Monday, November 17, 2025

Get HSN Code

 public str getHSNCode(CustInvoiceTrans _custInvoiceTrans) 

    { 

        TaxDocumentRowTransaction       taxDocumentRowTransaction; 

        TaxDocumentRowTransaction_IN    taxDocumentRowTransaction_IN; 

        SalesTable                      salesTable; 

  

        Select RecId, TransactionJourLineRecId from taxDocumentRowTransaction 

                where taxDocumentRowTransaction.TransactionJourLineRecId == _custInvoiceTrans.RecId 

            join HSNCodeTaxDocumentRowTransactionRecId 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