Skip to content

Page 6630 "Sales Return Order", Action "GetPostedDocumentLinesToReverse" does not validate "Payment Method Code" #24367

@bokhimlin

Description

@bokhimlin

🕮 Describe the issue

When using the Page 6630 "Sales Return Order" with the action "GetPostedDocumentLinesToReverse", the Payment Method Code field is not validated after getting the Sales Lines, resulting in missing 1 Customer Ledger Entry for Refund. We can already see the missing posting in "Posting Preview".

🔧 To Reproduce

  1. create a new sales return order
  2. select any customer with Posted Invoices. Note: Payment Method Code is still empty, which is fine.
  3. Choose any Document, you want to reverse.
  4. Payment method code is filled in.
  5. If we look on posting preview in Customer Ledger Entries, there is only 1 entry for Credit memo, 0 for Refund.

📣 Expected behavior

If you validate the Payment Method code manually and look at the preview, there are 2 Customer Ledger Entries, 1 for credit memo, 1 for refund.

Screenshots
Wrong Behaviour missing refund entry
image

Correct behaviour, after manual validate of Payment Method Code
image

Additional context

  1. I analyzed the code but didn't find the right spot, where "Payment Method Code" is entered but not validated. The best guess is in codeunit 6620 "Copy Document Mgt.", function CopySalesInvLinesToDoc or deeper in code.

  2. With a manual validate of the field "Payment Methode Code" the code in the Validate Trigger is run, guess this is missing.
    "Bal. Account Type" := PaymentMethod."Bal. Account Type";
    "Bal. Account No." := PaymentMethod."Bal. Account No.";

  3. I guess all copy functions of where of Posted Shipments, Invoices, Return Receipts or Credit Memo have the same wrong behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions