Jump to content

Customize invoice number format (YYYYMMDDXXXX)


happy fred

Recommended Posts

Hello,

 

If I want to modify OrderCore class I should have to put inside /override/classe/order directory my custom Order Class that extends OrderCore class but I can't find which methodes I've to extend.

 

I would like generate invoice number like this : YYYYMMDD0001, YYYYMMDD0002, YYYYMMDD0003 etc...

 

In Order.php I've found the method below, Is the method that I have to extend ? Or is there another methods to modify ?

public static function getLastInvoiceNumber(){
return Db::getInstance()->getValue('
SELECT MAX(`number`)
FROM `'._DB_PREFIX_.'order_invoice`
');
}
}

Please, someone could help me ?

 

Thank you.

 

Best regards,

Fred

Edited by zefri (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...