From bede016157d64cd1e07d08ed838052ceb8e62e14 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Thu, 18 Apr 2024 14:01:02 +0200 Subject: [PATCH] Contract WIP & Contractqueue WIP 2024-04-18 --- Layout/default/Contract/View.php | 85 ++- Layout/default/Contractqueue/Index.php | 673 ++++++++++-------- application/Contract/Contract.php | 43 +- application/Contract/ContractModel.php | 78 +- .../Contractqueue/ContractqueueController.php | 138 ++++ .../Contractqueue/ContractqueueModel.php | 13 +- lang/de.php | 1 + lib/mvcfronk/mfBase/mfBaseModel.php | 6 + 8 files changed, 685 insertions(+), 352 deletions(-) diff --git a/Layout/default/Contract/View.php b/Layout/default/Contract/View.php index f3039d68b..46823344d 100644 --- a/Layout/default/Contract/View.php +++ b/Layout/default/Contract/View.php @@ -156,10 +156,10 @@ product_external) ? "Ja" : "Nein"?> Setup Preis: - € price_setup?> + ">€ price_setup?> Preis Periodisch: - € price?> + ">€ price?> Verrechnungsperiode: @@ -261,9 +261,15 @@ Vertrag manuell angelegt value == "import"): ?> Vertrag importiert: text))?> + value == "order"): ?> + Vertrag aus Bestellung # $contract->orderproduct->order_id])?>">orderproduct->order_id?> erstellt - + type == "credit_created"): ?> + + Gutschrift-Vertrag $j->value])?>">value?> erstellt + + type == "link"): ?> value); ?> @@ -321,45 +327,56 @@ linkFrom) && count($contract->linkFrom)) || (is_array($contract->linkTo) && count($contract->linkTo))): ?> + - - links as $link): ?> - contract_id == $contract->id) { - $direction = "von"; - $linkcontract = $link->origin; - } else { - $linkcontract = $link->contract; - if($link->type == "upgrade" || $link->type == "downgrade") { - $direction = "auf"; - } - if($link->type == "relocation") { - $direction = "nach"; - } - - } - - ?> - - - - - - - - - - + linkFrom, $contract->linkTo] as $links): ?> + + contract_id == $contract->id) { + $direction = "von"; + $linkcontract = $link->origin; + if($link->type == "credit") { + $direction = ""; + //continue; + } + } else { + $linkcontract = $link->contract; + if($link->type == "upgrade" || $link->type == "downgrade") { + $direction = "auf"; + } + if($link->type == "relocation") { + $direction = "nach"; + } + if($link->type == "credit") { + $direction = "zu"; + //continue; + } + + } + + ?> + + + + + + + + + + + +
Typ Kunde Contract IDTyp Produkt Bestelldatum Fertigstellung Kündigung
$linkcontract->owner_id])?>">owner->getCompanyOrName()?>"> $linkcontract->id])?>">id?>">type, "contract")?> type != "link") ? $direction : ""?>"> $linkcontract->id])?>">product_name?> [matchcode?>]">order_date) ? date('d.m.Y', $linkcontract->order_date) : ""?>">finish_date) ? date('d.m.Y', $linkcontract->finish_date) : ""?>">cancel_date) ? date('d.m.Y', $linkcontract->cancel_date) : ""?> - $link->id])?>" onclick="if(!confirm('Verknüpfung wirklich entfernen?')) return false;" class="text-danger" title="Verknüpfung entfernen"> -
">type, "contract")?> type != "link") ? $direction : ""?> $linkcontract->owner_id])?>">owner->getCompanyOrName()?>"> $linkcontract->id])?>">id?>"> $linkcontract->id])?>">product_name?> [matchcode?>]">order_date) ? date('d.m.Y', $linkcontract->order_date) : ""?>">finish_date) ? date('d.m.Y', $linkcontract->finish_date) : ""?>">cancel_date) ? date('d.m.Y', $linkcontract->cancel_date) : ""?> + $link->id])?>" onclick="if(!confirm('Verknüpfung wirklich entfernen?')) return false;" class="text-danger" title="Verknüpfung entfernen"> +
diff --git a/Layout/default/Contractqueue/Index.php b/Layout/default/Contractqueue/Index.php index b2464974c..abe46f6ce 100644 --- a/Layout/default/Contractqueue/Index.php +++ b/Layout/default/Contractqueue/Index.php @@ -78,360 +78,371 @@
+ +
"> +

Fertiggestellte Bestellungen

+
- - $contracts): ?> - orderproduct->order; ?> - -
-
-
-
- Fertigstellung: finish_date)?> - Zuletzt bearbeitet: edit)?> (editor?>) - Erstellt: create)?> (creator?>) - -

$order_id])?>" target="_blank">Bestellung

-
-
- -
-
-
-
-
- -
Inhaber
-
-
-
- owner->customer_number?>
- owner->getCompanyOrName()?>
- owner->street?>
- owner->zip?> owner->city?>
+ + + $contracts): ?> + orderproduct->order; ?> + +
+
+
+
+ Fertigstellung: finish_date)?> + Zuletzt bearbeitet: edit)?> (editor?>) + Erstellt: create)?> (creator?>) + +

$order_id])?>" target="_blank">Bestellung

+
+
+ +
+ +
+
+
+
+ +
Inhaber
+
+
+
+ owner->customer_number?>
+ owner->getCompanyOrName()?>
+ owner->street?>
+ owner->zip?> owner->city?>
+
+
- -
-
- -
-
-
- -
Rechnungsempfänger
-
-
- billingaddress_id): ?> - billingaddress->customer_number) ? $order->billingaddress->customer_number."
" : ""?> - billingaddress->getCompanyOrName()?>
- billingaddress->street?>
- billingaddress->zip?> billingaddress->city?>
- +
+ +
+
+
+
Bestelljournal
+ + + + + + + journals as $journal): ?> + + + + + +
ErstelltText
create)?> (creator?>)text)?>
- +
+ + + +
+ note)): ?> +
+
+
+
+
Interne Notiz
+
+ note))?>
+
-
- -
-
-
-
Bestelljournal
+ +
- - - - - - journals as $journal): ?> - - - - - -
ErstelltText
create)?> (creator?>)text)?>
+
+
+
+ +
Produkte
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ProduktMatchcodePreisPreis SetupRechnungsperiodeVerz. VerrechnungsstartErstelltZuletzt bearbeitet
approved) ? "checked='checked'" : ""?> /> +
+ product_name?> + termination_id && $contract->termination): ?> +
termination->code?> - termination->getAddress())?> + +
+ +
+
+ matchcode)?> +
+ +
+
price?>
+ +
+
price_setup?>
+ +
+
+ + + billing_period == 1): ?> + monatlich + billing_period == 12): ?> + Jährlich + billing_period == 24): ?> + 2-jährlich + billing_period == 36): ?> + 3-jährlich + + billing_period)?>x Jährlich + + +
+ +
+
billing_delay) ? $contract->billing_delay." Monate" : ""?>
+ +
orderproduct->create)?>
orderproduct->creator->name?>
orderproduct->edit)?>
orderproduct->editor->name?>
+ +
Gutschriften / Provisionen
+ + + + + + + + + + + + + + + + getCredit(); if(!$credit) continue; ?> + + + + + + + + + + +
BezieherProduktMatchcodeProvisionRechnungsperiodeVerz. Verrechnungsstart
approved_credit) ? "checked='checked'" : ""?> />getCompanyOrName() : ""?> + product_name?> + termination_id && $contract->termination): ?> +
termination->code?> - termination->getAddress())?> + +
+
+ crediting_matchcode?> +
+ +
+ price_nne?> + + billing_period == 1): ?> + monatlich + billing_period == 24): ?> + 3-jährlich + billing_period == 36): ?> + 3-jährlich + + billing_period)?>x Jährlich + + billing_delay) ? $contract->billing_delay." Monate" : ""?>
+ + +
+
+
- - - -
- note)): ?> -
-
-
-
-
Interne Notiz
-
- note))?> -
-
-
-
- -
- -
-
-
- -
Produkte
- - - - - - - - - - - - - - - - - - - - - - - - - - -
ProduktMatchcodePreisPreis SetupRechnungsperiodeVerz. VerrechnungsstartErstelltZuletzt bearbeitet
approved) ? "checked='checked'" : ""?> /> -
- product_name?> - termination_id && $contract->termination): ?> -
termination->code?> - termination->getAddress())?> - -
- -
-
- matchcode)?> -
- -
-
price?>
- -
-
price_setup?>
- -
-
- - - billing_period == 1): ?> - monatlich - billing_period == 12): ?> - Jährlich - billing_period == 24): ?> - 2-jährlich - billing_period == 36): ?> - 3-jährlich - - billing_period)?>x Jährlich - - -
- -
-
billing_delay) ? $contract->billing_delay." Monate" : ""?>
- -
orderproduct->create)?>
orderproduct->creator->name?>
orderproduct->edit)?>
orderproduct->editor->name?>
- -
Gutschriften / Provisionen
- - - - - - - - - - - - - - - - getCredit(); if(!$credit) continue; ?> - - - - - - - - - - -
BezieherProduktMatchcodeProvisionRechnungsperiodeVerz. Verrechnungsstart
approved) ? "checked='checked'" : ""?> />getCompanyOrName() : ""?> - product_name?> - termination_id && $contract->termination): ?> -
termination->code?> - termination->getAddress())?> - -
-
- crediting_matchcode?> -
- -
- price_nne?> - - billing_period == 1): ?> - monatlich - billing_period == 24): ?> - 3-jährlich - billing_period == 36): ?> - 3-jährlich - - billing_period)?>x Jährlich - - billing_delay) ? $contract->billing_delay." Monate" : ""?>
- - -
-
-
-
-
-
- + + - + + +
+
- +
+
- +