while select taxDocumentRowTransaction
join taxDocumentRowTransactionIn
where taxDocumentRowTransactionIn.TaxDocumentRowTransactionRecId == taxDocumentRowTransaction.RecId
&& taxDocumentRowTransaction.TaxDirection == TaxDirection::IncomingTax
&& taxDocumentRowTransaction.InvoiceId == headerTmp.InvoiceId
&& taxDocumentRowTransaction.CustVendAC == vendTable.AccountNum
{
counter++;
linesTmp.clear();
linesTmp.SerialNo = counter;
if(taxDocumentRowTransaction.Source == TaxModuleType::Voucher)
{
select firstonly taxInformation
join taxInfoRelation
where taxInformation.RecId == taxInfoRelation.TransTaxInformationRecId
&& taxInfoRelation.TransactionRecId == taxDocumentRowTransaction.TransactionLineRecId
&& taxInfoRelation.TransactionTableId == taxDocumentRowTransaction.TransactionLineTableId;
linesTmp.HSNCode = HSNCodeTable_IN::find(taxInformation.HSNCodeTable).Code;
linesTmp.SAC = ServiceAccountingCodeTable_IN::find(taxInformation.ServiceAccountingCodeTable).SAC;
select firstonly journalTrans
where journalTrans.RecId == taxDocumentRowTransaction.TransactionLineRecId
&& journalTrans.TableId == taxDocumentRowTransaction.TransactionLineTableId;
if(journalTrans.RecId)
{
if(journalTrans.AccountType != LedgerJournalACType::Ledger && journalTrans.OffsetLedgerDimension == 0)
continue;
linesTmp.InvoiceId = taxDocumentRowTransaction.InvoiceId;
if(journalTrans.PMEMedicineName)
{
linesTmp.ProductDescription = journalTrans.PMEMedicineName;
}
else
{
linesTmp.ProductDescription = journalTrans.PMEItemTypeId;
}
public str getHSNCode(CustInvoiceTrans _custInvoiceTrans)
{
TaxDocumentRowTransaction taxDocumentRowTransaction;
TaxDocumentRowTransaction_IN taxDocumentRowTransaction_IN;
SalesTable salesTable;
Select RecId, TransactionJourLineRecId from taxDocumentRowTransaction
where taxDocumentRowTransaction.TransactionJourLineRecId == _custInvoiceTrans.RecId
join HSNCode, TaxDocumentRowTransactionRecId from taxDocumentRowTransaction_IN
where taxDocumentRowTransaction_IN.TaxDocumentRowTransactionRecId taxDocumentRowTransaction.RecId;
if(taxDocumentRowTransaction_IN)
{
return taxDocumentRowTransaction_IN.HSNCode;
}
else
{
return HSNCodeTable_IN::find(_custInvoiceTrans.salesLine().salesLine_IN().HSNCodeTable).Code;
}
return ' ';
}
No comments:
Post a Comment