Hi every one.
I have such problem in Navison 5SP1. In Purchase Setup I checked "Exact Cost Reversing Mandatory" option. When I post there are error in CodeUnit 99000834 procedure TransferPurchLineToItemJnlLine
...............
IF ReservEngineMgt.InitRecordSet(OldReservEntry) THEN
REPEAT
OldReservEntry.TESTFIELD("Item No.",PurchLine."No.");
OldReservEntry.TESTFIELD("Variant Code",PurchLine."Variant Code");
OldReservEntry.TESTFIELD("Location Code",PurchLine."Location Code");
IF CheckApplToItemEntry AND
(OldReservEntry."Item Tracking" <> OldReservEntry."Item Tracking"::None)
THEN BEGIN
OldReservEntry2.GET(OldReservEntry."Entry No.",NOT OldReservEntry.Positive);
OldReservEntry2.TESTFIELD("Source Type",DATABASE::"Item Ledger Entry");
NewCheckApplToItemEntry := FALSE;
END;
................
0
Comments
To duplicate in CRONOS:
Use BLUE location. Set "Exact Cost Reversing" on both sales and purchases setup.
1. Create purchase order for item 80216-T
2. Receive purchase order
3. Sell received quantity on sales order
4. Ship and invoice sales order
5. Create Sales Return order to return item to inventory. Recieved and Invoice
6. Create Purchase Return order to return item to vendor. The Applies-to entry will be the positive entry created by the sales return.
7. Attempt to ship. Error occurs
MS Support provided me with the following code changes. The are for CodeUnit 99000834 TransferPurchLineToItemJnlLine
IF ReservEngineMgt.InitRecordSet(OldReservEntry) THEN BEGIN
REPEAT
OldReservEntry.TESTFIELD("Item No.",PurchLine."No.");
OldReservEntry.TESTFIELD("Variant Code",PurchLine."Variant Code");
OldReservEntry.TESTFIELD("Location Code",PurchLine."Location Code");
IF CheckApplToItemEntry AND
(OldReservEntry."Reservation Status" = OldReservEntry."Reservation Status"::Reservation) THEN BEGIN
OldReservEntry2.GET(OldReservEntry."Entry No.",NOT OldReservEntry.Positive);
OldReservEntry2.TESTFIELD("Source Type",DATABASE::"Item Ledger Entry");
END;
TransferQty := CreateReservEntry.TransferReservEntry(DATABASE::"Item Journal Line", ItemJnlLine."Entry Type",
ItemJnlLine."Journal Template Name", ItemJnlLine."Journal Batch Name",
0,ItemJnlLine."Line No.", ItemJnlLine."Qty. per Unit of Measure",OldReservEntry,TransferQty);
UNTIL (ReservEngineMgt.NEXTRecord(OldReservEntry) = 0) OR (TransferQty = 0);
CheckApplToItemEntry := FALSE;
EXIT(TransferQty);
END;
I have not had a chance to test this fix. So I make no promises that it will solve your problem. Be sure to test this before implementing in your live system.
Hope this helps.