Search the Community
Showing results for tags 'date_format'.
-
Guys, easy to implement, but would help a lot of people: TWO digit year in invoice numbering -- eg. 16100986 -- {shortyear}{month}{day}{num} -- Settings > Company > Invoice Customization here is the patch (but use rather that attached one): --- ./invoices-old.php 2016-10-09 11:45:43.000000000 +0200 +++ ./app/models/invoices.php 2016-10-09 12:10:29.000000000 +0200 @@ -2383,8 +2383,8 @@ // Set the id format accordingly, also replace the {year} tag with the appropriate year, // the {month} tag with the appropriate month, and the {day} tag with the appropriate day // to ensure the id_value is calculated appropriately on a year-by-year basis - $tags = array("{year}", "{month}", "{day}"); - $replacements = array($this->Date->format("Y"), $this->Date->format("m"), $this->Date->format("d")); + $tags = array("{year}", "{shortyear}", "{month}", "{day}"); + $replacements = array($this->Date->format("Y"), $this->Date->format("y"), $this->Date->format("m"), $this->Date->format("d")); $vars['id_format'] = str_ireplace($tags, $replacements, $inv_format); // Creates subquery to calculate the next invoice ID value on the fly patch
- 5 replies
-
- invoicing
- date_format
-
(and 1 more)
Tagged with: