You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed an issue with the javascript auto payment terms due_date timestamp format.
When the invoice is first generated based on the default payment terms of the customer
The start date is always right, but the due date gets a full UTC timestamp
This is the timestamp auto-generated.
"due_date":"2014-05-13T04:00:00.000Z"
However if you try to save this timestamp you will get an error because we expect the format to be 'Apr 29, 2014'
If you manually select a due date the time stamp changes to the correct format.
"due_date":"May 15, 2014"
I personally think that the date handling should be done client side maybe using moment.js and I think the json object should pass back to the server full UTC stamps.
(But perhaps you have had issues with that approach that is maybe why you chose to do it server side.)
The text was updated successfully, but these errors were encountered:
I've checked in a fix for this and deployed it to production. I've used the datepicker to handle formatting the date. Long term I'm going to look into using moment.js (most date work is currently handled server side).
I've checked in a fix for this and deployed it to production. I've
used the datepicker to handle formatting the date. Long term I'm going
to look into using moment.js (most date work is currently handled
server side).
—
Reply to this email directly or view it on GitHub #102 (comment).
I hope to describe the issue accurately.
I noticed an issue with the javascript auto payment terms due_date timestamp format.
When the invoice is first generated based on the default payment terms of the customer
The start date is always right, but the due date gets a full UTC timestamp
This is the timestamp auto-generated.
"due_date":"2014-05-13T04:00:00.000Z"
However if you try to save this timestamp you will get an error because we expect the format to be 'Apr 29, 2014'
If you manually select a due date the time stamp changes to the correct format.
"due_date":"May 15, 2014"
I personally think that the date handling should be done client side maybe using moment.js and I think the json object should pass back to the server full UTC stamps.
(But perhaps you have had issues with that approach that is maybe why you chose to do it server side.)
The text was updated successfully, but these errors were encountered: