CalculateDiscounts
Calculate discounts for supplier payments with terms on purchase bills.
Released
Updated
| URL | Supports |
|---|---|
/{cf_uri}/Purchase/SupplierPayment/CalculateDiscounts | |
| 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 bill line information to calculate discounts |
Items.RequestID | String | ID to uniquely identify a request within the collection |
Items.Purchase | object | Unique purchases transaction information |
Items.Purchase.UID | Guid (36) | Foreign Key : Unique guid identifier belonging to the bill object. |
Items.Purchase.Type | String | Purchase type, can consist of the following: Bill |
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 bill line information to calculate discounts |
Items.RequestID | String | ID to uniquely identify a request within the collection |
Items.Purchase | object | Unique purchases transaction information |
Items.Purchase.UID | Guid (36) | Foreign Key : Unique guid identifier belonging to the bill object. |
Items.Purchase.Type | String | Purchase type, can consist of the following: Bill |
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 bill. |
Items.DiscountForeign | Decimal (13.2) | Discount amount in foreign currency applicable to the bill. |
Items.DiscountExpiryDate | DateTime | Date the discount is valid until, format YYYY-MM-DD HH:MM:SS { 'Date': '2013-08-11 13:33:02' } |
Items.BalanceDueDate | DateTime | Date the purchase bill 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 bill. Please note: this bill balance does not include Discount amounts, to include these you'll need to calculate using the values returned. |
Items.BalanceDueForeign | Decimal (13.2) | Balance amount owing in foreign currency on the bill. Please note: this bill balance does not include DiscountForeign 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": "abdfba11-8988-4109-b0ac-a731588fa0c4",
"Type": "Bill"
},
{
"PaymentDate": "2013-11-04T00:00:00",
"Discount": 105,
"DiscountForeign": 105,
"DiscountExpiryDate": "2014-02-01T00:00:00",
"BalanceDueDate": "2014-02-28T00:00:00",
"BalanceDue": 1069,
"BalanceDueForeign": 1069,
"UID": "7a273963-b895-41d8-8009-41fd092cc5b4",
"Code": "HRK",
"Name": "Croatian Kuna",
"URI": "{cf_uri}/GeneralLedger/Currency/7a273963-b895-41d8-8009-41fd092cc5b4",
"CurrencyExchangeRate": 1
},
{
"RequestID": 1
}
]
}