Line 52:
Line 52:
If the new rule can create conflicts with old one, it will be necessary to rename old existing references. This can be done by a SQL request.
If the new rule can create conflicts with old one, it will be necessary to rename old existing references. This can be done by a SQL request.
For example, to go from numbering module Jupiter (FYYYYMM99) to Terre (FAYYMM-999), you can run the following request:
For example, to go from numbering module Jupiter (FYYYYMM99) to Terre (FAYYMM-999), you can run the following request:
−
<syntaxHighlight lang="sql">
+
<syntaxhighlight lang="sql">
update llx_facture set facnumber=concat('FA',substr(facnumber,4,4),'-',substr(facnumber,8))
update llx_facture set facnumber=concat('FA',substr(facnumber,4,4),'-',substr(facnumber,8))
where facnumber like 'F%' and facnumber not like 'FA%';
where facnumber like 'F%' and facnumber not like 'FA%';
−
</syntaxHighlight>
+
</syntaxhighlight>
For example, to rename references from model FAYYMM999 to Terre (FAYYMM-999), you can run the following request:
For example, to rename references from model FAYYMM999 to Terre (FAYYMM-999), you can run the following request:
−
<syntaxHighlight lang="sql">
+
<syntaxhighlight lang="sql">
update llx_facture set facnumber=concat('FA',substr(facnumber,3,4),'-',substr(CONCAT('0000',substr(facnumber,7)),-4))
update llx_facture set facnumber=concat('FA',substr(facnumber,3,4),'-',substr(CONCAT('0000',substr(facnumber,7)),-4))
where facnumber like 'FA%' and facnumber not like '%-%';
where facnumber like 'FA%' and facnumber not like '%-%';
−
</syntaxHighlight>
+
</syntaxhighlight>
=Submit a patch, work and help on Dolibarr development=
=Submit a patch, work and help on Dolibarr development=