[Document] - List view

[ { "id": 34, "revision_display": "B", "revision": -1, "sub_revision": 2, "user_editable": false, "revision_editable": true, "status": 1, "status_name": "Pending Approval", "approval_status": 3, "approval_status_name": "Partially Approved", "approval_flow": [ { "role": 1, "approved_date": "2017-10-08", "approver": 3 }, { "role": 2, "approved_date": "", "approver": 3 } ], "preparer": 3, "preparer_name": "Pawarit Saengpreecharutn", "owner": 3, "owner_name": "Pawarit Saengpreecharutn", "assistant": null, "assistant_name": "-", "numbering_code": 2, "reserved_no": "PVR0139284382829", "approved_no": "PVR0139284382829", // ADDED "company": 1, "company_name": "Bizinterprise Co.,Ltd.", "company_address": "79/182 Life@Ratchadapisek Huaykwang Huaykwang Bangkok 10310", "company_tax_id": "1234567890123", "date": "2017-09-30", "date_display": "30 September 2017", // NOTE: Changed the attr name from "date_long" "sensitivity_level": 1, "sensitivity_level_name": "Confidential", "external_ref_no": "SR0139284382829", "ref_document_type": 31, "ref_document_id": 8, "ref_document_no": "SRR1COM01-0015", "product_list_divisible": true, "customer": 1, "customer_name": "Bizinterprise Co.,Ltd.", "customer_tax_id": "123456765432345", "customer_address": "1234567654 ถ.จรัญสนิทวงศ์", "delivery_point": { "address_type": 1, "address_id": 2, "address": "1234567654 ถ.จรัญสนิทวงศ์" }, "payment_term": 4, "payment_term_name": "N/30", "delivery_term": "FCA", "type": 1, "type_name": "Delivery Note | Payment Receipt | Tax invoice", "need_payment_info": true, "document_payments": [ // NOTE: Changed the attr name from "document_payments" { "id": 19, "cash_account": 1, "cash_account_name": "1234567890 - CASH_AC", "method": "1", "method_name": "Cash", "amount": "600000.00" } ], "payment_received_date": "2017-09-30", "payment_received_date_display": "30 September 2017", // NOTE: Changed the attr name from "payment_received_date_display" "remark": "", "currency": "THB", "need_storage_bins_info": true, "document_products": [ // NOTE: Changed the attr name from "document_payments" { // NOTE: redesigned "id": 6, "quantity": "7.00", "amount": "70.00", "order_product": { "id": 1, "product": { "id": 1, "name": "Oreo", "uom": "ชิ้น" }, "pricing_type": 1, "pricing_type_name": "A", "quantity": "10.00", "tax": "7.00", "unit_price": "100.00", "unit_discount": "10.00", "unit_discount_display_type": "percent", "amount": "100.00", "required_date": "2018-03-01", }, "storage_bin": 1, "storage_bin_name": "Dock 1" }, { "id": 7, "quantity": "3.00", "amount": "30.00", "order_product": { "id": 2, "product": { "id": 1, "name": "Oreo", "uom": "ชิ้น" }, "pricing_type": "", "quantity": "10.00", "tax": "7.00", "unit_price": "100.00", "unit_discount": "10.00", "unit_discount_display_type": "percent", "amount": "100.00", "required_date": "2018-03-01", "pricing_type_name": "Call" }, "storage_bin": 1, "storage_bin_name": "Dock 1" } ], "discount": 123.00, // ADDED "sub_total": 1234.00, // ADDED "tax": 12.00, // ADDED "grand_total": 1234.00, // ADDED "grand_total_in_words": "One thousand two hundred and thirty four baht", "rounding_changes_type": "precise" // ADDED, NOTE: It could be 'precise', 'round', 'up' (AKA rounded up) and 'down' (AKA round down). }, ]
The Sample API Result
Module name: Documents
Sample view: List view

6 Responses

I've added one more attribute named 'currency'. It comes from the associated sale-order of the current document.
approved_date should be in date format (not datetime) na kub
"approved_date": "2017-10-08 09:11:00 UTC" -> "2017-10-08"
date_long -> date_display
delivery_point: string
no -> reserved_no, approved_no
document_product_quantities -> document_products
document_payment_amounts -> document_payments

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.