static void tax(Args _args)
{
TaxOnItem TaxOnItem;
TaxGroupData TaxGroupData, TaxGroupData_1;
real tax1, _TaxAmountloc = 0;
TaxValue TaxValue = 0, TaxValue_1 = 0;
purchline purchline;
TaxCode TaxCode;
real TaxAmountloc
;
//TaxAmountloc=0;
select purchline where purchline.PurchId == "**********";
tax1 = Tax::calcTaxAmount(purchline.TaxGroup, purchline.TaxItemGroup, Systemdateget(), purchline.CurrencyCode, purchline.LineAmount, TaxModuleType::Purch);
if(purchline.TaxItemGroup && purchline.TaxGroup && purchline.LineAmount != 0)
{
while select TaxOnItem where TaxOnItem.TaxItemGroup == purchline.TaxItemGroup
{
if(TaxOnItem)
{
while select TaxGroupData where TaxGroupData.TaxGroup == purchline.TaxGroup
&& TaxGroupData.TaxCode == TaxOnItem.TaxCode
{
if(TaxGroupData)
{
TaxCode = TaxGroupData.TaxCode;
TaxValue = TaxData::find(TaxOnItem.TaxCode, Systemdateget(), 0).TaxValue;
TaxValue_1 += TaxValue;
TaxAmountloc = (purchline.LineAmount * TaxValue)/100;
//_TaxAmountloc += TaxAmountloc;
//element.execute(4);
info(strfmt("%1,%2", TaxValue, TaxCode));
}
}
}
}
info(strfmt("%1", TaxValue));
}
}
{
TaxOnItem TaxOnItem;
TaxGroupData TaxGroupData, TaxGroupData_1;
real tax1, _TaxAmountloc = 0;
TaxValue TaxValue = 0, TaxValue_1 = 0;
purchline purchline;
TaxCode TaxCode;
real TaxAmountloc
;
//TaxAmountloc=0;
select purchline where purchline.PurchId == "**********";
tax1 = Tax::calcTaxAmount(purchline.TaxGroup, purchline.TaxItemGroup, Systemdateget(), purchline.CurrencyCode, purchline.LineAmount, TaxModuleType::Purch);
if(purchline.TaxItemGroup && purchline.TaxGroup && purchline.LineAmount != 0)
{
while select TaxOnItem where TaxOnItem.TaxItemGroup == purchline.TaxItemGroup
{
if(TaxOnItem)
{
while select TaxGroupData where TaxGroupData.TaxGroup == purchline.TaxGroup
&& TaxGroupData.TaxCode == TaxOnItem.TaxCode
{
if(TaxGroupData)
{
TaxCode = TaxGroupData.TaxCode;
TaxValue = TaxData::find(TaxOnItem.TaxCode, Systemdateget(), 0).TaxValue;
TaxValue_1 += TaxValue;
TaxAmountloc = (purchline.LineAmount * TaxValue)/100;
//_TaxAmountloc += TaxAmountloc;
//element.execute(4);
info(strfmt("%1,%2", TaxValue, TaxCode));
}
}
}
}
info(strfmt("%1", TaxValue));
}
}
No comments:
Post a Comment