Это ошибка.
Вот кусок джоба, которым искали подобные ошибки.
X++:
while select CustTrans
where (!AccountNum || CustTrans.AccountNum == AccountNum)
&& (!Voucher || CustTrans.Voucher == Voucher)
&& (!PostingProfile || CustTrans.PostingProfile == PostingProfile)
&& (!dateFrom || CustTrans.TransDate >= dateFrom)
exists join CustTransOpen2
where CustTransOpen2.RefRecId == CustTrans.RecId
{
select sum(AmountMST), sum(AmountCur), count(RecId) from CustTransOpen
where CustTransOpen.RefRecId == CustTrans.RecId;
AmountMST = CustTrans.AmountMST + CustTrans.ExchAdjustment - CustTrans.SettleAmountMST - CustTransOpen.AmountMST;
AmountCur = CustTrans.AmountCur - CustTrans.SettleAmountCur - CustTransOpen.AmountCur;
if (AmountMST != 0 || AmountCur != 0)
info(strfmt("CustTrans.RecId открытая сумма %1", CustTrans.RecId));
select sum(SettleAmountMST), sum(SettleAmountCur), sum(ExchAdjustment) from CustSettlement
where CustSettlement.TransRecId == CustTrans.RecId;
AmountMST = CustTrans.SettleAmountMST - CustSettlement.SettleAmountMST - CustSettlement.ExchAdjustment;
AmountCur = CustTrans.SettleAmountCur - CustSettlement.SettleAmountCur;
if (AmountMST != 0 || AmountCur != 0)
info(strfmt("CustTrans.RecId сумма сопоставления %1", CustTrans.RecId));
if (abs(CustTrans.AmountCur) < abs(CustTrans.SettleAmountCur) ||
abs(CustTrans.AmountMST) < abs(CustTrans.SettleAmountMST - CustTrans.ExchAdjustment))
{
info(strfmt("!!!CustTrans.RecId сумма сопоставления больше самой суммы %1", CustTrans.RecId));
}
}