CalculateDiscountsFees
Calculate discounts and fees for customer payments associated with terms on sale invoices
Released
Updated
| URL | Supports |
|---|---|
/{cf_uri}/Sale/CustomerPayment/CalculateDiscountsFees | |
| The {guid} in the URL above is replaced with the unique ID for any given company file | |
Attribute Details
| Attribute | Type | Notes |
|---|---|---|
Items | array | An array of sale invoice line information to calculate fees and discount |
Items.RequestID | String | ID to uniquely identify a request within the collection |
Items.Sale | object | Sales invoice transaction information |
Items.Sale.UID | Guid (36) | Foreign Key : Unique guid identifier belonging to the invoice object. |
Items.Sale.Type | String | Invoice type, can consist of the following: Invoice |
Items.PaymentDate | DateTime | Date of payment, format YYYY-MM-DD HH:MM:SS { 'Date': '2013-08-11 13:33:02' } |
Items | array | An array of invoice line information to calculate fees and discount |
Items.RequestID | String | ID to uniquely identify a request within the collection |
Items.Sale | object | Sales invoice transaction information |
Items.Sale.UID | Guid (36) | Foreign Key : Unique guid identifier belonging to the invoice object. |
Items.Sale.Type | String | Invoice type, can consist of the following: Invoice |
Items.PaymentDate | DateTime | Date of payment, format YYYY-MM-DD HH:MM:SS { 'Date': '2013-08-11 13:33:02' } |
Items.Discount | Decimal (13.2) | Discount amount applicable to the invoice. |
Items.DiscountForeign | Decimal (13.2) | Discount amount applicable to the invoice in foreign currency. |
Items.DiscountExpiryDate | DateTime | Date the discount is valid until, format YYYY-MM-DD HH:MM:SS { 'Date': '2013-08-11 13:33:02' } |
Items.FinanceCharge | Decimal (13.2) | Finance Charge amount applicable to the invoice. |
Items.FinanceChargeForeign | Decimal (13.2) | Finance Charge amount applicable to the invoice in foreign currency. |
Items.BalanceDueDate | DateTime | Date the invoice balance is due, format YYYY-MM-DD HH:MM:SS { 'Date': '2013-08-11 13:33:02' } |
Items.BalanceDue | Decimal (13.2) | Balance amount owing on the invoice. Please note: this invoice balance does not include either Discount or FinanceCharge amounts, to include these you'll need to calculate using the values returned. |
Items.BalanceDueForeign | Decimal (13.2) | Balance amount owing on the invoice in foreign currency. Please note: this invoice balance does not include either DiscountForeign or FinanceChargeForeign amounts, to include these you'll need to calculate using the values returned. |
Items.ForeignCurrency | object | Foreign currency information in the transaction. |
Items.ForeignCurrency.UID | Guid (36) | Foreign Key : Unique identifier for the currency in the form of a guid. |
Items.ForeignCurrency.Code | String (3) | The currency code. |
Items.ForeignCurrency.Name | String | The full name of the currency. |
Items.ForeignCurrency.URI | String | Uniform resource identifier associated with the currency object. |
Items.CurrencyExchangeRate | Decimal | Currency exchange rate in the associated currency object. |
Response
Request
{
"Items\" : [": [
{
"UID": "19bc3c39-a0c1-41c8-b406-fc433f1431c0",
"Type": "Invoice"
},
{
"PaymentDate": "2013-11-04T00:00:00",
"Discount": 260,
"DiscountExpiryDate": "2014-07-01T00:00:00",
"FinanceCharge": 0,
"BalanceDueDate": "2014-07-30T00:00:00",
"BalanceDue": 5200
},
{
"RequestID": 1
}
]
}