Skip to content
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

Merged
merged 3 commits into from
Jan 22, 2021
Merged

refactoring Haddex #10548

merged 3 commits into from
Jan 22, 2021

Conversation

metas-rc
Copy link
Member

add haddex validations to:

  • partner change
  • promised date changed
  • order completion

#10538

add haddex validations to:
* partner change
* promised date changed
* order completion
return false;
}

if (partner.getDateHaddexCheck() == null)
Copy link
Member

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?

Copy link
Member Author

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(
Copy link
Member

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..)

Copy link
Member Author

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

@metas-rc metas-rc merged commit 8150ae9 into tenacious_d_uat Jan 22, 2021
@metas-rc metas-rc deleted the gh10538_cornerCases branch January 22, 2021 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants