to get a personalized navigation.
to get a personalized navigation.
In a program, we are trying to update customer invoice lines by assigning a deferral key, start date for deferral, and end date for deferral. We use the endpoint [PUT] https://integration.visma.net/API/controller/api/v1/customerinvoice/{invoiceNumber} and send a JSON payload as shown below.
Bug: When we attempt to update more than 5 lines, only the first lines are assigned the deferral key, while all lines are assigned the start and end dates for deferral. The issue has been reproduced in the demo environment (see attachment). This applies to deferral keys with the accounting method "Flexible by periods, proportional over days."
Hi Charlotte! Unfortunately we do not see a JSON payload or attached screenshots. Can you add these? Thx in advance 🙂
{ "ReferenceNumber": null, "Note": { "Value": "" }, "DocumentDate": null, "CurrencyId": null, "CreditTermsId": null, "Hold": null, "BranchNumber": null, "ExternalReference": null, "CustomerRefNumber": null, "InvoiceText": null, "ExchangeRate": null, "CustomerNumber": null, "SalesPerson": null, "LocationId": null, "InvoiceLines": [ { "InventoryNumber": null, "Description": null, "Quantity": null, "UnitPriceInCurrency": null, "Note": null, "Subaccount": null, "VatCodeId": null, "AccountNumber": null, "Operation": "Update", "LineNumber": { "Value": 1 }, "ManualDiscount": null, "DiscountPercent": null, "DiscountAmountInCurrency": null, "DeferralCode": { "Value": "06I1" }, "TermStartDate": { "Value": "2025-01-01T00:00:00" }, "TermEndDate": { "Value": "2025-12-31T00:00:00" } }, { "InventoryNumber": null, "Description": null, "Quantity": null, "UnitPriceInCurrency": null, "Note": null, "Subaccount": null, "VatCodeId": null, "AccountNumber": null, "Operation": "Update", "LineNumber": { "Value": 2 }, "ManualDiscount": null, "DiscountPercent": null, "DiscountAmountInCurrency": null, "DeferralCode": { "Value": "06I1" }, "TermStartDate": { "Value": "2025-01-01T00:00:00" }, "TermEndDate": { "Value": "2025-12-31T00:00:00" } }, { "InventoryNumber": null, "Description": null, "Quantity": null, "UnitPriceInCurrency": null, "Note": null, "Subaccount": null, "VatCodeId": null, "AccountNumber": null, "Operation": "Update", "LineNumber": { "Value": 3 }, "ManualDiscount": null, "DiscountPercent": null, "DiscountAmountInCurrency": null, "DeferralCode": { "Value": "06I1" }, "TermStartDate": { "Value": "2025-01-01T00:00:00" }, "TermEndDate": { "Value": "2025-12-31T00:00:00" } }, { "InventoryNumber": null, "Description": null, "Quantity": null, "UnitPriceInCurrency": null, "Note": null, "Subaccount": null, "VatCodeId": null, "AccountNumber": null, "Operation": "Update", "LineNumber": { "Value": 4 }, "ManualDiscount": null, "DiscountPercent": null, "DiscountAmountInCurrency": null, "DeferralCode": { "Value": "06I1" }, "TermStartDate": { "Value": "2025-01-01T00:00:00" }, "TermEndDate": { "Value": "2025-12-31T00:00:00" } }, { "InventoryNumber": null, "Description": null, "Quantity": null, "UnitPriceInCurrency": null, "Note": null, "Subaccount": null, "VatCodeId": null, "AccountNumber": null, "Operation": "Update", "LineNumber": { "Value": 5 }, "ManualDiscount": null, "DiscountPercent": null, "DiscountAmountInCurrency": null, "DeferralCode": { "Value": "06I1" }, "TermStartDate": { "Value": "2025-01-01T00:00:00" }, "TermEndDate": { "Value": "2025-12-31T00:00:00" } }, { "InventoryNumber": null, "Description": null, "Quantity": null, "UnitPriceInCurrency": null, "Note": null, "Subaccount": null, "VatCodeId": null, "AccountNumber": null, "Operation": "Update", "LineNumber": { "Value": 6 }, "ManualDiscount": null, "DiscountPercent": null, "DiscountAmountInCurrency": null, "DeferralCode": { "Value": "06I1" }, "TermStartDate": { "Value": "2025-01-01T00:00:00" }, "TermEndDate": { "Value": "2025-12-31T00:00:00" } }, { "InventoryNumber": null, "Description": null, "Quantity": null, "UnitPriceInCurrency": null, "Note": null, "Subaccount": null, "VatCodeId": null, "AccountNumber": null, "Operation": "Update", "LineNumber": { "Value": 7 }, "ManualDiscount": null, "DiscountPercent": null, "DiscountAmountInCurrency": null, "DeferralCode": { "Value": "06I1" }, "TermStartDate": { "Value": "2025-01-01T00:00:00" }, "TermEndDate": { "Value": "2025-12-31T00:00:00" } } ]}
Thank you for the information. I have used your script and were able to update the invoice without problems. Can you describe the precise steps to reproduce this problem?
Copyright © 2022 Visma.com. All rights reserved.