Fix on invoices, add delivery reference, wip on dashboard concurrency requests designed on template

This commit is contained in:
Ludovic CANDELLIER
2023-02-17 00:05:03 +01:00
parent 820a200e88
commit 900aa413a2
26 changed files with 555 additions and 130 deletions

View File

@@ -61,7 +61,7 @@ class Invoices
public static function getNewRef()
{
$ref = date('ym') . '00000';
$last_ref = Invoice::orderBy('ref', 'desc')->where('ref', '>', $ref)->first();
$last_ref = Invoice::orderBy('id', 'desc')->first();
return $last_ref ? $last_ref->ref + 1 : $ref + 1;
}
@@ -72,6 +72,6 @@ class Invoices
public static function statuses()
{
return ['En attente', 'Non soldée', 'Soldée'];
return ['En attente', 'Paiement partiel', 'Soldée', 'Paiement rejeté'];
}
}