-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactoring Haddex #10548
refactoring Haddex #10548
Conversation
add haddex validations to: * partner change * promised date changed * order completion
return false; | ||
} | ||
|
||
if (partner.getDateHaddexCheck() == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we sure this is what we want? what not insisten on a date if isHaddexCheck=true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be handled in a followup
{ | ||
final IBPartnerDAO partnerDAO = Services.get(IBPartnerDAO.class); | ||
final org.compiere.model.I_C_BPartner partner = partnerDAO.getById(order.getC_BPartner_ID()); | ||
final long differenceBetweenHaddexCheckDateAndPromisedDateInMonths = Math.abs( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the abs
?
not 100% sure what to do if datePromised is before the haddex, check..but should it really depend on how many moths before it is?
maybe we should simply throw the error also if getDatePromised < getDateHaddexCheck ?
(i guess it's a rare case, so maybe it doesn't make sense to engneer a dedicated error message..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be handled in a followup
add haddex validations to:
#10538