Internal account statement displays inconsistant information when reversing open transactions which have been exchange adjusted
Problem:
The Internal account statement report may display inconsistant balance information when reversing open transactions which have been exchange adjusted.
Resolution:
To resolve the issue the following code changes can be made.
Change \Classes\CustVendTransData\remainAmountMST
From:
public AmountMST remainAmountMST()
{
AmountMST remainAmountMST;
;
if (custVendTrans.TransType == LedgerTransType::ExchAdjustment)
{
remainAmountMST = custVendTrans.AmountMST - custVendTrans.SettleAmountMST;
}
To:
public AmountMST remainAmountMST()
{
AmountMST remainAmountMST;
;
if (custVendTrans.TransType == LedgerTransType::ExchAdjustment || || custVendTrans.reversed())
{
remainAmountMST = custVendTrans.AmountMST - custVendTrans.SettleAmountMST;
}
Also, a new method is needed for \Data Dictionary\Maps\CustVendTrans:
boolean reversed()
{
boolean ret;
CustTrans custTrans;
VendTrans vendTrans;
;
switch (this.TableId)
{
case tableNum(CustTrans): ret = custTrans.reversed();
break;
case tableNum(VendTrans): ret = vendTrans.reversed();
break;
}
return ret;
}