From 32109819945967f568dd7bebf90de4bbe6dbf302 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Fri, 24 Feb 2023 15:50:28 +0100 Subject: [PATCH] Contractjournal finished & Started Contractconfig Hooks for Provisioning Workflow --- Layout/default/Address/View.php | 2 +- Layout/default/Contract/Form.php | 28 +- Layout/default/Contract/View.php | 104 +++++- Layout/default/Contractconfig/Form.php | 4 +- Layout/default/Contractconfiggroup/Index.php | 300 ++++++++++-------- Layout/default/Voicenumber/Form.php | 14 +- Layout/default/Voicenumberblock/Index.php | 6 +- .../Voicenumberblock/include/block-detail.php | 8 +- application/Contract/ContractController.php | 25 +- .../ContractconfigController.php | 9 + .../hooks/Contractconfig_Hook.php | 35 ++ application/Contractconfig/hooks/Voip.php | 42 +++ .../ContractconfigItemController.php | 1 + .../ContractjournalController.php | 86 +++++ application/Voicenumber/Voicenumber.php | 13 +- .../Voicenumber/VoicenumberController.php | 2 +- application/Voicenumber/VoicenumberModel.php | 14 +- .../Voicenumberblock/Voicenumberblock.php | 53 +--- .../VoicenumberblockModel.php | 40 +-- lib/mvcfronk/mfUpload/mfUpload.php | 52 +++ public/assets/css/thetool.css | 3 + 21 files changed, 562 insertions(+), 279 deletions(-) create mode 100644 application/Contractconfig/hooks/Contractconfig_Hook.php create mode 100644 application/Contractconfig/hooks/Voip.php create mode 100644 application/Contractjournal/ContractjournalController.php diff --git a/Layout/default/Address/View.php b/Layout/default/Address/View.php index bd4cf24a0..c3e8a461a 100644 --- a/Layout/default/Address/View.php +++ b/Layout/default/Address/View.php @@ -192,7 +192,7 @@ contracts) && count($address->contracts)): ?> diff --git a/Layout/default/Contract/Form.php b/Layout/default/Contract/Form.php index 3018db6d1..89af5da3e 100644 --- a/Layout/default/Contract/Form.php +++ b/Layout/default/Contract/Form.php @@ -354,9 +354,33 @@ }); $('#product_id').on("autocomplete.select", function(evt, item) { - if(item && item.value === 0) { - $('#product_id').autoComplete('set', null); + if(item) { + if(item.value === 0) { + $('#product_id').autoComplete('set', null); + return; + } + product_id = item.value; + + $.get("", { + do: "getProduct", + "product_id": product_id + }, + function(success) { + if(success.status != "OK") return; + + p = success.result.product; + $("#price").val(p.price); + $("#price_setup").val(p.price_setup); + $("#price_nne").val(p.price_nne); + $("#price_nbe").val(p.price_nbe); + $("#billing_delay").val(p.billing_delay); + $("#billing_period").val(p.billing_period); + }, + "json" + ); + } + }); // product autocomplete diff --git a/Layout/default/Contract/View.php b/Layout/default/Contract/View.php index 1a92304cf..ddb947b2f 100644 --- a/Layout/default/Contract/View.php +++ b/Layout/default/Contract/View.php @@ -224,32 +224,84 @@
- - +
journals as $j): ?> - + text) > 120): ?> + + + + + + + type == "file"): ?> + + + + type == "created_from"): ?> + + + + + type == "link"): ?> + value); ?> + + + + + + + + + + +
create)?> (creator?>) - type == "text"):?> - text), 128)?> - type == "phone"): ?> - text), 128)?> - type == "file"): ?> + + type == "text" || $j->type == "phone"):?> + text-white p-1"> + text), 120)?> + + + text)?> + text): ?> text), 128)?>
- $j->contractfile->file_id])?>"> contractfile->name?> - type == "created_from"): ?> - value == "manual"): ?> - Vertrag manuell angelegt. - + $j->contractfile->file_id])?>">contractfile->name?> +
+ value == "manual"): ?> + Vertrag manuell angelegt - Verknüpfung mit $link->id])?>">id?> - product_name?> [matchcode?>] erstellt $j->id])?>" title="Journaleintrag bearbeiten">
+
+ +
@@ -257,11 +309,11 @@ - linkFrom) && count($contract->linkFrom)) || (is_array($contract->linkTo) && count($contract->linkTo))): ?> +

Verknüpfte Verträge $contract->id])?>">Neuen Contract anlegen

- + linkFrom) && count($contract->linkFrom)) || (is_array($contract->linkTo) && count($contract->linkTo))): ?> @@ -307,9 +359,10 @@
Kunde
+
- +
@@ -321,4 +374,21 @@
+ \ No newline at end of file diff --git a/Layout/default/Contractconfig/Form.php b/Layout/default/Contractconfig/Form.php index 6778e84b8..4f2c36e57 100644 --- a/Layout/default/Contractconfig/Form.php +++ b/Layout/default/Contractconfig/Form.php @@ -27,7 +27,7 @@ -
+

product_name?> (id?>)

@@ -53,7 +53,7 @@
-
+

Konfiguration bearbeiten

diff --git a/Layout/default/Contractconfiggroup/Index.php b/Layout/default/Contractconfiggroup/Index.php index ec6e577af..bd9525300 100644 --- a/Layout/default/Contractconfiggroup/Index.php +++ b/Layout/default/Contractconfiggroup/Index.php @@ -45,163 +45,181 @@
+
-

Gruppe name?> Neues Element erstellen

- -