Finance Integration (Voucher)
ShipX has a built in webhook function which sends integration details for the entire BaseCompany. This section describes the Finance aspects of the integration detail.
Generate a formatted report for each invoice when approving or deleting an invoice.
To setup, make sure the following configuration exists in Manage -> Integrate -> Details
By setting this meta data, the system will post ALL finance vouchers with the following sample:
- baseUrl - the url where the system will make a POST request to.
- headers - this information will be included in the headers for any sort of auth.
- emailTo - list of email address that will receive the report (additional email should be separated by ","), this could be override by API's configuration. Ex: emailTo: "a@email.com,b@gmail.com,c@mail.com"
A sample body/voucher information can be found here: https://pastebin.com/Nfie8Xd9
Tax Rounding and Exchange Rate Rounding Support
In ShipX, vouchers compute taxRounding and exchangeRounding values to 6 decimal places. It is stored in a voucher and computed when submitted. Users should use this field to display the voucher documentCreator template. The fields are computed by summing the rounded line items, and subtract with the voucher.total value rounded to 2 decimal places.
Example:
Since most integration does not support having tax and exchange rounding field when sending voucher headers, we send the rounding as a voucherItem to ensure the invoice computes accurately. To ensure the system sends the correct GL code, one would need to create a Charge Item and tag it as isRoundingTax and isRoundingExchangeRate accordingly. If there is no ChargeItem with both these tags, and there is a rounding error, the system will bomb as such: ChargeItem - no isRoundingExchangeRate tag found. Please add the tag to one chargeItem.
Internal Branch GL Code Support
The GL Code used on the report is default to the Expense Code (Cost Details) and Revenue Code (Sell Details) in Charge Item Details.
Voucher's inter GL Code will be used when the transact company has tag "Inter Branch" and the invoice item has inter branch GL Code setup,
To use a seperate GL Codes for internal branch on a existing company, you need to:
- Add "Inter Branch" tag in Company Details
- Create relevant GL Code for expenses and revenue. In the example below, I have added "INTBR_1111" as Inter Branch Expense Code and "INTBR_0000" as Inter Branch Revenue Code
- After the GL Codes is created. Go to Charge Item -> select one of the cost that supports inter branch
- Add the newly added GL Code into Charge Item Details. Now the webhook report will this CODE instead of the original expense/revenue code for inter branch
Report format
- supports 4 types of report: APIN, APCN, ARIN, ARCN
- consists of 1 MASTER Header data and at least 1 Details data based on number of voucher
ex: bottom is inter branch with GL Code: INTBR_0000 instead of the usual 0000