Ajout archivage factures

This commit is contained in:
Jean-Christophe Engel 2026-02-26 10:09:36 +01:00
parent 79b3a72cca
commit 745de00331
4 changed files with 29 additions and 14 deletions

View file

@ -559,10 +559,10 @@ class Facture
return DB::getInstance()->delete('plugin_facturation_factures', 'id = '. (int)$id);
}
public function archiver($id)
public function archiver($id, $archive)
{
$f = $this->get($id);
$f->archivee = 1;
$f->archivee = $archive;
$f->date_emission = $f->date_emission->format('d/m/Y');
$f->date_echeance = $f->date_echeance->format('d/m/Y');
$id = $f->id;