Hi everyone,
I have a problem initializing a purchLine record whit TaxGroup and ItemTaxGroup fields.
This is the code:
purchLine.initValue(purchTable.PurchaseType);
purchLine.initFromPurchTable(purchTable);
purchLine.initFromInventTable(inventTable);
At the end of the "purchLine.initFromPurchTable(purchTable);" method the value of that fields are:
TaxGroup == "AGRICULT"
ItemTaxGroup == ""
That's right, the system takes the value from the purchTable record for that field(what is taken from the vendor) then in the "purchLine.initFromInventTable(inventTable);" method, (I show you the code of that method below)
public server void initFromInventTable(InventTable _inventTable)
{
container purchLineContainer;
XppILExecutePermission xppILExecutePermission;
xppILExecutePermission = new XppILExecutePermission();
xppILExecutePermission.assert();
if (PurchLine::hasExensionTableEnabled())
{
this.SysExtensionSerializerMap::packAll();
}
purchLineContainer = runTableMethodIL(tableStr(PurchLine),
tableStaticMethodStr(PurchLine, initFromInventTableIL),
[buf2Con(this, true), buf2Con(_inventTable, true)]);
CodeAccessPermission::revertAssert();
this.con2buf(purchLineContainer);
if (PurchLine::hasExensionTableEnabled())
{
this.SysExtensionSerializerMap::unpackAll();
}
}
When the systems call con2buf(purchLineContainer) method, the values of TaxGroup and ItemTaxGroup fields change, setting:
TaxGroup == "NAC-COMP"
ItemTaxGroup == "SUPERREDUC",
I dont know why the value of TaxGroup Field changes, the value of the ItemTaxGroup is correct, that value is what is set in the inventTable for the Item what I using... But the other one?
In other companies it works fine, but not in that one... I have checked the TaxGroup and ItemTaxGroup configurations and are the same for both companies...
Can someone help me or, at least, give me some idea that may be happening?
thank you very much!!
Ander