Invoice due date

26 views
Skip to first unread message

IamPersistent

unread,
Apr 5, 2012, 1:15:35 AM4/5/12
to vespol...@googlegroups.com
I'm working on invoice right and looking for some feedback on the due date. What should be accepted parameters, I think obviously a DateTime object, but should it also take a DateInterval or a date string. If we do a date sting should it be php or ISO8601.

To me the obvious upside to doing it is that it covers all of the possible cases, the downside is it would require a check for multiple types then probably have to regex the date string.

Any thoughts?

Inspiran

unread,
Apr 5, 2012, 2:00:51 AM4/5/12
to vespol...@googlegroups.com
I would stick with just a DateTime instance without parameters for setDueDate().  It's up to the consumer to figure out which format he really needs.  We could have an util class to help with converting.

You might however consider a method to calculate the due date out of the invoice date ( = invoice date + due_period)

For reference, you at least should have following dates in an invoice

For all invoice 
- created at (date/time)
- updated at
- invoice date (= issue date, can be different from the created/updated at date)
- due_date

For supplier invoices we would have additionally:
- posting date (= date on which you really received the goods from the supplier)

You'll also typically state when the goods where sent for customer orders.  These dates should available on both invoice and invoice item level. 
Reply all
Reply to author
Forward
0 new messages