static void taxinfo(Args _args)
{
CustTable VendTableloc;
SalesTable PurchTableloc;
DirPartyTable dirPartyTable;
TaxRegistrationNumbers_IN TaxRegistrationNumbers_INloc;
TaxInformation_IN TaxInformation_INloc;
LogisticsLocation LogisticsLocationloc;
DirPartyNamePrimaryAddressView DirPartyNamePrimaryAddressViewloc;
TaxRegistration TaxRegistration;
DirPartyLocation DirPartyLocationloc;
SalesLine salesline;
str S3_tin;
select PurchTableloc where PurchTableloc.SalesId == "ICPL-000392";//this.getPurchId();
select dirPartyTable join VendTableloc where VendTableloc.Party == dirPartyTable.RecId && VendTableloc.AccountNum == PurchTableloc.InvoiceAccount;
select DirPartyLocationloc order by RecId asc where DirPartyLocationloc.Party == dirPartyTable.RecId;
select LogisticsLocationloc where LogisticsLocationloc.RecId == DirPartyLocationloc.Location;
select TaxInformation_INloc join TaxRegistrationNumbers_INloc where TaxInformation_INloc.RegistrationLocation == LogisticsLocationloc.RecId && TaxRegistrationNumbers_INloc.RecId == TaxInformation_INloc.TIN;
S3_tin = TaxRegistrationNumbers_INloc.RegistrationNumber;
}
==============================================================================================================================================
by trainess
static void Salesname(Args _args)
{
SalesTable SalesTable ;
DirPartyTable DirPartyTable;
LogisticsLocation LogisticsLocation;
TaxInformation_IN TaxInformation_IN;
TaxRegistrationNumbers_IN TaxRegistrationNumbers_IN;
select SalesName from SalesTable where SalesTable.SalesId == '000855';
{
select DirPartyTable where DirPartyTable.Name == SalesTable.SalesName;
{
select LogisticsLocation where DirPartyTable.PrimaryAddressLocation == LogisticsLocation.RecId;
{
select TaxInformation_IN where TaxInformation_IN.RegistrationLocation == LogisticsLocation.RecId;
{
select TaxRegistrationNumbers_IN where TaxInformation_IN.TIN == TaxRegistrationNumbers_IN.RecId;
info(strFmt("%1,Tin No = %2",SalesTable.SalesName, TaxRegistrationNumbers_IN.RegistrationNumber));//10024521001
}
}
}
}
}
{
CustTable VendTableloc;
SalesTable PurchTableloc;
DirPartyTable dirPartyTable;
TaxRegistrationNumbers_IN TaxRegistrationNumbers_INloc;
TaxInformation_IN TaxInformation_INloc;
LogisticsLocation LogisticsLocationloc;
DirPartyNamePrimaryAddressView DirPartyNamePrimaryAddressViewloc;
TaxRegistration TaxRegistration;
DirPartyLocation DirPartyLocationloc;
SalesLine salesline;
str S3_tin;
select PurchTableloc where PurchTableloc.SalesId == "ICPL-000392";//this.getPurchId();
select dirPartyTable join VendTableloc where VendTableloc.Party == dirPartyTable.RecId && VendTableloc.AccountNum == PurchTableloc.InvoiceAccount;
select DirPartyLocationloc order by RecId asc where DirPartyLocationloc.Party == dirPartyTable.RecId;
select LogisticsLocationloc where LogisticsLocationloc.RecId == DirPartyLocationloc.Location;
select TaxInformation_INloc join TaxRegistrationNumbers_INloc where TaxInformation_INloc.RegistrationLocation == LogisticsLocationloc.RecId && TaxRegistrationNumbers_INloc.RecId == TaxInformation_INloc.TIN;
S3_tin = TaxRegistrationNumbers_INloc.RegistrationNumber;
}
==============================================================================================================================================
by trainess
static void Salesname(Args _args)
{
SalesTable SalesTable ;
DirPartyTable DirPartyTable;
LogisticsLocation LogisticsLocation;
TaxInformation_IN TaxInformation_IN;
TaxRegistrationNumbers_IN TaxRegistrationNumbers_IN;
select SalesName from SalesTable where SalesTable.SalesId == '000855';
{
select DirPartyTable where DirPartyTable.Name == SalesTable.SalesName;
{
select LogisticsLocation where DirPartyTable.PrimaryAddressLocation == LogisticsLocation.RecId;
{
select TaxInformation_IN where TaxInformation_IN.RegistrationLocation == LogisticsLocation.RecId;
{
select TaxRegistrationNumbers_IN where TaxInformation_IN.TIN == TaxRegistrationNumbers_IN.RecId;
info(strFmt("%1,Tin No = %2",SalesTable.SalesName, TaxRegistrationNumbers_IN.RegistrationNumber));//10024521001
}
}
}
}
}
No comments:
Post a Comment