Skip to main content

Good day,

I am trying to add an invoice in the Documents to Apply tab for a Credit Memo on the Payments & Applications (AR302000) screen via the API endpoint: {{base_url}}/entity/{{endpointName}}/{{endpointVersion}}/Payment

When I push through the applicable payload, I get the following error message: “The document is out of the balance.; curyOrigDocAmt: The document is out of the balance.

The slight mind scratcher here is; suppose I open the credit memo on the Payments & Applications screen and then manually click the Load Documents button on the screen, let the system load the invoice, and then save. If I remove that line, save it again, and then push through the same API request, I don’t get an error and the invoice shows up on the Documents to Apply tab.

What would be wrong with my initial attempt at adding this invoice line to the credit memo’s Documents to Apply detail section?


Request:

{
"Type": {
"value": "Credit Memo"
},
"ReferenceNbr": {
"value": "FTNHQ-C00023743"
},
"PaymentAmount": {
"value": 44.2100
},
"AppliedToDocuments": {
"value": 44.2100
},
"DocumentsToApply": e
{
"AmountPaid": {
"value": 44.2100
},
"BalanceWriteOff": {
"value": 0.0000
},
"CashDiscountTaken": {
"value": 0.0000
},
"DocType": {
"value": "Invoice"
},
"ReferenceNbr": {
"value": "FTNHQ-I00725049"
}
}
]
}

Response:

{
"id": "6c9d7f53-af75-ef11-b98a-ba2262cc143e",
"rowNumber": 1,
"note": {
"value": ""
},
"error": "The document is out of the balance.; curyOrigDocAmt: The document is out of the balance.",
"ApplicationDate": {
"value": "2024-08-19T00:00:00+02:00"
},
"AppliedToDocuments": {
"value": 88.42
},
"Branch": {
"value": "FTNHQ"
},
"CardAccountNbr": {},
"CashAccount": {},
"CurrencyID": {
"value": "ZAR"
},
"CustomerID": {
"value": "FTNHQ-233993"
},
"Description": {
"value": "Reversal of Incorrect Shipping Revenue - FTNHQ-I00725049"
},
"DocumentsToApply": e
{
"id": "adc182c5-af75-ef11-b98a-ba2262cc143e",
"rowNumber": 1,
"note": {
"value": ""
},
"AmountPaid": {
"value": 44.21
},
"BalanceWriteOff": {
"value": 0.0
},
"CashDiscountTaken": {
"value": 0.0
},
"CustomerOrder": {
"value": "REDACTED"
},
"Description": {
"value": "Magento Order REDACTED"
},
"DocType": {
"value": "Invoice"
},
"ReferenceNbr": {
"value": "FTNHQ-I00725049"
},
"WriteOffReasonCode": {
"value": "BALWOBADDEBT"
},
"custom": {},
"_links": {
"files:put": "REDACTED"
}
}
],
"Hold": {
"value": false
},
"LastModifiedDateTime": {
"value": "2024-09-18T13:15:48.764151+02:00"
},
"PaymentAmount": {
"value": 44.2100,
"error": "The document is out of the balance."
},
"PaymentMethod": {},
"PaymentRef": {},
"ProcessingCenterID": {},
"ReferenceNbr": {
"value": "FTNHQ-C00023743"
},
"SaveCard": {
"value": false
},
"Status": {
"value": "Open"
},
"Type": {
"value": "Credit Memo"
},
"custom": {},
"_links": {
"self": "REDACTED",
"files:put": "REDACTED"
}
}


 

Be the first to reply!

Reply