Wrong period validation on Bank Statement

Description

Reviewing MBankStatement.prepareIt

I think the period validation is very wrong there:

1 - period open is checked with StatementDate instead of DateAcct - line 306

2 - minDate and maxDate are checked without organization - lines 330,331

3 - Because of that validation would not be needed, because document is posted just with the header DateAcct

4 - But if we integrate the suggestions from on - then it makes sense again to validate the dateacct on lines, but, in this case, I think validating just min and max is wrong also, we would need to validate period open in any different date, because could be possible that min and max are open, but an intermediate date is closed

Environment

None

Activity

Show:
Diego Ruiz
August 22, 2020, 7:15 PM

Triaged by Diego Ruiz,

Partially still reproducible in 7.1z.

1 - period open is checked with StatementDate instead of DateAcct - line 306

Still the case → MPeriod.testPeriodOpen(getCtx(), getStatementDate(), MDocType.DOCBASETYPE_BankStatement, getAD_Org_ID());
2 - minDate and maxDate are checked without organization - lines 330,331

These lines are no longer there, they were commented out on

Assignee

Unassigned

Reporter

Carlos Ruiz

Labels

Tested By

None

Components

Affects versions

Priority

Major
Configure