ET Import - Invoice: Insert tax exempts (I21 ET changes)

Issue No: IET-486
Created 3/3/2020 4:42:33 AM
Type Feature
Priority Major
Status Closed
Resolution Fixed
Fixed Version 19.1
Description Need changes in i21 to accept field from file that indicates whether the tax is exempted or not.   *1. update API method - add field ysnTaxExempt.*   *2. Update stored procedure, add parameters, modified inserting of taxes - add logic updating ysnTaxExempt of tblARinvoiceDetailTax base on newly added indicator from ET.*         This issue relates to i21 Help Desk ticket. Click the link below to go to Help Desk ticket.   [HDTN-241945 - Outbound Tax Report Questions|https://helpdesk.irely.com/iRelyi21live//#/HD/Ticket/?ticket=HDTN-241945]           This issue relates to i21 Help Desk ticket. Click the link below to go to Help Desk ticket.   [HDTN-239494 - Tax Reports Outbound dashboard missing invoices|https://helpdesk.irely.com/iRelyi21live//#/HD/Ticket/?ticket=HDTN-239494]             This issue relates to i21 Help Desk ticket. Click the link below to go to Help Desk ticket.   [HDTN-223466 - Certain Invoices are not showing in Dashboard as Federal Gas and Diesel Exempted trans|https://helpdesk.irely.com/iRelyi21live//#/HD/Ticket/?ticket=HDTN-223466]         v18.3.0110.622     + *Issue:* +   Currently, tank delivery invoices that were made through import from Energy Trac only insert tax details with charges and not when it has no value ($0.00). To avoid datafixing our clients data in filing their taxes such as form 8849 or refund of excise taxes, tax exempt ($0.00 value) should now become be part of the import process.   select ID.intInvoiceDetailId   ,ID.intTaxGroupId ,TGC.intTaxCodeId code ,TC.intTaxClassId ,TED.strExemptionNotes --,E.intTaxClassId --,ID.intItemId ,IC.intCategoryId ,IC.strItemNo ,I.strInvoiceNumber --,I.intInvoiceId --,I.intEntityCustomerId --,IDT.intTaxCodeId intTaxCodeId --,I.dtmDate --,TED.ysnTaxExempt --,TED.ysnInvalidSetup from tblARInvoice I INNER JOIN tblARInvoiceDetail ID ON I.intInvoiceId = ID.intInvoiceId INNER JOIN tblICItem IC ON ID.intItemId = IC.intItemId INNER JOIN tblARCustomerTaxingTaxException E ON I.intEntityCustomerId = E.intEntityCustomerId AND E.intTaxCodeId IN (1,2) INNER JOIN tblSMTaxGroupCode TGC ON E.intTaxCodeId = TGC.intTaxCodeId AND ID.intTaxGroupId = TGC.intTaxGroupId INNER JOIN tblSMTaxCode TC ON TGC.intTaxCodeId = TC.intTaxCodeId LEFT JOIN tblARInvoiceDetailTax IDT ON ID.intInvoiceDetailId = IDT.intInvoiceDetailId AND E.intTaxCodeId = IDT.intTaxCodeId AND ID.intTaxGroupId = IDT.intTaxGroupId CROSS APPLY [dbo].[fnGetCustomerTaxCodeExemption](I.intEntityCustomerId, I.dtmDate, ID.intTaxGroupId, TGC.intTaxCodeId,TC.intTaxClassId, NULL, ID.intItemId, IC.intCategoryId, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL) TED WHERE IDT.intTaxCodeId IS NULL AND strInvoiceNumber NOT LIKE '%CFDT%' AND TED.ysnTaxExempt = 1 AND TED.ysnInvalidSetup = 0 ORDER BY I.strInvoiceNumber