This commit is contained in:
Luca 2018-03-22 13:32:04 +01:00
parent 02fc65e82b
commit ee7766d062
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ $_SESSION['superselect']['ddt'] = $dir;
if ($dir == 'uscita') {
echo '
<div class="col-md-3">
{[ "type": "text", "label": "'.tr('Numero fattura').'", "required": 1, "name": "numero","class": "text-center alphanumeric-mask", "value": "$numero$" ]}
{[ "type": "text", "label": "'.tr('Numero fattura/protocollo').'", "required": 1, "name": "numero","class": "text-center alphanumeric-mask", "value": "$numero$" ]}
</div>';
$label = tr('Numero secondario');
} else {

View File

@ -45,7 +45,7 @@ function get_new_numerofattura($data)
}else{
$query = "SELECT IFNULL(MAX(numero),'0') AS max_numerofattura FROM co_documenti WHERE DATE_FORMAT( data, '%Y' ) = ".prepare(date('Y', strtotime($data)))." AND idtipodocumento IN(SELECT id FROM co_tipidocumento WHERE dir = '".prepare($dir)."') ORDER BY CAST(numero AS UNSIGNED) DESC LIMIT 0, 1";
$query = "SELECT IFNULL(MAX(numero),'0') AS max_numerofattura FROM co_documenti WHERE DATE_FORMAT( data, '%Y' ) = ".prepare(date('Y', strtotime($data)))." AND idtipodocumento IN(SELECT id FROM co_tipidocumento WHERE dir = ".prepare($dir).") ORDER BY CAST(numero AS UNSIGNED) DESC LIMIT 0, 1";
$rs = $dbo->fetchArray($query);
$numero = $rs[0]['max_numerofattura'] + 1;