mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-25 15:58:56 +01:00
Update modules/fatture/src/Fattura.php
This commit is contained in:
parent
46ddf6958a
commit
421ff70be3
@ -127,7 +127,7 @@ class Fattura extends Model
|
||||
// Recupero maschera per questo segmento
|
||||
$maschera = static::getMaschera($id_segment);
|
||||
|
||||
$ultima_fattura = $database->fetchOne('SELECT numero FROM co_documenti WHERE YEAR(data) = :year AND id_segment = :id_segment '.(($direzione == 'uscita') ? 'ORDER BY numero DESC' : static::getMascheraOrder($maschera)), [
|
||||
$ultima_fattura = $database->fetchOne('SELECT numero FROM co_documenti WHERE YEAR(data) = :year AND id_segment = :id_segment '.(($direzione == 'uscita') ? 'ORDER BY CAST(numero AS UNSIGNED) DESC' : static::getMascheraOrder($maschera)), [
|
||||
':year' => date('Y', strtotime($data)),
|
||||
':id_segment' => $id_segment,
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user