diff --git a/Layout/default/Invoice/PDF_HEADER.html b/Layout/default/Invoice/PDF_HEADER.html index 37c5fde53..cf9cd2221 100644 --- a/Layout/default/Invoice/PDF_HEADER.html +++ b/Layout/default/Invoice/PDF_HEADER.html @@ -51,7 +51,7 @@
- Xinon Logo + Xinon Logo
@@ -92,8 +92,8 @@
- - QR-Code + + QR-Code diff --git a/Layout/default/Invoice/PDF_MAIN.php b/Layout/default/Invoice/PDF_MAIN.php index b48af1c74..3d925dda9 100644 --- a/Layout/default/Invoice/PDF_MAIN.php +++ b/Layout/default/Invoice/PDF_MAIN.php @@ -72,7 +72,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]); tr.position td:first-child { vertical-align: middle !important; - padding-left: 2pt; + padding-left: 4pt; } #invoiceTable tr td:first-child { @@ -108,7 +108,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]); $price = number_format($p->price, 2, ",","."); $price_total = number_format($p->price_total, 2, ",","."); $price_gross = number_format($p->price_gross, 2, ",","."); - $vatrate = number_format($p->vatrate, 2, ",","."); + $vatrate = number_format($p->vatrate, 0, ",","."); ?> @@ -137,7 +137,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]); % - € + matchcode): ?> Gesamt Brutto: - + @@ -180,7 +180,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]); billing_type == "sepa"): ?>

BITTE NICHT EINZAHLEN, DER BETRAG WIRD AUTOMATISCH VON IHREM KONTO ABGEBUCHT !

- Bitte überweisen Sie den Rechnungsbetrag bis zum invoice_date))->modify("+14 days")->format("d.m.Y")?> auf folgendes Konto:
+ Bitte überweisen Sie den Rechnungsbetrag bis zum  invoice_date))->modify("+14 days")->format("d.m.Y")?> auf folgendes Konto:
IBAN:
BIC:

Bitte geben Sie als Verwendungszweck unbedingt die Rechnungsnummer an, nur so können wir Ihre Zahlung eindeutig zuordnen @@ -197,23 +197,23 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]); - + - + zones as $zone): ?> price_total < 0.000000001) continue; ?> "> - + - + diff --git a/application/Billing/BillingController.php b/application/Billing/BillingController.php index be7ed4937..45e9525c6 100644 --- a/application/Billing/BillingController.php +++ b/application/Billing/BillingController.php @@ -94,48 +94,43 @@ class BillingController extends mfBaseController { protected function importContractsAction() { $r = $this->request; - $today = new DateTime("now"); - $today->setTime(0,0,0); - - //$tomorrow = new DateTime("tomorrow"); - //$tomorrow->setTime(0,0,0); - $i = 0; $v = 0; - //$yearly_not_before = new DateTime("2023-06-01"); + $today = new DateTime("now"); + $today->setTime(0,0,0); $now_year = date("Y"); $now_month = date("m"); $now_day = date("d"); + //$now_year = 2024; //$now_month = 6; //$now_day = 3; // XXX for debugging only, must be removed // XXX only for 1st Billing after IVT Import - //$yearly_not_before = new DateTime("$now_year-$now_month-01"); - $yearly_not_before = new DateTime("$now_year-06-01"); + $yearly_not_before = new DateTime("$now_year-$now_month-01"); $del = 0; // first delete all non-invoiced billing records - /*foreach(BillingModel::search(["invoice_id" => null]) as $bill) { + foreach(BillingModel::search(["invoice_id" => null]) as $bill) { $bill->delete(); $del++; - }*/ + } $this->log->notice(__METHOD__.": $del Billing records deleted"); - //$stop = false; - foreach(ContractModel::search(["owner_id" => 783, "finish_date<" => mktime(0,1,0,$now_month, $now_day, $now_year), "cancel_date" => null]) as $contract) { - //while(!$stop) { - //$stop = true; - //$contract = new Contract(1475); - //var_dump($contract);exit; + $contract_search = [ + "finish_date<" => mktime(2,0,0,$now_month, $now_day, $now_year), + "cancel_date_null_or_gte" => mktime(0,0,0,$now_month, 1, $now_year) + ]; + + foreach(ContractModel::search($contract_search) as $contract) { $bill_month = $now_month; $bill_year = $now_year; //$bill_day = $now_day; $bill_date = new DateTime("$bill_year-$bill_month-01"); - //echo $bill_date->format("Y-m-d H:i:s")."
"; + $monthly_bill_period_to = clone($bill_date); $monthly_bill_period_to->modify("last day of this month"); @@ -165,6 +160,7 @@ class BillingController extends mfBaseController { $cancel_date = false; if($contract->cancel_date) { $cancel_date = new DateTime("@".$contract->cancel_date); + $cancel_date->setTimezone(new DateTimeZone("Europe/Vienna")); $cancel_date->setTime(0,0,0); if($cancel_date->format("Y") != $now_year || $cancel_date->format("m") != $now_month) { $cancel_date = false; @@ -301,9 +297,7 @@ class BillingController extends mfBaseController { $eday = $end_date->format("d"); if ($contract->price && ($sday > 1 || $cancel_date)) { - // aliquoter preis - $days = ($eday - $sday) + 1; - + // Aliquoten Preis errechnen $first_of_period = clone $start_date; $first_of_period->modify("first day of this month"); @@ -379,7 +373,7 @@ class BillingController extends mfBaseController { $data["billing_period"] = $contract->billing_period; $matchcode = $contract->matchcode; - // if voice product and matchcode consists oh phonenumbers only, remove matchcode + // if voice product and matchcode consists of phonenumbers only, remove matchcode if(array_key_exists("needs_number", $contract->product->attributes) && $contract->product->attributes["needs_number"] == 1 && preg_match('/^[0-9, ]+$]/', $matchcode)) { $matchcode = ""; } @@ -416,8 +410,6 @@ class BillingController extends mfBaseController { /* * Create Voice Billing, if contract has voicenumbers */ - - $voicenumbers = VoicenumberModel::search(["contract_id" => $contract->id]); if(count($voicenumbers)) { diff --git a/application/Billing/BillingModel.php b/application/Billing/BillingModel.php index 07ab84103..dc3d1745c 100644 --- a/application/Billing/BillingModel.php +++ b/application/Billing/BillingModel.php @@ -32,7 +32,6 @@ class BillingModel { public $price; public $price_setup; public $vatarea; - public $vatrate; public $vatgroup_id; public $billing_period; diff --git a/application/Contract/ContractModel.php b/application/Contract/ContractModel.php index 3862ba2e5..7df9d3d30 100644 --- a/application/Contract/ContractModel.php +++ b/application/Contract/ContractModel.php @@ -500,12 +500,26 @@ class ContractModel { } } + if(array_key_exists("cancel_date_null_or_gte", $filter)) { + $cancel_date = $filter['cancel_date_null_or_gte']; + if(is_numeric($cancel_date)) { + $where .= " AND (Contract.cancel_date IS NULL OR Contract.cancel_date >= $cancel_date)"; + } + } + if(array_key_exists("cancel_date<", $filter)) { $cancel_date = $filter['cancel_date<']; if(is_numeric($cancel_date)) { $where .= " AND Contract.cancel_date <= $cancel_date"; } } + + if(array_key_exists("cancel_date_null_or_lte", $filter)) { + $cancel_date = $filter['cancel_date_null_or_lte']; + if(is_numeric($cancel_date)) { + $where .= " AND (Contract.cancel_date IS NULL OR Contract.cancel_date <= $cancel_date)"; + } + } if(array_key_exists("add-where", $filter)) { $where .= " ".$filter['add-where']; diff --git a/public/assets/images/xinon-full.jpg b/public/assets/images/xinon-full-mit-gmbh.jpg similarity index 100% rename from public/assets/images/xinon-full.jpg rename to public/assets/images/xinon-full-mit-gmbh.jpg diff --git a/public/assets/images/xinon-full.png b/public/assets/images/xinon-full.png new file mode 100644 index 000000000..19fe9ab70 Binary files /dev/null and b/public/assets/images/xinon-full.png differ
ZielZiel Preis pro Minute Anzahl Dauer Netto €Brutto €Brutto €
zone?>zone?> price * 60, 4, ",",".")?> € call_count, 0, ",",".")?> duration)?> price_total, 4, ",",".")?> €price_total_gross?> €price_total_gross?> €