Bug in invoice post. for sales credit memo when using whse?

JohannesAlbertJohannesAlbert Member Posts: 3
"Exact Cost Reversing Mandatory" is set in Sales & Receivabels Setup.
I have an item with lot tracking "all". This item is at a location which requires receiving.
After posting the warehouse receipt for a sales return order, naturally I want to post the invoice (in another step, not at once!).
Then I get the error "Appl.-from Item Entry must not be 0 in Sales lince Document Type="'Return Order',Document ..."
In my opinion "Appl.-from Item Entry" is only interesting for posting the Item Ledger Entry and should not be tested when posting the Value Entry.

As a solution I'd suggest to change the function PostItemJnlLine in CU80.
Original:
IF (QtyToBeShippedBase <> 0) THEN
  IF "Document Type" IN ["Document Type"::"Return Order","Document Type"::"Credit Memo"] THEN
    ReserveSalesLine.TransferSalesLineToItemJnlLine(SalesLine,ItemJnlLine,QtyToBeShippedBase,CheckApplFromItemEntry)
  ELSE
    TransferReservToItemJnlLine(
      SalesLine,ItemJnlLine,-QtyToBeShippedBase,TempTrackingSpecification,CheckApplFromItemEntry);

IF CheckApplFromItemEntry THEN
  TESTFIELD("Appl.-from Item Entry");
New:
IF (QtyToBeShippedBase <> 0) THEN BEGIN
  IF "Document Type" IN ["Document Type"::"Return Order","Document Type"::"Credit Memo"] THEN
    ReserveSalesLine.TransferSalesLineToItemJnlLine(SalesLine,ItemJnlLine,QtyToBeShippedBase,CheckApplFromItemEntry)
  ELSE
    TransferReservToItemJnlLine(
      SalesLine,ItemJnlLine,-QtyToBeShippedBase,TempTrackingSpecification,CheckApplFromItemEntry);

  IF CheckApplFromItemEntry THEN
    TESTFIELD("Appl.-from Item Entry");
END;
What do you think? Is this the correct solution?

Greetings,
Johannes Albert

Answers

Sign In or Register to comment.