Updating Tax Calculations and Breakups on Credit Memos
updateCreditMemoTaxCalculationsAndBreakups API calculates Tax Amount and populates it on the Credit Memo.
API |
Signature |
---|---|
updateCreditMemoTaxCalculationsAndBreakups |
|
This API calculates Tax Amount and Tax Breakups for credit memos with status as 'Draft' or 'Pending Approved'. After tax computation, it updates the Tax Amount on each credit memo line item and creates or updates Credit Memo Line Item Tax Breakups. It then calculates the Total Tax Amount for the credit memo and creates or updates the Credit Memo Tax Breakups.
If autoTransitionFromPendingApprovedToApproved is set to true, it updates the status of Credit Memo from Pending Approved to Approved.
Request |
|||
---|---|---|---|
Field |
Type |
Required? |
Description |
creditMemoIDs |
Set <Id> |
Yes |
Set of Credit Memo Ids |
autoTransitionFromPendingApprovedToApproved |
Boolean |
Yes |
If set to true, the API updates the status of Credit Memo from Pending Approved to Approved. If set to false, the credit memo status is not updated. |
Code Sample
The code sample below helps you calculate and fetch Tax Amount for credit memos.
Set<ID> creditMemoIDs = new Set<ID>();
//[{creditMemos[0].Id, creditMemos[1].Id};]
Apttus_Billing.BillingService.updateCreditMemoTaxCalculationsAndBreakups(creditMemoIDs, true);