Updates sepa_id script

This commit is contained in:
Frank Schubert
2024-08-07 18:42:55 +02:00
parent 19419ba573
commit f6693795e7

View File

@@ -153,7 +153,7 @@ class InvoiceModel {
WHERE $where
ORDER BY invoice_number DESC LIMIT 1";
//mfLoghandler::singleton()->debug($sql);
mfLoghandler::singleton()->debug($sql);
$res = $db->query($sql);
if($db->num_rows($res)) {
@@ -429,17 +429,21 @@ class InvoiceModel {
}
}
if(array_key_exists("sepa_id", $filter)) {
$sepa_id = $filter['sepa_id'];
if($sepa_id) {
$where .= " AND Invoice.sepa_id = '$sepa_id'";
}
}
if(array_key_exists("add-where", $filter)) {
$where .= " ".$filter['add-where'];
}
if(array_key_exists("Invoice_period", $filter)) {
$Invoice_period = $filter['Invoice_period'];
if(is_numeric($Invoice_period)) {
$where .= " AND Invoice.Invoice_period = $Invoice_period";
}
}
//var_dump($filter, $where);exit;
return $where;
}