From d6da19574e26af0c61f2009780a0031a623123e5 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Sun, 7 Jul 2024 23:01:10 +0200 Subject: [PATCH] Ivt Import Tweaks --- Layout/default/Invoice/PDF_MAIN.php | 2 +- application/Admin/functions/IvtContractImport.php | 3 ++- application/Billing/BillingController.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Layout/default/Invoice/PDF_MAIN.php b/Layout/default/Invoice/PDF_MAIN.php index 6554b5834..01a1c80bb 100644 --- a/Layout/default/Invoice/PDF_MAIN.php +++ b/Layout/default/Invoice/PDF_MAIN.php @@ -90,7 +90,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]); - + diff --git a/application/Admin/functions/IvtContractImport.php b/application/Admin/functions/IvtContractImport.php index 3a4432cd1..86c630513 100644 --- a/application/Admin/functions/IvtContractImport.php +++ b/application/Admin/functions/IvtContractImport.php @@ -893,7 +893,8 @@ class Admin_IvtContractImport { } foreach($ivtnumbers as $ivtnum) { - $number = preg_replace('/^0043/', '43', $ivtnum->number); + + $number = preg_replace('/^0043/', '43', trim($ivtnum->number)); if(!$number) { continue; } diff --git a/application/Billing/BillingController.php b/application/Billing/BillingController.php index 79dcde5e8..b73f955cd 100644 --- a/application/Billing/BillingController.php +++ b/application/Billing/BillingController.php @@ -275,7 +275,7 @@ class BillingController extends mfBaseController { continue; } - if($contract->billing_period == 1 && $start_date->format("Y") < 2024 || ($start_date->format("Y") == 2024 && $start_date->format("m") < 7)) { + if($contract->billing_period == 1 && ($start_date->format("Y") < 2024 || ($start_date->format("Y") == 2024 && $start_date->format("m") < 7))) { // XXX only for 1st Billing after IVT Import $this->log->debug(__METHOD__.": Ignoring Contract ".$contract->id." with start_date ".$start_date->format("Y-m-d")." because is before this month"); }
Leitung / ProduktLeistung / Produkt Zeitraum Preis Menge