My Products
Help
alexandreveeck
CONTRIBUTOR **

Negative discountPercent when creating credit notes

by alexandreveeck

Hi 


I'm having a problem when creating credit notes. For example: 

When I send some line with discountPercent  20.0 and discountAmountInCurrency -52.2 the line on the credit note is created with -20.0 and -52.2 . I'd like the percentage to be positive. Is there a business rule on the API for that? 

 

Example of line:

{
"operation": "Insert",
"description": {
"value": ""
},
"quantity": {
"value": 1.0
},
"unitPriceInCurrency": {
"value": 271.0
},
"accountNumber": {
"value": "3011"
},
"uom": {
"value": "ST"
},
"discountPercent": {
"value": 20.0
},
"discountAmountInCurrency": {
"value": -54.2
},
"subaccount": [
{
"segmentId": 1,
"segmentValue": "60"
},
{
"segmentId": 2,
"segmentValue": "10231"
},
{
"segmentId": 3,
"segmentValue": "2"
}
]
}

1 REPLY 1
Accepted solution
Yıldırım
VISMA

by Yıldırım

Hello, "DiscountAmount" is calculated based on "DiscountPercent" of the unitPrice - Manual amount total. 
E.g: 

manualAmount = 300
discountPercent = 20 
discountAmount = 60 

 

So you should use one of them to adjust your discount if there is no automatic discount has been configured for either item or customer.