0 Replies Latest reply: Aug 9, 2018 7:52 AM by Ivan Aksenov RSS

    Transfer calculation date for the next period

    Ivan Aksenov

      Hello everybody,

      Please advise with one question.

      I need to set condition for vendors which starts with "2000",

      So the main condition that they have payments only on last Wednesday of the period (we have list of  finance periods in separate file).

      And the point is, that all periods finish on Monday. For example Period 6 is from 30.05.2018 to 30.07.2018.

      And if the Net Due Date of the vendor is less than the last Wednesday, it`s not problem.

      But if it`s going after Wednesday and before Monday-it should be transferred to the next period`s last Wednesday.

      So last condition is the problematic one, bellow is the formula. Please advise how it`s better to change  in script to have necessary data.

      Thanks in advance

       

      Date(if(left(LIFNR,4)='2000' and NetDueDate<=PeriodEnd_NDD-5,PeriodEnd_NDD-5,

      If(left(LIFNR,4)='2000' and NetDueDate>PeriodEnd_NDD-5 or NetDueDate<=PeriodEnd_NDD,Month(AddMonths((NetDueDate),+1)) and (PeriodEnd_NDD-5),) as  NetDueDate_Calc1