Ivt Import Tweaks

This commit is contained in:
Frank Schubert
2024-07-07 23:01:10 +02:00
parent dbd332018b
commit d6da19574e
3 changed files with 4 additions and 3 deletions

View File

@@ -90,7 +90,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]);
<table style="border-collapse: collapse; width: 100%;" id="invoiceTable">
<tr style="font-weight: bold; border-bottom: 1px solid black;" class="uneven">
<th style="text-align: center">Leitung / Produkt</th>
<th style="text-align: center">Leistung / Produkt</th>
<th style="text-align: center">Zeitraum</th>
<th style="text-align: right">Preis</th>
<th style="text-align: center">Menge</th>

View File

@@ -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;
}

View File

@@ -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");
}