Skip to content

Create Official Receipt

simitben edited this page Oct 16, 2025 · 8 revisions

Using CURL in terminal console to insert the Office Receipt data.(* If there is no data in the data column, user may direct remove the column from the insert data array.)

curl --header "Content-Type: application/x-www-form-urlencoded" \
--request POST \
--data '
{
    "action": "createOfficialReceipt",
    "module": "sales",
    "token": "simit_5d6ce44404688-30487",
    "uid": "admin",
    "organization_code": "SIMIT",
    "branch_code": "HQ",
    "data": {
        "headerarr": {
            "document_no": "API-ARCN-00001",
            "document_refno": "API_DOC_TEST",
            "document_date": "2019-09-02",
            "document_status": "D",
            "document_prepareby": "admin",
            "document_desc": "DOCUMENT CREATED FROM API",
            "document_note": "ADDITIONAL NOTE",
            "document_reason": "",
            "document_glmemo": "ADDITIONAL GLMEMO",
            "accounts_code": "11-1000",
            "bpartner_no": "S0001",
            "bpartner_name": "",
            "billcontacts_name": "",
            "billcontacts_hp": "",
            "billaddress_street1": "",
            "billaddress_street2": "",
            "billaddress_street3": "",
            "billaddress_street4": "",
            "billaddress_postcode": "",
            "billaddress_city": "",
            "billaddress_area": "",
            "billaddress_country": "",
            "shipaddress_street1": "",
            "shipaddress_street2": "",
            "shipaddress_street3": "",
            "shipaddress_street4": "",
            "shipaddress_postcode": "",
            "shipaddress_city": "",
            "shipaddress_area": "",
            "shipaddress_country": "",
            "shippinginfo": "",
            "shipcontacts_name": "",
            "shipcontacts_hp": "",
            "totalamt": "100",
            "totalamt_local": "100",
            "totaltaxamt": "",
            "totaltaxamt_local": "",
            "totalnetamt": "100",
            "totalnetamt_local": "100",
            "salesagent_name": "",
            "terms_name": "",
            "terms_day": "",
            "currency_code": "MYR",
            "currency_rate": "1",
            "document_trackdate": "0000-00-00",
            "document_tracktype": "",
            "document_trackremark": "",
            "document_trackupdated": "0000-00-00 00:00:00",
            "document_trackupdatedby": "",
            "track1_code": "",
            "track2_code": "",
            "track3_code": "",
            "track4_code": "",
            "track5_code": "",
            "isprinted": "0",
            "isop": "0",
            "isimport": "0",
            "filling_date": "2019-08-06",
            "filingdatelastchangebyuser": "admin",
            "created": "2019-08-06 12:04:36",
            "createdby": "admin",
            "updated": "2019-08-06 12:04:36",
            "updatedby": "admin",
            "organization_code": "SIMIT",
            "branch_code": "HQ",
            "rounding_amount": "0.00"
        },
        "linearr": [
            {
                "documentline_seq": "10",
                "documentline_desc": "",
                "documentline_promisedate": "0000-00-00",
                "item_code": "",
                "item_name": "TEST ITEM 1",
                "quantity": "1",
                "basequantity": "1",
                "uom_code": "",
                "baseuom_code": "",
                "unitprice": "100",
                "unitprice_local": "100",
                "discount": "",
                "discount_amt": "",
                "amount_sub": "100",
                "amount_sub_local": "100",
                "amount_tax": "",
                "amount_tax_local": "",
                "amount_netttotal": "100",
                "amount_netttotal_local": "100",
                "accounts_code": "11-1000",
                "isinclusive": "0",
                "tax_name": "",
                "tax_rate": "",
                "taxaccounts_id": "",
                "msic_code": "",
                "serialno": "",
                "batchno": "",
                "lotno": "",
                "track1_code": "",
                "track2_code": "",
                "track3_code": "",
                "track4_code": "",
                "track5_code": "",
                "customfield1": "",
                "customfield2": "",
                "customfield3": "",
                "created": "2019-08-06 12:04:36",
                "createdby": "admin",
                "updated": "2019-08-06 12:04:36",
                "updatedby": "admin",
                "isprint": "0",
                "isremark": "0",
                "linedocument_no": "",
                "inventorydebitacc_id": "",
                "inventorycreditacc_id": "",
                "syscalgstamt": "",
                "taxupdatedby": "",
                "inventorycost": "",
                "othercost": "",
                "hscode_code": ""
            },
            {
                "documentline_seq": "20",
                "documentline_desc": "",
                "documentline_promisedate": "0000-00-00",
                "item_code": "",
                "item_name": "TEST ITEM 2",
                "quantity": "1",
                "basequantity": "1",
                "uom_code": "",
                "baseuom_code": "",
                "unitprice": "100",
                "unitprice_local": "100",
                "discount": "",
                "discount_amt": "",
                "amount_sub": "100",
                "amount_sub_local": "100",
                "amount_tax": "",
                "amount_tax_local": "",
                "amount_netttotal": "100",
                "amount_netttotal_local": "100",
                "accounts_code": "11-1000",
                "isinclusive": "0",
                "tax_name": "",
                "tax_rate": "",
                "taxaccounts_id": "",
                "msic_code": "",
                "serialno": "",
                "batchno": "",
                "lotno": "",
                "track1_code": "",
                "track2_code": "",
                "track3_code": "",
                "track4_code": "",
                "track5_code": "",
                "customfield1": "",
                "customfield2": "",
                "customfield3": "",
                "created": "2019-08-06 12:04:36",
                "createdby": "admin",
                "updated": "2019-08-06 12:04:36",
                "updatedby": "admin",
                "isprint": "0",
                "isremark": "0",
                "linedocument_no": "",
                "inventorydebitacc_id": "",
                "inventorycreditacc_id": "",
                "syscalgstamt": "",
                "taxupdatedby": "",
                "inventorycost": "",
                "othercost": "",
                "hscode_code": ""
            }
        ]
    }
}
' \
https://simbiz_system_url/simbiz/api.php

The available field for insert Office Receipt Data

Office Receipt Header Data

No Field Name Data Type (Size) Required Description
1 document_no varchar(255) Y Office Receipt document number
2 document_refno varchar(255) Office Receipt reference number
3 document_date date Office Receipt document date
4 document_status varchar(30) Office Receipt document status
5 document_prepareby varchar(50) Preparer of the document
6 document_desc text Office Receipt description
7 document_note text Office Receipt document note
8 document_reason varchar(255) Office Receipt Void reason
9 document_glmemo varchar(255) Office Receipt document GL memo
10 accounts_code varchar(50) Y Office Receipt Account Code
11 bpartner_no varchar(50) Office Receipt business partner number
12 bpartner_name varchar(255) Office Receipt business partner name
13 payeetype varchar(255) Payment Voucher payee type ("others"/"bpartner")
14 paidfrom_to varchar(255) Payment Voucher Paid From To
15 billcontacts_name varchar(255) Office Receipt Bill Contact Name
16 billcontacts_hp varchar(255) Office Receipt bill contact handphone number
17 billaddress_street1 varchar(255) Office Receipt bill address street 1
18 billaddress_street2 varchar(255) Office Receipt bill address street 2
19 billaddress_street3 varchar(255) Office Receipt bill address street 3
20 billaddress_street4 varchar(255) Office Receipt bill address street 4
21 billaddress_postcode varchar(50) Office Receipt bill address postcode
22 billaddress_city varchar(50) Office Receipt bill address city
23 billaddress_area varchar(50) Office Receipt bill address area
24 billaddress_country varchar(50) Office Receipt bill address country
25 shipaddress_street1 varchar(255) Office Receipt ship address street 1
26 shipaddress_street2 varchar(255) Office Receipt ship address street 2
27 shipaddress_street3 varchar(255) Office Receipt ship address street 3
28 shipaddress_street4 varchar(255) Office Receipt ship address street 4
29 shipaddress_postcode varchar(50) Office Receipt ship address postcode
30 shipaddress_city varchar(50) Office Receipt ship address city
31 shipaddress_area varchar(50) Office Receipt ship address area
32 shipaddress_country varchar(50) Office Receipt ship address country
33 shippinginfo varchar(255) Office Receipt shipping info
34 shipcontacts_name varchar(255) Office Receipt shipping contact name
35 shipcontacts_hp varchar(50) Office Receipt shipping contact handphone
36 totalamt decimal(22,2) Office Receipt total amount
37 totalamt_local decimal(22,2) Office Receipt total amount in local currency
38 totaltaxamt decimal(22,2) Office Receipt total tax amount
39 totaltaxamt_local decimal(22,2) Office Receipt total tax amount in local currency
40 totalnetamt decimal(22,2) Office Receipt total net amount (amt + tax)
41 totalnetamt_local decimal(22,2) Office Receipt total net amount in local currency
42 salesagent_name varchar(255) Office Receipt sales agent
43 terms_name varchar(255) Office Receipt term name
44 terms_day int(11) Office Receipt term day
45 currency_code varchar(255) Office Receipt currency code
46 currency_rate decimal(14,8) NULL Office Receipt currency rate
47 document_trackdate date [1970-01-01] Office Receipt track date
48 document_tracktype varchar(100) Office Receipt track type
49 document_trackremark text Office Receipt track remark
50 document_trackupdated datetime Office Receipt track last update date time
51 document_trackupdatedby varchar(50) Office Receipt track last update by
52 track1_code varchar(255) Office Receipt track 1 code
53 track2_code varchar(255) Office Receipt track 2 code
54 track3_code varchar(255) Office Receipt track 3 code
55 track4_code varchar(255) Office Receipt track 4 code
56 track5_code varchar(255) Office Receipt track 5 code
57 isprinted smallint(1) Office Receipt is allow print out in the print format (Yes[1]/No[0])
58 isop smallint(1) [0]
59 isimport smallint(1)
60 filling_date date Office Receipt filling Date
61 filingdatelastchangebyuser varchar(50) Office Receipt filling Date last updated user
62 created datetime Office Receipt created date in the system
63 createdby varchar(50) Office Receipt creator
64 updated datetime Office Receipt last updated date
65 updatedby varchar(50) Office Receipt last updated user
66 organization_code varchar(10) Office Receipt was created under which organization
67 branch_code varchar(40) Office Receipt was created under which branch
68 process_auto_knockoff smallint(1) Option to procress auto knockoff with FIFO method (1 for turn on / 0 for turn off)

Office Receipt Line Data

No Field Name Data Type (Size) Required Description
1 documentline_seq smallint(6) Office Receipt's document line Sequence No
2 documentline_desc text Office Receipt's Line description
3 documentline_promisedate date Office Receipt's line promise date
4 item_code varchar(255) Office Receipt's line item code
5 item_name varchar(255) Office Receipt's line item name
6 quantity decimal(28,8) Office Receipt's line item quantity
7 basequantity decimal(28,8) Office Receipt's line item base quantity
8 uom_code varchar(255) Office Receipt's line item UOM
9 baseuom_code varchar(255) Office Receipt's line item base UOM
10 accounts_code varchar(50) Y Office Receipt's line item account code
11 unitprice decimal(24,4) Office Receipt's line item unit price
12 unitprice_local decimal(24,4) Office Receipt's line item unit price in local currency
13 discount varchar(255) Office Receipt's line item discount percentage
14 discount_amt decimal(24,2) Office Receipt's line item discount amount
15 amount_sub decimal(22,2) Office Receipt's line sub amount (unitprice * quantity)
16 amount_sub_local decimal(22,2) Office Receipt's line sub amount in local currency
17 amount_tax decimal(22,2) Office Receipt's line tax amount
18 amount_tax_local decimal(22,2) Office Receipt's line tax amount in local currency
19 amount_netttotal decimal(22,2) Office Receipt's line net total (sub amount + tax amount)
20 amount_netttotal_local decimal(22,2) Office Receipt's line net total in local currency
21 isinclusive smallint(11) Is Inclusive tax? (Yes[1]/No[0])
22 tax_name varchar(255) Office Receipt's line tax name
23 tax_rate decimal(10,4) Office Receipt's line tax rate
24 taxaccounts_id varchar(50) Office Receipt's line tax account
25 msic_code varchar(30) Office Receipt's line MSIC code
26 serialno text NULL Office Receipt's line item's serial number
27 batchno varchar(255) Office Receipt's line item's batch number
28 lotno varchar(255) Office Receipt's line item's lot number
29 track1_code varchar(255) Office Receipt's line track 1 code
30 track2_code varchar(255) Office Receipt's line track 2 code
31 track3_code varchar(255) Office Receipt's line track 3 code
32 track4_code varchar(255) Office Receipt's line track 4 code
33 track5_code varchar(255) Office Receipt's line track 5 code
34 customfield1 varchar(255) Office Receipt's line custom field 1
35 customfield2 varchar(255) Office Receipt's line custom field 2
36 customfield3 varchar(255) Office Receipt's line custom field 3
37 created datetime Office Receipt's line created date in the system
38 createdby varchar(50) Office Receipt's line creator
39 updated datetime Office Receipt's line last updated date
40 updatedby varchar(50) Office Receipt's line last updated user
41 isprint smallint(1) [1] Office Receipt's line is allow print out in the print format? (Yes[1]/No[0])
42 isremark int(11) Is remark? (Yes[1]/No[0])
43 inventorydebitacc_id varchar(50)
44 inventorycreditacc_id varchar(50)
45 syscalgstamt decimal(14,2)
46 taxupdatedby varchar(50)
47 inventorycost decimal(22,2) NULL Office Receipt's line item's inventory cost
48 othercost decimal(22,2) NULL Office Receipt's line item's landing cost
49 hscode_code varchar(50) Office Receipt's line item's HS code

Clone this wiki locally