The trouble is you think you have time. Your success depends on how you utilize your time.

Get Registration ID, CNIC, NTN of Customer x++

 Get Registration ID, CNIC, NTN of Customer x++



      CustTrans custTrans;

      CUSTTABLE CUSTTABLE;

      DirPartyTable DirPartyTable;

      DirPartyLocation DirPartyLocation;

      taxRegistration taxRegistration;

      CustInvoiceTrans custInvoiceTrans;

      CustInvoiceJour custInvoiceJour;

      TaxRegistrationTypeApplicabilityRule TaxRegistrationTypeApplicabilityRule;

      TaxRegistrationType TaxRegistrationType;

      Taxtable Taxtable;

      TaxTrans TaxTrans;       


 

select DirPartyTable

        join DirPartyLocation

        join RegistrationNumber from taxRegistration 

        join CUSTTABLE

        join TaxRegistrationTypeApplicabilityRule 

        join TaxRegistrationType 

        where CUSTTABLE.ACCOUNTNUM == custTrans.AccountNum

        &&  DirPartyLocation.Party == dirPartyTable.RecId

        &&  taxRegistration.DirPartyLocation == dirPartyLocation.RecId

        &&  DirPartyTable.Recid == CUSTTABLE.PARTY

        &&  TaxRegistrationTypeApplicabilityRule.RECID ==                 taxRegistration.TaxRegistrationTypeApplicabilityRule

        &&  TaxRegistrationType.RECID == TaxRegistrationTypeApplicabilityRule.TAXREGISTRATIONTYPE

        &&  TaxRegistrationType.TaxRegstrationType == 'CNIC';

No comments:

Post a Comment