Dear Sameer,
Actually i do not have a setup of project module so i m unable to provide you exact solution but i can give you some code, may be it help you to identify actual code.
The below code is for sales order invoice.
//Variable declaration for tax document tables
TaxDocumentRowTransaction_IN taxDocumentRowTransaction_IN;
TaxDocumentRowTransaction taxDocumentRowTransaction;
taxDocumentComponentTransaction taxDocumentComponentTransaction;
TaxDocumentComponentTransaction_IN taxDocumentComponentTransaction_IN;
TaxComponentTable_IN taxComponentTable_IN;
ITaxDocumentComponentLine taxDocumentComponentLine;
ITaxDocumentComponentLineEnumerator taxDocumentComponentLineEnumerator;
select firstOnly HSNCode, SAC from taxDocumentRowTransaction_IN
join RecId, DiscountAmount from taxDocumentRowTransaction
where taxDocumentRowTransaction.RecId == taxDocumentRowTransaction_IN.TaxDocumentRowTransactionRecId
&& taxDocumentRowTransaction.TransactionHeaderTableId == salesParmTable.TableId
&& taxDocumentRowTransaction.TransactionHeaderRecId == salesParmTable.RecId
&& taxDocumentRowTransaction.TransactionLineTableId == salesParmLine.TableId
&& taxDocumentRowTransaction.TransactionLineRecId == salesParmLine.RecId
join TaxBaseAmount from taxDocumentComponentTransaction
where taxDocumentComponentTransaction.TaxDocumentRowTransactionRecId == taxDocumentRowTransaction.RecId;
while select TaxBaseAmount, TaxAmount, TaxRate from taxDocumentComponentTransaction
where taxDocumentComponentTransaction.TaxDocumentRowTransactionRecId == taxDocumentRowTransaction.RecId
join TotalReverseChargeAmount from taxDocumentComponentTransaction_IN
where taxDocumentComponentTransaction_IN.TaxDocumentComponnetTransactionRecId == taxDocumentComponentTransaction.RecId
join Component from taxComponentTable_IN
where taxComponentTable_IN.RecId == taxDocumentComponentTransaction_IN.TaxComponent
&& taxComponentTable_IN.TaxType == TaxType_IN::GST
{
if(taxComponentTable_IN.Component == "IGST")
{
_SalesOrderInvoiceTmp.IGSTTaxComponentRate = taxDocumentComponentTransaction.TaxRate;
_SalesOrderInvoiceTmp.IGSTComponentAmount = taxDocumentComponentTransaction.TaxAmount;
}
if(taxComponentTable_IN.Component == "CGST")
{
_SalesOrderInvoiceTmp.cGSTTaxComponentRate = taxDocumentComponentTransaction.TaxRate;
_SalesOrderInvoiceTmp.cGSTComponentAmount = taxDocumentComponentTransaction.TaxAmount;
}
if(taxComponentTable_IN.Component == "SGST")
{
_SalesOrderInvoiceTmp.SGSTTaxComponentRate = taxDocumentComponentTransaction.TaxRate;
_SalesOrderInvoiceTmp.SGSTComponentAmount = taxDocumentComponentTransaction.TaxAmount;
}
}
Let me know if any help in this.
Thanks
B K Sharma