...
The following new fields for delta invoicing are created which will calculate the outstanding amount based on changes done for Campaigns and what was already invoiced.
Invoice API Name | Invoice Field Label | Invoice Item API Name + Logic |
---|
GrossAmountB3Outstanding__c
| Outstanding Gross Amount B3 | GrossAmountB3delta__c
Additional Condition:
NonMedia__c == false |
GrossAmountB2Outstanding__c
| Outstanding Gross Amount B2 | GrossAmountB2delta__c
Additional Condition:
NonMedia__c == false |
GrossAmountB1Outstanding__c
| Outstanding Gross Amount B1 | GrossAmountB1delta__c
Additional Condition:
NonMedia__c == false |
InvoicedAmountNet1Outstanding__c
| Outstanding Invoiced Amount N1 | InvoicedAmountNet1delta__c
Additional Condition:
NonMedia__c == false |
InvoicedAmountNet2Outstanding__c
| Outstanding Invoiced Amount N2 | InvoicedAmountNet2delta__c
Additional Condition:
NonMedia__c == false |
InvoicedAmountNet3Outstanding__c
| Outstanding Invoiced Amount N3 | InvoicedAmountNet3delta__c
Additional Condition:
NonMedia__c == false |
NonMediaAmountOutstanding__c
| Outstanding Non-Media Amount | InvoicedAmountNet3delta__c
Additional Condition:
NonMedia__c == true |
DstAmountOutstanding__c
| Outstanding DST Amount | DstAmountdelta__c
Additional Condition:
DstRelevant__c == true && DstExempt__c == false |
NonTaxableAmountDstOutstanding__c
| Outstanding Nontaxable Amount (DST) | Based on TaxableAmountType__c :
InvoicedAmountNet2delta__c or
InvoicedAmountNet3delta__c Additional Condition:
DstRelevant__c == false || DstExempt__c == true
|
TaxableAmountDstOutstanding__c
| Outstanding Taxable Amount (DST) | Based on TaxableAmountType__c :
InvoicedAmountNet2delta__c or
InvoicedAmountNet3delta__c Additional Condition:
DstRelevant__c == true && DstExempt__c == false
|
VATAmount1Outstanding__c
| Outstanding VAT Amount (Type 1 (A)) | VATAmountdelta__c
Additional Condition:
VATExempt__c == false && VATType__c = '1'
|
VATAmount1BOutstanding__c
| Outstanding VAT Amount (Type 1 (B)) | VATAmountBdelta__c
Additional Condition:
VATExempt__c == false && VATType__c = '1'
|
VATAmount2Outstanding__c
| Outstanding VAT Amount (Type 2 (A)) | VATAmountdelta__c
Additional Condition:
VATExempt__c == false && VATType__c = '2'
|
VATAmount2BOutstanding__c
| Outstanding VAT Amount (Type 2 (B)) | VATAmountBdelta__c
Additional Condition:
VATExempt__c == false && VATType__c = '2'
|
TaxableAmountVatType1Outstanding__c
| Outstanding Taxable Amount (VAT Type 1) | Based on TaxableAmountType__c:
InvoicedAmountNet2Delta__c + DstAmountDelta__c
or
InvoicedAmountNet3Delta__c + DstAmountDelta__c
Additional Condition:
VATExempt__c == false && VATType__c == '1'
|
TaxableAmountVatType2Outstanding__c
| Outstanding Taxable Amount (VAT Type 2) | Based on TaxableAmountType__c:
InvoicedAmountNet2Delta__c + DstAmountDelta__c
or
InvoicedAmountNet3Delta__c + DstAmountDelta__c
Additional Condition:
VATExempt__c == false && VATType__c == '2'
|
NonTaxableAmountTotalOutstanding__c
| Outstanding Nontaxable Amount (VAT Total) | Based on TaxableAmountType__c :
InvoicedAmountNet2delta__c + DstAmountDstAmountDelta__c or
InvoicedAmountNet3delta__c + DstAmountDstAmountDelta__c Additional Condition:
VATExempt__c == true or TaxableAmountType__c not supported or VATType__c not supported
|
QR code feature users should map the correct amount to the ESR reference.
For Non-delta and Normal Items, the following fields are relevant
Those normal roll-up fields do not include the amounts of the technical reversal items.Following invoice fields will calculate the outstanding + the already paid amount:
Invoice Field API Name | Invoice Field Label | Invoice Item API Name + Logic |
---|
GrossAmountB3__c (This is a salesforce roll-up field and needs to be changed in the field definition)
| Gross Amount B3 | GrossAmountB3__c
Additional Condition:
NonMedia__c == false |
GrossAmountB2__c
(This is a salesforce roll-up field and needs to be changed in the field definition) | Gross Amount B2 | Gross Amount B2 | GrossAmountB2__c
Additional Condition:
NonMedia__c == false |
GrossAmountB1__c (This is a salesforce roll-up field and needs to be changed in the field definition)
| Gross Amount B1 | GrossAmountB1__c
Additional Condition:
NonMedia__c == false |
InvoicedAmountNet1__c (This is a salesforce roll-up field and needs to be changed in the field definition)
| Invoiced Amount N1 | InvoicedAmountNet1__c
Additional Condition:
NonMedia__c == false |
InvoicedAmountNet2__c (This is a salesforce roll-up field and needs to be changed in the field definition)
| Invoiced Amount N2 | InvoicedAmountNet2__c
Additional Condition:
NonMedia__c == false |
InvoicedAmountNet3__c (This is a salesforce roll-up field and needs to be changed in the field definition)c
| Invoiced Amount N3 | InvoicedAmountNet3__c
Additional Condition:
NonMedia__c == false |
NonMediaAmount__c
(This is a salesforce roll-up field and needs to be changed in the field definition) | Non-Media Amount | InvoicedAmountNet3__c
Additional Condition:
NonMedia__c == true |
DstAmount__c
(This is calculated in the InvoiceItemTrigger.cls and needs to be changed there) | DST Amount | DstAmount__c
Additional Condition:
DstRelevant__c == true && DstExempt__c == false |
NonTaxableAmountDst__c (This is calculated in the InvoiceItemTrigger.cls and needs to be changed there)
| Nontaxable Amount (DST) | Based on TaxableAmountType__c :
InvoicedAmountNet2__c or
InvoicedAmountNet3__c Additional Condition:
DstRelevant__c == false || DstExempt__c == true
TaxableAmountDst__c
(This is calculated in the InvoiceItemTrigger.cls and needs to be changed there)= true |
TaxableAmountDst__c
| Taxable Amount (DST) | Based on TaxableAmountType__c :
InvoicedAmountNet2__c or
InvoicedAmountNet3__c Additional Condition:
DstRelevant__c == true && DstExempt__c == false
|
VATAmount1__c
(This is a salesforce roll-up field and needs to be changed in the field definition) | VAT Amount (Type 1 (A)) | VATAmount__c
Additional Condition:
VATExempt__c == false && VATType__c = '1'
|
VATAmount1B__c
(This is a salesforce roll-up field and needs to be changed in the field definition) | VAT Amount (Type 1 (B)) | VATAmountB__c
Additional Condition:
VATExempt__c == false && VATType__c = '1'
VATAmount2__c
(This is a salesforce roll-up field and needs to be changed in the field definition)_c = '1' |
VATAmount2__c
| VAT Amount (Type 2 (A)) | VATAmount__c
Additional Condition:
VATExempt__c == false && VATType__c = '2'
|
VATAmount2B__c
(This is a salesforce roll-up field and needs to be changed in the field definition) | VAT Amount (Type 2 (B)) | VATAmountB__c
Additional Condition:
VATExempt__c == false && VATType__c = '2'
|
TaxableAmountVatType1__c (This is calculated in the InvoiceItemTrigger.cls and needs to be changed there)
| Taxable Amount (VAT Type 1) | Based on TaxableAmountType__c :
InvoicedAmountNet2__c + DstAmount__c or
InvoicedAmountNet3__c + DstAmount__c Additional Condition:
VATExempt__c == false && VATType__c == '1'
|
TaxableAmountVatType2__c
(This is calculated in the InvoiceItemTrigger.cls and needs to be changed there)TaxableAmountVatType2__c | Taxable Amount (VAT Type 2) | Based on TaxableAmountType__c :
InvoicedAmountNet2__c + DstAmount__c or
InvoicedAmountNet3__c + DstAmount__c Additional Condition:
VATExempt__c == false && VATType__c == '2'
|
NonTaxableAmountTotal__c
(This is calculated in the InvoiceItemTrigger.cls and needs to be changed there) | Nontaxable Amount (VAT Total) | Based on TaxableAmountType__c :
InvoicedAmountNet2__c + DstAmount__c or
InvoicedAmountNet3__c + DstAmount__c Additional Condition:
VATExempt__c == true or TaxableAmountType__c not supported or VATType__c not supportesupported
|
The general amount calculation is described here: 4.2.6.2 Amount Calculation and Discounts
Following Invoice Formula fields will are not be created for Delta, however, we need to document the formula so that customers can create their custom fieldsthey can be created as custom fields if needed.
Formula | Delta API Name | Delta Label | Normal Formula API Name (can be taken as reference) |
---|
NonTaxableAmountDstDelta__c + TaxableAmountDstOutstanding__c + DstAmountOutstanding__c
| InvoicedAmountDstOutstanding__c
| Delta Outstanding Invoiced Amount Gross (DST) | InvoicedAmountDst__c
|
VATAmount1Outstanding__c + VATAmount1BOutstanding__c
| VatTotalType1Outstanding__c
| Delta Outstanding VAT Total (Type 1) | VatTotalType1__c
|
VATAmount2Outstanding__c + VATAmount2BOutstanding__c
| VatTotalType2Outstanding__c
| Delta Outstanding VAT Total (Type 2) | VatTotalType2__c
|
TaxableAmountVatType1Outstanding__c + TaxableAmountVatType2Outstanding__c
| TaxableAmountTotalOutstanding__c
| Delta Outstanding Taxable Amount (VAT Total) | TaxableAmountTotal__c
|
VatTotalType1Outstanding__c + VatTotalType2Outstanding__c
| VatTotalOutstanding__c
| Delta Outstanding VAT Total | VatTotal__c
|
TaxableAmountTotalOutstanding__c + VatTotalOutstanding__c + NonTaxableAmountTotalOutstanding__c
| InvoicedAmountTotalOutstanding__c
| Delta Outstanding Invoiced Amount Gross (Total) | InvoicedAmountTotal__c
|
ROUND(InvoicedAmountTotalOutstanding__c * Early_Payment_Discount__c,2)
| EarlyPaymentDiscountAbsOutstanding__c
| Delta Outstanding Early Payment Discount abs. | EarlyPaymentDiscountAbs__c
|
InvoicedAmountTotaOutstanding__c - EarlyPaymentDiscountAbsOutstanding__c
| InvoicedAmountGrossInclEpdOutstanding__c
| Delta Outstanding Invoiced Amount Gross (incl. EPD) | InvoicedAmountGrossInclEpd_
|
...