Updating Tax Calculations and Breakups on Invoice
updateInvoiceMemoTaxCalculationsAndBreakups API calculates Tax Amount and populates it on the Invoice.
API |
Signature |
---|---|
updateInvoiceTaxCalculationsAndBreakups |
|
This API calculates Tax Amount and Tax Breakups for invoices with status as 'Draft' or 'Pending Approved'. After tax computation, it updates the Tax Amount on each invoice line item and creates or updates Invoice Line Item Tax Breakups. It then calculates the Total Tax Amount for the invoice and creates or updates the Invoice Tax Breakups.
If autoTransitionFromPendingApprovedToApproved is set to true, it updates the status of the invoice from Pending Approved to Approved.
Request |
|||
---|---|---|---|
Field |
Type |
Required? |
Description |
invoiceIDs |
List <Id> |
Yes |
List of Invoice Ids |
autoTransitionFromPendingApprovedToApproved |
Boolean |
Yes |
If set to true, the API updates the status of the Invoice from Pending Approved to Approved. If set to false, the invoice status is not updated. |
Code Sample
The code sample below helps you calculate and fetch Tax Amount for invoices.
Set<ID> invoiceIDs = new Set<ID>();
invoiceIDs.add('invoiceID')
Apttus_Billing.BillingService.updateInvoiceTaxCalculationsAndBreakups(invoiceIDs,true);