Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Current »

Automatic VAT Code Selection for EC Sales

Legacy Script

Workflow Action Script: LOC: ecSalesTaxcodeSuiteAPP V2

Workflow: Localization Nordics TXN BeforeSubmit

Unreleased new version: User Event Script: Localization Nordics Tran On Submit

Design Flow

  1. Runs on before submit

  2. NetSuite License checking

  3. Get the localization settings record

    1. For OneWorld accounts, the corresponding loc settings for the transaction subsidiary

    2. For non-OneWorld accounts, the active loc settings record with the smallest internal id (created the earliest)
      Note: Subsidiary field is not mandatory in the Localization Settings record

  4. If no loc settings found, exit script

  5. Check if the feature is enabled through the field EC TAX CODE CHANGE ENABLED (custrecord_sta_fin_ectaxcodechange). If unchecked, exit script.

  6. Get the following field values from the loc settings record:

    1. EC DUMMY TAX CODE (custrecord_sta_fin_ecdummy_taxcodeid)

    2. EC GOODS TAX CODE (custrecord_sta_fin_ecgoods_taxcodeid)

    3. EC SERVICES TAX CODE (custrecord_sta_fin_ecservice_taxcodeid)

  7. Get the Item VAT Type of Nature (custom field in the Item record) for all of the Items in the Item sublist and store them in an array.

  8. Loop through the Item sublist. If the line’s Tax Code ID = EC DUMMY TAX CODE:

    1. If the Item VAT Type of Nature of the current Item = Goods, set the current line’s Tax Code to the EC GOODS TAX CODE

    2. If the Item VAT Type of Nature of the current Item = Service, set the current line’s Tax Code to the EC SERVICES TAX CODE

Updating VAT Declaration Fields

Legacy Script

Workflow Action Script: LOC: VAT Declaration 1: BeforeSubmit

Workflow: Localization Nordics TXN BeforeSubmit

Unreleased new version: User Event Script: Localization Nordics Tran On Submit

Design Flow

  1. Runs on before submit

  2. NetSuite License checking

  3. Build an array of Tax Code details

    1. Perform a search of all tax codes where VAT Category code (custrecord_sta_vat_type_code) is not empty

      1. For OneWorld accounts, additional filter for Subsidiary

    2. Get the following fields for each Tax Code in the search results and store them:

      1. Tax Internal ID (internalid)

      2. VAT Category code (custrecord_sta_vat_type_code)

      3. VAT Category (custrecord_sta_select_vat_category)

      4. VAT Exemption code (custrecord_sta_vatexempt_code)

      5. VAT Exemption Reason (custrecord_sta_vatex_reason)

  4. Loop through the sublists: Item, Billable Expenses, and Billable Time. For each line:

    1. Set the following column fields to the values retrieved from the Tax Code record (retrieved in #3)

      1. Line : VAT Category code (custcol_sta_vat_type_code) = Tax Code : VAT Category code (custrecord_sta_vat_type_code)

      2. Line : VAT Category desc. (custcol_sta_vat_type_description) = Tax Code : VAT Category (custrecord_sta_select_vat_category)

      3. Line : VAT Exemption Code (custcol_sta_vatex_code) = Tax Code : VAT Exemption code (custrecord_sta_vatexempt_code)

      4. Line : VAT Exemption Reason (custcol_sta_vatex_reason) = Tax Code : VAT Exemption Reason (custrecord_sta_vatex_reason)

Invoicing: Detailed VAT Summary

Legacy Script

Workflow Action Script: LOC: Create Invoice Reference Number v2

Workflow: Localization Nordics TXN AfterSubmit

Unreleased new version: User Event Script: Localization Nordics Tran On Submit

Design Flow

  1. Runs on before submit

  2. NetSuite License checking

  3. Get the localization settings record

    1. For OneWorld accounts, the corresponding loc settings for the transaction subsidiary

    2. For non-OneWorld accounts, the active loc settings record with the smallest internal id (created the earliest)
      Note: Subsidiary field is not mandatory in the Localization Settings record

  4. If no loc settings found, exit script

  5. Check if the feature is enabled through the field VAT DETAILED SUMMARY (custrecord_sta_locset_vat_summary). If unchecked, exit script.

  6. Get all the Tax Codes assigned in the lines of the sublists: Item, Billable Expenses, and Billable Time

  7. Get the following fields for each Tax Code and store them:

    1. Tax Internal ID (internalid)

    2. Tax Rate (rate)

    3. VAT Category code (custrecord_sta_vat_type_code)

    4. VAT Category (custrecord_sta_select_vat_category)

    5. VAT Exemption code (custrecord_sta_vatexempt_code)

  8. Group all the lines from the Item, Billable Expenses, and Billable Time sublists according to Tax Code

    1. For each Tax Code, get the summation of the Amount and Tax Amount of all the lines using that Tax Code

  9. Add the Shipping Cost and Shipping Tax Amount to the grouped lines

  10. Add the Handling Cost and Handling Tax Amount to the grouped lines

  11. Sort the Tax Code grouped lines by descending Tax Rate

  12. Get the first 4 Tax Codes and set the corresponding fields in the eInvoice (FIN) subtab of the Invoice (ex. Tax Rate 1, Tax Rate 2, Tax Rate 3, Tax Rate 4)

Invoicing: Invoice Layout

Legacy Template

Nordic Countries Invoice PDF/HTML Template

Design Flow

  1. References the VAT Summary fields populated from the Invoicing: Detailed VAT Summary feature

  • No labels