PiotrNow Posted July 8, 2017 Share Posted July 8, 2017 Bonjour, Je souhaiterai pour les commandes avoir la même numérotation que pour les factures avec préfixe/année/numéro. Ou au moins des numéros de commandes en chiffres et non en lettres. Quelqu'un peut-il m'aider ? Merci, Piotr Link to comment Share on other sites More sharing options...
PiotrNow Posted July 11, 2017 Author Share Posted July 11, 2017 Pour info voici le code que j'ai modifié pour avoir des commandes avec une numérotation "Préfixe C"+"Année sur 2 chiffres"+"/"+n°de la commande de l'année : fichier order.php, fonction generateReference() : //return strtoupper(Tools::passwdGen(9, 'NO_NUMERIC')); $id_order_max = Db::getInstance()->getValue(' SELECT count(id_order) FROM '._DB_PREFIX_.'orders WHERE YEAR(date_add)='.date("Y").' and id_order > 0 ' .Shop::addSqlRestriction()); return 'C'.date("y").'/'.sprintf('%05d',$id_order_max + 1); Link to comment Share on other sites More sharing options...
loupiloop Posted September 21, 2017 Share Posted September 21, 2017 Merci !! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now