payment could not be committed due to wrong invoice date

Description

I yesterday created a payment selection manually and included a recurring invoice with date of tomorrow. After exporting the selection (and transmitting it to the bank) I wanted to define the selection as correctly transferred (answered the appropiate question) and got the message "Belegbearbeitung gescheitert - Wrong allocation date". The first idea is to enter a translateble message, which also exactly mentions whats wrong (allocation date earlier than invoice date). Second would be, to hinder or at least warn to enter an invoice into the selection which is dated later. I'm willing to prepare a patch but I first want to discuss, what's best.

Environment

None

Activity

Show:
Martin Schönbeck
May 3, 2020, 7:36 AM
Edited

When completing a POS-order MPayment.allocateInvoice is called but
MInvoice invoice = MInvoice.get(getCtx(), getC_Invoice_ID());
doesn't deliver a valid invoice. getC_Invoice_ID delivers an ID which seems to be valid but MInvoice.get then isn't able to deliver this invoice.

Carlos Ruiz
May 3, 2020, 1:38 PM

Fixed trx issue (#26)

Carlos Ruiz
May 3, 2020, 1:38 PM

Fixed trx issue (#26)

Heng Sin Low
May 3, 2020, 1:56 PM

I think there’s the need for a broader review of all the M*.get() usage in the code. There are a few potential issues that need review:

  • Trx issue similar to the issue o this ticket

  • Doing write operation(s) with the object retrieve from cache. This is problematic since PO is not thread safe and cache is static global.

  • Keeping PO with Trx in cache. This is problematic since it could lead to trx leak.

 

Martin Schönbeck
May 3, 2020, 6:58 PM

Hi ,

as expected it works now.

Regards,
Martin

Assignee

Carlos Ruiz

Reporter

Martin Schönbeck

Labels

None

Tested By

None

Components

Fix versions

Affects versions

Priority

Critical
Configure