mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-13 01:50:46 +01:00
Fix per il bug #41
Risoluzione del problema segnalato in #41, per cui il codice degli interventi veniva considerato in base alla lunghezza del formato.
This commit is contained in:
parent
d7b03719b9
commit
8ae46049d3
@ -217,7 +217,8 @@ switch (post('op')) {
|
|||||||
*/
|
*/
|
||||||
$formato = get_var('Formato codice intervento');
|
$formato = get_var('Formato codice intervento');
|
||||||
|
|
||||||
$rs = $dbo->fetchArray('SELECT codice FROM in_interventi WHERE concat("", codice * 1) = codice AND LENGTH(codice) = '.strlen($formato).' ORDER BY CAST(codice AS SIGNED) DESC LIMIT 1');
|
// Condizioni aggiuntive: WHERE concat("", codice * 1) = codice AND LENGTH(codice) = '.strlen($formato).'
|
||||||
|
$rs = $dbo->fetchArray('SELECT codice FROM in_interventi ORDER BY id DESC LIMIT 1');
|
||||||
$codice = get_next_code($rs[0]['codice'], 1, $formato);
|
$codice = get_next_code($rs[0]['codice'], 1, $formato);
|
||||||
|
|
||||||
// Informazioni di base
|
// Informazioni di base
|
||||||
|
Loading…
x
Reference in New Issue
Block a user