Post Purchase Return Order Or Credit Memo

krasi_varna_77krasi_varna_77 Member Posts: 34
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;
................

Comments

  • bbrownbbrown Member Posts: 3,268
    I ran into this issue a couple of day ago. It occurs when you attempt to return inventory (purchase return) that was brought into inventory via a sales return. I was able to duplicate he issue in CRONUS and report it to MS support.

    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.
    There are no bugs - only undocumented features.
  • krasi_varna_77krasi_varna_77 Member Posts: 34
    thanks. I will test it
Sign In or Register to comment.