Jump to content

Recommended Posts

Posted

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


 

 

patchFetching info...

Posted

That is so cool :D I've added this to mine now you've shown me how to do it.

$tags = array("{year}", "{shortyear}", "{month}", "{day}", "{GB}", "{EU}", "{US}");
$replacements = array($this->Date->format("Y"), $this->Date->format("y"), $this->Date->format("m"), $this->Date->format("d"), 'GB', 'EU', 'US');

Be neat if we can set the Country for the company and use that tag like some companies do: GB02389234 EU2389423 etc.

Now mine is: GB1610091 [{GB}{shortyear}{month}{day}{num}]

@Paul do you like this feature request to have the short date?

Posted

it would be cool... I think this is quite an important stuff, especially under this stupid EU/CZ jurisdisction (we're from Prague, CZ).

A lot of companies over here use also a CUSTOMER ID in their invoicing schemas.. so.. a lot of macros would be useful.

The good thing imho is that it is soo easy to implement i Blesta.. 

Also -- this can be a game-changes for NEW customers moving over to Blesta -- they can CONTINUE with their numbering.

And thats important especially under restrictive jurisdictions, such as atmost of EU countries.

You got weird numbering scheme? Or you changed anything? Well... you could be tampering with somehing -> deep check of your accounting stuff :) 

 

Posted
  On 10/9/2016 at 12:43 PM, Hix said:

it would be cool... I think this is quite an important stuff, especially under this stupid EU/CZ jurisdisction (we're from Prague, CZ).

A lot of companies over here use also a CUSTOMER ID in their invoicing schemas.. so.. a lot of macros would be useful.

The good thing imho is that it is soo easy to implement i Blesta.. 

Also -- this can be a game-changes for NEW customers moving over to Blesta -- they can CONTINUE with their numbering.

And thats important especially under restrictive jurisdictions, such as atmost of EU countries.

You got weird numbering scheme? Or you changed anything? Well... you could be tampering with somehing -> deep check of your accounting stuff :) 

 

Expand  

I've just tried to grab the client ID and I failed lol.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...