From ee0037835c39a93caf0a57eaeac22fc1abb62ef8 Mon Sep 17 00:00:00 2001 From: Frank Schubert Date: Tue, 24 Dec 2024 12:38:29 +0100 Subject: [PATCH] andom-tec changes --- Layout/andom-tec/Address/Form.php | 716 ++++++ Layout/andom-tec/Address/Index.php | 382 ++++ Layout/andom-tec/Address/View.php | 350 +++ Layout/andom-tec/Address/bmd_export.csv.php | 10 + Layout/andom-tec/Address/invoice.php | 98 + Layout/andom-tec/Dashboard/Dashboard.php | 32 + Layout/andom-tec/Dashboard/Index.php | 32 + Layout/andom-tec/Order/Form.php | 2013 +++++++++++++++++ Layout/andom-tec/Order/Index.php | 1273 +++++++++++ Layout/andom-tec/User/Form.php | 256 +++ Layout/andom-tec/menu.php | 237 +- Layout/andom-tec/topbar.php | 158 +- Layout/andom-tec/tpl/pagination-summary.php | 7 + Layout/andom-tec/tpl/pagination.php | 106 + Layout/default/User/Form.php | 6 +- Layout/default/UserProfile/Index.php | 110 +- Layout/default/VueViews/Vue.php | 7 +- application/Address/AddressController.php | 6 +- application/Device/DeviceController.php | 4 +- application/Order/Order.php | 2 +- application/User/UserController.php | 4 +- .../20240220192901_create_vat_tables.php | 2 +- lib/IbanValidator/IbanValidator.php | 4 + lib/mvcfronk/mfBase/mfBaseController.php | 1 + 24 files changed, 5518 insertions(+), 298 deletions(-) create mode 100644 Layout/andom-tec/Address/Form.php create mode 100644 Layout/andom-tec/Address/Index.php create mode 100644 Layout/andom-tec/Address/View.php create mode 100644 Layout/andom-tec/Address/bmd_export.csv.php create mode 100644 Layout/andom-tec/Address/invoice.php create mode 100644 Layout/andom-tec/Dashboard/Dashboard.php create mode 100644 Layout/andom-tec/Dashboard/Index.php create mode 100644 Layout/andom-tec/Order/Form.php create mode 100644 Layout/andom-tec/Order/Index.php create mode 100644 Layout/andom-tec/User/Form.php create mode 100644 Layout/andom-tec/tpl/pagination-summary.php create mode 100644 Layout/andom-tec/tpl/pagination.php diff --git a/Layout/andom-tec/Address/Form.php b/Layout/andom-tec/Address/Form.php new file mode 100644 index 000000000..3b53f3b26 --- /dev/null +++ b/Layout/andom-tec/Address/Form.php @@ -0,0 +1,716 @@ + + + + +
+
+
+
+ +
+

Personen & Firmen

+
+
+
+ + +
+
+ +
+
+

id) ? "Person/Firma bearbeiten" : "Neue Person/Firma"?>

+ +
+
+
+ + + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ "> +
+
+ +
+
+ +
+
+
+ +
+ +
+
+
+
+ +

Einwilligungen

+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+ +
+
+
+ +
+ +
+
+
+
+ +

Verrechnungsdaten

+
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + +
+
+ +
+ +
+ +
+
+ +
+ + +
+ + can("Fibu")): ?> +
+ +
+ sepa_date) : ""?>" /> +
+
+ + +
+
+ + can("Fibu")): ?> +

FIBU

+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+ + Standard: Tage +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ + +

Zusatzdaten

+
+
+
+ +
+ +
+
+
+
+ +

Verknüpfungen

+
+ +
+ + + linked_as) && count($address->linked_as)): ?> +

Verknüpft als

+ + +
+
+
+ +
+ +
+
+
+
+ + + +
+ +
+ + + +
+
+ + + +
+
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/Layout/andom-tec/Address/Index.php b/Layout/andom-tec/Address/Index.php new file mode 100644 index 000000000..965eb9240 --- /dev/null +++ b/Layout/andom-tec/Address/Index.php @@ -0,0 +1,382 @@ +getUrl($Mod,"Index"); + $pagination_baseurl_params = ["filter" => $filter]; + $pagination_entity_name = "Adressen"; +?> + + + + +
+
+
+
+ +
+

Personen & Firmen

+
+
+
+ + +
+
+ +
+
+

Filter

+ +
"> +
+ is("Admin")): ?> +
+ + +
+ + +
+ + " /> +
+ +
+ + " /> +
+ +
+ + " /> +
+ +
+ + " /> +
+ +
+ +
+
+ + " /> +
+ +
+ + " /> +
+ +
+ + " /> +
+ + +
+ + " /> +
+ +
+ + " /> +
+ +
+ + " /> +
+ +
+ + " /> +
+ + +
+ + +
+ + + +
+ + +
+
+ + 1])?>"> Filter zurücksetzen +
+
+
+ +
+
+ + +
+
+
+
+
+

Liste aller Personen & Firmen

+
+ +
+
+ + + + + + + + + + + + + + + + + + + types) && count($address->types)):?> + types); + $l7d_types = []; + foreach($types as $type): + $l7d_types[] = __($type); + endforeach; + ?> + + + + + + + + + + + + + + +
TypKundennummerFIBU KontenFirmaNameAdresseTelefonEmail
"> + 1) ? ", ..." : ""?> + + $address->id, 's' => $pagination['start']])?>"> + customer_number?> + spin) ? "
".$address->spin."" : ""?> +
+
+ fibu_account_number): ?> + fibu_account_number?>fibu_primary_account) ? " " : ""?> + + fibu_supplier_number): ?> +
fibu_supplier_number?> + +
$address->id, 's' => $pagination['start']])?>">company)?> $address->id, 's' => $pagination['start']])?>">getFullName()?> + street?>
+ zip?> city?> +
phone?>email?> + ["address_id" => $address->id]])?>" title="Benutzer anzeigen"> + $address->id, 's' => $pagination['start']])?>"> + $address->id, 's' => $pagination['start']])?>"> + $address->id, 's' => $pagination['start']])?>" onclick="if(!confirm('Person/Firma wirklich löschen?')) return false;" class="text-danger" title="Löschen"> +
+ + + + + +
+
+ +
+
+ + + + + + diff --git a/Layout/default/VueViews/Vue.php b/Layout/default/VueViews/Vue.php index 190f88aed..491c0e354 100644 --- a/Layout/default/VueViews/Vue.php +++ b/Layout/default/VueViews/Vue.php @@ -51,7 +51,12 @@ function pascalToSnakeCase(string $str): string { $vueTagName = pascalToSnakeCase($vueViewName); -include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/vueHeader.php"); ?> +$vueHeaderPath = realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/vueHeader.php"; +if(!file_exists($vueHeaderPath)) { + $vueHeaderPath = realpath(dirname(__FILE__) . "/../../default") . "/vueHeader.php"; +} + +include($vueHeaderPath); ?>
diff --git a/application/Address/AddressController.php b/application/Address/AddressController.php index 7a10638df..1c22f9b41 100644 --- a/application/Address/AddressController.php +++ b/application/Address/AddressController.php @@ -102,13 +102,15 @@ class AddressController extends mfBaseController { if(!array_key_exists("customer_number", $filter) || !$filter["customer_number"]) { if(array_key_exists("type", $filter)) { - if($filter["type"] == "xinon") { + if($filter["type"] == "systemowner") { $new_filter["customer_or_fibu_numbers"] = true; } elseif($filter["type"] == "others") { $new_filter["customer_or_fibu_numbers"] = false; } } else { - $new_filter["customer_or_fibu_numbers"] = true; // default + if(defined("TT_ADDRESS_FILTER_DEFAULT_SYSOWNER") && TT_ADDRESS_FILTER_DEFAULT_SYSOWNER) { + $new_filter["customer_or_fibu_numbers"] = true; // default + } } unset($filter["type"]); unset($filter["customer_number"]); diff --git a/application/Device/DeviceController.php b/application/Device/DeviceController.php index 341b29cac..8f549a316 100644 --- a/application/Device/DeviceController.php +++ b/application/Device/DeviceController.php @@ -49,8 +49,8 @@ class DeviceController extends mfBaseController "DEVICE_MANUFACTURERS" => $deviceManufacturers, "DEVICE_TYPES" => $deviceTypes, "DEVICES" => $this->getDevices(), - "ZABBIX_URL" => ZABBIX_URL, - "GRAFANA_URL" => GRAFANA_URL, + "ZABBIX_URL" => (defined("ZABBIX_URL")) ? ZABBIX_URL : "", + "GRAFANA_URL" => (defined("GRAFANA_URL")) ? GRAFANA_URL : "", ]; $this->layout()->set("vueViewName", "Device"); diff --git a/application/Order/Order.php b/application/Order/Order.php index 664775cdb..354c5d316 100644 --- a/application/Order/Order.php +++ b/application/Order/Order.php @@ -145,7 +145,7 @@ class Order extends mfBaseModel { $to = $owner->email; if(!$subject || !$from || !$from_name || !$to) { - $this->log->warn("Service PIN Email not sent. (subject: '$subject', from: '$from_email', from_email: '$from', to: '$to')"); + $this->log->warn("Service PIN Email not sent. (subject: '$subject', from: '$from_name', from_email: '$from', to: '$to')"); } else { $email = new Emailnotification(); $email->setSubject($subject); diff --git a/application/User/UserController.php b/application/User/UserController.php index 36fd45fcb..5d61ef44d 100644 --- a/application/User/UserController.php +++ b/application/User/UserController.php @@ -39,8 +39,8 @@ class UserController extends mfBaseController } $this->layout()->set('users', $users); - $addresses = AddressModel::getAll(); - $this->layout()->set("addresses", $addresses); + //$addresses = AddressModel::getAll(); + //$this->layout()->set("addresses", $addresses); $this->layout()->set("filter", $this->request->filter); } diff --git a/db/migrations/20240220192901_create_vat_tables.php b/db/migrations/20240220192901_create_vat_tables.php index d2ba9480a..bfa4552ce 100644 --- a/db/migrations/20240220192901_create_vat_tables.php +++ b/db/migrations/20240220192901_create_vat_tables.php @@ -33,7 +33,7 @@ final class CreateVatTables extends AbstractMigration $table->create(); $table = $this->table("Product"); - $table->addColumn("vatgroup_id", "integer", ["null" => false, "default" => 1]); + $table->addColumn("vatgroup_id", "integer", ["null" => false, "default" => 1, "after" => "price_setup"]); $table->save(); } diff --git a/lib/IbanValidator/IbanValidator.php b/lib/IbanValidator/IbanValidator.php index 2d2fd2790..56e870a1c 100644 --- a/lib/IbanValidator/IbanValidator.php +++ b/lib/IbanValidator/IbanValidator.php @@ -6,6 +6,10 @@ class IbanValidator { if(!$iban) { return false; } + + if(!defined("TT_IBAN_VALIDATOR_BASEURL") || !TT_IBAN_VALIDATOR_BASEURL) { + return ["bank" => "none", "iban" => "none", "bic" => [], "iban_correct" => true, "iban_sus" => false, "bic_correct" => true]; + } $creds = TT_IBAN_VALIDATOR_USER.":".TT_IBAN_VALIDATOR_PASS; $b64creds = base64_encode($creds); diff --git a/lib/mvcfronk/mfBase/mfBaseController.php b/lib/mvcfronk/mfBase/mfBaseController.php index 8b45c2da5..775bfb910 100644 --- a/lib/mvcfronk/mfBase/mfBaseController.php +++ b/lib/mvcfronk/mfBase/mfBaseController.php @@ -287,6 +287,7 @@ class mfBaseController public static function getUrl($mod, $action = null, $param = null) { if (!$mod) { + if (MFUSEFANCYURLS) return MFFANCYBASEURL; return ""; }