SimpleInvoices Group Forum › Forums › Fearless359 SimpleInvoices Discussion Group › Date format
- This topic has 9 replies, 2 voices, and was last updated 2 months, 3 weeks ago by
ExpertGeeks.
-
AuthorPosts
-
December 22, 2020 at 7:54 am #1279
ExpertGeeks
ParticipantHi,
I’ve noticed that the date is MM/DD/YYYY. Everything I can think of is set to en_GB (and so should be DD/MM/YYY). How can I fix this ? Thanks.December 23, 2020 at 7:32 am #1280RRowley
ParticipantI’ve standardized the date format displayed on screens to the database format, yyyy-mm-dd. The value on the invoice, expense and payment view screens had been missed. The most recent update, Version: 2020.0.11, corrects this.
If you want a difference format for the printed invoice, you’ll need to develop a custom template.
January 6, 2021 at 9:49 am #1288ExpertGeeks
ParticipantI’ve downloaded the zip from github, but it seems to be a revision off;
Version: 2020.0.10 — 20201217
This is still showing the date in MM-DD-YYYY format. How/where would I need to edit this to make changes to the date format ? My template references this field using;
{$invoice.date|utilDate}
-
This reply was modified 3 months, 1 week ago by
ExpertGeeks.
January 6, 2021 at 10:02 am #1290ExpertGeeks
ParticipantI also tried a git clone and copying across the usual config files etc etc and I get;
PdoDb – construct error: SQLSTATE[HY000] [1698] Access denied for user ‘root’@’localhost’ (Error code: 0)
January 6, 2021 at 1:59 pm #1291ExpertGeeks
ParticipantI’ve manually made the changes listed here;
https://github.com/fearless359/simpleinvoices/commit/62c86040ae3cc154aa3e76bc51d1f8fd25f16155
to my working copy of 2020.0.10 which should bring me up to v2020.0.11. Despite all dates now showing as YYYY-MM-DD in the menus, they’re still MM-DD-YYYY in the print preview and the PDF’s for both the
default
template and my owneg-invoice
template.-
This reply was modified 3 months, 1 week ago by
ExpertGeeks.
January 6, 2021 at 2:21 pm #1293ExpertGeeks
ParticipantApologies, I think the version issue might have been to a permission on the config folder. I’ve tried the update again and now it shows 2020.0.11, however the print preview and the pdfs still have the date formate of MM-DD-YYYY. I’d be very happy with your new format of YYYY-MM-DD, I think this format makes the most sense. If only I could get the PDF’s to comply !
January 7, 2021 at 5:51 am #1294RRowley
ParticipantPDF’s are an exception to the rule. They contain their own code to display values and any changes you want to make require you to implement a customized version. Check out the directions for the Invoice Templates & Styles menu link to the left.
January 8, 2021 at 6:48 am #1295ExpertGeeks
ParticipantThe default template (which the “Invoices Templates & Styles” you referenced to edit) renders the date in MM-DD-YYYY format.
I can’t put this any more plainly, how can I get the default template to display the date in the format YYYY-MM-DD ?
January 8, 2021 at 10:53 am #1296RRowley
ParticipantYou need to make a custom template. The instructions I mentioned tell you how to initially set this up. You can copy the default directory to a new directory named for example, “mypdf”, and then modify line 35 of the template.tpl file and change
{$invoice.date|utilDate}
to{$invoice.date|htmlSafe}
.January 20, 2021 at 3:48 am #1328ExpertGeeks
ParticipantThanks Richard. Can I recommend you amended this in the default template? Cheers.
-
This reply was modified 3 months, 1 week ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
Recent Comments