Hi all,
How to calculate CGST, CGST & IGST through code , i want to display in POinvoiceReport . Anyone tell me Process how to get GST values through X++.
Thanks,
Chaitana
Version Ax 2012 R3 cu11 country India
Thanks For Replay Kranthi, I have solved my issue as per similar logic in salesinvoiceDP am getting CGST & SGST values and amount also. Thanks siva rama Krishna
Hi thirumal, // Company GSTINNumber select companyInfo where companyInfo.DataArea == curext() join dirpartytable where dirpartytable.PartyNumber == companyInfo.PartyNumber join dirPartyLocation where dirPartyLocation.Party == dirpartytable.RecId join logisticsLocation where logisticsLocation.RecId == dirPartyLocation.Location join taxInformation_IN where taxInformation_IN.RegistrationLocation == logisticsLocation.RecId && taxInformation_IN.IsPrimary == NoYes::Yes; tmp.comapanyGSTINNumber = TaxRegistrationNumbers_IN::find(taxInformation_IN.GSTIN).RegistrationNumber; //Vendor GSTINNumber select vendtable1 where vendtable1.AccountNum==vendtable.AccountNum join dirPartyLocation where dirPartyLocation.Party == vendtable1.Party join logisticsLocation where logisticsLocation.RecId == dirPartyLocation.Location join taxInformation_IN where taxInformation_IN.RegistrationLocation == logisticsLocation.RecId && taxInformation_IN.IsPrimary == NoYes::Yes; tmp.vendorGSTINNumber = TaxRegistrationNumbers_IN::find(taxInformation_IN.GSTIN).RegistrationNumber; // CGST , SGST & IGST numbers with rates. select firstOnly HSNCode, SAC from taxDocumentRowTransaction_IN join RecId, DiscountAmount from taxDocumentRowTransaction where taxDocumentRowTransaction.RecId == taxDocumentRowTransaction_IN.TaxDocumentRowTransactionRecId && taxDocumentRowTransaction.TransactionHeaderTableId == vendInvoiceinfotable.TableId && taxDocumentRowTransaction.TransactionHeaderRecId == vendInvoiceinfotable.RecId && taxDocumentRowTransaction.TransactionLineTableId == vendInvoiceinfoline.TableId && taxDocumentRowTransaction.TransactionLineRecId == vendInvoiceinfoline.RecId; if(taxDocumentRowTransaction.RecId) { while select taxDocumentComponentTransaction
where taxDocumentComponentTransaction.TaxDocumentRowTransactionRecId == taxDocumentRowTransaction.RecId { if(taxDocumentComponentTransaction.TaxCode =="CGST") { tmp.CGST_TaxRate = taxDocumentComponentTransaction.TaxRate*100; tmp.CGST = taxDocumentComponentTransaction.TaxAmountCur; } if(taxDocumentComponentTransaction.TaxCode == "SGST") { tmp.SGST_Taxrate = taxDocumentComponentTransaction.TaxRate*100; tmp.SGST = taxDocumentComponentTransaction.TaxAmountCur; } if(taxDocumentComponentTransaction.TaxCode == "IGST") { tmp.IGST_Taxrate = taxDocumentComponentTransaction.TaxRate*100; tmp.IGST = taxDocumentComponentTransaction.TaxAmountCur; } } } Thanks, Siva Rama Krishna.
use purchTotals = PurchTotals::newPurchTable(purchTable);
for item wise, look into my previous comment.
Revert back if any issues