Creating a partial invoice for a negative order produces incorrect matching qty
Description
Creating a partial invoice for a negative order produces incorrect matching qty.
To reproduce: 1. Create/complete a PO for negative 4 Plum Trees. 2. Create/complete a Material receipt from this PO. 3. Create a standard Invoice from the material receipt but change the quantity from -4 to -3. (This can happen if the Vendor has only agreed to give a credit for 3 at present.) 4. Try to complete and the Invoice status will be Invalid, with the following error:
10000012: Grand Total=-90.0 (#1) - Total matched qty > invoiced qty. MatchedQty=-4, InvoicedQty=-3, Line=MInvoiceLine[1000006,10,QtyInvoiced=-3,LineNetAmt=-90]
The matched qty is -4, but should only be -3 to match the invoice qty.
Creating a partial invoice for a negative order produces incorrect matching qty.
To reproduce:
1. Create/complete a PO for negative 4 Plum Trees.
2. Create/complete a Material receipt from this PO.
3. Create a standard Invoice from the material receipt but change the quantity from -4 to -3. (This can happen if the Vendor has only agreed to give a credit for 3 at present.)
4. Try to complete and the Invoice status will be Invalid, with the following error:
10000012: Grand Total=-90.0 (#1) - Total matched qty > invoiced qty.
MatchedQty=-4, InvoicedQty=-3, Line=MInvoiceLine[1000006,10,QtyInvoiced=-3,LineNetAmt=-90]
The matched qty is -4, but should only be -3 to match the invoice qty.