It happens sometimes when you invoice not the full packing slip quantity of a PO line, AX split the transactions but it invoices all quantities although the invoice quantity is not that value.
The fix is to just updating the remain quantity so that it is not linked with InventTransPosting record.
Example:
InventTRans IT;
Select forupdate IT where IT.Qty = 140 && .....;
If (IT)
{
IT.DateFinancial = datenull();
IT.StatusReceipt = StatusReceipt::Received;
IT.CostAmountPosted = 0;
IT.CostAmountAdjustment = 0;
IT.Voucher = '';
IT.InvoiceId = '';
ttsbegin;
IT.doupdate();
ttscommit;
}
No comments:
Post a Comment