Codeunit 4815 Intrastat Report Upgrade
Source AL, 45 lines
src/Apps/W1/Intrastat/app/src/Setup/IntrastatReportUpgrade.Codeunit.allines 2 to 17 of 45, Copyright (c) Microsoft Corporation. MIT
codeunit 4815 "Intrastat Report Upgrade"{ Subtype = Upgrade; trigger OnUpgradePerCompany() var IntrastatReportSetup: Record "Intrastat Report Setup"; UpgradeTag: Codeunit "Upgrade Tag"; begin if UpgradeTag.HasUpgradeTag(GetIntrastatDocumentVATIDUpgradeTag()) then exit; if IntrastatReportSetup.Get() then begin if IntrastatReportSetup."VAT No. Based On" = IntrastatReportSetup."VAT No. Based On"::"Sell-to VAT" then begin IntrastatReportSetup."Sales VAT No. Based On" := IntrastatReportSetup."Sales VAT No. Based On"::"Sell-to VAT"; IntrastatReportSetup."Purchase VAT No. Based On" := IntrastatReportSetup."Purchase VAT No. Based On"::"Buy-from VAT"; IntrastatReportSetup."Sales Intrastat Info Based On" := IntrastatReportSetup."Sales Intrastat Info Based On"::"Sell-to Customer";