From fe1677d7c6357bef0adcebc953ae6fe4f3f0a9c0 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Thu, 25 Jul 2024 17:22:10 +0200 Subject: [PATCH] WIP partner productchange --- .../Contract/include/productchange-action.php | 27 ++++- Layout/default/Order/Index.php | 2 +- Layout/default/Order/Productchange.php | 98 ------------------- application/Contract/ContractController.php | 6 +- 4 files changed, 32 insertions(+), 101 deletions(-) delete mode 100644 Layout/default/Order/Productchange.php diff --git a/Layout/default/Contract/include/productchange-action.php b/Layout/default/Contract/include/productchange-action.php index 58470eb0d..45fa8728a 100644 --- a/Layout/default/Contract/include/productchange-action.php +++ b/Layout/default/Contract/include/productchange-action.php @@ -1,3 +1,20 @@ +
+
+
+

+ Wählen Sie das neue Produkt aus oder ändern Sie den Preis.
+ Wenn ein Fertigstellungsdatum eingetragen wird, wird das alte Produkt am Vortag + gekündigt.
+ Ohne Fertigstellungsdatum wird das neue Produkt händisch nach der technischen Produktanpassung fertiggestellt. +

+

+ Verknüpfte Produkte können beibehalten oder gekündigt werden.
+ Um beim verknüpften Produkt ein Kündigungsdatum einzutragen, muss beim Hauptprodukt ein Fertigstellungsdatum eingetragen sein. +

+
+
+
+

Neuer Contract

@@ -140,7 +157,7 @@
- +
@@ -356,4 +373,12 @@ } //link-id?>-action-cancel } + + function finishDateChange() { + $("#link-table input.link-cancel:checked").each(function() { + var match = this.id.match(/^link-(\d+)-action/); + link_id = match[1]; + linkActionChange(link_id); + }); + } \ No newline at end of file diff --git a/Layout/default/Order/Index.php b/Layout/default/Order/Index.php index 95ec4fe67..ad50c05d8 100644 --- a/Layout/default/Order/Index.php +++ b/Layout/default/Order/Index.php @@ -143,7 +143,7 @@
diff --git a/Layout/default/Order/Productchange.php b/Layout/default/Order/Productchange.php deleted file mode 100644 index 73c0ba386..000000000 --- a/Layout/default/Order/Productchange.php +++ /dev/null @@ -1,98 +0,0 @@ - - - - -
-
-
-
- -
-

Bestellungen

-
-
-
- - -
-
- -
-
-

Produktwechsel

- -
-
-
- -
-
- - -
- -
-

Vertragsinhaber auswählen

- - - -
- -
-
- - - - - - - - - - - - - -
Contract IDProduktMatchcodePreis p.P.HerstellungskostenFertigstellungKündigung
-
-
-
-
-
-
-
- -
-
-
- -
-
- - - - - diff --git a/application/Contract/ContractController.php b/application/Contract/ContractController.php index bb216f2e8..c2fae4eb4 100644 --- a/application/Contract/ContractController.php +++ b/application/Contract/ContractController.php @@ -435,7 +435,11 @@ class ContractController extends mfBaseController if (!$new_contract_id) { $this->layout()->setFlash("Neuer Contract konnte nicht gespeichert werden", "error"); - $this->redirect("Contract", "productchange", ["contract_id" => $id]); + if($f == "o") { + $this->redirect("Contract", "productchange", ["contract_id" => $id, "f" => $f]); + } else { + $this->redirect("Contract", "productchange", ["contract_id" => $id]); + } } if($contract_cancel_date) {