Completed
Branch master (6ed6e7)
by Lars
07:57
created
src/Intraface/modules/stock/Controller/Variations.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 
14 14
     function renderHtml()
15 15
     {
16
-        $this->document->setTitle('Set stock for variations for product ' . $this->getProduct()->get('name'));
16
+        $this->document->setTitle('Set stock for variations for product '.$this->getProduct()->get('name'));
17 17
 
18
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/variations');
18
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/variations');
19 19
         return $smarty->render($this, array('variations' => $this->getProduct()->getVariations(), 'product' => $this->context->getProduct()));
20 20
     }
21 21
 
Please login to merge, or discard this patch.
src/Intraface/modules/order/include_front.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         );
18 18
     } else {
19 19
         $db = new DB_Sql;
20
-        $db->query("SELECT * FROM debtor WHERE type = 2 AND status = 0 AND active = 1 AND intranet_id = " . $kernel->intranet->get('id'));
20
+        $db->query("SELECT * FROM debtor WHERE type = 2 AND status = 0 AND active = 1 AND intranet_id = ".$kernel->intranet->get('id'));
21 21
         $orders = $db->numRows();
22 22
         if ($orders > 0) {
23 23
             $_attention_needed[] = array(
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/ProcurementItem.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $this->procurement = $procurement;
66 66
         $this->error = new Intraface_Error;
67
-        $this->id = (int) $id;
67
+        $this->id = (int)$id;
68 68
 
69 69
         if ($this->id > 0) {
70 70
             $this->load();
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         $db->query("SELECT procurement_item.* FROM procurement_item
88 88
                     INNER JOIN procurement ON procurement_item.procurement_id = procurement.id
89
-                    WHERE procurement_item.id = " . $this->id . " AND procurement.id = " . $this->procurement->get('id') . " AND procurement_item.intranet_id = " . $this->procurement->kernel->intranet->get("id"));
89
+                    WHERE procurement_item.id = " . $this->id." AND procurement.id = ".$this->procurement->get('id')." AND procurement_item.intranet_id = ".$this->procurement->kernel->intranet->get("id"));
90 90
         if ($db->nextRecord()) {
91 91
             $this->value["id"] = $db->f("id");
92 92
             $this->value["product_id"] = $db->f("product_id");
@@ -282,20 +282,20 @@  discard block
 block discarded – undo
282 282
             exit;
283 283
         }
284 284
 
285
-        $sql = "product_id = " . $product->getId() . ",
286
-                product_detail_id = " . $product_detail_id . ",
287
-                product_variation_id = " . $variation_id . ",
288
-                product_variation_detail_id = " . $variation_detail_id . ",
289
-                quantity = " . $input["quantity"] . ",
285
+        $sql = "product_id = ".$product->getId().",
286
+                product_detail_id = " . $product_detail_id.",
287
+                product_variation_id = " . $variation_id.",
288
+                product_variation_detail_id = " . $variation_detail_id.",
289
+                quantity = " . $input["quantity"].",
290 290
                 unit_purchase_price = " . $input["unit_purchase_price"];
291 291
 
292 292
         $db = new DB_Sql;
293 293
 
294 294
         if ($this->id == 0) {
295
-            $db->query("INSERT INTO procurement_item SET " . $sql . ", intranet_id = " . $this->procurement->kernel->intranet->get("id") . ", procurement_id = " . $this->procurement->get("id") . ", active = 1");
295
+            $db->query("INSERT INTO procurement_item SET ".$sql.", intranet_id = ".$this->procurement->kernel->intranet->get("id").", procurement_id = ".$this->procurement->get("id").", active = 1");
296 296
             $this->id = $db->InsertedId();
297 297
         } else {
298
-            $db->query("UPDATE procurement_item SET " . $sql . " WHERE id = " . $this->id . " AND procurement_id = " . $this->procurement->get("id") . " AND intranet_id = " . $this->procurement->kernel->intranet->get("id"));
298
+            $db->query("UPDATE procurement_item SET ".$sql." WHERE id = ".$this->id." AND procurement_id = ".$this->procurement->get("id")." AND intranet_id = ".$this->procurement->kernel->intranet->get("id"));
299 299
         }
300 300
 
301 301
         return $this->id;
@@ -322,10 +322,10 @@  discard block
 block discarded – undo
322 322
             return false;
323 323
         }
324 324
 
325
-        $sql = "unit_purchase_price = " . $unit_purchase_price->get();
325
+        $sql = "unit_purchase_price = ".$unit_purchase_price->get();
326 326
 
327 327
         $db = new DB_Sql;
328
-        $db->query("UPDATE procurement_item SET " . $sql . " WHERE id = " . $this->id . " AND procurement_id = " . $this->procurement->get("id") . " AND intranet_id = " . $this->procurement->kernel->intranet->get("id"));
328
+        $db->query("UPDATE procurement_item SET ".$sql." WHERE id = ".$this->id." AND procurement_id = ".$this->procurement->get("id")." AND intranet_id = ".$this->procurement->kernel->intranet->get("id"));
329 329
         return true;
330 330
     }
331 331
 
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
             product_variation_detail_id = ".$variation_detail_id;
376 376
 
377 377
         $db = new DB_Sql;
378
-        $db->query("UPDATE procurement_item SET " . $sql . " WHERE id = " . $this->id . " AND procurement_id = " . $this->procurement->get("id") . " AND intranet_id = " . $this->procurement->kernel->intranet->get("id"));
378
+        $db->query("UPDATE procurement_item SET ".$sql." WHERE id = ".$this->id." AND procurement_id = ".$this->procurement->get("id")." AND intranet_id = ".$this->procurement->kernel->intranet->get("id"));
379 379
 
380 380
         return true;
381 381
     }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
     public function delete()
388 388
     {
389 389
         $db = new DB_Sql;
390
-        $db->query("UPDATE procurement_item SET active = 0 WHERE intranet_id = " . $this->procurement->kernel->intranet->get('id') . " AND id = " . $this->id . " AND procurement_id = " . $this->procurement->get("id"));
390
+        $db->query("UPDATE procurement_item SET active = 0 WHERE intranet_id = ".$this->procurement->kernel->intranet->get('id')." AND id = ".$this->id." AND procurement_id = ".$this->procurement->get("id"));
391 391
         $this->id = 0;
392 392
 
393 393
         return 1;
@@ -401,13 +401,13 @@  discard block
 block discarded – undo
401 401
     public function getList()
402 402
     {
403 403
         $db = new DB_Sql;
404
-        $db->query("SELECT * FROM procurement_item WHERE active = 1 AND intranet_id = " . $this->procurement->kernel->intranet->get("id") . " AND procurement_id = " . $this->procurement->get("id") . " ORDER BY id ASC");
404
+        $db->query("SELECT * FROM procurement_item WHERE active = 1 AND intranet_id = ".$this->procurement->kernel->intranet->get("id")." AND procurement_id = ".$this->procurement->get("id")." ORDER BY id ASC");
405 405
         $i = 0;
406
-        $item = array ();
406
+        $item = array();
407 407
 
408 408
         if ($this->procurement->get("price_items") > 0) {
409 409
             // calculates shipment etc per item price kr
410
-            $calculated = $this->procurement->get("price_shipment_etc") / $this->procurement->get("price_items");
410
+            $calculated = $this->procurement->get("price_shipment_etc")/$this->procurement->get("price_items");
411 411
         } else {
412 412
             $calculated = 0;
413 413
         }
@@ -423,17 +423,17 @@  discard block
 block discarded – undo
423 423
                 $item[$i]["unit"] = $unit['plural'];
424 424
             }
425 425
             $item[$i]["unit_purchase_price"] = $db->f("unit_purchase_price");
426
-            $item[$i]["calculated_unit_price"] = $db->f("unit_purchase_price") + $db->f("unit_purchase_price") * $calculated;
426
+            $item[$i]["calculated_unit_price"] = $db->f("unit_purchase_price") + $db->f("unit_purchase_price")*$calculated;
427 427
             $item[$i]["quantity"] = $db->f("quantity");
428 428
             $item[$i]["vat"] = $product->get("vat");
429 429
             $item[$i]["product_id"] = $product->get("id");
430
-            $item[$i]["amount"] = $db->f("quantity") * $db->f("unit_purchase_price");
430
+            $item[$i]["amount"] = $db->f("quantity")*$db->f("unit_purchase_price");
431 431
 
432 432
             if ($product->get('has_variation')) {
433 433
                 $variation = $product->getVariation($db->f('product_variation_id'));
434 434
                 $detail = $variation->getDetail($db->f('product_variation_detail_id'));
435 435
                 $item[$i]["name"] = $product->get("name").' - '.$variation->getName();
436
-                $item[$i]["number"]= $product->get("number").'.'.$variation->getNumber();
436
+                $item[$i]["number"] = $product->get("number").'.'.$variation->getNumber();
437 437
                 $item[$i]["price"] = $detail->getPrice($product);
438 438
 
439 439
             } else {
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
      */
453 453
     public function getQuantity($status, $product_id, $product_variation_id, $from_date = "")
454 454
     {
455
-        if (!in_array($status, array (
455
+        if (!in_array($status, array(
456 456
                 'ordered',
457 457
                 'delivered'
458 458
             ))) {
@@ -466,8 +466,8 @@  discard block
 block discarded – undo
466 466
                         FROM procurement_item INNER JOIN procurement
467 467
                             ON procurement_item.procurement_id = procurement.id
468 468
                         WHERE procurement_item.active = 1 AND procurement.active = 1
469
-                            AND procurement_item.intranet_id = " . $this->procurement->kernel->intranet->get("id") . " AND procurement.intranet_id = " . $this->procurement->kernel->intranet->get("id") . "
470
-                            AND procurement_item.product_id = " . $product_id . " AND procurement.status_key = 0
469
+                            AND procurement_item.intranet_id = " . $this->procurement->kernel->intranet->get("id")." AND procurement.intranet_id = ".$this->procurement->kernel->intranet->get("id")."
470
+                            AND procurement_item.product_id = " . $product_id." AND procurement.status_key = 0
471 471
                             AND procurement_item.product_variation_id = ".$product_variation_id);
472 472
             $db->nextRecord(); // a post will always be present
473 473
             return intval($db->f("on_order"));
@@ -477,11 +477,11 @@  discard block
 block discarded – undo
477 477
                         FROM procurement_item INNER JOIN procurement
478 478
                             ON procurement_item.procurement_id = procurement.id
479 479
                         WHERE procurement_item.active = 1 AND procurement.active = 1
480
-                            AND procurement_item.intranet_id = " . $this->procurement->kernel->intranet->get("id") . " AND procurement.intranet_id = " . $this->procurement->kernel->intranet->get("id") . "
481
-                            AND procurement_item.product_id = " . $product_id . "
480
+                            AND procurement_item.intranet_id = " . $this->procurement->kernel->intranet->get("id")." AND procurement.intranet_id = ".$this->procurement->kernel->intranet->get("id")."
481
+                            AND procurement_item.product_id = " . $product_id."
482 482
                             AND procurement_item.product_variation_id = ".$product_variation_id."
483 483
                             AND procurement.status_key = 1
484
-                            AND procurement.date_recieved > \"" . $from_date . "\"");
484
+                            AND procurement.date_recieved > \"" . $from_date."\"");
485 485
             $db->nextRecord(); // a post will always be present
486 486
             return intval($db->f("stock_in"));
487 487
         }
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/ProcurementGateway.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     function setNewContactId($old_id, $new_id)
42 42
     {
43 43
         $db = MDB2::singleton();
44
-        $db->query('UPDATE procurement SET contact_id = ' . $new_id . ' WHERE contact_id = ' . $old_id);
44
+        $db->query('UPDATE procurement SET contact_id = '.$new_id.' WHERE contact_id = '.$old_id);
45 45
     }
46 46
 
47 47
     function find()
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                 $this->dbquery->setCondition("status_key < 1 OR (status_key = 1 AND paid_date = \"0000-00-00\")");
82 82
             } else {
83 83
                 if ($this->dbquery->checkFilter("to_date")) {
84
-                    switch($this->dbquery->getFilter("status")) {
84
+                    switch ($this->dbquery->getFilter("status")) {
85 85
                         case "0":
86 86
                             $to_date_field = "date_created";
87 87
                             break;
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
             $list[$i]["contact_id"] = $db->f("contact_id");
148 148
 
149
-            $list[$i]["total_price"] = round($db->f("price_items") + $db->f("price_shipment_etc") + $db->f("vat"), 2);;
149
+            $list[$i]["total_price"] = round($db->f("price_items") + $db->f("price_shipment_etc") + $db->f("vat"), 2); ;
150 150
 
151 151
             $i++;
152 152
         }
@@ -157,14 +157,14 @@  discard block
 block discarded – undo
157 157
     function any()
158 158
     {
159 159
         $db = new DB_Sql;
160
-        $db->query("SELECT id FROM procurement WHERE intranet_id = " . $this->kernel->intranet->get('id'));
160
+        $db->query("SELECT id FROM procurement WHERE intranet_id = ".$this->kernel->intranet->get('id'));
161 161
         return $db->numRows();
162 162
     }
163 163
 
164 164
     function anyByContact($contact_id)
165 165
     {
166 166
         $db = new DB_Sql;
167
-        $db->query("SELECT id FROM procurement WHERE intranet_id = " . $this->kernel->intranet->get('id')." AND contact_id = ".$contact_id." AND active = 1");
167
+        $db->query("SELECT id FROM procurement WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND contact_id = ".$contact_id." AND active = 1");
168 168
         return $db->numRows();
169 169
     }
170 170
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     {
214 214
         $sql = "SELECT id
215 215
                 FROM procurement
216
-                WHERE intranet_id = " . $this->kernel->intranet->get("id") . "
216
+                WHERE intranet_id = " . $this->kernel->intranet->get("id")."
217 217
                     AND contact_id = ".(int)$contact_id."
218 218
                     AND active = 1";
219 219
 
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Procurement.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
         $this->value["from_region"] = $region_types[$db->f("from_region_key")];
103 103
 
104 104
         $this->value["price_items"] = $db->f("price_items");
105
-        $this->value["dk_price_items"] = number_format($db->f("price_items"), 2, ",",".");
105
+        $this->value["dk_price_items"] = number_format($db->f("price_items"), 2, ",", ".");
106 106
         $this->value["price_shipment_etc"] = $db->f("price_shipment_etc");
107
-        $this->value["dk_price_shipment_etc"] = number_format($this->value["price_shipment_etc"], 2, ",",".");
107
+        $this->value["dk_price_shipment_etc"] = number_format($this->value["price_shipment_etc"], 2, ",", ".");
108 108
         $this->value["vat"] = $db->f("vat");
109
-        $this->value["dk_vat"] = number_format($db->f("vat"), 2, ",",".");
109
+        $this->value["dk_vat"] = number_format($db->f("vat"), 2, ",", ".");
110 110
         $this->value["total_price"] = round($this->value["price_items"] + $this->value["price_shipment_etc"] + $this->value["vat"], 2);
111
-        $this->value["dk_total_price"] = number_format($this->value["total_price"], 2, ",",".");
111
+        $this->value["dk_total_price"] = number_format($this->value["total_price"], 2, ",", ".");
112 112
 
113 113
         $this->value["status_key"] = $db->f("status_key");
114 114
         $types = $this->getStatusTypes();
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
             throw new Exception("Ugyldigt status: ".$status);
259 259
         }
260 260
 
261
-        switch($status) {
261
+        switch ($status) {
262 262
             case "ordered":
263 263
                 $sql = "";
264 264
                 break;
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
         }
416 416
 
417 417
 
418
-        $text = $translation->get('procurement').'# ' . $this->get('number') . ': ' . $this->get('description');
418
+        $text = $translation->get('procurement').'# '.$this->get('number').': '.$this->get('description');
419 419
         require_once 'Intraface/modules/accounting/Voucher.php';
420 420
         $voucher = Voucher::factory($year, $voucher_number);
421 421
         $voucher->save(array(
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
             $credit_total += $amount;
435 435
 
436 436
             if (!empty($line['text'])) {
437
-                $line_text = $text. ' - ' . $line['text'];
437
+                $line_text = $text.' - '.$line['text'];
438 438
             } else {
439 439
                 $line_text = $text;
440 440
             }
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
             $voucher_date->convert2db();
490 490
         }
491 491
 
492
-        $db->query("UPDATE procurement SET date_stated = '".$voucher_date->get()."', voucher_id = ".intval($voucher_number)." WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id'));
492
+        $db->query("UPDATE procurement SET date_stated = '".$voucher_date->get()."', voucher_id = ".intval($voucher_number)." WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id'));
493 493
         return 1;
494 494
     }
495 495
 
@@ -572,16 +572,16 @@  discard block
 block discarded – undo
572 572
         $total = 0;
573 573
         $vat = 0;
574 574
         foreach ($debet_accounts AS $key => $debet_account) {
575
-            if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', 'greater_than_zero')) {
575
+            if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje '.($key + 1).' "'.$debet_account['text'].'"', 'greater_than_zero')) {
576 576
 
577 577
                 $amount = new Intraface_Amount($debet_account['amount']);
578 578
                 $amount->convert2db();
579 579
                 $total += $amount->get();
580 580
 
581
-                $validator->isString($debet_account['text'], 'Ugyldig tekst i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', '', 'allow_empty');
581
+                $validator->isString($debet_account['text'], 'Ugyldig tekst i linje '.($key + 1).' "'.$debet_account['text'].'"', '', 'allow_empty');
582 582
 
583
-                if (empty($debet_account['state_account_id']) ) {
584
-                    $this->error->set('Linje ' . ($key + 1) . ' "' . $debet_account['text'] . '" ved ikke hvor den skal bogføres');
583
+                if (empty($debet_account['state_account_id'])) {
584
+                    $this->error->set('Linje '.($key + 1).' "'.$debet_account['text'].'" ved ikke hvor den skal bogføres');
585 585
                 } else {
586 586
                     require_once 'Intraface/modules/accounting/Account.php';
587 587
                     $account = Account::factory($year, $debet_account['state_account_id']);
@@ -589,9 +589,9 @@  discard block
 block discarded – undo
589 589
                     // @todo check this. I changed it to make sure that we are able to state varekøb til videresalg
590 590
                     // || $account->get('type') != 'operating'
591 591
                     if ($account->get('id') == 0) {
592
-                        $this->error->set('Ugyldig konto for bogføring af linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"');
592
+                        $this->error->set('Ugyldig konto for bogføring af linje '.($key + 1).' "'.$debet_account['text'].'"');
593 593
                     } elseif ($account->get('vat') == 'in') {
594
-                        $vat += $amount->get() / 100 * $account->get('vat_percent');
594
+                        $vat += $amount->get()/100*$account->get('vat_percent');
595 595
                     }
596 596
                 }
597 597
             }
@@ -608,8 +608,8 @@  discard block
 block discarded – undo
608 608
             }
609 609
 
610 610
             if (round($vat, 2) != $this->get('vat')) {
611
-                $expected = number_format($this->get('vat') * 4, 2, ',', '.');
612
-                $this->error->set('Momsen af de beløb du bogfører på konti med moms stemmer ikke overens med momsen på det samlede indkøb (vi forventede '.number_format($vat, 2, ',', '.').' i moms og det samlede beløb burde have været ' . $expected . '). Har du fået alle varer med? Har du husket at skrive beløbet uden moms for varerne?');
611
+                $expected = number_format($this->get('vat')*4, 2, ',', '.');
612
+                $this->error->set('Momsen af de beløb du bogfører på konti med moms stemmer ikke overens med momsen på det samlede indkøb (vi forventede '.number_format($vat, 2, ',', '.').' i moms og det samlede beløb burde have været '.$expected.'). Har du fået alle varer med? Har du husket at skrive beløbet uden moms for varerne?');
613 613
             }
614 614
         }
615 615
 
@@ -638,16 +638,16 @@  discard block
 block discarded – undo
638 638
         $total = 0;
639 639
         $vat = 0;
640 640
         foreach ($debet_accounts AS $key => $debet_account) {
641
-            if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', 'greater_than_zero')) {
641
+            if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje '.($key + 1).' "'.$debet_account['text'].'"', 'greater_than_zero')) {
642 642
 
643 643
                 $amount = new Intraface_Amount($debet_account['amount']);
644 644
                 $amount->convert2db();
645 645
                 $total += $amount->get();
646 646
 
647
-                $validator->isString($debet_account['text'], 'Ugyldig tekst i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', '', 'allow_empty');
647
+                $validator->isString($debet_account['text'], 'Ugyldig tekst i linje '.($key + 1).' "'.$debet_account['text'].'"', '', 'allow_empty');
648 648
 
649
-                if (empty($debet_account['state_account_id']) ) {
650
-                    $this->error->set('Linje ' . ($key + 1) . ' "' . $debet_account['text'] . '" ved ikke hvor den skal bogføres');
649
+                if (empty($debet_account['state_account_id'])) {
650
+                    $this->error->set('Linje '.($key + 1).' "'.$debet_account['text'].'" ved ikke hvor den skal bogføres');
651 651
                 } else {
652 652
                     require_once 'Intraface/modules/accounting/Account.php';
653 653
                     $account = Account::factory($year, $debet_account['state_account_id']);
@@ -655,9 +655,9 @@  discard block
 block discarded – undo
655 655
                     // @todo check this. I changed it to make sure that we are able to state varekøb til videresalg
656 656
                     // || $account->get('type') != 'operating'
657 657
                     if ($account->get('id') == 0) {
658
-                        $this->error->set('Ugyldig konto for bogføring af linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"');
658
+                        $this->error->set('Ugyldig konto for bogføring af linje '.($key + 1).' "'.$debet_account['text'].'"');
659 659
                     } elseif ($account->get('vat') == 'in') {
660
-                        $vat += $amount->get() / 100 * $account->get('vat_percent');
660
+                        $vat += $amount->get()/100*$account->get('vat_percent');
661 661
                     }
662 662
                 }
663 663
             }
@@ -674,8 +674,8 @@  discard block
 block discarded – undo
674 674
 
675 675
         if (round($vat, 2) != $this->get('vat')) {
676 676
             $expected_vat = number_format($vat, 2, ',', '.');
677
-            $expected_value = number_format($this->get('vat') * 4, 2, ',', '.');
678
-            $this->error->set('Momsen af de beløb du bogfører på konti med moms stemmer ikke overens med momsen på det samlede indkøb (vi forventede ' . $expected_vat . ' i moms og det samlede beløb burde have været ' . $expected_value . '). Har du fået alle varer med? Har du husket at skrive beløbet uden moms for varerne?');
677
+            $expected_value = number_format($this->get('vat')*4, 2, ',', '.');
678
+            $this->error->set('Momsen af de beløb du bogfører på konti med moms stemmer ikke overens med momsen på det samlede indkøb (vi forventede '.$expected_vat.' i moms og det samlede beløb burde have været '.$expected_value.'). Har du fået alle varer med? Har du husket at skrive beløbet uden moms for varerne?');
679 679
         }
680 680
         
681 681
         if ($this->error->isError()) {
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Controller/Show.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                 $contact_module = $this->getKernel()->useModule('contact');
56 56
 
57 57
                 $redirect = Intraface_Redirect::factory($this->getKernel(), 'go');
58
-                $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('choosecontact'), NET_SCHEME . NET_HOST . $this->url());
58
+                $url = $redirect->setDestination(NET_SCHEME.NET_HOST.$this->url('choosecontact'), NET_SCHEME.NET_HOST.$this->url());
59 59
                 $redirect->askParameter('contact_id');
60 60
                 $redirect->setIdentifier('contact');
61 61
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         	'kernel' => $this->getKernel(),
103 103
         	'append_file' => $append_file,
104 104
         	'filehandler' => $filehandler);
105
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/show');
105
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/show');
106 106
         return $tpl->render($this, $data);
107 107
     }
108 108
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         	'title' => $this->t("Edit procurement"),
119 119
             'gateway' => new Intraface_modules_procurement_ProcurementGateway($this->getKernel()),
120 120
             'values' => $this->getValues());
121
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/procurement-edit');
121
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/procurement-edit');
122 122
         return $tpl->render($this, $data);
123 123
     }
124 124
 
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Controller/Index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             'procurements' => $procurements
68 68
         );
69 69
 
70
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/index');
70
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/index');
71 71
         return $smarty->render($this, $data);
72 72
     }
73 73
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             'gateway' => $this->getProcurementGateway()
83 83
         );
84 84
 
85
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/procurement-edit');
85
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/procurement-edit');
86 86
         return $smarty->render($this, $data);
87 87
     }
88 88
 
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Controller/Item.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         if (isset($_GET['change_product'])) {
68 68
             $redirect = Intraface_Redirect::factory($this->getKernel(), 'go');
69
-            $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('selectproduct'), NET_SCHEME . NET_HOST . $this->url());
69
+            $url = $redirect->setDestination(NET_SCHEME.NET_HOST.$this->url('selectproduct'), NET_SCHEME.NET_HOST.$this->url());
70 70
             $redirect->askParameter('product_id');
71 71
             return new k_SeeOther($url);
72 72
         }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         $data = array('procurement' => $procurement, 'values' => $values);
83 83
 
84
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/item-edit');
84
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/item-edit');
85 85
         return $tpl->render($this, $data);
86 86
 
87 87
     }
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Controller/PurchasePrice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
             'procurement' => $procurement
21 21
         );
22 22
 
23
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/purchaseprice');
23
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/purchaseprice');
24 24
         return $tpl->render($this, $data);
25 25
     }
26 26
 
Please login to merge, or discard this patch.