Ajout archivage factures
This commit is contained in:
parent
cb3d201aec
commit
a80bebcc4e
5 changed files with 20 additions and 11 deletions
|
|
@ -318,7 +318,7 @@ class Facture
|
|||
return $r;
|
||||
}
|
||||
|
||||
public function list(): DynamicList
|
||||
public function list($all = true): DynamicList
|
||||
{
|
||||
$id_field = \Paheko\Users\DynamicFields::getNameFieldsSQL('u');
|
||||
$plugin_name = preg_replace('/^.*\/(\w+)\/$/', '${1}', \Paheko\PLUGIN_ADMIN_URL);
|
||||
|
|
@ -396,7 +396,12 @@ class Facture
|
|||
LEFT JOIN users AS u ON f.receveur_membre = 1 AND u.id = f.receveur_id
|
||||
LEFT JOIN plugin_facturation_clients AS c ON f.receveur_membre = 0 AND c.id = f.receveur_id';
|
||||
|
||||
$list = new DynamicList($columns, $tables);
|
||||
if ($all) {
|
||||
$where = "f.archivee != TRUE";
|
||||
} else {
|
||||
$where = "f.archivee == TRUE";
|
||||
}
|
||||
$list = new DynamicList($columns, $tables, $where);
|
||||
$list->orderBy('date_emission', true);
|
||||
|
||||
$currency = Config::getInstance()->monnaie;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue