Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM

Size: px
Start display at page:

Download "Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM"

Transcription

1 Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM Version 01 Revision date: 8/28/15 Product release: Microsoft NAV Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license agreement from Avalara, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property Avalara, Inc. All rights reserved. Avalara, AvaTax, AvaTax Calc, AvaTax Returns, AvaTax Certs, AvaTax Local, AvaLocal, AvaTax POS, AvaPOS, AvaRates, TrustFile, BPObridge, Laserbridge+, Sales Taxll, Sales TaxPC, SalestaxPC+, StatetaxII, and StatetaxPC are either registered trademarks or trademarks of Avalara, Inc. in the United States or other countries. All other trademarks are property of their respective owners..

2 AvaTax Integration for Sales & Service Module... 4 Changes in Avalara CodeUnits... 4 Codeunit AVA Address Validation... 4 Codeunit AVA Tax Engine... 8 Codeunit AVA Purchase Validate Codeunit AVA Use Tax Engine Codeunit AVA Validate Call Codeunit AVA TPA Codeunit AVA IsInstalled Changes in Avalara Tables Table AVA CONFIG Table AVA Install Table AVA Vendors Use Tax Assessment Table AVA Company List Changes in Avalara Pages Page AVA Address Validation Page AVA Batch Address Validation Page AVA Statistics Page AVA Setup Assistant Page AVA Configuration Card Page AVA SOP Utility Page AVA Vendors Use Tax Assessment Page AVA Vendor Use Tax Assessment Page AVA Vendor Accrue Utility Page AVA Document Tax Calc. Date Page AVA Company List AvaTax Integration for Purchase Module Changes in Codeunits Codeunit 90 Purch.-Post Changes in Codeunits Page 26 Vendor Card Page 27 Vendor List Page 50 Purchase Order Page 51 Purchase Invoice Changes in Query Query AVA Sales Invoice Header Query AVA Sales Cr.Memo Header Avalara Inc. All rights reserved. Page 2 of 74

3 Query AVA Service Invoice Header Query AVA Service Cr.Memo Header Avalara Inc. All rights reserved. Page 3 of 74

4 AvaTax Integration for Sales & Service Module Changes in Avalara CodeUnits Codeunit AVA Address Validation Replace all FIND( - ) with FINDFIRST Replace all FIND( + ) with FINDLAST Replace all DotNet DLL version from to Change in Version List details of objects: New Value : AVANA Changes in Global Text Constant: Text : TextConst 'ENU= NAV ' Text : TextConst 'ENU= NAV Changes in functions AvaValidate Search for below first line and modify the following changes IF "AvaConfig 1"."Result Upper" THEN ResultUpperCase:=1 ELSE ResultUpperCase:=0; AVAAddressCountry.RESET; AVAAddressCountry.SETFILTER(Code,'%1 %2',Text ,TCountry); IF NOT AVAAddressCountry.FINDFIRST THEN ERROR(Text ,TCountry); AvaUserPref.RESET; //AvaUserPref.SETRANGE(AvaUserPref."User Pref Name",USERID); AvaUserPref.SETRANGE("User Pref Name",USERID); IF AvaUserPref.FINDFIRST THEN BEGIN IF AvaUserPref."Disable Addr" THEN BEGIN ResultText:=Text ; EXIT(2); END ELSE Search for below first line and modify the following changes TState:=oValidResult.Addresses.Item(0).Region; Tzip:=oValidResult.Addresses.Item(0).PostalCode; TCountry:=oValidResult.Addresses.Item(0).Country; ResultText:=''; //AvaSplitString("Addr 1","Addr 2"); END ELSE BEGIN FOR Counter := 0 TO ovalidresult.messages.count DO BEGIN //ResultText:=oValidResult.Messages.Item(Counter).Summary + '. '+ovalidresult.messages.item(counter).details; ResultText:=oValidResult.Messages.Item(Counter).Summary +'\'+ovalidresult.messages.item(counter).details; //AVANA EXIT(oValidResult.ResultCode); Avalara Inc. All rights reserved. Page 4 of 74

5 Changes in functions AvaValidateBatch Search for below first line and modify the following changes IF "AvaConfig 1"."Result Upper" THEN ResultUpperCase:=1 ELSE ResultUpperCase:=0; //AvaUserPref.SETRANGE(AvaUserPref."User Pref Name",USERID); AvaUserPref.SETRANGE("User Pref Name",USERID); IF AvaUserPref.FIND('-') THEN BEGIN IF AvaUserPref."Disable Addr" THEN BEGIN ResultText:=Text ; EXIT(2); END ELSE IF "AvaConfig 1"."Disable Address" THEN BEGIN Search for below first line and modify the following changes TState:=oValidResult.Addresses.Item(0).Region; Tzip:=oValidResult.Addresses.Item(0).PostalCode; TCountry:=oValidResult.Addresses.Item(0).Country; ResultText:=''; //AvaSplitString("Addr 1","Addr 2"); //AVANA END ELSE BEGIN FOR Counter := 0 TO ovalidresult.messages.count DO BEGIN //ResultText:=oValidResult.Messages.Item(Counter).Summary + '. '+ovalidresult.messages.item(counter).details; ResultText:=oValidResult.Messages.Item(Counter).Summary +'\'+ ovalidresult.messages.item(counter).details; //AVANA EXIT(oValidResult.ResultCode); Change in functions AvaIsAuthorised New Local Variables Name DataType Option String AvaTaxServiceBln Option Disabled,Enabled AavAddrServiceBln Option Disabled,Enabled AvaCertServiceBln Option Disabled,Enabled Search for below first line and modify the following changes IF Res <> AvaDisableService THEN BEGIN AdapterVer:=oTaxSvc.Profile.Adapter; TMessage:='Error: ' + oisaures.messages.item(0).summary; //EXIT(Res); //AVANA END ELSE Res :=0; Search for below first line and modify the following changes oisaures := AvaCertSvc.IsAuthorized(''); Avalara Inc. All rights reserved. Page 5 of 74

6 Res:=oIsAuRes.ResultCode; IF Res <> 0 THEN BEGIN //IF Res <> AvaDisableService THEN BEGIN //AVANA IF (Res <> AvaDisableService) AND (AVAServices = 0) THEN BEGIN //AVANA AdapterVer:=AvaCertSvc.Profile.Adapter; TMessage:='Error: ' + oisaures.messages.item(0).summary; //EXIT(Res); //AVANA END ELSE Res :=0; AdapterVer:=AvaCertSvc.Profile.Adapter; ValidDate:=DT2DATE(oIsAuRes.Expires); TMessage:=Text FORMAT(ValidDate); AVAServices := AVAServices+AvaCertService; //AVANA Start ServicesEnabled := Text 'No Service'; CASE AVAServices OF 1 : BEGIN AvaTaxServiceBln := 1; AavAddrServiceBln := 0; AvaCertServiceBln := 0; ServicesEnabled := Text 'Tax Calculation'; 11 : BEGIN AvaTaxServiceBln := 1; AavAddrServiceBln := 1; AvaCertServiceBln := 0; ServicesEnabled := Text 'Tax Calculation, Address Validation'; 111 : BEGIN AvaTaxServiceBln := 1; AavAddrServiceBln := 1; AvaCertServiceBln := 1; ServicesEnabled := Text 'Tax Calculation, Address Validation, Certs/CertCapture'; //AVANA End //EXIT(Res); //AVANA EXIT(AVAServices); //AVANA Change in functions IsConfigValid Old Code AvaConfig.SETRANGE(AvaConfig."Account Number"); IF AvaConfig.FIND('-') THEN BEGIN IF USERID <> '' THEN BEGIN AvaUserPref.SETRANGE(AvaUserPref."User Pref Name",USERID); IF AvaUserPref.FIND('-') THEN BEGIN IF AvaUserPref."Disable Addr" THEN BEGIN MESSAGE(Text ); EXIT(FALSE); Avalara Inc. All rights reserved. Page 6 of 74

7 END ELSE IF AvaConfig."Disable Address" THEN BEGIN MESSAGE(Text ); EXIT(FALSE); IF Country = '' THEN BEGIN TCountryID:=Text ; TCountryID:=Country; AvaAddrCountry.SETRANGE(AvaAddrCountry.Code,TCountryID); IF NOT AvaAddrCountry.FIND('-') THEN BEGIN MESSAGE('''%1'''+Text ,TCountryID); EXIT(FALSE); AvaAddrCountry.RESET; MESSAGE('%1',Text ); EXIT(FALSE); AvaConfig.RESET; EXIT(TRUE); Modified Code (Search for 1st line / modified code marked in Rec color) AvaConfig.SETRANGE("Account Number"); IF AvaConfig.FINDFIRST THEN BEGIN IF AvaConfig."Disable Address" THEN BEGIN MESSAGE(Text ); EXIT(FALSE); IF USERID <> '' THEN BEGIN AvaUserPref.SETRANGE("User Pref Name",USERID); IF AvaUserPref.FINDFIRST THEN BEGIN IF AvaUserPref."Disable Addr" THEN BEGIN MESSAGE(Text ); EXIT(FALSE); //AVANA IF Country = '' THEN TCountryID:=Text ELSE TCountryID:=Country; AvaAddrCountry.SETRANGE(Code,TCountryID); IF NOT AvaAddrCountry.FINDFIRST THEN BEGIN MESSAGE('''%1'''+Text ,TCountryID); EXIT(FALSE); AvaAddrCountry.RESET; // //AVANA MESSAGE('%1',Text ); EXIT(FALSE); Avalara Inc. All rights reserved. Page 7 of 74

8 AvaConfig.RESET; EXIT(TRUE); Change in functions IsConfigValidBatchAddr Search for below first line and modify the following changes TCountryID:=Country; //AvaAddrCountry.SETRANGE(AvaAddrCountry.Code,TCountryID); AvaAddrCountry.SETRANGE(Code,TCountryID); IF NOT AvaAddrCountry.FINDFIRST THEN BEGIN Text:=''''+TCountryID+''''+Text ; EXIT(FALSE); Codeunit AVA Tax Engine Replace all FIND( - ) with FINDFIRST Replace all FIND( + ) with FINDLAST Replace DotNet variable mapping from Adapter Version= to Version= Changes in Global Text Constant: Text : TextConst 'ENU= NAV ' Text : TextConst 'ENU= NAV Changes in function fncalctax New code (search for 1 st Line and modified colored lines) DtlLevel:=3; EntityUseCode:=''; SalesHead.SETRANGE("No.",SalesHeaderNo); SalesHead.SETRANGE("Document Type",SalesHeaderType); SalesHead.FINDFIRST; ShipMethod:=0; IF STRPOS(SalesHead."Shipment Method Code",Text ) <> 0 THEN ShipMethod:=1 ELSE IF STRPOS(SalesHead."Tax Area Code",Text ) <> 0 THEN ShipMethod:=2; DocumentType := FORMAT(SalesHead."Document Type"); StrMessage:=Text FORMAT(SalesHead."No.",STRLEN(FORMAT(SalesHead."No."))); AvaCheckSalesTaxAdjust(SalesHead."No.", SalesHead."Document Type",FALSE); AvaTaxCalcDate := AvaGetTaxCalcDate(SalesHead."No.", SalesHead."Document Type", 'Sales', SalesHead."Document Date"); AvaGetExemptionProcessingNo(SalesHead."Sell-to Customer No.", SalesHead."Bill-to Customer No.",SalesHead."Tax Exemption No.",ExemptionNo);//Changes Avalara Inc. All rights reserved. Page 8 of 74

9 New code (search for 1 st Line and modified colored lines) DestAVAAddrLatLongFlag := AVAAddrLatLongFlag; AVAAddrLatLongFlag := FALSE; TmpAddressSrc:=''; IF SalesHead."Location Code"<>'' THEN BEGIN TmpAddressSrc:=Text ; Loc.GET(SalesHead."Location Code"); "TmpL 1":=Loc.Address; "TmpL 2":=Loc."Address 2"; "TmpL 3":=''; TmpCity:=Loc.City; TmpState:=Loc.County; TmpZip:=fnAVAPinCheck(Loc."Post Code"); TmpCountry:=FORMAT(Loc."Country/Region Code"); TmpAddressSrc:=Text ; CompInfo.GET; "TmpL 1":=CompInfo."Ship-to Address"; "TmpL 2":=CompInfo."Ship-to Address 2"; "TmpL 3":=''; TmpCity:=CompInfo."Ship-to City"; TmpState:=CompInfo."Ship-to County"; TmpZip:=fnAVAPinCheck(CompInfo."Ship-to Post Code"); TmpCountry:=FORMAT(CompInfo."Ship-to Country/Region Code"); IF (Avaconfig."Chk. Address") AND NOT(Avaconfig."Disable Address") AND NOT(AVAAddrLatLongFlag) THEN BEGIN AvaWindowOpen(StrMessage+Text TmpAddressSrc); AvaAddrValidn.AvaValidate("TmpL 1","TmpL 2","TmpL 3",TmpCity,TmpState,TmpZip,TmpCountry,TmpLatitude, TmpLongitude, TmpTaxRegionID, ResultText,0); AvaWindowClose; IF ResultText <> '' THEN IF NOT(AVABatchModeFlag) THEN MESSAGE(Text 'Error: ('+Text TmpAddressSrc+') '+ResultText) ELSE BEGIN AVAInsertDocErrorMsg(SalesHeaderNo,SalesHeaderType,0, TmpAddressSrc, Text Text ': '+ResultText); IF Avaconfig."Abort Batch Posting with Error" THEN EXIT(FALSE); oaddfrom.line1:="tmpl 1"; oaddfrom.line2:="tmpl 2"; oaddfrom.line3:="tmpl 3"; oaddfrom.city:=tmpcity; oaddfrom.region:=tmpstate; oaddfrom.postalcode:=tmpzip; oaddfrom.country:=tmpcountry; AvaWindowOpen(StrMessage+Text TmpAddressSrc); IF NOT(AVAAddrLatLongFlag) THEN BEGIN oaddfrom.line1:="tmpl 1"; oaddfrom.line2:="tmpl 2"; Avalara Inc. All rights reserved. Page 9 of 74

10 oaddfrom.line3:="tmpl 3"; oaddfrom.city:=tmpcity; oaddfrom.region:=tmpstate; oaddfrom.postalcode:=tmpzip; oaddfrom.country:=tmpcountry; oaddfrom.taxregionid:=tmptaxregionid; oaddfrom.latitude:=tmplatitude; oaddfrom.longitude:=tmplongitude; AvaWindowClose; //FromAddress:= "TmpL 1" + ', ' + "TmpL 2" + ', ' + TmpCity + ', ' + TmpState + ', ' + TmpZip + ', ' + TmpCountry; FromAddress:=''; AvaAddrSeparator:=''; AvaTempText := "TmpL 1"; IF STRLEN(AvaTempText)>1 THEN FromAddress := "TmpL 1"; IF STRLEN(FromAddress)>0 THEN AvaAddrSeparator:=','; AvaTempText := "TmpL 2"; IF STRLEN(AvaTempText)>1 THEN FromAddress += AvaAddrSeparator+"TmpL 2"; IF STRLEN(FromAddress)>0 THEN AvaAddrSeparator:=','; AvaTempText := TmpCity; IF STRLEN(AvaTempText)>1 THEN FromAddress += AvaAddrSeparator+TmpCity; IF STRLEN(FromAddress)>0 THEN AvaAddrSeparator:=','; AvaTempText :=TmpState; IF STRLEN(AvaTempText)>1 THEN FromAddress += AvaAddrSeparator+TmpState; IF STRLEN(FromAddress)>0 THEN AvaAddrSeparator:=','; AvaTempText := TmpZip; IF STRLEN(AvaTempText)>1 THEN FromAddress += AvaAddrSeparator+TmpZip; IF STRLEN(FromAddress)>0 THEN AvaAddrSeparator:=','; { AvaTempText := TmpCountry; IF STRLEN(AvaTempText)>1 THEN FromAddress += AvaAddrSeparator+TmpCountry; IF STRLEN(FromAddress)>0 THEN AvaAddrSeparator:=','; } AVAAddrLatLongFlag:=FALSE; IF AvaReleaseStatusFlag THEN BEGIN IF (Avaconfig."Release Quantity" = '3') THEN BEGIN AvaCallGetTax := FALSE; AvaHead.RESET; AvaHead.SETFILTER("Document No.",'%1','*'+SalesHead."No."+'*'); AvaHead.SETRANGE("Document Type",FORMAT(SalesHead."Document Type")); IF AvaHead.FINDFIRST AND (AvaHead."Company ID" <> '') THEN BEGIN IF NOT DocTypeSetToInv THEN BEGIN IF SalesHead."Document Type" = SalesHead."Document Type"::Quote THEN AvaCallGetTax := TRUE; IF AvaCallGetTax = FALSE THEN IF (SalesHead."Document Type" <> SalesHead."Document Type"::Quote) THEN IF AvaHead."Document Status" = 0 THEN AvaCallGetTax := TRUE; END ELSE BEGIN IF SalesHead."Document Type" <> SalesHead."Document Type"::Quote THEN IF AvaHead."Document Status" = 0 THEN AvaCallGetTax := TRUE; Avalara Inc. All rights reserved. Page 10 of 74

11 IF AvaCallGetTax = FALSE THEN IF (AvaHead."Original Address" <> FromAddress) THEN AvaCallGetTax := TRUE; IF AvaCallGetTax = FALSE THEN IF (AvaHead."Destination Address" <> ToAddress) THEN AvaCallGetTax := TRUE; IF AvaCallGetTax = FALSE THEN IF (AvaHead."Customer No." <> SalesHead."Sell-to Customer No.") THEN AvaCallGetTax := TRUE; IF AvaCallGetTax = FALSE THEN IF (AvaHead."Document Date" <>SalesHead."Document Date") THEN AvaCallGetTax := TRUE; IF AvaCallGetTax = FALSE THEN IF (AvaHead."Exemption No." <> ExemptionNo) THEN AvaCallGetTax:= TRUE; SalesHead.CALCFIELDS(SalesHead.Amount); IF AvaCallGetTax = FALSE THEN IF ((AvaHead."Total Taxable Amount" + AvaHead."Tax Exempt Amount") <> SalesHead.Amount) THEN AvaCallGetTax:= TRUE; IF AvaCallGetTax = FALSE THEN BEGIN SalesLine.SETRANGE("Document Type",SalesHead."Document Type") ; SalesLine.SETRANGE("Document No.",SalesHead."No."); SalesLine.SETFILTER(Type,'<>%1',SalesLine.Type::" "); SalesLine.CALCSUMS("Inv. Discount Amount"); IF AvaCallGetTax = FALSE THEN IF SalesLine."Inv. Discount Amount" <> AvaHead."Tax Discount Amount" THEN AvaCallGetTax:= TRUE; TRUE; //SalesLine.SETFILTER("Qty. to Invoice",'<>0'); //AVANA SalesLine.SETFILTER("Qty. to Invoice",'>=0'); //AVANA IF SalesLine.FINDFIRST THEN BEGIN REPEAT AvaLine.RESET; AvaLine.SETRANGE("Tax Header No.",AvaHead."No."); AvaLine.SETRANGE("Tax Line No.",FORMAT(SalesLine."Line No.")); AvaLine.SETRANGE("Item No.",FORMAT(SalesLine."No.")); IF AvaLine.FINDFIRST THEN BEGIN IF AvaCallGetTax = FALSE THEN IF (AvaLine."Entity No." <> EntityUseCode) THEN AvaCallGetTax:= TRUE; IF AvaCallGetTax = FALSE THEN IF (AvaLine."Tax Area" <> SalesLine."Tax Area Code") THEN AvaCallGetTax:= fngetitemdetails(salesline.type,salesline."no.",salesline."tax Group Code",Ref1,Ref2,"G\LAccNo.",TaxibilityCode,UnitPrice); IF AvaCallGetTax = FALSE THEN IF (AvaLine."Tax Code" <> TaxibilityCode) THEN AvaCallGetTax:= TRUE; AvalLineDiffQtyInv := AvaLine."Quantity Inv." - SalesLine."Qty. to Invoice"; IF AvaCallGetTax = FALSE THEN IF (AvalLineDiffQtyInv <> 0) THEN AvaCallGetTax:= TRUE; AvalLineDiffAmtInv := (AvaLine."Total Taxable Amount" + AvaLine."Tax Exempt Amount" + AvaLine."Tax Discount Amount")- SalesLine."Line Amount"; IF AvaCallGetTax = FALSE THEN IF (AvalLineDiffAmtInv <> 0) THEN AvaCallGetTax:= TRUE; END ELSE AvaCallGetTax := TRUE; UNTIL (SalesLine.NEXT = 0) OR (AvaCallGetTax = TRUE); END ELSE AvaCallGetTax:= TRUE; IF AvaCallGetTax = FALSE THEN Avalara Inc. All rights reserved. Page 11 of 74

12 EXIT(TRUE); fnremoverecord(avahead."no."); AvaWindowOpen(StrMessage+Text ); CASE SalesHead."Document Type" OF 0 : PassDocNo:='QUO' + SalesHead."No."; 1 : PassDocNo:='ORD' + SalesHead."No."; 2 : PassDocNo:='INV' + SalesHead."No."; 3 : PassDocNo:='CRM' + SalesHead."No."; 4 : PassDocNo:='BLC' + SalesHead."No."; 5 : PassDocNo:='RET' + SalesHead."No."; IF Avaconfig.FINDFIRST THEN; AvaAsynPosDoc(PassDocNo,SalesHead."Document Type",SalesHead."No."); IF Avaconfig."Source Code" = Avaconfig."Source Code"::"Sell-to Customer" THEN BEGIN CustCode := SalesHead."Sell-to Customer No."; IF CustCode = '' THEN CustCode := SalesHead."Sell-to Customer Template Code" END ELSE BEGIN CustCode := SalesHead."Bill-to Customer No."; IF CustCode = '' THEN CustCode := SalesHead."Bill-to Customer Template Code" LocCode := ''; CompInfo.GET; LrSalesLine.SETRANGE("Document Type",SalesHeaderType); LrSalesLine.SETRANGE("Document No.",SalesHeaderNo); LrSalesLine.SETFILTER(Type, '<>%1', LrSalesLine.Type::" "); IF LrSalesLine.FINDFIRST THEN LocCode := LrSalesLine."Location Code"; IF (LocCode = '') AND (SalesHead."Location Code" <> '') THEN LocCode := SalesHead."Location Code"; IF (LocCode = '') THEN AvaGetLocationCode(SalesHead."Responsibility Center",LocCode); fngettaxhdr(oaddfrom, oaddto, Changes in function fncalctaxbatch Search for below first line and modify the following changes DtlLevel:=3; EntityUseCode:=''; SalesHead.SETRANGE("No.",SalesHeaderNo); SalesHead.SETRANGE("Document Type",SalesHeaderType); SalesHead.FINDFIRST; ShipMethod:=0; IF STRPOS(SalesHead."Shipment Method Code",Text ) <> 0 THEN Avalara Inc. All rights reserved. Page 12 of 74

13 ShipMethod:=1 ELSE IF STRPOS(SalesHead."Tax Area Code",Text ) <> 0 THEN ShipMethod:=2; DocumentType := FORMAT(SalesHead."Document Type"); AvaTaxCalcDate := AvaGetTaxCalcDate(SalesHead."No.", SalesHead."Document Type", 'Sales', SalesHead."Document Date"); AvaCheckSalesTaxAdjust(SalesHead."No.", SalesHead."Document Type",FALSE); ExemptionNo:=''; Search for below first line and modify the following changes TmpAddressSrc:=''; IF SalesHead."Location Code"<>'' THEN BEGIN TmpAddressSrc:=Text ; Loc.GET(SalesHead."Location Code"); "TmpL 1":=Loc.Address; "TmpL 2":=Loc."Address 2"; "TmpL 3":=''; TmpCity:=Loc.City; TmpState:=Loc.County; TmpZip:=fnAVAPinCheck(Loc."Post Code"); TmpCountry:=FORMAT(Loc."Country/Region Code"); TmpAddressSrc:=Text ; CompInfo.GET; "TmpL 1":=CompInfo."Ship-to Address"; "TmpL 2":=CompInfo."Ship-to Address 2"; "TmpL 3":=''; TmpCity:=CompInfo."Ship-to City"; TmpState:=CompInfo."Ship-to County"; TmpZip:=fnAVAPinCheck(CompInfo."Ship-to Post Code"); TmpCountry:=FORMAT(CompInfo."Ship-to Country/Region Code"); IF (Avaconfig."Chk. Address") AND NOT(Avaconfig."Disable Address") AND NOT(AVAAddrLatLongFlag) THEN BEGIN Search for below first line and modify the following changes IF Avaconfig."Source Code" = Avaconfig."Source Code"::"Sell-to Customer" THEN CustCode := SalesHead."Sell-to Customer No." ELSE CustCode := SalesHead."Bill-to Customer No."; IF Avaconfig.FINDFIRST THEN; AvaAsynPosDoc(PassDocNo,SalesHead."Document Type", PassDocNo); LocCode := ''; CompInfo.GET; lrsalesline.setrange("document Type",SalesHeaderType); lrsalesline.setrange("document No.",SalesHeaderNo); lrsalesline.setfilter(type, '<>%1', lrsalesline.type::" "); IF lrsalesline.findfirst THEN LocCode := lrsalesline."location Code"; Avalara Inc. All rights reserved. Page 13 of 74

14 IF (LocCode = '') AND (SalesHead."Location Code" <> '') THEN LocCode := SalesHead."Location Code"; IF (LocCode = '') THEN AvaGetLocationCode(SalesHead."Responsibility Center",LocCode); fngettaxhdr(oaddfrom, oaddto, ShipMethod, Avaconfig."Company ID", Changes in function fngettaxline New Local Variables: Name DataType Subtype Length AvaUseUPCCode Record AVA Item UPC MAP Search for below first line and modify the following changes oaddfromtmp.postalcode:=oaddfrom.postalcode; oline := oline.line; oline.no:=format(num); //AVANA IF(Avaconfig."Use UPC as Item Code") AND AvaUseUPCCode.GET(ItemCode) THEN oline.itemcode := AvaUseUPCCode."Item UPC Code" ELSE oline.itemcode:=itemcode; //AVANA oline.description:=itemdesc; oline.qty:=qty; Changes in function fnobjtotbl New Local Variables: Name DataType Subtype Length RecGLSetup Record General Ledger Setup PrepLineAmt Decimal Search for below first line and modify the following changes TmpHdrID:=GetNextHdrID(DocNo,iDocType,DocDate,DocumentType); IF TmpHdrID = -1 THEN TmpHdrID:=1; fnremoverecord(tmphdrid); CASE idoctype OF //0: DCoefficient := 1; //1: DCoefficient := 1; //5: DCoefficient := -1; //AVANA ,1: DCoefficient := 1; 5: DCoefficient := -1; //AVANA TempText:=','+oRequest.OriginAddress.Line1; Avalara Inc. All rights reserved. Page 14 of 74

15 Search for below first line and modify the following changes SalesOrderHdr.SETRANGE("Document Type",SalesOrderHdr."Document Type"::"Return Order"); SalesOrderHdr.SETRANGE("No.",COPYSTR(AvaHead."Document No.",4,100)); IF SalesOrderHdr.FINDFIRST THEN BEGIN AvaHead."Posted Date" := SalesOrderHdr."Posting Date"; //AvaHead."Document Date" := SalesOrderHdr."Document Date";//Connect-1905 AvaHead."Document Date" := AvaTaxCalcDate;//Connect-1905 ServiceHeader.RESET; IF COPYSTR(AvaHead."Document No.",1,6) = 'SERQUO' THEN ServiceHeader.SETRANGE("Document Type",ServiceHeader."Document Type"::Quote); IF COPYSTR(AvaHead."Document No.",1,6) = 'SERORD' THEN ServiceHeader.SETRANGE("Document Type",ServiceHeader."Document Type"::Order); IF COPYSTR(AvaHead."Document No.",1,6) = 'SERINV' THEN ServiceHeader.SETRANGE("Document Type",ServiceHeader."Document Type"::Invoice); IF COPYSTR(AvaHead."Document No.",1,6) = 'SERCRM' THEN ServiceHeader.SETRANGE("Document Type",ServiceHeader."Document Type"::"Credit Memo"); ServiceHeader.SETRANGE("No.",COPYSTR(AvaHead."Document No.",7,100)); IF ServiceHeader.FINDFIRST THEN BEGIN //AvaHead."Document Date" := ServiceHeader."Document Date";//Connect-1905 AvaHead."Document Date" := AvaTaxCalcDate;//Connect-1905 AvaHead."Posted Date" := ServiceHeader."Posting Date"; AvaHead."Document Status" := oresult.docstatus; Search for below first line and modify the following changes IF NOT(COPYSTR(AvaHead."Document No.",1,3) = 'SER') THEN BEGIN //SalesLine.SETRANGE(SalesLine."Document No.",COPYSTR(AvaHead."Document No.",4,100)); SalesLine.SETRANGE("Document No.",COPYSTR(AvaHead."Document No.",4,100)); SalesLine.SETFILTER(SalesLine."Line No.",oTaxLine.No); SalesLine.SETFILTER("Document Type",DocumentType); SalesLine.SETRANGE("Document Type",SalesOrderHdr."Document Type"); IF SalesLine.FINDFIRST THEN BEGIN AvaLine."Tax Area" := SalesLine."Tax Area Code"; //SalesLine."Amount Including VAT" := AvaLine."Tax Tax Amount" + AvaLine."Total Taxable Amount"; SalesLine."Amount Including VAT" := AvaLine."Tax Tax Amount" + AvaLine."Total Taxable Amount" + AvaLine."Tax Exempt Amount"; // - AvaLine."Tax Discount Amount"; //AVANA start IF SalesOrderHdr."Currency Code" = '' THEN RecCurrency.InitRoundingPrecision ELSE BEGIN SalesOrderHdr.TESTFIELD("Currency Factor"); RecCurrency.GET(SalesOrderHdr."Currency Code"); RecCurrency.TESTFIELD("Amount Rounding Precision"); IF (SalesLine."Prepayment %" > 0) AND (AvaLine."Tax Tax Amount" > 0) THEN SalesLine."VAT %" := AvaLine."Tax Rate" * 100; SalesLine."Prepmt. Line Amount" := ROUND((SalesLine."Prepayment %" * SalesLine."Line Amount") / 100,RecCurrency."Amount Rounding Precision"); Avalara Inc. All rights reserved. Page 15 of 74

16 PrepLineAmt := AvaLine."Total Taxable Amount" + AvaLine."Tax Tax Amount" + AvaLine."Tax Exempt Amount" + AvaLine."Tax Discount Amount"; IF SalesOrderHdr."Prepmt. Include Tax" THEN SalesLine."Prepmt. Amt. Incl. VAT" := ROUND((SalesLine."Prepayment %" * PrepLineAmt) / 100,RecCurrency."Amount Rounding Precision") ELSE SalesLine."Prepmt. Amt. Incl. VAT" := SalesLine."Prepmt. Line Amount"; SalesLine."Prepayment Amount" := SalesLine."Prepmt. Amt. Incl. VAT"; //AVANA end SalesLine.MODIFY; SalesInvLine.SETRANGE(SalesInvLine."Document No.",COPYSTR(AvaHead."Document No.",4,100)); SalesInvLine.SETFILTER(SalesInvLine."Line No.",oTaxLine.No); IF SalesInvLine.FINDFIRST THEN AvaLine."Tax Area" := SalesInvLine."Tax Area Code" ELSE BEGIN recobjpostedcrline.setrange(recobjpostedcrline."document No.",COPYSTR(AvaHead."Document No.",4,100)); recobjpostedcrline.setfilter(recobjpostedcrline."line No.",oTaxLine.No); IF recobjpostedcrline.findfirst THEN AvaLine."Tax Area" := recobjpostedcrline."tax Area Code" END END //ServiceLine.SETRANGE(ServiceLine."Document No.",COPYSTR(AvaHead."Document No.",7,100)); ServiceLine.SETRANGE("Document No.",COPYSTR(AvaHead."Document No.",7,100)); ServiceLine.SETFILTER(ServiceLine."Line No.",oTaxLine.No); ServiceLine.SETRANGE("Document Type",ServiceHeader."Document Type"); IF ServiceLine.FINDFIRST THEN BEGIN AvaLine."Tax Area" := ServiceLine."Tax Area Code"; //ServiceLine."Amount Including VAT" := AvaLine."Tax Tax Amount" + AvaLine."Total Taxable Amount"; ServiceLine."Amount Including VAT" := AvaLine."Tax Tax Amount" + AvaLine."Total Taxable Amount" + AvaLine."Tax Exempt Amount";// - AvaLine."Tax Discount Amount"; ServiceLine.MODIFY; TmpCityTax+=oTaxLine.TaxDetails.Item(j).Rate; AvaDtl.INSERT; AvaJurs.RESET; AvaJurs.SETRANGE("Tax Header No.",TmpHdrID); //AvaJurs.SETRANGE(AvaJurs."Tax Header No.",TmpHdrID); //AvaJurs.SETRANGE(AvaJurs."Tax Name",oTaxLine.TaxDetails.Item(j).TaxName); //AvaJurs.SETRANGE(AvaJurs."Tax Description",oTaxLine.TaxDetails.Item(j).JurisName); AvaJurs.SETRANGE("Tax Header No.",TmpHdrID); AvaJurs.SETRANGE("Tax Name",oTaxLine.TaxDetails.Item(j).TaxName); AvaJurs.SETRANGE("Tax Description",oTaxLine.TaxDetails.Item(j).JurisName); IF NOT AvaJurs.FINDFIRST THEN BEGIN TmpJurisID:=GetNextJurisID(TmpHdrID); Changes in function fnservicecalctax IF NOT(AvaServCheckTaxReqd(ServiceHeaderNo,ServiceHeaderType)) THEN EXIT(TRUE); Avalara Inc. All rights reserved. Page 16 of 74

17 DCoefficient:=1; CASE ServiceHeaderType OF //0: BEGIN TDocType:=1; DCoefficient := 1; //1: BEGIN TDocType:=1; DCoefficient := 1; //2: BEGIN TDocType:=1; DCoefficient := 1; //3: BEGIN TDocType:=5; DCoefficient := -1; //4: BEGIN TDocType:=1; DCoefficient := 1; //5: BEGIN TDocType:=5; DCoefficient := -1; //AVANA ,1,2,4: BEGIN TDocType:=1; DCoefficient := 1; 3,5: BEGIN TDocType:=5; DCoefficient := -1; //AVANA idoctype:=0; IF PostInvRtn = 98 THEN idoctype:=1 ELSE IF PostInvRtn = 99 THEN idoctype:=5; fnclear; //oaddto := oaddto.address; //oaddfrom := oaddfrom.address; //oaddfromline := oaddfromline.address; //ogettaxrequest := ogettaxrequest.gettaxrequest; Avaconfig.FINDFIRST; IF Avaconfig.COGS THEN BEGIN IF FORMAT(Avaconfig."COGS Tax Group No.") ='' THEN TaxAreaCodeCOGS:='COGS' ELSE TaxAreaCodeCOGS:=Avaconfig."COGS Tax Group No."; DtlLevel:=3; EntityUseCode:=''; ServiceHead.SETRANGE(ServiceHead."No.",ServiceHeaderNo); ServiceHead.SETRANGE(ServiceHead."Document Type",ServiceHeaderType); ServiceHead.FINDFIRST; AvaValidCall.AvaDocLatLongService(ServiceHead,FALSE); //AVANA DocumentType := FORMAT(ServiceHead."Document Type"); StrMessage:=Text FORMAT(ServiceHead."No.",STRLEN(FORMAT(ServiceHead."No."))); //AvaCheckSalesTaxAdjust1(ServiceHead."No.", ServiceHead."Document Type"); AvaCheckSalesTaxAdjust(ServiceHead."No.", ServiceHead."Document Type",TRUE); AvaTaxCalcDate:=AvaGetTaxCalcDate(ServiceHead."No.", ServiceHead."Document Type", 'Service', ServiceHead."Document Date");//Connect-1905 ExemptionNo:=''; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Bill-to Customer" THEN BEGIN //Cust.SETRANGE(Cust."No.",ServiceHead."Bill-to Customer No."); //IF Cust.FINDFIRST THEN IF Cust.GET(ServiceHead."Bill-to Customer No.") THEN ExemptionNo :=Cust."Tax Exemption No."; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Sell-to Customer" THEN //Cust.SETRANGE(Cust."No.",ServiceHead."Customer No."); //IF Cust.FINDFIRST THEN Avalara Inc. All rights reserved. Page 17 of 74

18 IF Cust.GET(ServiceHead."Customer No.") THEN ExemptionNo :=Cust."Tax Exemption No."; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Transaction Level" THEN ExemptionNo := ServiceHead."Tax Exemption No."; Search for below first line and modify the following changes DestAVAAddrLatLongFlag := AVAAddrLatLongFlag; AVAAddrLatLongFlag:=FALSE; TmpAddressSrc:=''; IF ServiceHead."Location Code"<>'' THEN BEGIN TmpAddressSrc:=Text ; Loc.GET(ServiceHead."Location Code"); "TmpL 1":=Loc.Address; "TmpL 2":=Loc."Address 2"; "TmpL 3":=''; TmpCity:=Loc.City; TmpState:=Loc.County; TmpZip:=fnAVAPinCheck(Loc."Post Code"); TmpCountry:=FORMAT(Loc."Country/Region Code"); TmpAddressSrc:=Text ; CompInfo.GET; "TmpL 1":=CompInfo."Ship-to Address"; "TmpL 2":=CompInfo."Ship-to Address 2"; "TmpL 3":=''; TmpCity:=CompInfo."Ship-to City"; TmpState:=CompInfo."Ship-to County"; TmpZip:=fnAVAPinCheck(CompInfo."Ship-to Post Code"); TmpCountry:=FORMAT(CompInfo."Ship-to Country/Region Code"); IF NOT Avaconfig.Initiate THEN BEGIN Search for below first line and modify the following changes IF Avaconfig."Source Code" = Avaconfig."Source Code"::"Sell-to Customer" THEN CustCode := ServiceHead."Customer No." ELSE CustCode := ServiceHead."Bill-to Customer No."; IF Avaconfig.FINDFIRST THEN; AvaAsynPosDoc(PassDocNo,ServiceHead."Document Type", ServiceHead."No."); LocCode := ''; CompInfo.GET; LrServiceLine.SETRANGE("Document Type",ServiceHead."Document Type"); LrServiceLine.SETRANGE("Document No.",ServiceHead."No."); LrServiceLine.SETFILTER(Type, '<>%1', ServiceLine.Type::" "); IF LrServiceLine.FINDFIRST THEN LocCode := LrServiceLine."Location Code"; IF (LocCode = '') AND (ServiceHead."Location Code" <> '') THEN LocCode := ServiceHead."Location Code"; IF (LocCode = '') THEN Avalara Inc. All rights reserved. Page 18 of 74

19 AvaGetLocationCode(ServiceHead."Responsibility Center",LocCode); fngettaxhdr(oaddfrom, oaddto, ShipMethod, Avaconfig."Company ID", PassDocNo, //ServiceHead."Document Date",//Connect-1905 AvaTaxCalcDate,//Connect-1905 idoctype, TotalDisc*DCoefficient, ExemptionNo, DtlLevel, CustCode, EntityUseCode, ServiceHead."Salesperson Code", ServiceHead."Your Reference", '', ogettaxrequest, OutStatus, LocCode ); IF ServiceHead."Currency Code" <> '' THEN BEGIN Tgcurrencycode:=ServiceHead."Currency Code"; ExRate:= ServiceHead."Currency Factor"; //ExDate:= ServiceHead."Document Date";//Connect-1905 ExDate:= AvaTaxCalcDate;//onnect-1905 fngettaxhdrv3(tgcurrencycode,exrate,exdate); Search for below first line and modify the following changes Old code fngetitemdetails(servlineitemtype,serviceline."no.",serviceline."tax Group Code",Ref1,Ref2,"G\LAccNo.",TaxibilityCode,UnitPrice); Disc:=FALSE; IF ServiceLine."Inv. Discount Amount" <> 0 THEN Disc:=TRUE ELSE Disc:=FALSE; IF Avaconfig."Statistics Quantity" = '1' THEN BEGIN LineAmtPassed:=ROUND((ServiceLine.Quantity*UnitPrice) - ((ServiceLine.Quantity * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine.Quantity; END ELSE IF Avaconfig."Statistics Quantity" = '2' THEN BEGIN IF (ServiceLine."Document Type" = ServiceLine."Document Type" :: "Credit Memo") THEN BEGIN LineAmtPassed:=ROUND((ServiceLine."Qty. to Invoice"*UnitPrice) - ((ServiceLine."Qty. to Invoice" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Invoice"; Avalara Inc. All rights reserved. Page 19 of 74

20 LineAmtPassed:=ROUND((ServiceLine."Qty. to Ship"*UnitPrice) - ((ServiceLine."Qty. to Ship" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Ship"; END ELSE IF Avaconfig."Statistics Quantity" = '3' THEN BEGIN LineAmtPassed:=ROUND((ServiceLine."Qty. to Invoice"*UnitPrice) - ((ServiceLine."Qty. to Invoice" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Invoice"; IF TDocType=1 THEN BEGIN Modified Code (Search for 1st line / modified code marked in Rec color) fngetitemdetails(servlineitemtype,serviceline."no.",serviceline."tax Group Code",Ref1,Ref2,"G\LAccNo.",TaxibilityCode,UnitPrice); Disc:=FALSE; IF ServiceLine."Inv. Discount Amount" <> 0 THEN Disc:=TRUE ELSE Disc:=FALSE; //AVANA start IF ServiceHead."Currency Code" = '' THEN RecCurrency.InitRoundingPrecision ELSE BEGIN ServiceHead.TESTFIELD("Currency Factor"); RecCurrency.GET(ServiceHead."Currency Code"); RecCurrency.TESTFIELD("Amount Rounding Precision"); IF Avaconfig."Statistics Quantity" = '1' THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine.Quantity*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine.Quantity * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine.Quantity; END ELSE IF Avaconfig."Statistics Quantity" = '2' THEN BEGIN IF (ServiceLine."Document Type" = ServiceLine."Document Type" :: "Credit Memo") THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Invoice"; LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Ship"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Ship" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Ship"; END ELSE IF Avaconfig."Statistics Quantity" = '3' THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA Avalara Inc. All rights reserved. Page 20 of 74

21 QtyPerLine:=ServiceLine."Qty. to Invoice"; //AVANA end IF TDocType=1 THEN BEGIN Search for below first line and modify the following changes ERROR(Text '%1',oGetTaxResult.Messages.Item(2).Summary); ELSE BEGIN Result:=FALSE; ERROR(Text Text ); AvaWindowOpen(StrMessage+Text ); HdrID:=fnObjToTbl(oGetTaxRequest,oGetTaxResult,oGetTaxResult.DocCode,TDocType,DT2DATE(oGetTaxResult.DocDate),D ocumenttype); //fnserviceqtyamtord(hdrid,serviceline); fnserviceqtyamtord(hdrid,serviceline,false); IF NOT Avaconfig."Show Message Dialog" THEN Changes in function fnservicecalctax1 IF NOT(AvaServCheckTaxReqd(ServiceHeaderNo,ServiceHeaderType)) THEN EXIT(TRUE); DCoefficient:=1; CASE ServiceHeaderType OF //0: BEGIN TDocType:=1; DCoefficient := 1; //1: BEGIN TDocType:=1; DCoefficient := 1; //2: BEGIN TDocType:=1; DCoefficient := 1; //3: BEGIN TDocType:=5; DCoefficient := -1; //4: BEGIN TDocType:=1; DCoefficient := 1; //5: BEGIN TDocType:=5; DCoefficient := -1; //AVANA ,1,2,4: BEGIN TDocType:=1; DCoefficient := 1; 3,5: BEGIN TDocType:=5; DCoefficient := -1; //AVANA idoctype:=0; IF PostInvRtn = 98 THEN idoctype:=1 ELSE IF PostInvRtn = 99 THEN idoctype:=5; fnclear; oaddto := oaddto.address; oaddfrom := oaddfrom.address; oaddfromline := oaddfromline.address; ogettaxrequest := ogettaxrequest.gettaxrequest; Avaconfig.FINDFIRST; Avalara Inc. All rights reserved. Page 21 of 74

22 IF Avaconfig.COGS THEN BEGIN IF FORMAT(Avaconfig."COGS Tax Group No.") ='' THEN TaxAreaCodeCOGS:='COGS' ELSE TaxAreaCodeCOGS:=Avaconfig."COGS Tax Group No."; DtlLevel:=3; EntityUseCode:=''; ServiceHead.SETRANGE(ServiceHead."No.",ServiceHeaderNo); ServiceHead.SETRANGE(ServiceHead."Document Type",ServiceHeaderType); ServiceHead.FINDFIRST; AvaValidCall.AvaDocLatLongService(ServiceHead,FALSE); //AVANA ShipMethod:=0; //Service AvaTax-POD IF STRPOS(ServiceHead."Shipment Method Code",Text ) <> 0 THEN ShipMethod:=1 ELSE IF STRPOS(ServiceHead."Tax Area Code",Text ) <> 0 THEN ShipMethod:=2; //Service AvaTax-POD DocumentType := FORMAT(ServiceHead."Document Type"); StrMessage:=Text FORMAT(ServiceHead."No.",STRLEN(FORMAT(ServiceHead."No."))); //AvaCheckSalesTaxAdjust1(ServiceHead."No.", ServiceHead."Document Type"); AvaCheckSalesTaxAdjust(ServiceHead."No.", ServiceHead."Document Type",TRUE); AvaTaxCalcDate:= AvaGetTaxCalcDate(ServiceHead."No.", ServiceHead."Document Type", 'Service', ServiceHead."Document Date");//Connect ExemptionNo:=''; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Bill-to Customer" THEN BEGIN //Cust.SETRANGE(Cust."No.",ServiceHead."Bill-to Customer No."); //IF Cust.FINDFIRST THEN IF Cust.GET(ServiceHead."Bill-to Customer No.") THEN ExemptionNo :=Cust."Tax Exemption No."; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Sell-to Customer" THEN //Cust.SETRANGE(Cust."No.",ServiceHead."Customer No."); //IF Cust.FINDFIRST THEN IF Cust.GET(ServiceHead."Customer No.") THEN ExemptionNo :=Cust."Tax Exemption No."; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Transaction Level" THEN ExemptionNo := ServiceHead."Tax Exemption No."; AvaWindowOpen(StrMessage); "TmpL 1":=''; "TmpL 2":=''; "TmpL 3":=''; TmpCity:=''; TmpState:=''; TmpZip:=''; TmpCountry:=''; ResultText:=''; TmpAddressSrc:=Text ; IF DocumentType = 'Credit Memo' THEN BEGIN //IF Avaconfig."Return Address" = '3' THEN BEGIN //fnserviceisemptyaddressret(1,servicehead,entityusecode); IF Avaconfig."Return Address" = '1' THEN BEGIN fnserviceisemptyaddressret(3,servicehead,entityusecode); Avalara Inc. All rights reserved. Page 22 of 74

23 "TmpL 1":=ServiceHead.Address; "TmpL 2":=ServiceHead."Address 2"; "TmpL 3":=''; TmpCity:=ServiceHead.City; TmpState:=ServiceHead.County; TmpZip:=fnAVAPinCheck(ServiceHead."Post Code"); TmpCountry:=FORMAT(ServiceHead."Country/Region Code"); END ELSE IF Avaconfig."Return Address" = '2' THEN BEGIN fnserviceisemptyaddressret(2,servicehead,entityusecode); "TmpL 1":=ServiceHead."Bill-to Address"; "TmpL 2":=ServiceHead."Bill-to Address 2"; "TmpL 3":=''; TmpCity:=ServiceHead."Bill-to City"; TmpState:=ServiceHead."Bill-to County"; TmpZip:=fnAVAPinCheck(ServiceHead."Bill-to Post Code"); TmpCountry:=FORMAT(ServiceHead."Bill-to Country/Region Code"); //END ELSE IF Avaconfig."Return Address" = '1' THEN BEGIN //fnserviceisemptyaddressret(3,servicehead,entityusecode); END ELSE IF Avaconfig."Return Address" = '3' THEN BEGIN fnserviceisemptyaddressret(1,servicehead,entityusecode); "TmpL 1":=ServiceHead."Ship-to Address"; "TmpL 2":=ServiceHead."Ship-to Address 2"; "TmpL 3":=''; TmpCity:=ServiceHead."Ship-to City"; Search for below first line and modify the following changes DestAVAAddrLatLongFlag := AVAAddrLatLongFlag; AVAAddrLatLongFlag := FALSE; TmpAddressSrc:=''; IF ServiceHead."Location Code"<>'' THEN BEGIN TmpAddressSrc:=Text ; Loc.GET(ServiceHead."Location Code"); "TmpL 1":=Loc.Address; "TmpL 2":=Loc."Address 2"; "TmpL 3":=''; TmpCity:=Loc.City; TmpState:=Loc.County; TmpZip:=fnAVAPinCheck(Loc."Post Code"); TmpCountry:=FORMAT(Loc."Country/Region Code"); TmpAddressSrc:=Text ; CompInfo.GET; "TmpL 1":=CompInfo."Ship-to Address"; "TmpL 2":=CompInfo."Ship-to Address 2"; "TmpL 3":=''; TmpCity:=CompInfo."Ship-to City"; TmpState:=CompInfo."Ship-to County"; TmpZip:=fnAVAPinCheck(CompInfo."Ship-to Post Code"); TmpCountry:=FORMAT(CompInfo."Ship-to Country/Region Code"); Search for below first line and modify the following changes IF Avaconfig."Source Code" = Avaconfig."Source Code"::"Sell-to Customer" THEN CustCode := ServiceHead."Customer No." Avalara Inc. All rights reserved. Page 23 of 74

24 ELSE CustCode := ServiceHead."Bill-to Customer No."; IF Avaconfig.FINDFIRST THEN; AvaAsynPosDoc (PassDocNo,ServiceHead."Document Type",ServiceHead."No."); LocCode := ''; CompInfo.GET; LrServiceLine.SETRANGE("Document Type",ServiceHead."Document Type"); LrServiceLine.SETRANGE("Document No.",ServiceHead."No."); LrServiceLine.SETFILTER(Type, '<>%1', ServiceLine.Type::" "); IF LrServiceLine.FINDFIRST THEN LocCode := LrServiceLine."Location Code"; IF (LocCode = '') AND (ServiceHead."Location Code" <> '') THEN LocCode := ServiceHead."Location Code"; IF (LocCode = '') THEN AvaGetLocationCode(ServiceHead."Responsibility Center",LocCode); fngettaxhdr(oaddfrom, oaddto, ShipMethod, Avaconfig."Company ID", PassDocNo, //ServiceHead."Document Date",//Connect AvaTaxCalcDate,//Connect-1905 idoctype, TotalDisc*DCoefficient, ExemptionNo, DtlLevel, CustCode, EntityUseCode, ServiceHead."Salesperson Code", ServiceHead."Your Reference", '', ogettaxrequest, OutStatus, LocCode ); IF ServiceHead."Currency Code" <> '' THEN BEGIN Tgcurrencycode:=ServiceHead."Currency Code"; ExRate:= ServiceHead."Currency Factor"; //ExDate:= ServiceHead."Document Date";//Connect-1905 ExDate:=AvaTaxCalcDate;//Connect-1905 fngettaxhdrv3(tgcurrencycode,exrate,exdate); Search for below first line and modify the following changes Old Code fngetitemdetails(servlineitemtype,serviceline."no.",serviceline."tax Group Code",Ref1,Ref2,"G\LAccNo.",TaxibilityCode,UnitPrice); Avalara Inc. All rights reserved. Page 24 of 74

25 Disc:=FALSE; IF ServiceLine."Inv. Discount Amount" <> 0 THEN Disc:=TRUE ELSE Disc:=FALSE; Avaconfig.FINDFIRST; InvoiceFlag := Avaconfig.Invoice; IF (ServiceLine."Qty. Shipped Not Invoiced") <> 0 THEN BEGIN IF InvoiceFlag THEN BEGIN IF ServiceLine."Qty. Shipped Not Invoiced" < ServiceLine."Qty. to Invoice" THEN BEGIN LineAmtPassed:=ROUND((ServiceLine."Qty. Shipped Not Invoiced"*UnitPrice) - ((ServiceLine."Qty. Shipped Not Invoiced" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. Shipped Not Invoiced"; LineAmtPassed:=ROUND((ServiceLine."Qty. to Invoice"*UnitPrice) - ((ServiceLine."Qty. to Invoice" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Invoice"; IF ServiceLine."Qty. Shipped Not Invoiced" < ServiceLine."Qty. to Invoice" THEN BEGIN LineAmtPassed:=ROUND((((ServiceLine."Qty. Shipped Not Invoiced")+(ServiceLine."Qty. to Ship"))*UnitPrice) - (((ServiceLine."Qty. Shipped Not Invoiced" + ServiceLine."Qty. to Ship") * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=(ServiceLine."Qty. Shipped Not Invoiced")+(ServiceLine."Qty. to Ship"); LineAmtPassed:=ROUND((ServiceLine."Qty. to Invoice"*UnitPrice) - ((ServiceLine."Qty. to Invoice" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Invoice"; IF (ServiceLine."Qty. Shipped Not Invoiced" = 0) THEN BEGIN LineAmtPassed:=ROUND((ServiceLine."Qty. to Invoice"*UnitPrice) - ((ServiceLine."Qty. to Invoice" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Invoice"; IF (ServiceLine."Document Type" = ServiceLine."Document Type" :: "Credit Memo") THEN BEGIN LineAmtPassed:=ROUND((ServiceLine."Qty. to Invoice"*UnitPrice) - ((ServiceLine."Qty. to Invoice" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Invoice"; IF TDocType=1 THEN BEGIN IF QtyPerLine < 0 THEN QtyPerLine:=QtyPerLine*-1; END ELSE IF TDocType=5 THEN BEGIN Modified Code (Search for 1st line / modified code marked in Rec color) fngetitemdetails(servlineitemtype,serviceline."no.",serviceline."tax Group Code",Ref1,Ref2,"G\LAccNo.",TaxibilityCode,UnitPrice); Disc:=FALSE; IF ServiceLine."Inv. Discount Amount" <> 0 THEN Avalara Inc. All rights reserved. Page 25 of 74

26 Disc:=TRUE ELSE Disc:=FALSE; Avaconfig.FINDFIRST; InvoiceFlag := Avaconfig.Invoice; //AVANA start IF ServiceHead."Currency Code" = '' THEN RecCurrency.InitRoundingPrecision ELSE BEGIN ServiceHead.TESTFIELD("Currency Factor"); RecCurrency.GET(ServiceHead."Currency Code"); RecCurrency.TESTFIELD("Amount Rounding Precision"); IF (ServiceLine."Qty. Shipped Not Invoiced") <> 0 THEN BEGIN IF InvoiceFlag THEN BEGIN IF ServiceLine."Qty. Shipped Not Invoiced" < ServiceLine."Qty. to Invoice" THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. Shipped Not Invoiced"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. Shipped Not Invoiced" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. Shipped Not Invoiced"; LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Invoice"; IF ServiceLine."Qty. Shipped Not Invoiced" < ServiceLine."Qty. to Invoice" THEN BEGIN LineAmtPassed:=ROUND(ROUND(((ServiceLine."Qty. Shipped Not Invoiced")+(ServiceLine."Qty. to Ship"))*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND((ServiceLine."Qty. Shipped Not Invoiced" + ServiceLine."Qty. to Ship") * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"), RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=(ServiceLine."Qty. Shipped Not Invoiced")+(ServiceLine."Qty. to Ship"); LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Invoice"; IF (ServiceLine."Qty. Shipped Not Invoiced" = 0) THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Invoice"; Avalara Inc. All rights reserved. Page 26 of 74

27 IF (ServiceLine."Document Type" = ServiceLine."Document Type" :: "Credit Memo") THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Invoice"; //AVANA end IF TDocType=1 THEN BEGIN IF QtyPerLine < 0 THEN QtyPerLine:=QtyPerLine*-1; END ELSE IF TDocType=5 THEN BEGIN Changes in function fnservicecalctaxbatch IF NOT(AvaCheckTaxReqd(SalesHeaderNo,SalesHeaderType)) THEN EXIT(TRUE); DCoefficient:=1; CASE SalesHeaderType OF //0: BEGIN TDocType:=1; DCoefficient := 1; //1: BEGIN TDocType:=1; DCoefficient := 1; //2: BEGIN TDocType:=1; DCoefficient := 1; //3: BEGIN TDocType:=5; DCoefficient := -1; //4: BEGIN TDocType:=1; DCoefficient := 1; //5: BEGIN TDocType:=5; DCoefficient := -1; //AVANA ,1,2,4: BEGIN TDocType:=1; DCoefficient := 1; 3,5: BEGIN TDocType:=5; DCoefficient := -1; //AVANA idoctype:=0; IF PostInvRtn = 98 THEN idoctype:=1 ELSE IF PostInvRtn = 99 THEN idoctype:=5; fnclear; Avaconfig.FINDFIRST; IF Avaconfig.COGS THEN BEGIN IF FORMAT(Avaconfig."COGS Tax Group No.") ='' THEN TaxAreaCodeCOGS:='COGS' ELSE TaxAreaCodeCOGS:=Avaconfig."COGS Tax Group No."; DtlLevel:=3; EntityUseCode:=''; SalesHead.SETRANGE("No.",SalesHeaderNo); SalesHead.SETRANGE("Document Type",SalesHeaderType); SalesHead.FINDFIRST; ShipMethod:=0; Avalara Inc. All rights reserved. Page 27 of 74

28 IF STRPOS(SalesHead."Shipment Method Code",Text ) <> 0 THEN ShipMethod:=1 ELSE IF STRPOS(SalesHead."Tax Area Code",Text ) <> 0 THEN ShipMethod:=2; DocumentType := FORMAT(SalesHead."Document Type"); //AvaCheckSalesTaxAdjust1(ServiceHead."No.", ServiceHead."Document Type"); AvaCheckSalesTaxAdjust(ServiceHead."No.", ServiceHead."Document Type",TRUE); ExemptionNo:=''; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Bill-to Customer" THEN BEGIN //Cust.SETRANGE(Cust."No.",SalesHead."Bill-to Customer No."); //IF Cust.FINDFIRST THEN IF Cust.GET(SalesHead."Bill-to Customer No.") THEN ExemptionNo :=Cust."Tax Exemption No."; IF SalesHead."Tax Exemption No." <>'' THEN ExemptionNo := SalesHead."Tax Exemption No." ELSE BEGIN IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Sell-to Customer" THEN //Cust.SETRANGE(Cust."No.",SalesHead."Sell-to Customer No."); //IF Cust.FINDFIRST THEN IF Cust.GET(SalesHead."Sell-to Customer No.") THEN ExemptionNo :=Cust."Tax Exemption No."; StrMessage:=Text FORMAT(SalesHead."No.",STRLEN(FORMAT(SalesHead."No."))); Modified Code (Search for 1st line / modified code marked in Rec color) TmpAddressSrc:=''; IF SalesHead."Location Code"<>'' THEN BEGIN TmpAddressSrc:=Text ; Loc.GET(SalesHead."Location Code"); "TmpL 1":=Loc.Address; "TmpL 2":=Loc."Address 2"; "TmpL 3":=''; TmpCity:=Loc.City; TmpState:=Loc.County; TmpZip:=fnAVAPinCheck(Loc."Post Code"); TmpCountry:=FORMAT(Loc."Country/Region Code"); TmpAddressSrc:=Text ; CompInfo.GET; "TmpL 1":=CompInfo."Ship-to Address"; "TmpL 2":=CompInfo."Ship-to Address 2"; "TmpL 3":=''; TmpCity:=CompInfo."Ship-to City"; TmpState:=CompInfo."Ship-to County"; TmpZip:=fnAVAPinCheck(CompInfo."Ship-to Post Code"); TmpCountry:=FORMAT(CompInfo."Ship-to Country/Region Code"); IF (Avaconfig."Chk. Address") AND NOT(Avaconfig."Disable Address") AND NOT(AVAAddrLatLongFlag) THEN BEGIN Search for below first line and modify the following changes Avalara Inc. All rights reserved. Page 28 of 74

29 Old Code fngetitemdetails(servlineitemtype,serviceline."no.",serviceline."tax Group Code",Ref1,Ref2,"G\LAccNo.",TaxibilityCode,UnitPrice); Disc:=FALSE; IF SalesLine."Inv. Discount Amount" <> 0 THEN Disc:=TRUE ELSE Disc:=FALSE; IF NOT (SalesHead.Ship AND SalesHead.Invoice) THEN BEGIN IF NOT AvaReleaseStatisticsBln THEN BEGIN //AVANA IF Avaconfig."Statistics Quantity" = '1' THEN BEGIN LineAmtPassed:=(SalesLine.Quantity*UnitPrice) - ROUND((SalesLine.Quantity * UnitPrice * SalesLine."Line Discount %")/100); QtyPerLine:=SalesLine.Quantity; END ELSE IF Avaconfig."Statistics Quantity" = '2' THEN BEGIN IF (SalesLine."Document Type" = SalesLine."Document Type" :: "Credit Memo") OR (SalesLine."Document Type" = SalesLine."Document Type" :: "Return Order") THEN BEGIN LineAmtPassed:=(SalesLine."Return Qty. to Receive"*UnitPrice) - ROUND((SalesLine."Return Qty. to Receive" * UnitPrice * SalesLine."Line Discount %")/100); QtyPerLine:=SalesLine."Return Qty. to Receive"; LineAmtPassed:=(SalesLine."Qty. to Ship"*UnitPrice) - ROUND((SalesLine."Qty. to Ship" * UnitPrice * SalesLine."Line Discount %")/100); QtyPerLine:=SalesLine."Qty. to Ship"; END ELSE IF Avaconfig."Statistics Quantity" = '3' THEN BEGIN LineAmtPassed:=(SalesLine."Qty. to Invoice"*UnitPrice) - ROUND((SalesLine."Qty. to Invoice" * UnitPrice * SalesLine."Line Discount %")/100); QtyPerLine:=SalesLine."Qty. to Invoice"; IF Avaconfig."Release Quantity" = '1' THEN BEGIN LineAmtPassed:=(SalesLine.Quantity*UnitPrice) - ROUND((SalesLine.Quantity * UnitPrice * SalesLine."Line Discount %")/100); QtyPerLine:=SalesLine.Quantity; END ELSE IF Avaconfig."Release Quantity" = '2' THEN BEGIN IF (SalesLine."Document Type" = SalesLine."Document Type" :: "Credit Memo") OR (SalesLine."Document Type" = SalesLine."Document Type" :: "Return Order") THEN BEGIN LineAmtPassed:=(SalesLine."Return Qty. to Receive"*UnitPrice) - ROUND((SalesLine."Return Qty. to Receive" * UnitPrice * SalesLine."Line Discount %")/100); QtyPerLine:=SalesLine."Return Qty. to Receive"; LineAmtPassed:=(SalesLine."Qty. to Ship"*UnitPrice) - ROUND((SalesLine."Qty. to Ship" * UnitPrice * SalesLine."Line Discount %")/100); QtyPerLine:=SalesLine."Qty. to Ship"; END ELSE IF Avaconfig."Release Quantity" = '3' THEN BEGIN LineAmtPassed:=(SalesLine."Qty. to Invoice"*UnitPrice) - ROUND((SalesLine."Qty. to Invoice" * UnitPrice * SalesLine."Line Discount %")/100); Avalara Inc. All rights reserved. Page 29 of 74

30 QtyPerLine:=SalesLine."Qty. to Invoice"; IF TDocType=1 THEN BEGIN IF QtyPerLine < 0 THEN QtyPerLine:=QtyPerLine*-1; END ELSE IF TDocType=5 THEN BEGIN Modified Code (Search for 1st line / modified code marked in Rec color) fngetitemdetails(servlineitemtype,serviceline."no.",serviceline."tax Group Code",Ref1,Ref2,"G\LAccNo.",TaxibilityCode,UnitPrice); Disc:=FALSE; IF SalesLine."Inv. Discount Amount" <> 0 THEN Disc:=TRUE ELSE Disc:=FALSE; //AVANA start IF SalesHead."Currency Code" = '' THEN RecCurrency.InitRoundingPrecision ELSE BEGIN SalesHead.TESTFIELD("Currency Factor"); RecCurrency.GET(SalesHead."Currency Code"); RecCurrency.TESTFIELD("Amount Rounding Precision"); IF NOT (SalesHead.Ship AND SalesHead.Invoice) THEN BEGIN IF NOT AvaReleaseStatisticsBln THEN BEGIN //CONNECT-1596 IF Avaconfig."Statistics Quantity" = '1' THEN BEGIN LineAmtPassed:=ROUND(SalesLine.Quantity*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(SalesLine.Quantity * UnitPrice,RecCurrency."Amount Rounding Precision") * SalesLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=SalesLine.Quantity; END ELSE IF Avaconfig."Statistics Quantity" = '2' THEN BEGIN IF (SalesLine."Document Type" = SalesLine."Document Type" :: "Credit Memo") OR (SalesLine."Document Type" = SalesLine."Document Type" :: "Return Order") THEN BEGIN LineAmtPassed:=ROUND(SalesLine."Return Qty. to Receive"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(SalesLine."Return Qty. to Receive" * UnitPrice,RecCurrency."Amount Rounding Precision") * SalesLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=SalesLine."Return Qty. to Receive"; LineAmtPassed:=ROUND(SalesLine."Qty. to Ship"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(SalesLine."Qty. to Ship" * UnitPrice,RecCurrency."Amount Rounding Precision") * SalesLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=SalesLine."Qty. to Ship"; END ELSE IF Avaconfig."Statistics Quantity" = '3' THEN BEGIN LineAmtPassed:=ROUND(SalesLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(SalesLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * SalesLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=SalesLine."Qty. to Invoice"; Avalara Inc. All rights reserved. Page 30 of 74

31 IF Avaconfig."Release Quantity" = '1' THEN BEGIN LineAmtPassed:=ROUND(SalesLine.Quantity*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(SalesLine.Quantity * UnitPrice,RecCurrency."Amount Rounding Precision") * SalesLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=SalesLine.Quantity; END ELSE IF Avaconfig."Release Quantity" = '2' THEN BEGIN IF (SalesLine."Document Type" = SalesLine."Document Type" :: "Credit Memo") OR (SalesLine."Document Type" = SalesLine."Document Type" :: "Return Order") THEN BEGIN LineAmtPassed:=ROUND(SalesLine."Return Qty. to Receive"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(SalesLine."Return Qty. to Receive" * UnitPrice,RecCurrency."Amount Rounding Precision") * SalesLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=SalesLine."Return Qty. to Receive"; LineAmtPassed:=ROUND(SalesLine."Qty. to Ship"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(SalesLine."Qty. to Ship" * UnitPrice,RecCurrency."Amount Rounding Precision") * SalesLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=SalesLine."Qty. to Ship"; END ELSE IF Avaconfig."Release Quantity" = '3' THEN BEGIN LineAmtPassed:=ROUND(SalesLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(SalesLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * SalesLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=SalesLine."Qty. to Invoice"; //AVANA end IF TDocType=1 THEN BEGIN IF QtyPerLine < 0 THEN QtyPerLine:=QtyPerLine*-1; END ELSE IF TDocType=5 THEN BEGIN Changes in function fnservcalctaxbatch IF NOT(AvaServCheckTaxReqd(ServiceHeaderNo,ServiceHeaderType)) THEN EXIT(TRUE); DCoefficient:=1; CASE ServiceHeaderType OF //0: BEGIN TDocType:=1; DCoefficient := 1; //1: BEGIN TDocType:=1; DCoefficient := 1; //2: BEGIN TDocType:=1; DCoefficient := 1; //3: BEGIN TDocType:=5; DCoefficient := -1; //4: BEGIN TDocType:=1; DCoefficient := 1; //5: BEGIN TDocType:=5; DCoefficient := -1; //AVANA ,1,2,4: BEGIN TDocType:=1; DCoefficient := 1; 3,5: BEGIN TDocType:=5; DCoefficient := -1; //AVANA idoctype:=0; IF PostInvRtn = 98 THEN idoctype:=1 ELSE IF PostInvRtn = 99 THEN Avalara Inc. All rights reserved. Page 31 of 74

32 idoctype:=5; fnclear; oaddto := oaddto.address; oaddfrom := oaddfrom.address; oaddfromline := oaddfromline.address; oaddtoline := oaddtoline.address; ogettaxrequest := ogettaxrequest.gettaxrequest; Avaconfig.FINDFIRST; IF Avaconfig.COGS THEN BEGIN IF FORMAT(Avaconfig."COGS Tax Group No.") ='' THEN TaxAreaCodeCOGS:='COGS' ELSE TaxAreaCodeCOGS:=Avaconfig."COGS Tax Group No."; DtlLevel:=3; EntityUseCode:=''; ServiceHead.SETRANGE(ServiceHead."No.",ServiceHeaderNo); ServiceHead.SETRANGE(ServiceHead."Document Type",ServiceHeaderType); ServiceHead.FINDFIRST; DocumentType := FORMAT(ServiceHead."Document Type"); //AvaCheckSalesTaxAdjust1(ServiceHead."No.", ServiceHead."Document Type"); AvaCheckSalesTaxAdjust(ServiceHead."No.", ServiceHead."Document Type",TRUE); AvaTaxCalcDate := AvaGetTaxCalcDate(ServiceHead."No.", ServiceHead."Document Type", 'Service', ServiceHead."Document Date");//Connect-1905 ExemptionNo:=''; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Bill-to Customer" THEN BEGIN //Cust.SETRANGE(Cust."No.",ServiceHead."Bill-to Customer No."); //IF Cust.FINDFIRST THEN IF Cust.GET(ServiceHead."Bill-to Customer No.") THEN ExemptionNo :=Cust."Tax Exemption No."; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Sell-to Customer" THEN //Cust.SETRANGE(Cust."No.",ServiceHead."Customer No."); //IF Cust.FINDFIRST THEN IF Cust.GET(ServiceHead."Customer No.") THEN ExemptionNo :=Cust."Tax Exemption No."; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Transaction Level" THEN ExemptionNo := ServiceHead."Tax Exemption No."; StrMessage:=Text FORMAT(ServiceHead."No.",STRLEN(FORMAT(ServiceHead."No."))); Modified Code (Search for 1st line / modified code marked in Rec color) TmpAddressSrc:=''; IF ServiceHead."Location Code"<>'' THEN BEGIN TmpAddressSrc:=Text ; Loc.GET(ServiceHead."Location Code"); Avalara Inc. All rights reserved. Page 32 of 74

33 "TmpL 1":=Loc.Address; "TmpL 2":=Loc."Address 2"; "TmpL 3":=''; TmpCity:=Loc.City; TmpState:=Loc.County; TmpZip:=fnAVAPinCheck(Loc."Post Code"); TmpCountry:=FORMAT(Loc."Country/Region Code"); TmpAddressSrc:=Text ; CompInfo.GET; "TmpL 1":=CompInfo."Ship-to Address"; "TmpL 2":=CompInfo."Ship-to Address 2"; "TmpL 3":=''; TmpCity:=CompInfo."Ship-to City"; TmpState:=CompInfo."Ship-to County"; TmpZip:=fnAVAPinCheck(CompInfo."Ship-to Post Code"); TmpCountry:=FORMAT(CompInfo."Ship-to Country/Region Code"); IF (Avaconfig."Chk. Address") AND NOT(Avaconfig."Disable Address") AND NOT(AVAAddrLatLongFlag) THEN BEGIN Modified Code (Search for 1st line / modified code marked in Rec color) IF Avaconfig."Source Code" = Avaconfig."Source Code"::"Sell-to Customer" THEN CustCode := ServiceHead."Customer No." ELSE CustCode := ServiceHead."Bill-to Customer No."; LocCode := ''; CompInfo.GET; LrServiceLine.SETRANGE("Document Type",ServiceHead."Document Type"); LrServiceLine.SETRANGE("Document No.",ServiceHead."No."); LrServiceLine.SETFILTER(Type, '<>%1', ServiceLine.Type::" "); IF LrServiceLine.FINDFIRST THEN LocCode := LrServiceLine."Location Code"; IF (LocCode = '') AND (ServiceHead."Location Code" <> '') THEN LocCode := ServiceHead."Location Code"; IF (LocCode = '') THEN AvaGetLocationCode(ServiceHead."Responsibility Center",LocCode); fngettaxhdr(oaddfrom, Search for below first line and modify the following changes Old Code fngetitemdetails(servlineitemtype,serviceline."no.",serviceline."tax Group Code",Ref1,Ref2,"G\LAccNo.",TaxibilityCode,UnitPrice); Disc:=FALSE; IF ServiceLine."Inv. Discount Amount" <> 0 THEN Disc:=TRUE ELSE Disc:=FALSE; IF NOT AvaReleaseStatisticsBln THEN BEGIN //AVANA IF Avaconfig."Statistics Quantity" = '1' THEN BEGIN Avalara Inc. All rights reserved. Page 33 of 74

34 LineAmtPassed:=ROUND((ServiceLine.Quantity*UnitPrice) - ((ServiceLine.Quantity * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine.Quantity; END ELSE IF Avaconfig."Statistics Quantity" = '2' THEN BEGIN IF (ServiceLine."Document Type" = ServiceLine."Document Type" :: "Credit Memo") THEN BEGIN LineAmtPassed:=ROUND((ServiceLine."Qty. to Invoice"*UnitPrice) - ((ServiceLine."Qty. to Invoice" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Invoice"; LineAmtPassed:=ROUND((ServiceLine."Qty. to Ship"*UnitPrice) - ((ServiceLine."Qty. to Ship" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Ship"; END ELSE IF Avaconfig."Statistics Quantity" = '3' THEN BEGIN LineAmtPassed:=ROUND((ServiceLine."Qty. to Invoice"*UnitPrice) - ((ServiceLine."Qty. to Invoice" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Invoice"; IF Avaconfig."Release Quantity" = '1' THEN BEGIN LineAmtPassed:=ROUND((ServiceLine.Quantity*UnitPrice) - ((ServiceLine.Quantity * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine.Quantity; END ELSE IF Avaconfig."Release Quantity" = '2' THEN BEGIN IF (ServiceLine."Document Type" = ServiceLine."Document Type" :: "Credit Memo") THEN BEGIN LineAmtPassed:=ROUND((ServiceLine."Qty. to Invoice"*UnitPrice) - ((ServiceLine."Qty. to Invoice" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Invoice"; LineAmtPassed:=ROUND((ServiceLine."Qty. to Ship"*UnitPrice) - ((ServiceLine."Qty. to Ship" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Ship"; END ELSE IF Avaconfig."Release Quantity" = '3' THEN BEGIN LineAmtPassed:=ROUND((ServiceLine."Qty. to Invoice"*UnitPrice) - ((ServiceLine."Qty. to Invoice" * UnitPrice * ServiceLine."Line Discount %")/100)); QtyPerLine:=ServiceLine."Qty. to Invoice"; IF TDocType=1 THEN BEGIN IF QtyPerLine < 0 THEN QtyPerLine:=QtyPerLine*-1; END ELSE IF TDocType=5 THEN BEGIN Modified Code (Search for 1st line / modified code marked in Rec color) fngetitemdetails(servlineitemtype,serviceline."no.",serviceline."tax Group Code",Ref1,Ref2,"G\LAccNo.",TaxibilityCode,UnitPrice); Disc:=FALSE; IF ServiceLine."Inv. Discount Amount" <> 0 THEN Disc:=TRUE ELSE Avalara Inc. All rights reserved. Page 34 of 74

35 Disc:=FALSE; //AVANA start IF ServiceHead."Currency Code" = '' THEN RecCurrency.InitRoundingPrecision ELSE BEGIN ServiceHead.TESTFIELD("Currency Factor"); RecCurrency.GET(ServiceHead."Currency Code"); RecCurrency.TESTFIELD("Amount Rounding Precision"); IF NOT AvaReleaseStatisticsBln THEN BEGIN //CONNECT-1596 IF Avaconfig."Statistics Quantity" = '1' THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine.Quantity*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine.Quantity * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"), RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine.Quantity; END ELSE IF Avaconfig."Statistics Quantity" = '2' THEN BEGIN IF (ServiceLine."Document Type" = ServiceLine."Document Type" :: "Credit Memo") THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Invoice"; LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Ship"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Ship" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Ship"; END ELSE IF Avaconfig."Statistics Quantity" = '3' THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Invoice"; IF Avaconfig."Release Quantity" = '1' THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine.Quantity*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine.Quantity * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine.Quantity; END ELSE IF Avaconfig."Release Quantity" = '2' THEN BEGIN IF (ServiceLine."Document Type" = ServiceLine."Document Type" :: "Credit Memo") THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Invoice"; LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Ship"*UnitPrice,RecCurrency."Amount Rounding Precision") - Avalara Inc. All rights reserved. Page 35 of 74

36 ROUND((ROUND(ServiceLine."Qty. to Ship" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Ship"; END ELSE IF Avaconfig."Release Quantity" = '3' THEN BEGIN LineAmtPassed:=ROUND(ROUND(ServiceLine."Qty. to Invoice"*UnitPrice,RecCurrency."Amount Rounding Precision") - ROUND((ROUND(ServiceLine."Qty. to Invoice" * UnitPrice,RecCurrency."Amount Rounding Precision") * ServiceLine."Line Discount %")/100,RecCurrency."Amount Rounding Precision"),RecCurrency."Amount Rounding Precision",'<'); //AVANA QtyPerLine:=ServiceLine."Qty. to Invoice"; //AVANA end IF TDocType=1 THEN BEGIN IF QtyPerLine < 0 THEN QtyPerLine:=QtyPerLine*-1; END ELSE IF TDocType=5 THEN BEGIN Changes in function AVAServiceBatchTaxFill Search for below first line and modify the following changes UNTIL Serviceline.NEXT = 0; //AvaCheckSalesTaxAdjust1(ServiceHead."No.", ServiceHead."Document Type"); AvaCheckSalesTaxAdjust(ServiceHead."No.", ServiceHead."Document Type",TRUE); ExemptionNo:=''; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Bill-to Customer" THEN BEGIN //Cust.SETRANGE(Cust."No.",ServiceHead."Bill-to Customer No."); //IF Cust.FINDFIRST THEN IF Cust.GET(ServiceHead."Bill-to Customer No.") THEN ExemptionNo :=Cust."Tax Exemption No."; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Sell-to Customer" THEN IF Cust.GET(ServiceHead."Customer No.") THEN ExemptionNo :=Cust."Tax Exemption No."; IF Avaconfig."Exempt Processing" = Avaconfig."Exempt Processing" :: "Transaction Level" THEN ExemptionNo := ServiceHead."Tax Exemption No."; AvaTaxCalcDate:=AvaGetTaxCalcDate(ServiceHead."No.", ServiceHead."Document Type", 'Service', ServiceHead."Document Date");//Connect AvaTaxUpdUtility.INIT; AvaTaxUpdUtility.No := ServiceHead."No."; AvaTaxUpdUtility."Document Type" := FORMAT(ServiceHead."Document Type"); AvaTaxUpdUtility."Sell-to Customer No." := ServiceHead."Customer No."; AvaTaxUpdUtility."Sell-to Customer Name" := ServiceHead.Name; AvaTaxUpdUtility."Bill-to Customer No." := ServiceHead."Bill-to Customer No."; AvaTaxUpdUtility."Bill-to Name" := ServiceHead."Bill-to Name"; //AvaTaxUpdUtility."Document Date" := ServiceHead."Document Date";//Connect-1905 Avalara Inc. All rights reserved. Page 36 of 74

37 AvaTaxUpdUtility."Document Date" := AvaTaxCalcDate;//Connect-1905 AvaTaxUpdUtility."Location Code" := ServiceHead."Location Code"; AvaTaxUpdUtility."Tax Area Code" := ServiceHead."Tax Area Code"; Create new function AvaGetTaxCalcDate Add Parameters Return Value Add variable Name DataType Subtype Length AvaDocTaxCalcDate Record AVA Document Tax Calc. Date Result:=iDocumentDate; IF (idocumenttype = 3) OR (idocumenttype = 5) THEN BEGIN AvaDocTaxCalcDate.RESET; AvaDocTaxCalcDate.SETFILTER("Document No.",iDocumentNo); AvaDocTaxCalcDate.SETFILTER("Document Type", FORMAT(iDocumentType)); AvaDocTaxCalcDate.SETFILTER("Document Group",iDocumentGroup); IF AvaDocTaxCalcDate.FINDFIRST AND (FORMAT(AvaDocTaxCalcDate."Tax Calculation Date") <> '') THEN Result := AvaDocTaxCalcDate."Tax Calculation Date"; //if result Date is blank in this case, AvaTax will pass "Document date" (idocumentdate) as "Doc Date" to GetTax Avalara Inc. All rights reserved. Page 37 of 74

38 Create new function AvaAsynPosDoc Add Parameters Add variable DocCount := 0; RecFound := FALSE; AvaHead.RESET; AvaHead.SETRANGE("AVA Document Type",DocType); AvaHead.SETFILTER("Document No.",'%1','*'+DocNo+'*'); IF AvaHead.FINDLAST THEN IF AvaHead."Status Code" = 'OK' THEN BEGIN DocCount := DocCount + AvaHead.COUNT; RecFound := TRUE; Avalara Inc. All rights reserved. Page 38 of 74

39 AvaHeadHst.RESET; AvaHeadHst.SETFILTER("Document No.",'%1','*'+DocNo+'*'); IF AvaHeadHst.FINDLAST THEN BEGIN DocCount := DocCount + AvaHeadHst.COUNT; RecFound := TRUE; IF RecFound THEN IF DocCount >0 THEN PassDocNo := PassDocNo + '-'+ FORMAT(DocCount) ELSE PassDocNo := AvaHead."Document No."; Create new function AvaGetLocationCode Add Parameters IF (LocCode = '') AND (ResponsibilityCenter <> '') THEN BEGIN ResCenter.GET(ResponsibilityCenter); LocCode := ResCenter."Location Code"; IF (LocCode = '') AND CompInfo.GET THEN IF CompInfo."Location Code" <> '' THEN LocCode := CompInfo."Location Code" ELSE LocCode :=CompInfo.Name; Avalara Inc. All rights reserved. Page 39 of 74

40 Codeunit AVA Purchase Validate Direct Import : New Code unit Codeunit AVA Use Tax Engine Direct Import : New Code unit Codeunit AVA Validate Call Changes in function AvaIsValidDocument //IF NOT(AvaCheckInstStatus) THEN IF NOT(AvaCheckInstStatus(Source)) THEN EXIT(FALSE); { IF NOT CuAvaInstal.IsAvaTaxInstalled THEN BEGIN IF Source = 1 THEN MESSAGE(Text ); Valid:=FALSE; EXIT; AvaConfig.RESET; AvaConfig.SETRANGE(AvaConfig."Account Number"); } Valid:=FALSE; IF AvaConfig.FINDFIRST THEN BEGIN //Valid:=TRUE; IF AvaConfig."Disable Tax Calc." THEN BEGIN Valid:= FALSE; EXIT; Valid:=TRUE; IF AvaUserPref.FINDLAST THEN IF AvaUserPref.Disable THEN BEGIN Valid:= FALSE; EXIT; //AvaUserPref.RESET; //AvaUserPref.SETRANGE(AvaUserPref."User Pref Name",USERID); IF AvaUserPref.FINDLAST THEN IF AvaUserPref.Disable THEN BEGIN Search for below first line and modify the following changes AvaCANTaxCount.SETFILTER(AvaCANTaxCount.Code,'%1 %2',Text ,CountryID); IF AvaCANTaxCount.FINDFIRST THEN Country:=TRUE ELSE Country:=FALSE; IF Country THEN Valid:=TRUE ELSE BEGIN IF Source = 1 THEN Avalara Inc. All rights reserved. Page 40 of 74

41 AvaUserPref.SETRANGE(AvaUserPref."User Pref Name",UPPERCASE(FORMAT(USERID,18))); IF AvaUserPref.FINDFIRST THEN BEGIN IF AvaUserPref.Warnings THEN Changes in function AvaPostInv Add new local variable PassDocNoNew : Text Search for below first line and modify the following changes SalesInvLine.SETRANGE("Document No.",SalesInv."No."); SalesInvLine.SETFILTER(Type, '<>%1', SalesInvLine.Type::" "); SalesInvLine.SETRANGE("Prepayment Line",FALSE); //AVANA IF SalesInvLine.FINDFIRST THEN REPEAT InvDiscountAmt:=SalesInvLine."Inv. Discount Amount"; Search for below first line and modify the following changes AvaWindowClose; IF AvaConfig.FINDFIRST THEN; //AVANA PassDocNoNew := FORMAT(OrigDocCode); AvaAsynPosDoc(PassDocNoNew,DocumentType,PassDocNoNew); //AVANA IF NOT AvaConfig."Enable AsynchronousAvaTax Post" THEN BEGIN //IF AvaTaxEngine.fnPosting(TmpDocID,AvaConfig."Company ID",DocType,FORMAT(DocCode),FORMAT(OrigDocCode),PostingDate,TotalAmt,TotalTax,ResultText,AvaHead."No.") THEN BEGIN IF AvaTaxEngine.fnPosting(TmpDocID,AvaConfig."Company ID",DocType,FORMAT(DocCode),PassDocNoNew,PostingDate,TotalAmt,TotalTax,ResultText,AvaHead."No.") THEN BEGIN //AVANA AvaWindowOpen(Text DocNumPre); AvaWindowClose; EXIT(TRUE); //AvaTaxEngine.fnCanceling(TmpDocID,AvaConfig."Company ID",DocType,2,FORMAT(DocCode)); //AVANA AvaTaxEngine.fnCanceling(TmpDocID,AvaConfig."Company ID",DocType,2,PassDocNoNew); //AVANA ERROR('%1',ResultText); END Changes in function AvaPostShp Add new local variable PassDocNoNew : Text Search for below first line and modify the following changes AvaWindowOpen(Text DocNumPre); AvaWindowClose; //AVANA Avalara Inc. All rights reserved. Page 41 of 74

42 PassDocNoNew := FORMAT(OrigDocCode); AvaAsynPosDoc(PassDocNoNew,FORMAT(SalesHdr."Document Type"),PassDocNoNew); //AVANA //IF AvaTaxEngine.fnPosting(TmpDocID,AvaConfig."Company ID",DocType,FORMAT(DocCode),FORMAT(OrigDocCode),PostingDate,TotalAmt,TotalTax,ResultText,AvaHead."No.") THEN BEGIN IF AvaTaxEngine.fnPosting(TmpDocID,AvaConfig."Company ID",DocType,FORMAT(DocCode),PassDocNoNew,PostingDate,TotalAmt,TotalTax,ResultText,AvaHead."No.") THEN BEGIN //AVANA AvaWindowOpen(Text DocNumPre); AvaWindowClose; EXIT(TRUE); //AvaTaxEngine.fnCanceling(TmpDocID,AvaConfig."Company ID",DocType,1,FORMAT(DocCode)); AvaTaxEngine.fnCanceling(TmpDocID,AvaConfig."Company ID",DocType,1,PassDocNoNew); //AVANA ERROR('%1',ResultText); Changes in function AvaPostRtn Add new local variable PassDocNoNew : Text Search for below first line and modify the following changes IF AvaConfig.FINDFIRST THEN; //AVANA PassDocNoNew := FORMAT(OrigDocCode); AvaAsynPosDoc(PassDocNoNew,DocumentType,PassDocNoNew); //AVANA IF NOT AvaConfig."Enable AsynchronousAvaTax Post" THEN BEGIN AvaWindowClose; //IF AvaTaxEngine.fnPosting(TmpDocID,AvaConfig."Company ID",DocType,FORMAT(DocCode),FORMAT(OrigDocCode),PostingDate,TotalAmt,TotalTax,ResultText,AvaHead."No.") THEN BEGIN IF AvaTaxEngine.fnPosting(TmpDocID,AvaConfig."Company ID",DocType,FORMAT(DocCode),PassDocNoNew,PostingDate,TotalAmt,TotalTax,ResultText,AvaHead."No.") THEN BEGIN //AVANA AvaWindowOpen(Text DocNumPre); AvaWindowClose; EXIT(TRUE); //AvaTaxEngine.fnCanceling(TmpDocID,AvaConfig."Company ID",DocType,2,FORMAT(DocCode)); AvaTaxEngine.fnCanceling(TmpDocID,AvaConfig."Company ID",DocType,2,PassDocNoNew); //AVANA ERROR('%1',ResultText); END ELSE BEGIN IF AvaHead."Document Id" = AvaHead."Document No." THEN BEGIN Avalara Inc. All rights reserved. Page 42 of 74

43 Changes in function AvaSetDocNumTypeTable Search for below first line and modify the following changes Old Code IF NOT(AvaCheckInstStatus) THEN EXIT; DocNum:=''; DocType:=0; TableType:=0; DocID:=''; AvaConfig.RESET; DocNum:=Num; DocType:=Type; TableType:=Table; IF Type=0 THEN DocNumPre:='QUO' + Num ELSE IF Type=1 THEN DocNumPre:='ORD' + Num ELSE IF Type=2 THEN DocNumPre:='INV' + Num ELSE IF Type=3 THEN DocNumPre:='CRM' + Num ELSE IF Type=4 THEN DocNumPre:='BLC' + Num ELSE IF Type=5 THEN DocNumPre:='RET' + Num; IF AvaConfig.FINDFIRST THEN; IF AvaConfig."Enable AsynchronousAvaTax Post" THEN BEGIN IF (Type = 1) OR (Type = 5) THEN BEGIN AvaHead.RESET; CASE Type OF 0: AvaHead.SETRANGE("Document Type",FORMAT(SalesHead."Document Type"::Quote)); 1: AvaHead.SETRANGE("Document Type",FORMAT(SalesHead."Document Type"::Order)); 2: AvaHead.SETRANGE("Document Type",FORMAT(SalesHead."Document Type"::Invoice)); 3: AvaHead.SETRANGE("Document Type",FORMAT(SalesHead."Document Type"::"Credit Memo")); 4: AvaHead.SETRANGE("Document Type",FORMAT(SalesHead."Document Type"::"Blanket Order")); 5: AvaHead.SETRANGE("Document Type",FORMAT(SalesHead."Document Type"::"Return Order")); AvaHead.SETFILTER("Document No.",'%1','*'+DocNumPre+'*'); IF AvaHead.FINDLAST THEN IF AvaHead."Status Code" = 'OK' THEN DocNumPre := DocNumPre + '-'+ FORMAT(AvaHead.COUNT) ELSE DocNumPre := AvaHead."Document No."; SalesLine.SETRANGE(SalesLine."Document Type",DocType) ; SalesLine.SETRANGE(SalesLine."Document No.",DocNum); SalesLine.SETFILTER(SalesLine.Type, '<>%1', SalesLine.Type::" "); IF SalesLine.FINDFIRST THEN BEGIN Avalara Inc. All rights reserved. Page 43 of 74

44 REPEAT IF AvaConfig.FINDFIRST THEN; IF (SalesLine."No." = 'SALESTAXADJUST') AND (AvaConfig."Enable Tax Amt Adj." = FALSE) THEN ERROR('"Sales Tax Adjustment" is disable in AvaTax Configuration % please enable before using "Sales Tax Adjustment Item"'); IF NOT(AvaConfig."Disable Tax Calc.") AND ((SalesLine."Tax Area Code"='') AND (SalesHead."Tax Area Code"='') AND (SalesHead."Tax Liable")) THEN BEGIN SalesLine.VALIDATE("Tax Area Code", AvaConfig."Tax Group No."); SalesLine.MODIFY; UNTIL (SalesLine.NEXT = 0); SalesHead.SETRANGE(SalesHead."Document Type",DocType); SalesHead.SETRANGE(SalesHead."No.",DocNum); IF SalesHead.FINDFIRST THEN BEGIN Modified Code (Search for 1st line / modified code marked in Rec color) IF NOT(AvaCheckInstStatus(0)) THEN EXIT; DocID:=''; DocNum:=Num; DocType:=Type; TableType:=Table; SalesHead.SETRANGE(SalesHead."Document Type",DocType); SalesHead.SETRANGE(SalesHead."No.",DocNum); IF SalesHead.FINDFIRST THEN; AvaSetDocNumPreSales(Type,Num,DocNumPre); AvaConfig.FINDFIRST; //AVANA //AVANA Start //IF AvaConfig."Enable AsynchronousAvaTax Post" THEN // AvaEvaluateForAsyncSales(Type,SalesHead,DocNumPre); AvaAsynPosDoc(DocNumPre,FORMAT(SalesHead."Document Type"),DocNumPre); //AVANA End SalesLine.SETRANGE("Document Type",DocType) ; SalesLine.SETRANGE("Document No.",DocNum); SalesLine.SETFILTER(SalesLine.Type, '<>%1', SalesLine.Type::" "); IF SalesLine.FINDFIRST THEN BEGIN REPEAT IF (SalesLine."No." = TextSalesTaxAdjust) AND NOT(AvaConfig."Enable Tax Amt Adj.") THEN ERROR('"Sales Tax Adjustment" is disable in AvaTax Configuration % please enable before using "Sales Tax Adjustment Item"'); IF NOT(AvaConfig."Disable Tax Calc.") AND ((SalesLine."Tax Area Code"='') AND (SalesHead."Tax Area Code"='') AND (SalesHead."Tax Liable")) THEN BEGIN SalesLine.VALIDATE("Tax Area Code", AvaConfig."Tax Group No."); SalesLine.MODIFY; UNTIL (SalesLine.NEXT = 0); Avalara Inc. All rights reserved. Page 44 of 74

45 Codeunit AVA TPA Direct Import : New Code unit Codeunit AVA IsInstalled Changes in function ConfigurationTableData Remove the following red colored lines MESSAGE('Inside Configuration Data'); RecObject.SETRANGE(RecObject.ID, ); IF RecObject.FIND('-') THEN AdapterV:= RecObject."Version List"; IF NOT AvaConfig.FINDFIRST THEN BEGIN MESSAGE('First record in the table'); AvaConfig.INIT; AvaConfigInitialData:=TRUE; END ELSE IF AvaConfig."Account Number" = '' THEN AvaConfigInitialData:=FALSE; AvaConfigInitialData:=TRUE; WITH AvaConfig DO BEGIN "Account Number":=AccValue; "License Key":=AccKey; "Tax Url":=URL; IF AvaConfigInitialData THEN BEGIN MESSAGE('setting initial data'); Initiate:=FALSE; "Disable Tax Calc.":=FALSE; "Disable Address":=FALSE; Create New function AvaIsAddrServEnabled Add Parameters Avalara Inc. All rights reserved. Page 45 of 74

46 Return Value Variables AvaResultValue := 1; AvaModFactor := 10; Result:=FALSE; IF IsAvaTaxInstalled AND iavaconfig.findfirst THEN IF ((iavaconfig.services MOD AvaModFactor) = AvaResultValue) THEN IF NOT(iAvaConfig."Disable Address") THEN Result:=TRUE; EXIT(Result); Create New function AvaIsTaxServEnabled Add Parameters Avalara Inc. All rights reserved. Page 46 of 74

47 Return Value Return Value Variables Avalara Inc. All rights reserved. Page 47 of 74

48 AvaResultValue := 1; AvaModFactor := 100; AvaDivFactor := 10; Result:=FALSE; IF IsAvaTaxInstalled AND iavaconfig.findfirst THEN IF (((iavaconfig.services MOD AvaModFactor) / AvaDivFactor) >= AvaResultValue) THEN IF NOT(iAvaConfig."Disable Tax Calc.") THEN Result:=TRUE; EXIT(Result); Create New function AvaIsCertServEnabled Add Parameters Return Value Avalara Inc. All rights reserved. Page 48 of 74

49 Variables AvaResultValue := 1; AvaDivFactor := 100; Result:=FALSE; IF IsAvaTaxInstalled AND iavaconfig.findfirst THEN IF ((iavaconfig.services / AvaDivFactor) >= AvaResultValue) THEN Result:=TRUE; EXIT(Result); Avalara Inc. All rights reserved. Page 49 of 74

50 Changes in Avalara Tables Table AVA CONFIG Changes in trigger OnModify() New code IF "Enable Use Tax" THEN TESTFIELD("Gen. Journal Batch Name"); Changes in trigger OnValidate() for field Account Number New code "Saved Changes" := FALSE; Changes in trigger OnValidate() for field License Key New code "Saved Changes" := FALSE; Changes in trigger OnValidate() for field Tax Url New code IF LOWERCASE("Tax Url") = ' THEN "Tax Url Option" := 0 ELSE IF LOWERCASE("Tax Url") = ' THEN "Tax Url Option" := 1 ELSE "Tax Url Option" := 2; "Saved Changes" := FALSE; Changes in Property for field Company ID New Property ValidateTableRelation=No; Add new field Ava User Name Field ID 61 Text 250 Code "Saved Changes" := FALSE; Add new field Ava Password Field ID 62 Text 250 Code "Saved Changes" := FALSE; Add new field Enable Use Tax Field ID 64 Boolean Code "Saved Changes" := FALSE; Avalara Inc. All rights reserved. Page 50 of 74

51 OnValidate() for field Enable Use Tax New code IF "Enable Use Tax" THEN BEGIN GenJournalBatch.RESET; GenJournalBatch.SETRANGE("Journal Template Name",'GENERAL'); GenJournalBatch.SETRANGE(Name,'AVATAX'); IF NOT GenJournalBatch.FINDFIRST THEN BEGIN GenJournalBatch.INIT; GenJournalBatch."Journal Template Name" := 'GENERAL'; GenJournalBatch.Name := 'AVATAX'; GenJournalBatch.Description := 'AvaTax for Use Tax Assessment'; GenJournalBatch."No. Series" := ''; GenJournalBatch.INSERT; Add new field Ava CU Credit AC Field ID 65 Code : 20 Add new field Ava CU Debit AC Field ID 66 Code : 20 Add new field Ava Cu Debit Opton Field ID 67 Option : Single Account,Inventory Account Add new field Gen. Journal Batch Name Field ID 68 TableRelation="Gen. Journal Batch".Name WHERE (Journal Template Name=CONST(GENERAL)) Add new field Saved Changes Field ID 69 Boolean Add new variable GenJournalBatch : Record 232 Avalara Inc. All rights reserved. Page 51 of 74

52 Table AVA Install Changes in function ItemTableData Code New RecItem.Description := 'AvaTax Sales Tax Only Adjustment'; Old RecItem.Description := 'AvaTax Sales Tax Only Adjment'; Table AVA Vendors Use Tax Assessment New Table direct import Table AVA Company List New Table direct import Avalara Inc. All rights reserved. Page 52 of 74

53 Changes in Avalara Pages Page AVA Address Validation Changes in Page Type New Old Card NavigatePage Changes in field property Tax Region Visible FALSE Editable FALSE Changes in Page Action Added Validate Addresses Old code //StatusCode:=AvaAddrValidn.AvaValidate("TmpL 1","TmpL 2","TmpL 3",TmpCity,TmpState,TmpZip,TmpCountry,ResultText,0);//Build 017 StatusCode:=AvaAddrValidn.AvaValidate("TmpL 1","TmpL 2","TmpL 3",TmpCity,TmpState,TmpZip,TmpCountry, TmpLatitude, TmpLongitude, TmpRegionID,ResultText,0); //Build 017 AcceptEnable:= FALSE; ValidateAddressEnable := TRUE; IF StatusCode = 0 THEN BEGIN IF STRLEN("TmpL 1") > 30 THEN BEGIN "VLine 1":=COPYSTR("TmpL 1", 1, 29); "VLine 2":=COPYSTR("TmpL 1", 29); "VLine 1":="TmpL 1"; "VLine 2":="TmpL 2"; Modified Code (Search for 1st line / modified code marked in Rec color) (Search for below first line and add colored line) //StatusCode:=AvaAddrValidn.AvaValidate("TmpL 1","TmpL 2","TmpL 3",TmpCity,TmpState,TmpZip,TmpCountry,ResultText,0);//Build 017 StatusCode:=AvaAddrValidn.AvaValidate("TmpL 1","TmpL 2","TmpL 3",TmpCity,TmpState,TmpZip,TmpCountry,TmpLatitude, TmpLongitude, TmpRegionID,ResultText,0); //Build 017 AcceptEnable:= FALSE; ValidateAddressEnable := TRUE; IF StatusCode = 0 THEN BEGIN IF STRLEN("TmpL 1") > 50 THEN BEGIN "VLine 1":=COPYSTR("TmpL 1", 1, 49); "VLine 2":=COPYSTR("TmpL 1", 49); "VLine 1":="TmpL 1"; "VLine 2":="TmpL 2"; Avalara Inc. All rights reserved. Page 53 of 74

54 Changes in function InitForm Old code AcceptEnable := FALSE; ValidateAddressEnable := FALSE; IF StatusCode = 0 THEN BEGIN IF STRLEN("TmpL 1") > 30 THEN BEGIN "VLine 1":=COPYSTR("TmpL 1", 1, 29); "VLine 2":=COPYSTR("TmpL 1", 29); "VLine 1":="TmpL 1"; "VLine 2":="TmpL 2"; Modified Code (Search for 1st line / modified code marked in Rec color) AcceptEnable := FALSE; ValidateAddressEnable := FALSE; IF StatusCode = 0 THEN BEGIN IF STRLEN("TmpL 1") > 50 THEN BEGIN "VLine 1":=COPYSTR("TmpL 1", 1, 49); "VLine 2":=COPYSTR("TmpL 1", 49); "VLine 1":="TmpL 1"; "VLine 2":="TmpL 2"; Changes in function RtnAddress Old code IF STRLEN("VLine 1") > 30 THEN BEGIN L1:=COPYSTR("VLine 1", 0, 29); L2:=COPYSTR("VLine 1", 29, STRLEN("VLine 1")-29); L1:="VLine 1"; L2:="VLine 2"; Ct:=VCity; Modified Code (Search for 1st line / modified code marked in Rec color) IF STRLEN("VLine 1") > 50 THEN BEGIN L1:=COPYSTR("VLine 1", 0, 49); L2:=COPYSTR("VLine 1", 49, STRLEN("VLine 1")-49); L1:="VLine 1"; L2:="VLine 2"; Ct:=VCity; Avalara Inc. All rights reserved. Page 54 of 74

55 Page AVA Batch Address Validation Changes in trigger OnOpenPage Modified Code (Search for 1st line / modified code marked in Rec color) IF NOT CuIsInstalled.IsAvaTaxInstalled THEN CurrPage.CLOSE; IF CuIsInstalled.AvaIsAddrServEnabled(AvaConfig1) THEN BEGIN CurrPage.EDITABLE := TRUE; AvaEnableDisableAllActions(TRUE);//Changes RecMassCustomerAdd.SETRANGE(RecMassCustomerAdd."No."); RecMassCustomerAdd.DELETEALL(); RecMassVendorAdd.SETRANGE(RecMassVendorAdd."No."); RecMassVendorAdd.DELETEALL(); RecMassLocationAdd.SETRANGE(RecMassLocationAdd.Code); RecMassLocationAdd.DELETEALL(); //Modified for Role Tailored Version MassAddValidCustEnable := TRUE; MassAddValidVendEnable := TRUE; MassAddValidLocalEnable := TRUE; CurrPage.sfMassAddValidCust.PAGE.UpdateForm; CurrPage.sfMassAddValidVend.PAGE.UpdateForm; CurrPage.sfMassAddValidLocal.PAGE.UpdateForm; CurrPage.EDITABLE := FALSE; AvaEnableDisableAllActions(FALSE);//Changes New function AvaEnableDisableAllActions code AcceptEnable := ienabledisable; MarkAllEnable := ienabledisable; UnMarkAllEnable := ienabledisable; ValidateAddressEnable := ienabledisable; ReportEnable := ienabledisable; ValidateRangeEnable := ienabledisable; MassAddValidCustEnable := ienabledisable; MassAddValidVendEnable := ienabledisable; MassAddValidLocalEnable := ienabledisable; Avalara Inc. All rights reserved. Page 55 of 74

56 Page AVA Statistics Changes in SourceExpr for Document Type Modified Code (Search for 1st line / modified code marked in Rec color) SourceExpr=TType; Modified Code (Search for 1st line / modified code marked in Rec color) SourceExpr="Document Type"; Page AVA Setup Assistant Changes in Source Expr TestConnectionSuccess Modified Code (Search for 1st line / modified code marked in Rec color) IF TestConnectionSuccess = Text THEN CuAVATPA.RUN; Add new variable CuAVATPA Codeunit Changes in Text Constant Text Text New value Congratultions! You are connected to Avalara AvaTax. You may still need to complete additional configuration tasks before using AvaTax. Click here to launch the AvaTax Tax Profile Assistant Old value Great! You are connected to Avalara AvaTax. You may still need to complete additional configuration tasks before using AvaTax Click here to see your complete Setup Report Avalara Inc. All rights reserved. Page 56 of 74

57 Page AVA Account Credentials Changes in trigger OnInit Modified Code (Search for 1st line / modified code marked in Rec color) IF "Saved Changes" THEN CUFetchCompanyList.FetchCompanyList; Changes in Action Test connection Modified Code (Search for 1st line / modified code marked in Rec color) lavafirsttimevalidation:=false; AvaDisableAllServices; IF AvaValidateCredValues THEN BEGIN IF NOT AvaIsInstalled.IsAvaTaxInstalled THEN BEGIN AvaIsInstalled.InitiateAvaInstall; lavafirsttimevalidation:=true; IF (AvaAddValidation.AvaIsAuthorised("License Key","Account Number","Tax Url",ResultText,Adapter,"Expiery Date","Services Enabled") >= 1) AND ( AvaAddValidation.AvaIsAuthorised("Ava Password","Ava User Name","Tax Url",ResultText,Adapter,"Expiery Date","Services Enabled") >= 1) THEN BEGIN ResultText:=Text FORMAT("Expiery Date"); "Saved Changes" := TRUE; Services:=AvaAddValidation.GetAVAServices; AddSecEnabled:=(((Services MOD 100) MOD 10) = 1); TaxSecEnabled:=(((Services MOD 100)/10) >= 1); CertSecEnabled:=(((Services / 100)) >= 1); AvaEnableAllServices(lAvaFirstTimeValidation); AvaInstald.InitializeConfigValues(TRUE,Adapter,"Account Number","License Key","Tax Url",FALSE,FALSE,TRUE,FALSE,Adapter,"Company ID","Expiery Date"); Modified Code (Search for 1st line / modified code marked in Rec color) BlnValidateComp := FALSE; EditSetting := TRUE; MESSAGE(ResultText); MODIFY; IF "Saved Changes"THEN CUFetchCompanyList.FetchCompanyList; CurrPage.UPDATE; Changes in Action Verify Company Code Remove this action Changes in field trigger Account Number Modified Code (Search for 1st line / modified code marked in Rec color) "Saved Changes" := FALSE; BlnValidateComp := FALSE; VALIDATE("Tax Url"); Avalara Inc. All rights reserved. Page 57 of 74

58 Add new field Username & Password Add new part Company List (PagePartID=Page ;) Changes in field trigger AvaValidateCredValues Modified code highlighted in red color Valid:=FALSE; IF "Account Number"='' THEN BEGIN ERROR(Text ) END ELSE IF "License Key"='' THEN BEGIN ERROR(Text ) END ELSE IF "Ava User Name"='' THEN BEGIN ERROR(Text ) END ELSE IF "Ava Password"='' THEN BEGIN ERROR(Text ) END ELSE IF "Tax Url"='' THEN BEGIN ERROR(Text ) END ELSE Valid:=TRUE; EXIT(Valid); Avalara Inc. All rights reserved. Page 58 of 74

59 Page AVA Configuration Card Changes in trigger OnInit Modified Code (Search for 1st line / modified code marked in Rec color) txttaxitemtaxschidenable := TRUE; EntityUseCodeEnable := TRUE; bavacudebitoption := TRUE; bavacudebitac := TRUE; bavacucreditac := TRUE; WebURL := ' Changes in trigger OnAfterGetRecord Modified Code (Search for 1st line / modified code marked in Rec color) AvaAddressEnableDisable; AvaUseTaxEnableDisable; AvaDebitAcEnableDisable; IF "Return Address" = '1' THEN Changes in Action trigger OnAction of Verify Credentials Modified Code (Search for 1st line / modified code marked in Rec color) IF AvaValidateCredValues() THEN BEGIN IF AvaAddrvalidn.AvaIsAuthorised("License Key","Account Number","Tax Url",ResultText,Adapter,"Expiery Date","Services Enabled") >= 1 THEN BEGIN ResultText:=Text FORMAT("Expiery Date"); CUAvaTPA.FetchCompanyList; "Saved Changes" := TRUE; IF NOT AvaInstald.IsAvaTaxInstalled() THEN BEGIN AvaInstald.InitializeConfigValues(TRUE,Adapter,"Account Number","License Key","Tax Url", FALSE,FALSE,TRUE,FALSE,Adapter,"Company ID","Expiery Date"); AvaInstald.InitiateApplicationData(); Initiate:=FALSE; "Disable Tax Calc.":=FALSE; "Disable Address":=FALSE; US:=FALSE; CAN:=FALSE; "Tax Group No.":='AVATAX'; "Batch Address Vlid" :=TRUE; "Display Warnings":=TRUE; "Entity\Use":=TRUE; "Shipping Code":='FR'; "Misc. Code":='HNLD'; "Show Statistics":=TRUE; RecAVASetUpAssistant.RESET; IF RecAVASetUpAssistant.FINDFIRST THEN BEGIN RecAVASetUpAssistant.Credentials := ''; RecAVASetUpAssistant."Valid Account Credentials":= FALSE; RecAVASetUpAssistant.MODIFY; END ELSE BEGIN RecAVASetUpAssistant."Primary Key" := ''; RecAVASetUpAssistant.Credentials := ''; RecAVASetUpAssistant."Valid Account Credentials":= FALSE; RecAVASetUpAssistant.INSERT; Avalara Inc. All rights reserved. Page 59 of 74

60 RecAVASetUpAssistant.RESET; IF RecAVASetUpAssistant.FINDFIRST THEN BEGIN RecAVASetUpAssistant.Credentials := 'Verified on '+ FORMAT(CURRENTDATETIME); RecAVASetUpAssistant."Valid Account Credentials":= TRUE; RecAVASetUpAssistant.MODIFY; END ELSE BEGIN RecAVASetUpAssistant."Primary Key" := ''; RecAVASetUpAssistant.Credentials := 'Verified on '+ FORMAT(CURRENTDATETIME); RecAVASetUpAssistant."Valid Account Credentials":= TRUE; RecAVASetUpAssistant.INSERT; RecAVAAddressCountry.RESET; RecAVAAddressCountry.SETRANGE(Code,'00'); IF RecAVAAddressCountry.COUNT = 0 THEN BEGIN RecAVAAddressCountry.INIT; RecAVAAddressCountry.Code:='00'; RecAVAAddressCountry.Name:='No Country Name'; RecAVAAddressCountry.Check := TRUE; RecAVAAddressCountry."Form Check" := TRUE; RecAVAAddressCountry.INSERT; "Connector Version":= Text ; AvaEnableCredentials(FALSE); Services:=AvaAddrvalidn.GetAVAServices; MODIFY; MESSAGE(ResultText); // // IF "Account Number"='' THEN BEGIN // ERROR('Please enter a valid Account Value'); // EXIT; // // IF "License Key"='' THEN BEGIN // ERROR('Please enter a valid Licence Key'); // EXIT; // // IF "Tax Url"='' THEN // ERROR('Please enter a valid URL'); // IF "Company ID"='' THEN // ERROR('Please enter a valid Company ID'); IF AVAConfig.FINDFIRST THEN BEGIN IF NOT AvaInstald.AvaIsTaxServEnabled(AVAConfig) THEN BEGIN Avalara Inc. All rights reserved. Page 60 of 74

61 Changes in Page design Global variable Add new Name DataType SubType chkdbaccounttype Boolean bavacudebitoption Boolean bavacudebitac Boolean bavacucreditac Boolean CUAvaTPA Codeunit AVA TPA Create new Function AvaInitiation Local Text variables AvaTaxEnableDisable; AvaAddressEnableDisable; AvaUseTaxEnableDisable; AvaDebitAcEnableDisable; AvaEnableCredentials(TRUE); Create new Function AvaInitiation Local Text variables ItemAcc:=FALSE; UpdateDefaulData :=FALSE; bavacucreditac := FALSE; bavacudebitoption := FALSE; bavacudebitac := FALSE; AvaTaxInitEnableDisable; ChkTaxAlwaysCheckEnable :=TRUE; ChkTaxCOGSEnable :=TRUE; TaxSchIDEnable :=TRUE; EnableTaxAmtAdjEnable := TRUE; ExemptionProcessingEnable := TRUE; txttaxitemtaxschidenable := TRUE; Avalara Inc. All rights reserved. Page 61 of 74

62 SourcecustomercodefromEnable := TRUE; AtorderreleaseEnable := TRUE; AtF9StatisticsEnable := TRUE; optaxschidyesenable := TRUE; DisWwarning:=TRUE; TaxGM :=TRUE; UserDefined1:=TRUE; UserD2Enabled:=TRUE; ItemAcc:=TRUE; UpdateDefaulData :=TRUE; bavacucreditac := TRUE; bavacudebitoption := TRUE; bavacudebitac := TRUE; AvaTaxInitEnableDisable; Create new Function AvaValidateCredValues Local Text variables Text : TextConst 'ENU=Please enter a valid Account Number'; Text : TextConst 'ENU=Please enter a valid Licence Key'; Text : TextConst 'ENU=Please enter a valid URL'; Text : TextConst 'ENU=Please enter a valid Username'; Text : TextConst 'ENU=Please enter a valid Password'; Text : TextConst 'ENU=Please enter a valid Company ID'; Code Valid:=FALSE; IF "Account Number"='' THEN BEGIN ERROR(Text ) END ELSE IF "License Key"='' THEN BEGIN ERROR(Text ) END ELSE IF "Ava User Name"='' THEN BEGIN ERROR(Text ) END ELSE IF "Ava Password"='' THEN BEGIN ERROR(Text ) END ELSE IF "Tax Url"='' THEN BEGIN ERROR(Text ) END ELSE IF "Company ID"='' THEN BEGIN ERROR(Text ) END ELSE Valid:=TRUE; EXIT(Valid); Create new Function AvaUseTaxEnableDisable Code IF ISEMPTY THEN EXIT; IF NOT "Enable Use Tax" THEN BEGIN bavacudebitoption := FALSE; bavacudebitac := FALSE; bavacucreditac := FALSE; Avalara Inc. All rights reserved. Page 62 of 74

63 bavacudebitoption := TRUE; bavacudebitac := TRUE; bavacucreditac := TRUE; Create new Function AvaDebitAcEnableDisable Code IF "Ava Cu Debit Opton" = "Ava Cu Debit Opton"::"Single Account" THEN bavacudebitac :=TRUE ELSE bavacudebitac :=FALSE; Page AVA SOP Utility Changes in Action trigger Sales Get Tax Add Local variable IsDateValid Text (250) Modified Code (Search for 1st line / modified code marked in Rec color) FnError; AvaClearData; IsDateValid:=ValidateDateValues(StartDate, EndDate); IF IsDateValid <> '' THEN ERROR(IsDateValid); RESET; SETRANGE("Document Type"); DocType:=''; DocType:= FnFilter; IF FINDFIRST THEN BEGIN REPEAT ReleaseSalesDoc.Reopen(Rec); AvaValidCall.AvaSetDocNumTypeTable("No.","Document Type",1); IF AvaValidCall.AvaIsValidDocumentBatch(1) THEN BEGIN Changes in Action trigger Service Get Tax Add Local variable IsDateValid Text[250]; ServiceDocumentRange Text[250]; Modified Code (Search for 1st line / modified code marked in Rec color) FnError; AvaClearData; IsDateValid:=ValidateDateValues(ServStartDate, ServEndDate); IF IsDateValid <> '' THEN ERROR(IsDateValid); ServiceHead.RESET; ServiceHead.SETRANGE("Document Type"); DocType:=''; Avalara Inc. All rights reserved. Page 63 of 74

64 DocType:= FnServiceFilter; ServiceDocumentRange:=ValidServiceDocumentRange; ServiceHead.SETFILTER("No.",ServiceDocumentRange); IF ServiceHead.FINDFIRST THEN BEGIN REPEAT AvaValidCall.AvaServiceSetDocNumTypeTable(ServiceHead."No.",ServiceHead."Document Type",1); IF AvaValidCall.AvaServiceIsValidDocumentBatch(1) THEN BEGIN IF AvaValidCall.ReleaseServiceBatchSales(ServiceHead) THEN BEGIN Remarks := 'SUCCESS'; Status := 'SUCCESS'; AvaValidCall.AvaServiceBatchTaxFill_data(ServiceHead,Remarks,Status); COMMIT; UNTIL ServiceHead.NEXT = 0; ServiceHead.RESET; ServiceHead.SETRANGE("No."); MESSAGE(Text DocType); CurrPage.subUtilityDetail.PAGE.SETTABLEVIEW(AvaTaxUpdUtility); CurrPage.subUtilityDetail.PAGE.Refresh; Changes in function FnFilter Modified Code (Search for 1st line / modified code marked in Rec color) CLEAR(AvaGetTaxBuf); RESET; SETRANGE("Document Type"); ltaxenableflag:=false; IF OpDocType = 0 THEN BEGIN RESET; SETRANGE("Document Type","Document Type"::Quote); SalesSetFilter(TQuote,StartDate,EndDate,lTaxEnableFlag); END ELSE IF OpDocType = 1 THEN BEGIN RESET; DocType := 'Order'; SETRANGE("Document Type","Document Type"::Order); SalesSetFilter(TOrder,StartDate,EndDate,lTaxEnableFlag); END ELSE IF OpDocType = 2 THEN BEGIN RESET; DocType := 'Invoice'; SalesSetFilter(TInvoice,StartDate,EndDate,lTaxEnableFlag); END ELSE IF OpDocType = 3 THEN BEGIN RESET; DocType := 'Credit Memo'; Avalara Inc. All rights reserved. Page 64 of 74

65 SalesSetFilter(TCreditMemo,StartDate,EndDate,lTaxEnableFlag); END ELSE IF OpDocType = 4 THEN BEGIN RESET; DocType := 'Blanket Order'; SalesSetFilter(TBlanketOrd,StartDate,EndDate,lTaxEnableFlag); END ELSE IF OpDocType = 5 THEN BEGIN RESET; DocType := 'Return Order'; SalesSetFilter(TReturnOrder,StartDate,EndDate,lTaxEnableFlag); TaxEnable:=lTaxEnableFlag; EXIT(DocType); Changes in function FnSelectType Modified Code (Search for 1st line / modified code marked in Rec color) QuoteVisible := FALSE; TQuote := ''; OrderVisible := FALSE; TOrder := ''; InvoiceVisible := FALSE; TInvoice := ''; CreditMemoVisible := FALSE; TCreditMemo := ''; BlanketOrderVisible := FALSE; TBlanketOrd := ''; ReturnOrderVisible := FALSE; TReturnOrder := ''; IF OpDocType = 0 THEN BEGIN QuoteVisible := TRUE; TQuote := ''; END ELSE IF OpDocType = 1 THEN BEGIN OrderVisible := TRUE; TOrder := ''; END ELSE IF OpDocType = 2 THEN BEGIN InvoiceVisible := TRUE; TInvoice := ''; END ELSE IF OpDocType = 3 THEN BEGIN CreditMemoVisible := TRUE; TCreditMemo := ''; END ELSE IF OpDocType = 4 THEN BEGIN BlanketOrderVisible := TRUE; TBlanketOrd := ''; END ELSE IF OpDocType = 5 THEN BEGIN ReturnOrderVisible := TRUE; TReturnOrder := ''; Changes in function FnServiceFilter Modified Code (Search for 1st line / modified code marked in Rec color) CLEAR(AvaGetTaxBuf); ServiceHead.RESET; ServiceHead.SETRANGE("Document Type"); IF OpServDocType = 0 THEN BEGIN ServiceSetFilter(TServQuote,ServStartDate,ServEndDate); END ELSE IF OpServDocType = 1 THEN BEGIN IF ServiceHead.FINDFIRST THEN ServiceSetFilter(TServOrder,ServStartDate,ServEndDate); END ELSE IF OpServDocType = 2 THEN Avalara Inc. All rights reserved. Page 65 of 74

66 BEGIN DocType := 'Invoice'; ServiceHead.RESET; ServiceHead.SETRANGE(ServiceHead."Document Type","Document Type"::Invoice); IF ServiceHead.FINDFIRST THEN ServiceSetFilter(TServInvoice,ServStartDate,ServEndDate); END ELSE IF OpServDocType = 3 THEN BEGIN DocType := 'Credit Memo'; ServiceHead.RESET; ServiceHead.SETRANGE(ServiceHead."Document Type","Document Type"::"Credit Memo"); IF ServiceHead.FINDFIRST THEN ServiceSetFilter(TServCreditMemo,ServStartDate,ServEndDate); EXIT(DocType); Changes in function FnServiceSelectType Modified Code (Search for 1st line / modified code marked in Rec color) ServQuoteVisible := FALSE; TServQuote := ''; ServOrderVisible := FALSE; TServOrder := ''; ServInvoiceVisible := FALSE; TServInvoice := ''; ServCreditMemoVisible := FALSE; TServCreditMemo := ''; IF OpServDocType = 0 THEN BEGIN ServQuoteVisible := TRUE; TServQuote := ''; END ELSE IF OpServDocType = 1 THEN BEGIN ServOrderVisible := TRUE; TServOrder := ''; END ELSE IF OpServDocType = 2 THEN BEGIN ServInvoiceVisible := TRUE; TServInvoice := ''; END ELSE IF OpServDocType = 3 THEN BEGIN ServCreditMemoVisible := TRUE; TServCreditMemo := ''; New function ValidateDateValues Parameter istartdate: Date ienddate: Date Return Result : Text[250] Modified Code (Search for 1st line / modified code marked in Rec color) Result:=''; IF IsDateBlank(iStartDate) AND NOT(IsDateBlank(iEndDate)) THEN Result:=Text ; IF IsDateBlank(iEndDate) AND NOT(IsDateBlank(iStartDate)) THEN Result:=Text ; IF istartdate > ienddate THEN Result:=Text ; EXIT(Result); Avalara Inc. All rights reserved. Page 66 of 74

67 New function ValidServiceDocumentRange Return Text[250] Modified Code (Search for 1st line / modified code marked in Rec color) ServiceDocumentRange:=''; IF (TServQuote<>'') OR (TServOrder <> '') OR (TServInvoice<>'') OR (TServCreditMemo<>'') THEN IF TServQuote<>'' THEN ServiceDocumentRange:=TServQuote ELSE IF TServOrder<>'' THEN ServiceDocumentRange:=TServOrder ELSE IF TServInvoice<>'' THEN ServiceDocumentRange:=TServInvoice ELSE IF TServCreditMemo<>'' THEN ServiceDocumentRange:=TServCreditMemo; EXIT(ServiceDocumentRange); New function IsDateBlank Parameter idate: Date Return Boolean Modified Code (Search for 1st line / modified code marked in Rec color) EXIT((FORMAT(iDate) = '')); New function SalesSetFilter Parameters Modified Code (Search for 1st line / modified code marked in Rec color) IF NOT((iDocType = '') AND IsDateBlank(iStartDate)) THEN vtaxenableflag := TRUE; IF idoctype <> '' THEN SETFILTER("No.",iDocType); IF NOT(IsDateBlank(iStartDate)) THEN SETFILTER("Document Date",'%1..%2',iStartDate,iEndDate); Avalara Inc. All rights reserved. Page 67 of 74

68 New function dssdsf Parameters Modified Code (Search for 1st line / modified code marked in Rec color) IF idoctype <> '' THEN ServiceHead.SETFILTER("No.",iDocType); IF NOT(IsDateBlank(iStartDate)) THEN ServiceHead.SETFILTER("Document Date",'%1..%2',iStartDate,iEndDate); Page AVA Vendors Use Tax Assessment New Page direct import Page AVA Vendor Use Tax Assessment New Page direct import Page AVA Vendor Accrue Utility New Page direct import Page AVA Document Tax Calc. Date New Page direct import Page AVA Company List New Page direct import Avalara Inc. All rights reserved. Page 68 of 74

Avalara AvaTax for Microsoft Dynamics NAV 2013 RTM

Avalara AvaTax for Microsoft Dynamics NAV 2013 RTM Avalara AvaTax for Microsoft Dynamics NAV 2013 RTM Version 01 Revision date: 4/30/15 Product release: Microsoft NAV 7.00.33781.05.00 Avalara may have patents, patent applications, trademarks, copyrights,

More information

Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM

Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM Version 01 Revision date: 11/30/17 Product release: Microsoft NAV 8.00.37874.11.04 Avalara may have patents, patent applications, trademarks, copyrights,

More information

Avalara AvaTax for Microsoft Dynamics NAV 2013 R2

Avalara AvaTax for Microsoft Dynamics NAV 2013 R2 Avalara AvaTax for Microsoft Dynamics NAV 2013 R2 Version 01 Revision date: 9/9/15 Product release: Microsoft NAV 7.10.35473.09.00 Avalara may have patents, patent applications, trademarks, copyrights,

More information

Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM

Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM Version 01 Revision date: 11/10/16 Product release: Microsoft NAV 8.00.37874.10.00 Avalara may have patents, patent applications, trademarks, copyrights,

More information

Avalara AvaTax for Microsoft Dynamics NAV 2013 RTM

Avalara AvaTax for Microsoft Dynamics NAV 2013 RTM Avalara AvaTax for Microsoft Dynamics NAV 2013 RTM Version 01 Revision date: 10/9/14 Product release: Microsoft NAV 7.00.33781.03.00 Avalara may have patents, patent applications, trademarks, copyrights,

More information

Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM

Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM Avalara AvaTax for Microsoft Dynamics NAV 2015 RTM Version 01 Revision date: 12/2/14 Product release: Microsoft NAV 8.00.37874.01.00 Avalara may have patents, patent applications, trademarks, copyrights,

More information

Avalara AvaTax for Microsoft Dynamics 365 Finance and Operations Enterprise Edition

Avalara AvaTax for Microsoft Dynamics 365 Finance and Operations Enterprise Edition Avalara AvaTax for Microsoft Dynamics 365 Finance and Operations Enterprise Edition Version 01 Revision date: 9/25/18 Product release: Microsoft Dynamics 365 FO - EE Avalara may have patents, patent applications,

More information

AvaTax for Microsoft Dynamics AX Retail 2012

AvaTax for Microsoft Dynamics AX Retail 2012 Revision date: 04/22/2013 Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly

More information

VAT Reporting v

VAT Reporting v Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license

More information

VAT Reporting v17.1.1

VAT Reporting v17.1.1 Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license

More information

VAT Reporting v17.4.1

VAT Reporting v17.4.1 Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license

More information

VAT Reporting v18.1.1

VAT Reporting v18.1.1 Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license

More information

VAT Reporting v

VAT Reporting v Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license

More information

VAT Reporting v17.3.1

VAT Reporting v17.3.1 Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license

More information

VAT Reporting v18.3.1

VAT Reporting v18.3.1 Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license

More information

VAT Reporting v

VAT Reporting v Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license

More information

Sage 300 ERP Sales Tax

Sage 300 ERP Sales Tax Sage 300 ERP Sales Tax User Guide Version 1.0.1 Revision date: 01/28/2013 Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject

More information

VAT Reporting v17.9.2

VAT Reporting v17.9.2 Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license

More information

VAT Reporting v17.8.1

VAT Reporting v17.8.1 Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license

More information

VAT Reporting v

VAT Reporting v Avalara may have patents, patent applications, trademarks, copyrights, or other intellectual property rights governing the subject matter in this document. Except as expressly provided in any written license

More information

Install and Configure Avalara AvaTax for Microsoft Dynamics 365 for Operations

Install and Configure Avalara AvaTax for Microsoft Dynamics 365 for Operations Install and Configure Avalara AvaTax for Microsoft Dynamics 365 for Operations 1 This article applies to: Now that you've activated your AvaTax account and set up your tax profile, it's time to setup and

More information

Direct Purchasing for Version 3.x to NAV 2009 Classic RTC has same functionality, but different UI

Direct Purchasing for Version 3.x to NAV 2009 Classic RTC has same functionality, but different UI Direct Purchasing for Version 3.x to NAV 2009 Classic RTC has same functionality, but different UI Direct Purchasing adds many new features to Navision Attain. First it allows you to issue a Purchase Order

More information

SLIM CD LEVEL 3 User Manual Slim CD Inc

SLIM CD LEVEL 3 User Manual Slim CD Inc SLIM CD LEVEL 3 User Manual 2017 Slim CD Inc. support@slimcd.com 1-877-475-4623 954-752-9309 0 support@slimcd.com Contents WHAT IS LEVEL 3?... 2 SLIM CD LEVEL 3 EXPRESS... 3 ITEMS... 4 CUSTOMERS... 6 ADD

More information

Microsoft Dynamics GP. This paper provides guidance for ISV products that integrate with Inventory transaction posting.

Microsoft Dynamics GP. This paper provides guidance for ISV products that integrate with Inventory transaction posting. INTEGRATE Microsoft Dynamics GP Integrating with the Historical Inventory Trial Balance White Paper This paper provides guidance for ISV products that integrate with Inventory transaction posting. Date:

More information

The shortcut to e-commerce

The shortcut to e-commerce The shortcut to e-commerce The table below provides the list of standard Microsoft Dynamics NAV objects that are modified by Sana Commerce. The standard Microsoft Dynamics NAV objects modified by Sana

More information

Document Capture for Microsoft Dynamics NAV

Document Capture for Microsoft Dynamics NAV Document Capture for Microsoft Dynamics NAV Walkthroughs - Version 4.50 Document Capture - Walkthroughs - Version 4.50 Page 1 / 57 TABLE OF CONTENTS TABLE OF CONTENTS... 2 SETUP AND ADMINISTRATION WALKTHROUGHS...

More information

Bridgestone National Accounts Interface

Bridgestone National Accounts Interface Bridgestone National Accounts Interface The Bridgestone National Accounts Interface links TireMaster and Bridgestone s Automated Delivery Receipt System, giving you the ability to electronically file claims

More information

The shortcut to e-commerce

The shortcut to e-commerce The shortcut to e-commerce The table below provides the list of standard Microsoft Dynamics NAV 2017 2018 objects that are modified by Sana Commerce. The standard Microsoft Dynamics NAV objects modified

More information

Microsoft Dynamics GP. Working With Configurations Release 10.0

Microsoft Dynamics GP. Working With Configurations Release 10.0 Microsoft Dynamics GP Working With Configurations Release 10.0 Copyright Copyright 2008 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws is the responsibility of

More information

ShipRite s Account Receivable Instructions

ShipRite s Account Receivable Instructions ShipRite s Account Receivable Instructions Setting up a new account Click on the POS button Enter the existing customer s PHONE number here. If they are in the database, their information will appear at

More information

Accounts Receivable Customer

Accounts Receivable Customer Accounts Receivable Customer Contents Overview... 1 Document Layout... 2 General Information Tab... 3 Corporate Information Tab... 3 Contact Information Tab... 4 Addresses Tab... 4 Overview The Customer

More information

Bill Designer for Shoper 9

Bill Designer for Shoper 9 The information contained in this document is current as of the date of publication and subject to change. Because Tally must respond to changing market conditions, it should not be interpreted to be a

More information

Client Access and Log In... CUSTOMER CENTER: Overview... 3 Home Links Quick Search... 5 Settings... 5

Client Access and Log In... CUSTOMER CENTER: Overview... 3 Home Links Quick Search... 5 Settings... 5 Table of Contents WWW.LABELKINGS.COM Client Access and Log In....... Page 2 CUSTOMER CENTER: Overview.... 3 Home Links... 4 Billing, Orders, Support Quick Search...... 5 Settings.... 5 ENTERING NEW ORDERS......

More information

2. QuickBooks Desktop Integration User Guides

2. QuickBooks Desktop Integration User Guides 2. QuickBooks Desktop Integration User Guides Thank you for purchasing my extension. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact

More information

Invoice Specification EDI 810

Invoice Specification EDI 810 Invoice Specification EDI 80 This document is solely for the use of Logicbroker, Inc. personnel and its intended client. No part of it may be circulated, Quoted, or reproduced for distribution outside

More information

Microsoft Dynamics GP Release Integration Guide For Microsoft Retail Management System Headquarters

Microsoft Dynamics GP Release Integration Guide For Microsoft Retail Management System Headquarters Microsoft Dynamics GP Release 10.0 Integration Guide For Microsoft Retail Management System Headquarters Copyright Copyright 2007 Microsoft Corporation. All rights reserved. Complying with all applicable

More information

IMPORTING QUICKBOOKS DATA. Use this guide to help you convert from QuickBooks to Denali

IMPORTING QUICKBOOKS DATA. Use this guide to help you convert from QuickBooks to Denali IMPORTING QUICKBOOKS DATA Use this guide to help you convert from QuickBooks to Denali Importing QuickBooks Data Copyright Notification At Cougar Mountain Software, Inc., we strive to produce high-quality

More information

Bridgestone/Firestone Interface

Bridgestone/Firestone Interface Bridgestone/Firestone Interface With the Bridgestone/Firestone Interface, you can electronically submit and process vendor claims for Bridgestone/Firestone transactions. These instructions describe how

More information

NC Tax. Documentation. NCT 8.02 for Microsoft Dynamics NAV 2016*

NC Tax. Documentation. NCT 8.02 for Microsoft Dynamics NAV 2016* Documentation NC Tax NCT 8.02 for Microsoft Dynamics NAV 2016* *NC Tax 8.02 is available for Navision Financials 2.60, Microsoft Business Solutions Navision 3.70, Microsoft Business Solutions Navision

More information

Eclipse Business Connect XML. Release (Eterm)

Eclipse Business Connect XML. Release (Eterm) Eclipse Business Connect XML Release 8.6.4 (Eterm) Legal Notices 2008 Activant Solutions Inc. All rights reserved. Unauthorized reproduction is a violation of applicable laws. Activant and the Activant

More information

Automatic Record Matching in the Payment Reconciliation Journal

Automatic Record Matching in the Payment Reconciliation Journal Automatic Record Matching in the Payment Reconciliation Journal Design Insight White Paper Ciprian Iordache Software Development Engineer II Nikola Kukrika Software Development Engineer II September 2014

More information

Microsoft Dynamics GP. Localization Chile

Microsoft Dynamics GP. Localization Chile Microsoft Dynamics GP Localization Chile Copyright Copyright 2010 Microsoft. All rights reserved. Limitation of liability This document is provided as-is. Information and views expressed in this document,

More information

v12.1 The following sections have been changed in this release:

v12.1 The following sections have been changed in this release: 9 / 2 9 / 2 0 1 5, PixelPoint Release Notes v12.1 This document details changes made to PixelPoint files. Changes are listed in order from newest to oldest, and are either new features that have been added

More information

Document Capture for Microsoft Dynamics NAV. Change Log and Upgrade Notes version 3.02

Document Capture for Microsoft Dynamics NAV. Change Log and Upgrade Notes version 3.02 Document Capture for Microsoft Dynamics NAV Change Log and Upgrade Notes version 3.02 TABLE OF CONTENTS General Changes... 3 Classic Client... 5 RoleBased Client & Server... 6 Web Approval... 7 Upgrade

More information

Microsoft Dynamics NAV 2009 Changes

Microsoft Dynamics NAV 2009 Changes Microsoft Dynamics NAV 2009 Changes This document provides an overview of the changed and new Microsoft Dynamics NAV objects. Sana 9 - The future of B2B e-commerce 2015 Sana Commerce Page 1 of 7 Table

More information

R98306 SNC-Lavalin ProFac Inc. 5/22/ :58: Override Next Status. 7. Override Transaction Unit of Measure

R98306 SNC-Lavalin ProFac Inc. 5/22/ :58: Override Next Status. 7. Override Transaction Unit of Measure Title 1 Defaults 1. Order Type (Required) SO 2. Line Type 3. Beginning Status 520 4. Override Next Status 5. Line Number Increment 0 6. Reason Code 7. Override Transaction Unit of Measure 8. Default Transaction

More information

C/AL Programming Guide

C/AL Programming Guide C/AL Programming Guide The Way to Grow C/AL PROGRAMMING GUIDE NOTICE This material is for informational purposes only. Navision a/s disclaims all warranties and conditions with regard to use of the material

More information

Item Management. SIMMS Inventory Management Software October 20, 2011

Item Management. SIMMS Inventory Management Software October 20, 2011 Item Management SIMMS Inventory Management Software 2012 October 20, 2011 Contents Item Management.................. 1 Adding an Item s Profile................ 1 Add an Item s Basic Profile Details..........

More information

OTHER ACCOUNTS RECEIVABLE - SETUP

OTHER ACCOUNTS RECEIVABLE - SETUP OTHER ACCOUNTS RECEIVABLE - SETUP (OAS - Figure 002) MENU DESCRIPTION This is the Setup Main Menu. Through this menu, the Operator may access Setup - Customer (OASC). By entering in the second field

More information

What s New in Microsoft Dynamics NAV 2013 R2

What s New in Microsoft Dynamics NAV 2013 R2 What s New in Microsoft Dynamics NAV 2013 R2 September 2013 Contents What s New: Application Changes for Microsoft Dynamics NAV 2013 R2 and Microsoft Dynamics NAV 2013 3 RapidStart Services for Microsoft

More information

Manual Ext. Fixed Assets

Manual Ext. Fixed Assets Manual Ext. Fixed Assets Prepared for Customers & Partners Project OPplus Ext. Fixed Assets Prepared by gbedv GmbH & Co. KG Contents General... 4 Manual Structure... 4 Description of Icons... 4 OPplus

More information

3096 Temple Ave Pomona, CA Tel: Fax: Website:

3096 Temple Ave Pomona, CA Tel: Fax: Website: NETcellent s Sales Order Import For ELLIOTT VERSION 7.4x From NETcellent System, Inc. 3096 Temple Ave Pomona, CA 91766 Tel: 909.622.5009 Fax: 909.622.5119 E-mail: sales@netcellent.com Website: www.netcellent.com

More information

Pop-Up Notes Manual Pop-Up Notes. For Microsoft Dynamics NAV

Pop-Up Notes Manual Pop-Up Notes. For Microsoft Dynamics NAV Pop-Up Notes For Microsoft Dynamics NAV Produced and Distributed by: Cost Control Software, Inc. 12409 Old Meridian Street Carmel, IN 46032 Phone: (317) 846-6025 www.costcontrolsoftware.com Page 1 Table

More information

Manual Installment Payment

Manual Installment Payment Manual Installment Payment Prepared for Customers & Partners Project OPplus Installment Payment Prepared by gbedv GmbH & Co. KG Contents General Information... 3 Manual Structure... 3 Description of Icons...

More information

Data Import Guide DBA Software Inc.

Data Import Guide DBA Software Inc. Contents 3 Table of Contents 1 Introduction 4 2 Data Import Instructions 5 3 Data Import - Customers 10 4 Data Import - Customer Contacts 16 5 Data Import - Delivery Addresses 19 6 Data Import - Suppliers

More information

REMOTE SERVICE Module Reference Manual. Version 11.0 Revision Date 5/1/04

REMOTE SERVICE Module Reference Manual. Version 11.0 Revision Date 5/1/04 REMOTE SERVICE Module Reference Manual Version 11.0 Revision Date 5/1/04 The documentation in this publication is provided pursuant to a Sales and Licensing Contract for the Prophet 21 System entered into

More information

Sage 300. Sage CRM 7.3 Integration Upgrade Guide

Sage 300. Sage CRM 7.3 Integration Upgrade Guide Sage 300 Sage CRM 7.3 Integration Upgrade Guide This is a publication of Sage Software, Inc. Copyright 2015. Sage Software, Inc. All rights reserved. Sage, the Sage logos, and the Sage product and service

More information

Design Insights Enhanced Cue Functionality

Design Insights Enhanced Cue Functionality Design Insights Enhanced Cue Functionality May 2014 Contents Introduction 3 Basics of Implementing Cue Controls 3 Best Practices for Implementing Cue Controls: Enabling End User Customization of Indicators

More information

Cisco Systems (Italy) S.r.l. Services Overview Cisco and/or its affiliates. All rights reserved. Cisco Public 0

Cisco Systems (Italy) S.r.l. Services Overview Cisco and/or its affiliates. All rights reserved. Cisco Public 0 Cisco Systems (Italy) S.r.l. Services Overview 2012 Cisco and/or its affiliates. All rights reserved. Cisco Public 0 Introduction of Cisco Services (Italy) S.r.l. How it Affects You What is Changing and

More information

Configuration Fixes for Encryption

Configuration Fixes for Encryption Oracle Retail Point-of-Sale Release Notes Release 7.2.2 April 2007 This document lists the fixed defects included in Release 7.2.2 of Oracle Retail Point-of-Sale. Before installing this release, confirm

More information

Microsoft Dynamics GP. Extender User s Guide

Microsoft Dynamics GP. Extender User s Guide Microsoft Dynamics GP Extender User s Guide Copyright Copyright 2009 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws is the responsibility of the user. Without

More information

Accounts Payable MODULE USER S GUIDE

Accounts Payable MODULE USER S GUIDE Accounts Payable MODULE USER S GUIDE INTEGRATED SOFTWARE SERIES Accounts Payable MODULE USER S GUIDE Version 3.1 Copyright 2005 2009, Interactive Financial Solutions, Inc. All Rights Reserved. Integrated

More information

Clemson buyway$ Requisitioner Training

Clemson buyway$ Requisitioner Training Clemson buyway$ Logon Enter your Clemson Userid and Password Review carts assigned to you by clicking the Draft Carts folder or by clicking on the Carts Tab along the top row of tabbed items. This view

More information

B2B Seller New Features Guide. version 5.9

B2B Seller New Features Guide. version 5.9 version 5.9 This manual contains information about software products from Epicor Software Corporation. The software described in this manual and the manual itself are furnished under the terms and conditions

More information

RMH GENERAL CONFIGURATION

RMH GENERAL CONFIGURATION RMH GENERAL CONFIGURATION Retail Management Hero (RMH) rmhsupport@rrdisti.com www.rmhpos.com Copyright 2016, Retail Realm. All Rights Reserved. RMHDOCGENCONFIGD051216 Disclaimer Information in this document,

More information

Hold Flags for Sales Order SO-1328

Hold Flags for Sales Order SO-1328 Hold Flags for Sales Order SO-1328 Overview This Extended Solution to the Sales Order module allows you to place orders on specific types of hold : Terms Hold, Credit Hold and Margin Hold. The Custom Office

More information

AbleCommerce v7.x AvaTax Connector Guide

AbleCommerce v7.x AvaTax Connector Guide AbleCommerce v7.x AvaTax Connector Guide Revision: 1.0 December 17, 2009 Copyright 2009 Able Solutions Corporation. All rights reserved. AbleCommerce is a division of Able Solutions Corporation. CommerceBuilder

More information

Ariba Manual INVOICING PO

Ariba Manual INVOICING PO Ariba Manual INVOICING PO For Suppliers Date 6 september 2013 Document name Ariba Manual - Invoicing PO (SUPPLIER).docx Version Version 2.0 2013 N.V. Nederlandse Gasunie, Groningen Page 1 of 23 Contents

More information

Shopping Basket and Order Requirements

Shopping Basket and Order Requirements Page 1 of 41 Page 2 of 41 1. The user can browse the site and select the product items to be added to the Shopping basket. Use the Catalog link to search and add products to the shopping basket or click

More information

VERSION 13 FILE CHANGES

VERSION 13 FILE CHANGES In version 13, 7 files were changed (shown below in black) and 9 files were added (shown below in blue) INFCOMPANION ARFCASHYTD OESHIPTO POFCHEADER POFHEADER INFVCATALOG ARWAREHOUSE - New Key Only OEFDHEADER

More information

The shortcut to e-commerce

The shortcut to e-commerce The shortcut to e-commerce The table below provides the list of standard Microsoft Dynamics NAV objects that are modified by Sana Commerce. The standard Microsoft Dynamics NAV objects modified by Sana

More information

E-CST Return for Gujarat FORM III (B)

E-CST Return for Gujarat FORM III (B) FORM III (B) November 2009 The information contained in this document represents the current view of Tally Solutions Pvt. Ltd., ( Tally in short) on the topics discussed as of the date of publication.

More information

810 IBM Subset - Invoice To Customer - (004010)

810 IBM Subset - Invoice To Customer - (004010) 810 IBM Subset - Invoice To Customer - (004010) Functional Group ID=IN Introduction: This Draft Standard for Trial Use contains the format and establishes the data contents of the Invoice Transaction Set

More information

Eclipse TMMG Sales Management Plus. Introduction

Eclipse TMMG Sales Management Plus. Introduction Introduction Eclipse has the ability to export customer, contact and pos/sales history data to be imported into the TMMG Sales Management Plus product. TMMG has recently changed the layout of the data

More information

Setup & Usage for CanadaPost AddressComplete Integration App

Setup & Usage for CanadaPost AddressComplete Integration App Setup & Usage for CanadaPost AddressComplete Integration App Setup 1. Visit CanadaPost - AddressComplete to obtain your API Key. If you do not already have an AddressComplete account, you may Start Your

More information

EFI Pace Accounts Receivable Module

EFI Pace Accounts Receivable Module EFI Pace Accounts Receivable Module Administrator Quick Start Guide July 2010 Version 23.02 Copyright 2010 by Electronics for Imaging, Inc. All Rights Reserved. EFI Pace Accounts Receivable Module Administrator

More information

What's New on Release 26.1

What's New on Release 26.1 What's New on Release 26.1 Welcome to Eagle Release 26.1 (server Level 38). This document summarizes the new features and enhancements. Use the red links below to take you to a particular section of this

More information

Setup & Usage - CanadaPost AddressComplete Integration App

Setup & Usage - CanadaPost AddressComplete Integration App Setup & Usage - CanadaPost AddressComplete Integration App Setup 1. Visit CanadaPost - AddressComplete to obtain your API Key. If you do not already have an AddressComplete account, you may Start Your

More information

Overview... 3 Microsoft Dynamics GP 2013 and Microsoft Dynamics NAV 2013 Transition Upgrade Policy... 4

Overview... 3 Microsoft Dynamics GP 2013 and Microsoft Dynamics NAV 2013 Transition Upgrade Policy... 4 Published July 11, 2012 Contents Overview... 3 Transition Upgrade Policy... 4 License Migration Transition Upgrade (LMT Upgrade)... 5 License Credit Transition Upgrade (LCT Upgrade)... 5 Use of Old Product

More information

CHAPTER 8B PURCHASE ORDER MANAGEMENT

CHAPTER 8B PURCHASE ORDER MANAGEMENT CHAPTER 8B PURCHASE ORDER MANAGEMENT Chapter 8B...1 Purchase Order Maintenance...2 Purchase Order Maintenance...3 Retrieving an Existing Purchase Order...5 Quick Search...6 Deleting an Existing Purchase

More information

Eclipse Forms. Release 8.7.2

Eclipse Forms. Release 8.7.2 Eclipse Forms Release 8.7.2 Legal Notices 2011 Epicor Software Corporation. All rights reserved. Unauthorized reproduction is a violation of applicable laws. Epicor and the Epicor logo are registered trademarks

More information

Developer Manual Sales Voucher Authorisation

Developer Manual Sales Voucher Authorisation Developer Manual Sales Voucher Authorisation The information contained in this document is current as of the date of publication and subject to change. Because Tally must respond to changing market conditions,

More information

INTEGRATED. Creating XML Style Sheets for Data Export from Microsoft Dynamics NAV 5.0. Microsoft Dynamics NAV. Technical White Paper

INTEGRATED. Creating XML Style Sheets for Data Export from Microsoft Dynamics NAV 5.0. Microsoft Dynamics NAV. Technical White Paper INTEGRATED Microsoft Dynamics NAV Creating XML Style Sheets for Data Export from Microsoft Dynamics NAV 5.0 Technical White Paper Microsoft Dynamics NAV 5.0 contains a new feature which allows you to export

More information

Pop-up Notes Features:

Pop-up Notes Features: Pop-up Notes The purpose of Pop-Up Notes is to streamline your internal communications. Pop-Up Notes gives you the ability to repeatedly issue Notes and reminders electronically. Instead of scribbled on

More information

What's New: Release to

What's New: Release to 26-Apr-2016 Page : 1 14:48:39 Modification and Development Release Notes, new development and modifications completed in release version range included on report. Please review and if interested in any,

More information

User Manual. Exact Online Accounting basic- Magento synchronization. iwebdevelopment Klokgebouw AC Eindhoven E:

User Manual. Exact Online Accounting basic- Magento synchronization. iwebdevelopment Klokgebouw AC Eindhoven E: User Manual Exact Online Accounting basic- Magento synchronization iwebdevelopment Klokgebouw 253 5617AC Eindhoven E: info@iwebdevelopment.nl Introduction Thank you for choosing the Exact Online connector

More information

Furniture: How Databases Affect Accounting

Furniture: How Databases Affect Accounting Databases To get started using Furniture, begin by setting up your database information. This includes setting up the following: Tax information Vendor alias departments Vendor database information. Setting

More information

NAV 2009 Scalability. Locking Management Solution for Dynamics NAV SQL Server Option. Stress Test Results White Paper

NAV 2009 Scalability. Locking Management Solution for Dynamics NAV SQL Server Option. Stress Test Results White Paper NAV 2009 Scalability Locking Management Solution for Dynamics NAV SQL Server Option Stress Test Results White Paper July 2009 Table of Contents EXECUTIVE SUMMARY... 3 INTRODUCTION... 3 HARDWARE... 5 RESULTS...

More information

Purchase Order - v4010 Functional Group ID = PO

Purchase Order - v4010 Functional Group ID = PO 850 Functional Group ID = PO TESTING PROCEDURES & TIPS ON AUTOLIV's 850 DOCUMENT is now using this 850 document for MRO ordering. If you have any questions, please contact Autoliv IT Service Center at

More information

CONNECTED 8.3 Release Notes

CONNECTED 8.3 Release Notes CONNECTED 8.3 Release Notes Introduction... 3 Minimum System Requirements for Connected 8.3... 3 Connected 8.3 Installation... 3 Enhancements... 4 General Enhancements... 4 Advanced Email Templates...

More information

Microsoft Dynamics GP. Extender User s Guide Release 9.0

Microsoft Dynamics GP. Extender User s Guide Release 9.0 Microsoft Dynamics GP Extender User s Guide Release 9.0 Copyright Copyright 2005 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws is the responsibility of the user.

More information

Great Plains 8.0 Integration Manager Payables Transaction Integration

Great Plains 8.0 Integration Manager Payables Transaction Integration Great Plains 8.0 Integration Manager Payables Transaction Integration Required Fields Voucher Number: Document Type: Vendor ID: Document Date: Document Number: Document Amount: The Voucher number of the

More information

'SC_Standard_objects Type ID Name WSExposed 2016 Sana Commerce Page 2 of 6

'SC_Standard_objects Type ID Name WSExposed 2016 Sana Commerce Page 2 of 6 This table provides the list of standard Microsoft Dynamics NAV 2009 R2 objects that are changed by Sana Commerce. This means that in these standard Microsoft Dynamics NAV objects some fields were created

More information

9. CREATING PURCHASE ORDERS ONLINE

9. CREATING PURCHASE ORDERS ONLINE 9. CREATING PURCHASE ORDERS ONLINE Overview: This document will demonstrate how to create purchase orders online in PeopleSoft 8.9. A PO consists of four basic components: header, line(s), schedule(s),

More information

Document Capture for Microsoft Dynamics NAV

Document Capture for Microsoft Dynamics NAV Document Capture for Microsoft Dynamics NAV Daily Usage for End Users - Version 4.50 Document Capture - Daily Usage for End Users - Version 4.50 Page 1 / 13 TABLE OF CONTENTS INTRODUCTION... 3 SCAN, OCR

More information

Auto Replenishment Module Setup Guide

Auto Replenishment Module Setup Guide Auto Replenishment Module Setup Guide A CustomerLink Exchange document The AcuSport Retail Technology Group (RTG) recommends completing the procedures in this guide to set up the Auto Replenishment (AR)

More information

Invoice 13 Pro Outline

Invoice 13 Pro Outline Invoice 13 Pro Outline Invoice 13 Pro is a feature rich productivity tool for the small business or company from 1 to 30 users. It is notjust an Invoicing software. It is in fact an Invoicing, Accounts

More information

Oracle Retail MICROS Stores2 Functional Document Stores2 for Portugal General Settings Release

Oracle Retail MICROS Stores2 Functional Document Stores2 for Portugal General Settings Release Oracle Retail MICROS Stores2 Functional Document Stores2 for Portugal General Settings Release 1.39.4 March 2018 Oracle Retail MICROS Stores2 Functional Document for Portugal General Settings, Release

More information

User Documentation. t-commerce User s Guide

User Documentation. t-commerce User s Guide User Documentation t-commerce User s Guide TRIBUTE INC. USER DOCUMENTATION t-commerce User s Guide Copyright Notice and Trademarks 2000-2007 Tribute, Inc. All rights reserved t-commerce is a registered

More information

Sage Paperless Construction

Sage Paperless Construction Sage Paperless Construction Release Notes Version 6.3 2018. The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks

More information