Non-Deductible VAT for Avalara VAT Reporting

Note:

If you don't use the Avalara VAT Reporting integration and you want to apply non-deductible tax, see Non-Deductible VAT.

If you use the Avalara VAT Reporting integration, you must perform the tasks explained below to apply non-deductible tax. You can apply this solution to most countries in the European Union, such as Belgium or Spain.

Creating Custom Fields

You must create custom fields of "Text" type that store the deductible tax value. For example, you can name the field Input Deductible Tax Value. You must create the custom fields on the objects related to the payable and sales invoices, and on the Transaction Line Item object because the data sent to Avalara is taken from this object's records.

You must create the custom field on each of the following objects:

  • Payable Invoice Expense Line Item
  • Payable Invoice Line Item
  • Sales Invoice Line Item
  • Transaction Line Item

For information about how to create a custom field, see the Salesforce Help.

Adding Custom Fields to Page Layouts

You must add the custom fields to the relevant page layouts of each object.

For information about how to add fields to page layouts, see the Salesforce Help.

Setting up a Sub-Analysis Mapping

You must create a sub-analysis mapping between the custom fields on the objects related to the payable and sales invoices, and the custom field on the Transaction Line Item object. To create a mapping:

  1. Go to the Sub-Analysis Mappings tab.
  2. Click New.
  3. Enter a name on the Mapping Name field. For example, enter Non-Deductible VAT.
  4. Select the custom field for each object on the corresponding field:
    • Payable Invoice Expense Line Item
    • Payable Invoice Line Item
    • Sales Invoice Line
    • Transaction Line Item

Adding Custom Fields to Custom Metadata

Before adding the custom fields to the list of mappings used for the Avalara VAT Reporting integration, you must clone the custom metadata type record. To do so:

  1. From Setup, click Custom Code | Custom Metadata Types.
  2. Click Foundations Configuration Item.
  3. Next to Foundations Configuration Item, click Manage Foundations Configuration Items.
  4. Click the name of the Avalara VAT Reporting integration record that you want to update.
  5. Click Clone.
  6. Increment the Small Data field value by one. For example, if the field contains 1, enter 2.
  7. In the Label field, enter a name. For example, enter Avalara VAT Reporting Integration Deductible VAT.

Once the new custom metadata record is created, you must create the following mappings:

  • The Home Tax Value 1 field must be mapped to the Avalara ValueVAT field. These fields store the total tax value of the sales or payable document.
  • Copy
    {
        "SourceField": "c2g__codaTransactionLineItem__c.c2g__HomeTaxValue1__c",
        "XMLPath": "InvoiceProperties/InvoiceLines[]/ValueVAT",
        "ChildRelationship": "c2g__TransactionLineItems__r"
    },
  • The Input Deductible Tax Value field must be mapped to the Avalara ValueDeductibleVAT field. To do so, you must create the following conditions for both payable and sales documents:
    • When Input Deductible Tax Value is empty, Home Tax Value 1 is mapped to ValueDeductibleVAT.
    • Copy
      {
          "SourceField": "c2g__codaTransactionLineItem__c.c2g__HomeTaxValue1__c",
          "XMLPath": "InvoiceProperties/InvoiceLines[]/ValueDeductibleVAT",
          "DocumentType": "PI,PCN",
          "ChildRelationship": "c2g__TransactionLineItems__r",
          "Conditions":[
              {
                  "SourceField":"c2g__codaTransactionLineItem__c.c2g__ReverseChargeTaxCode__c",
                  "ChildRelationship": "c2g__TransactionLineItems__r",
                  "Operator":"equals",
                  "Value":""
              },
              {
                  "SourceField":"c2g__codaTransactionLineItem__c.Input_Deductible_Tax_Value__c",
                  "ChildRelationship": "c2g__TransactionLineItems__r",
                  "Operator":"equals",
                  "Value":""
              }
          ]
      },
    • When Input Deductible Tax Value is not empty, this field is mapped to ValueDeductibleVAT.
    • Copy
      {
          "SourceField": "c2g__codaTransactionLineItem__c.Input_Deductible_Tax_Value__c",
          "XMLPath": "InvoiceProperties/InvoiceLines[]/ValueDeductibleVAT",
          "DocumentType": "PI,PCN",
          "ChildRelationship": "c2g__TransactionLineItems__r",
          "Conditions":[
              {
                  "SourceField":"c2g__codaTransactionLineItem__c.c2g__ReverseChargeTaxCode__c",
                  "ChildRelationship": "c2g__TransactionLineItems__r",
                  "Operator":"equals",
                  "Value":""
              },
              {
                  "SourceField":"c2g__codaTransactionLineItem__c.Input_Deductible_Tax_Value__c",
                  "ChildRelationship": "c2g__TransactionLineItems__r",
                  "Operator":"not equals",
                  "Value":""
              }
          ]
      },

Creating Payable Invoices or Sales Invoices

When you create a payable invoice or a sales invoice, on the corresponding Line tab you must manually enter:

  • The deductible tax value on the Input Deductible Tax Value field. This value is automatically populated on the Input Deductible Tax Value field on the transaction line item record generated when you post the invoice.
  • The total tax value on the Input Tax Value field. This value is automatically populated on the Home Tax Value 1 field on the transaction line item record generated when you post the invoice.

When the transaction line item is sent to Avalara:

  • The Input Deductible Tax Value field value is populated on the ValueDeductibleTax field.
  • The Home Tax Value 1 field value is populated on the ValueTax field.