Added price_setup and billing_delay to Product

This commit is contained in:
Frank Schubert
2021-07-06 15:44:47 +02:00
parent ad4ab58332
commit 7ed8c47374
4 changed files with 26 additions and 13 deletions
+13 -1
View File
@@ -141,7 +141,13 @@
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="price">Verkaufspreis Netto</label>
<label class="col-lg-2 col-form-label" for="price">Setup Preis Netto (Einmalig)</label>
<div class="col-lg-10">
<input type="text" name="price_setup" id="price_setup" class="form-control" value="<?=$this::dotToComma($product->price_setup)?>" />
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="price">Verkaufspreis Netto (Periodisch)</label>
<div class="col-lg-10">
<input type="text" name="price" id="price" class="form-control" value="<?=$this::dotToComma($product->price)?>" />
</div>
@@ -167,6 +173,12 @@
</select>
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="billing_delay">Verzögerter Verrechnungsstart (Monate)</label>
<div class="col-lg-10">
<input type="text" name="billing_delay" id="billing_delay" class="form-control" value="<?=$this::dotToComma($product->billing_delay)?>" />
</div>
</div>
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="ivt_id">IVT Produkt ID</label>
+1 -1
View File
@@ -49,7 +49,7 @@
<td><?=(count($product->networks)) ? array_shift($product->networks)->name . ((count($product->networks) > 1) ? ", ..." : "") : ""?></td>
<td><?=$product->productgroup->name?></td>
<td><?=$product->name?></td>
<td><?=$product->producttech->name?> (<?=$product->producttech->rtrcode?>)</td>
<td><?=$product->producttech->name?> (<?=$product->attributes['rtrcode']->value?>)</td>
<td><?=__($product->producttech->customer_type)?></td>
<td><?=$product->price?></td>
<td><?=$product->billing_period?>x Jährlich</td>
@@ -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;
+10 -11
View File
@@ -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);
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);