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
thx for your response. i’m sorry that i cannot check the existance of DateAcct column on those tables.
Carlos Ruiz August 25, 2023 at 9:39 AM
Hi
I think those tables don’t have DateAcct column
zuhri utama August 25, 2023 at 9:35 AM
i found some model class not check testPeriodOpen on DateAcct :
MInventory
MMovement
MProduction
MRequisition
should i open new issue to fix this bug?
Diego Ruiz August 22, 2020 at 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
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