diff --git a/Layout/default/Product/Form.php b/Layout/default/Product/Form.php index b63326682..a70222929 100644 --- a/Layout/default/Product/Form.php +++ b/Layout/default/Product/Form.php @@ -141,7 +141,13 @@
- + +
+ +
+
+
+
@@ -167,6 +173,12 @@
+
+ +
+ +
+
diff --git a/Layout/default/Product/Index.php b/Layout/default/Product/Index.php index 320052bb1..384cb2120 100644 --- a/Layout/default/Product/Index.php +++ b/Layout/default/Product/Index.php @@ -49,7 +49,7 @@ networks)) ? array_shift($product->networks)->name . ((count($product->networks) > 1) ? ", ..." : "") : ""?> productgroup->name?> name?> - producttech->name?> (producttech->rtrcode?>) + producttech->name?> (attributes['rtrcode']->value?>) producttech->customer_type)?> price?> billing_period?>x Jährlich diff --git a/application/Product/ProductController.php b/application/Product/ProductController.php index ad037b85d..9ac5f4637 100644 --- a/application/Product/ProductController.php +++ b/application/Product/ProductController.php @@ -66,7 +66,9 @@ class ProductController extends mfBaseController { $data['price_nne'] = Layout::commaToDot($r->price_nne); $data['price_nbe'] = Layout::commaToDot($r->price_nbe); $data['price'] = Layout::commaToDot($r->price); + $data['price_setup'] = $r->price_setup; $data['billing_period'] = $r->billing_period; + $data['billing_delay'] = $r->billing_delay; $data['ivt_id'] = ($r->ivt_id) ? $r->ivt_id : null; $data['note'] = $r->note; diff --git a/contrib/migrations/20210705-product-tables.sql b/contrib/migrations/20210705-product-tables.sql index a6243982f..f4d0b5fca 100644 --- a/contrib/migrations/20210705-product-tables.sql +++ b/contrib/migrations/20210705-product-tables.sql @@ -9,6 +9,8 @@ CREATE TABLE `Product` ( `price_nne` decimal(14,4) DEFAULT NULL, `price_nbe` decimal(14,4) DEFAULT NULL, `price` decimal(14,4) NOT NULL, + `price_setup` decimal(14,4) NOT NULL DEFAULT '0', + `billing_delay` int NOT NULL DEFAULT '0' COMMENT 'in months', `billing_period` int NOT NULL COMMENT 'in months', `ivt_id` int DEFAULT NULL, `note` text COLLATE utf8mb4_unicode_520_ci, @@ -30,21 +32,17 @@ CREATE TABLE `ProductNetwork` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -CREATE TABLE `Productattribute` ( +CREATE TABLE `ProductAttribute` ( `id` int NOT NULL AUTO_INCREMENT, `product_id` int NOT NULL, `producttechattribute_id` int NOT NULL, - `name` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL, - `displayname` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL, `value` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL, - `description` text COLLATE utf8mb4_unicode_520_ci NOT NULL, - `note` text COLLATE utf8mb4_unicode_520_ci NOT NULL, `create_by` int NOT NULL, `edit_by` int NOT NULL, `create` int NOT NULL, `edit` int NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; CREATE TABLE `Productgroup` ( `id` int NOT NULL AUTO_INCREMENT, @@ -73,7 +71,8 @@ CREATE TABLE `Producttech` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; CREATE TABLE `ProducttechAttribute` ( - `id` int NOT NULL, + `id` int NOT NULL AUTO_INCREMENT, + `producttech_id` int NOT NULL, `name` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL, `displayname` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL, `value` varchar(1024) COLLATE utf8mb4_unicode_520_ci NOT NULL, @@ -82,9 +81,9 @@ CREATE TABLE `ProducttechAttribute` ( `create_by` int NOT NULL, `edit_by` int NOT NULL, `create` int NOT NULL, - `edit` int NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; - + `edit` int NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; CREATE TABLE `Sla` ( `id` int NOT NULL AUTO_INCREMENT, @@ -98,4 +97,4 @@ CREATE TABLE `Sla` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; -INSERT INTO `Sla` VALUES (1,'12h/6T - Working Hours','','',1,1,1625495944,1625495944),(2,'24h/7T - 2h/6h Emergency','','',1,1,1625495944,1625495944),(3,'8h/5T - Next Business Day','','',1,1,1625495985,1625495985),(4,'8h/5T - Residential','','',1,1,1625495985,1625495985); \ No newline at end of file +INSERT INTO `Sla` VALUES (1,'12h/6T - Working Hours','','',1,1,1625495944,1625495944),(2,'24h/7T - 2h/6h Emergency','','',1,1,1625495944,1625495944),(3,'8h/5T - Next Business Day','','',1,1,1625495985,1625495985),(4,'8h/5T - Residential','','',1,1,1625495985,1625495985);