In order to enable the multi-currency feature for AccountRight Live files, we have released changes to below Sale endpoints:
- Sale/Invoice/Item
- Sale/Invoice/Service
- Sale/Order/Item
- Sale/Order/Service
- Sale/CustomerPayment
- Sale/CustomerPayment/CalculateDiscountsFees
- Sale/CustomerPayment/RecordWithDiscountsAndFees
Additional properties are introduced to support the Multi-currency feature for those endpoints. In order to be able to use this functionality, there are a few conditions that the AccountRight user must meet:
- The file must be in version 2019.4.
- The file must be in the Premier family.
For multi-currency enabled records, the value in Local-currency related properties, e.g. Total, UnitPrice, etc. will be ignored. On the other hand, the Multi-currency related properties, e.g. TotalForeign, UnitPriceForeign, etc. will be ignored on Local-currency records as vice-versa.
Sample Post Requests:
*Bold = Added Multi-currency Property.
*Red Bold = Added Mandatory Multi-currency Property for Post and Put.
Local | Foreign | |
Sale/Invoice/Item | { "Number": "SJ000092", "Date": "2013-08-30T19:00:59.0430000+10:00", "CustomerPurchaseOrderNumber": 112, "Customer": { "UID": "457c4932-ddcf-40c6-80f7-e7f11c34dcca", "DisplayID": "CUS000003" }, "PromisedDate": "2013-09-30T19:00:59.0430000+10:00", "Lines": [ { "Type": "Transaction", "Description": "20 Litres South Spring", "ShipQuantity": 2, "UnitPrice": 27.5, "DiscountPercent": 0, "Total": 55, "Item": { "UID": "c4085d83-b43e-4d8d-b32b-b136ce8ca16a" }, "Job": null, "TaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" } }, { "Type": "Transaction", "Description": "12 Litres Orange Carbon", "ShipQuantity": 1, "UnitPrice": 17.5, "DiscountPercent": 0, "Total": 17.5, "Item": { "UID": "7795a851-05bf-42c7-a42f-0386521568fc" }, "Job": null, "TaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" } } ], "ShipToAddress": "Cash Sales", "Terms": { "PaymentIsDue": "DayOfMonthAfterEOM", . . "MonthlyChargeForLatePayment": 0 }, "IsTaxInclusive": true, "Freight": 0, "FreightTaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" }, "Category": { "UID": "b211a2a3-0be9-477c-940e-1c8bac139cf1" }, "Salesperson": null, "Comment": "Thank you!", . . . "Order": null, "OnlinePaymentMethod": "All" } |
{ "Number": "SJ000092", "Date": "2013-08-30T19:00:59.0430000+10:00", "CustomerPurchaseOrderNumber": 112, "Customer": { "UID": "457c4932-ddcf-40c6-80f7-e7f11c34dcca", "DisplayID": "CUS000003" }, "PromisedDate": "2013-09-30T19:00:59.0430000+10:00", "Lines": [ { "Type": "Transaction", "Description": "20 Litres South Spring", "ShipQuantity": 2, "UnitPriceForeign": 17.5, "DiscountPercent": 0, "DiscountForeign": 0, "TotalForeign": 35, "Item": { "UID": "c4085d83-b43e-4d8d-b32b-b136ce8ca16a" }, "Job": null, "TaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" } }, { "Type": "Transaction", "Description": "12 Litres Orange Carbon", "ShipQuantity": 1, "UnitPriceForeign": 17.5, "DiscountPercent": 0, "DiscountForeign": 0, "TotalForeign": 17.5, "Item": { "UID": "7795a851-05bf-42c7-a42f-0386521568fc" }, "Job": null, "TaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" } } ], "ShipToAddress": "Cash Sales", "Terms": { "PaymentIsDue": "DayOfMonthAfterEOM", . . "MonthlyChargeForLatePayment": 0 }, "IsTaxInclusive": true, "FreightForeign": 0, "FreightTaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" }, "Category": { "UID": "b211a2a3-0be9-477c-940e-1c8bac139cf1" }, "Salesperson": null, "Comment": "Thank you!", . . . "OnlinePaymentMethod": "All", "ForeignCurrency": { "UID": "7a273963-b895-41d8-8009-41fd092cc5b4" }, "CurrencyExchangeRate": 1 } |
Sale/Order/Item | { "Number": 15, "Date": "2014-05-29T00:00:00.0000000+10:00", "ShipToAddress": "A-Z Stationery Supplies 22 Smith Street Carlingford NSW 2056 Australia", "CustomerPurchaseOrderNumber": null, "Customer": { "UID": "d61a6a86-453a-48bf-9402-6eb6b4ea23cf", "DisplayID": "CUS000001" }, "Terms": { "PaymentIsDue": "DayOfMonthAfterEOM", . . "MonthlyChargeForLatePayment": 8.5 }, "IsTaxInclusive": true, "Lines": [ { "Type": "Transaction", "Description": "Cooler Filter Large", "ShipQuantity": 5, "UnitPrice": 67.95, "DiscountPercent": 0, "Total": 339.75, "Item": { "UID": "d5ab0fd1-3bf4-4230-bbaf-90b26ea9afda" }, "Job": null, "TaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" } } ], "Freight": 0, "FreightTaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" }, "Category": { "UID": "b211a2a3-0be9-477c-940e-1c8bac139cf1" }, "Salesperson": null, . . . "ReferralSource": "Brochure" } |
{ "Number": 15, "Date": "2014-05-29T00:00:00.0000000+10:00", "ShipToAddress": "A-Z Stationery Supplies 22 Smith Street Carlingford NSW 2056 Australia", "CustomerPurchaseOrderNumber": null, "Customer": { "UID": "d61a6a86-453a-48bf-9402-6eb6b4ea23cf", "DisplayID": "CUS000001" }, "Terms": { "PaymentIsDue": "DayOfMonthAfterEOM", . . "MonthlyChargeForLatePayment": 8.5 }, "IsTaxInclusive": true, "Lines": [ { "Type": "Transaction", "Description": "Cooler Filter Large", "ShipQuantity": 5, "UnitPrice": 67.95, "UnitPriceForeign": 67.95, "DiscountPercent": 0, "Total": 339.75, "TotalForeign": 339.75, "Item": { "UID": "d5ab0fd1-3bf4-4230-bbaf-90b26ea9afda" }, "Job": null, "TaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" }, "RowVersion": -8814670370670903000 } ], "Freight": 0, "FreightForeign": 0, "FreightTaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" }, "Category": { "UID": "b211a2a3-0be9-477c-940e-1c8bac139cf1" }, "Salesperson": null, . . . "ReferralSource": "Brochure", "ForeignCurrency": { "UID": "7a273963-b895-41d8-8009-41fd092cc5b4" }, "CurrencyExchangeRate": 1, "RowVersion": -8958785558746759000 } |
Sale/Invoice/Service | { "Number": 56, "Date": "2019-09-05T00:00:00.0000000+10:00", "CustomerPurchaseOrderNumber": null, "Customer": { "UID": "d8f7b898-cae2-4e6e-8887-6a8f10b42d74", "DisplayID": "*None" }, "PromisedDate": null, "BalanceDueAmount": 100, "Lines": [ { "Type": "Transaction", "Description": "Service Line A", "Total": 50, "Account": { "UID": "4d2e0559-4f23-4f17-be6e-9020c2d618eb" }, "Job": null, "TaxCode": { "UID": "d1a65200-8ae1-4a50-a350-bbcaeaacc35f" } }, { "Type": "Transaction", "Description": "Service Line B", "Total": 25, "Account": { "UID": "4d2e0559-4f23-4f17-be6e-9020c2d618eb" }, "Job": null, "TaxCode": { "UID": "d1a65200-8ae1-4a50-a350-bbcaeaacc35f" } } ], "Status": "Open", "ShipToAddress": "CustomerAUD", "Terms": { "PaymentIsDue": "DayOfMonthAfterEOM", . . "MonthlyChargeForLatePayment": 1 }, "IsTaxInclusive": true, "Freight": 25, "FreightTaxCode": { "UID": "d1a65200-8ae1-4a50-a350-bbcaeaacc35f" }, "Category": null, . . . "OnlinePaymentMethod": "All" } |
{ "Number": 57, "Date": "2019-09-05T00:00:00.0000000+10:00", "CustomerPurchaseOrderNumber": null, "Customer": { "UID": "2ee393f5-d1f1-42e4-93c2-a14aa7c86666", "DisplayID": "*None" }, "PromisedDate": null, "Lines": [ { "Type": "Transaction", "Description": "Service Line A", "TotalForeign": 50, "Account": { "UID": "4d2e0559-4f23-4f17-be6e-9020c2d618eb" }, "Job": null, "TaxCode": { "UID": "6fad9280-8213-4ecf-84e4-016607f89e00" } }, { "Type": "Transaction", "Description": "Service Line B", "TotalForeign": 25, "Account": { "UID": "4d2e0559-4f23-4f17-be6e-9020c2d618eb" }, "Job": null, "TaxCode": { "UID": "6fad9280-8213-4ecf-84e4-016607f89e00" } } ], "ShipToAddress": "CustomerCOP", "Terms": { "PaymentIsDue": "DayOfMonthAfterEOM", . . "MonthlyChargeForLatePayment": 1 }, "IsTaxInclusive": true, "FreightForeign": 25, "FreightTaxCode": { "UID": "6fad9280-8213-4ecf-84e4-016607f89e00" }, "Category": null, . . . "OnlinePaymentMethod": "All", "ForeignCurrency": { "UID": "f4b2e046-39cd-44fb-a736-5ae82e052427" }, "CurrencyExchangeRate": 1.5 } |
Sale/Order/Service | { "Number": 1095, "Date": "2014-08-21T00:00:00.0000000+10:00", "SupplierInvoiceNumber": "AAA000005899813", "Supplier": { "UID": "63b984e5-241e-4c1a-bfe1-7868a69f5e29", "DisplayID": "SUPP000004" }, "ShipToAddress": "Clearwater Pty. Ltd. 25 Spring Street Blackburn VIC 3130", "Terms": { "PaymentIsDue": "DayOfMonthAfterEOM", . . "DiscountForEarlyPayment": 2 }, "IsTaxInclusive": true, "Lines": [ { "Type": "Transaction", "Description": "Stationery", "Total": 29.7, "Account": { "UID": "4d2e0559-4f23-4f17-be6e-9020c2d618eb" }, "Job": { "UID": "3777c4f0-48f7-40ab-aaea-3cec1433eef0" }, "TaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" } } ], "IsReportable": false, "Freight": 0, "FreightTaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" }, "Category": { "UID": "b211a2a3-0be9-477c-940e-1c8bac139cf1" }, "Salesperson": { "UID": "5383ff72-4bb6-4d8b-bcf0-8b10857455d8", "DisplayID": "SP000001" }, "Comment": "Thank you!", . . "OrderDeliveryStatus": "Print" } |
{ "Number": 1095, "Date": "2014-08-21T00:00:00.0000000+10:00", "SupplierInvoiceNumber": "AAA000005899813", "Supplier": { "UID": "63b984e5-241e-4c1a-bfe1-7868a69f5e29", "DisplayID": "SUPP000004" }, "ShipToAddress": "Clearwater Pty. Ltd. 25 Spring Street Blackburn VIC 3130", "Terms": { "PaymentIsDue": "DayOfMonthAfterEOM", . . "DiscountForEarlyPayment": 2 }, "IsTaxInclusive": true, "Lines": [ { "Type": "Transaction", "Description": "Stationery", "TotalForeign": 29.7, "Account": { "UID": "4d2e0559-4f23-4f17-be6e-9020c2d618eb" }, "Job": { "UID": "3777c4f0-48f7-40ab-aaea-3cec1433eef0" }, "TaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" } } ], "IsReportable": false, "FreightForeign": 0, "FreightTaxCode": { "UID": "38a37ae8-565c-46f8-ad4a-2a87069607f8" }, "Category": { "UID": "b211a2a3-0be9-477c-940e-1c8bac139cf1" }, "Salesperson": { "UID": "5383ff72-4bb6-4d8b-bcf0-8b10857455d8", "DisplayID": "SP000001" }, "Comment": "Thank you!", . . "OrderDeliveryStatus": "Print", "ForeignCurrency": { "UID": "f4b2e046-39cd-44fb-a736-5ae82e052427" }, "CurrencyExchangeRate": 0.245 } |
Local | Foreign | |
Sale/CustomerPayment | { "DepositTo": "Account", "Account": { "UID": "7772dc25-5ee6-4a61-994e-28c04b8a35fc" }, "Customer": { "UID": "d61a6a86-453a-48bf-9402-6eb6b4ea23cf", "DisplayID": "CUS000001" }, "ReceiptNumber": "CR000022", "Date": "2014-03-26T00:00:00.0000000+11:00", "AmountReceived": 46.2, "PaymentMethod": "Visa", "Memo": "Payment; A-Z Stationery Supplies", "Invoices": [ { "Number": 28, "UID": "962db553-3a04-43c6-a45e-d77d3d94bf87", "AmountApplied": 46.2, "Type": "Invoice" } ] } |
{ "DepositTo": "Account", "Account": { "UID": "7772dc25-5ee6-4a61-994e-28c04b8a35fc" }, "Customer": { "UID": "d61a6a86-453a-48bf-9402-6eb6b4ea23cf", "DisplayID": "CUS000001" }, "ReceiptNumber": "CR000022", "Date": "2014-03-26T00:00:00.0000000+11:00", "AmountReceivedForeign": 92.4, "PaymentMethod": "Visa", "Memo": "Payment; A-Z Stationery Supplies", "Invoices": [ { "Number": 28, "UID": "962db553-3a04-43c6-a45e-d77d3d94bf87", "AmountAppliedForeign": 92.4, "Type": "Invoice" } ], "ForeignCurrency": { "UID": "7a273963-b895-41d8-8009-41fd092cc5b4" }, "CurrencyExchangeRate": 2 } |
Sale/CustomerPayment/ RecordWithDiscountsAndFees |
{ "DepositTo": "Account", "Account": { "UID": "7772dc25-5ee6-4a61-994e-28c04b8a35fc" }, "Customer": { "UID": "63b984e5-241e-4c1a-bfe1-7868a69f5e29", "DisplayID": "CUS000003" }, "ReceiptNumber": 1569, "Date": "2014-11-05T00:00:00.0000000+11:00", "FinanceCharge": 0, "Memo": "Payment; Cash Sales", "Lines": [ { "Sale": { "UID": "895c0837-ed10-4277-ad1c-ab3294d39847" }, "AmountApplied": 69, "DiscountApplied": 5, "Type": "Invoice" }, { "Sale": { "UID": "172994f9-bd0a-41ee-8349-8ef68ac3be25" }, "AmountApplied": 3990, "DiscountApplied": 9.75, "Type": "Invoice" } ] } |
{ "DepositTo": "Account", "Account": { "UID": "7772dc25-5ee6-4a61-994e-28c04b8a35fc" }, "Customer": { "UID": "63b984e5-241e-4c1a-bfe1-7868a69f5e29", "DisplayID": "CUS000003" }, "ReceiptNumber": 1569, "Date": "2014-11-05T00:00:00.0000000+11:00", "FinanceChargeForeign": 0, "Memo": "Payment; Cash Sales", "Lines": [ { "Sale": { "UID": "895c0837-ed10-4277-ad1c-ab3294d39847" }, "AmountAppliedForeign": 69, "DiscountAppliedForeign": 5, "Type": "Invoice" }, { "Sale": { "UID": "172994f9-bd0a-41ee-8349-8ef68ac3be25" }, "AmountAppliedForeign": 3990, "DiscountAppliedForeign": 9.75, "Type": "Invoice" } ] } |
POST request method for Sale/CustomerPayment/CalculateDiscountsFees endpoint hasn't changed, though the response varies as below:
*Bold = Added Multi-currency Property.
Local | Foreign | |
Response | { "Items": [ { "RequestID": 1, "Sale": { "UID": "19bc3c39-a0c1-41c8-b406-fc433f1431c0", "Type": "Invoice" }, "PaymentDate": "2013-11-04T00:00:00.0000000+11:00", "Discount": 260, "DiscountExpiryDate": "2014-07-01T00:00:00.0000000+10:00", "FinanceCharge": 0, "BalanceDueDate": "2014-07-30T00:00:00.0000000+10:00", "BalanceDue": 5200 } ] } |
{ "Items": [ { "RequestID": 1, "Sale": { "UID": "19bc3c39-a0c1-41c8-b406-fc433f1431c0", "Type": "Invoice" }, "PaymentDate": "2013-11-04T00:00:00.0000000+11:00", "Discount": 260, "DiscountForeign": 260, "DiscountExpiryDate": "2014-07-01T00:00:00.0000000+10:00", "FinanceCharge": 0, "FinanceChargeForeign": 0, "BalanceDueDate": "2014-07-30T00:00:00.0000000+10:00", "BalanceDue": 5200, "BalanceDueForeign": 5200, "ForeignCurrency": { "UID": "7a273963-b895-41d8-8009-41fd092cc5b4", "Code": "HRK", "Name": "Croatian Kuna", "URI": "{cf_uri}/GeneralLedger/Currency/7a273963-b895-41d8-8009-41fd092cc5b4" }, "CurrencyExchangeRate": 1 } ] } |
Comments
0 comments
Article is closed for comments.