Calculating Date Field based on two parameters - is it possible?

Hello everyone!
I’m a SuiteCRM newbie and I have a problem I just can’t resolve on my own… I was looking on this forum for at least similar questions but couldn’t find none. First, let me explain what is the goal and I’m trying to achieve.

  • Each contract contains “Start date” field.
  • I have modified the “Type” field to show numbers 1, 2, 3, 4 and 6. These numbers are for the contractor (user) to define how often during the one year contract his services must be delivered.

I would like to create a report at the end of the each month to show which accounts must be taken care of during the following month. How to achieve that is where I got stuck…

My idea was to create one (or maybe even five) extra dynamic fields. Those fields would be populated with simple formula like this: Contract Start Date + 30 days (or 60, or 90, etc.). With extra fields populated like this, I believe it won’t be too hard to create conditions in Reports module to create a list of customers to take care of during the upcoming period.

I am not a developer and I’m not that good to make this work on my own so I’m asking you for some help - not necessarily with formulas and guide how to make this idea work, I would gladly take any other advice or solution if it’s already in use!

Thank you in advance even for reading this!
Best regards,
vinkobak

I have come to some kind of easy solution to this topic! Let me describe what I have done:

  • each year contains 12 months and it’s a fixed number of fields that doesn’t depend on what date a contract starts;
  • I have added 12 checkbox fields in Studio -> Contracts -> Fields and named them from January to December;
  • when a new Contract is opened, user can populate those checkboxes accordingly to maintenance conditions from the contract like this:
    • monthly maintenance - all checkboxes checked;
    • quarterly maintenance starting from March - checked boxes for March, June, September and December;
    • and so on…
      Create a simple Report with condition containing desired month and you’re good to go.
      And that’s it! No need for complicated formulas and connections between fields and its values. Still, it would be good to know how my initial idea would work and how to bring it to life… If anyone wants to give it a try…
      Thank you and have a nice rest of the day!
      vinkobak

Your solution seems to be effective and easy to implement. I will do some testinf over the week end to try and solve it just with a report, because I believe it would be a simpler solution.

In any case now you are much better off than in the Word!!! situation

1 Like

Oh, yes! Sometimes I feel like hand-written documentation would be easier to handle than endless sea of Word docs! :lol:
I’m still working on my TestReport, trying to get all the necessary fields and stuff so it’s still not over yet but I’m getting close. I’ll post again with snapshots of working report.
Best regards,
vinkobak