Completed
Pull Request — master (#27)
by Lars
11:57
created
src/Intraface/modules/procurement/Procurement.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         }
415 415
 
416 416
 
417
-        $text = $translation->get('procurement').'# ' . $this->get('number') . ': ' . $this->get('description');
417
+        $text = $translation->get('procurement').'# '.$this->get('number').': '.$this->get('description');
418 418
         require_once 'Intraface/modules/accounting/Voucher.php';
419 419
         $voucher = Voucher::factory($year, $voucher_number);
420 420
         $voucher->save(array(
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
             $credit_total += $amount;
434 434
 
435 435
             if (!empty($line['text'])) {
436
-                $line_text = $text. ' - ' . $line['text'];
436
+                $line_text = $text.' - '.$line['text'];
437 437
             } else {
438 438
                 $line_text = $text;
439 439
             }
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             $voucher_date->convert2db();
488 488
         }
489 489
 
490
-        $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'));
490
+        $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'));
491 491
         return 1;
492 492
     }
493 493
 
@@ -570,15 +570,15 @@  discard block
 block discarded – undo
570 570
         $total = 0;
571 571
         $vat = 0;
572 572
         foreach ($debet_accounts as $key => $debet_account) {
573
-            if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', 'greater_than_zero')) {
573
+            if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje '.($key + 1).' "'.$debet_account['text'].'"', 'greater_than_zero')) {
574 574
                 $amount = new Intraface_Amount($debet_account['amount']);
575 575
                 $amount->convert2db();
576 576
                 $total += $amount->get();
577 577
 
578
-                $validator->isString($debet_account['text'], 'Ugyldig tekst i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', '', 'allow_empty');
578
+                $validator->isString($debet_account['text'], 'Ugyldig tekst i linje '.($key + 1).' "'.$debet_account['text'].'"', '', 'allow_empty');
579 579
 
580 580
                 if (empty($debet_account['state_account_id'])) {
581
-                    $this->error->set('Linje ' . ($key + 1) . ' "' . $debet_account['text'] . '" ved ikke hvor den skal bogføres');
581
+                    $this->error->set('Linje '.($key + 1).' "'.$debet_account['text'].'" ved ikke hvor den skal bogføres');
582 582
                 } else {
583 583
                     require_once 'Intraface/modules/accounting/Account.php';
584 584
                     $account = Account::factory($year, $debet_account['state_account_id']);
@@ -586,9 +586,9 @@  discard block
 block discarded – undo
586 586
                     // @todo check this. I changed it to make sure that we are able to state varekøb til videresalg
587 587
                     // || $account->get('type') != 'operating'
588 588
                     if ($account->get('id') == 0) {
589
-                        $this->error->set('Ugyldig konto for bogføring af linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"');
589
+                        $this->error->set('Ugyldig konto for bogføring af linje '.($key + 1).' "'.$debet_account['text'].'"');
590 590
                     } elseif ($account->get('vat') == 'in') {
591
-                        $vat += $amount->get() / 100 * $account->get('vat_percent');
591
+                        $vat += $amount->get()/100*$account->get('vat_percent');
592 592
                     }
593 593
                 }
594 594
             }
@@ -605,8 +605,8 @@  discard block
 block discarded – undo
605 605
             }
606 606
 
607 607
             if (round($vat, 2) != $this->get('vat')) {
608
-                $expected = number_format($this->get('vat') * 4, 2, ',', '.');
609
-                $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?');
608
+                $expected = number_format($this->get('vat')*4, 2, ',', '.');
609
+                $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?');
610 610
             }
611 611
         }
612 612
 
@@ -635,15 +635,15 @@  discard block
 block discarded – undo
635 635
         $total = 0;
636 636
         $vat = 0;
637 637
         foreach ($debet_accounts as $key => $debet_account) {
638
-            if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', 'greater_than_zero')) {
638
+            if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje '.($key + 1).' "'.$debet_account['text'].'"', 'greater_than_zero')) {
639 639
                 $amount = new Intraface_Amount($debet_account['amount']);
640 640
                 $amount->convert2db();
641 641
                 $total += $amount->get();
642 642
 
643
-                $validator->isString($debet_account['text'], 'Ugyldig tekst i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', '', 'allow_empty');
643
+                $validator->isString($debet_account['text'], 'Ugyldig tekst i linje '.($key + 1).' "'.$debet_account['text'].'"', '', 'allow_empty');
644 644
 
645 645
                 if (empty($debet_account['state_account_id'])) {
646
-                    $this->error->set('Linje ' . ($key + 1) . ' "' . $debet_account['text'] . '" ved ikke hvor den skal bogføres');
646
+                    $this->error->set('Linje '.($key + 1).' "'.$debet_account['text'].'" ved ikke hvor den skal bogføres');
647 647
                 } else {
648 648
                     require_once 'Intraface/modules/accounting/Account.php';
649 649
                     $account = Account::factory($year, $debet_account['state_account_id']);
@@ -651,9 +651,9 @@  discard block
 block discarded – undo
651 651
                     // @todo check this. I changed it to make sure that we are able to state varekøb til videresalg
652 652
                     // || $account->get('type') != 'operating'
653 653
                     if ($account->get('id') == 0) {
654
-                        $this->error->set('Ugyldig konto for bogføring af linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"');
654
+                        $this->error->set('Ugyldig konto for bogføring af linje '.($key + 1).' "'.$debet_account['text'].'"');
655 655
                     } elseif ($account->get('vat') == 'in') {
656
-                        $vat += $amount->get() / 100 * $account->get('vat_percent');
656
+                        $vat += $amount->get()/100*$account->get('vat_percent');
657 657
                     }
658 658
                 }
659 659
             }
@@ -670,8 +670,8 @@  discard block
 block discarded – undo
670 670
 
671 671
         if (round($vat, 2) != $this->get('vat')) {
672 672
             $expected_vat = number_format($vat, 2, ',', '.');
673
-            $expected_value = number_format($this->get('vat') * 4, 2, ',', '.');
674
-            $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?');
673
+            $expected_value = number_format($this->get('vat')*4, 2, ',', '.');
674
+            $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?');
675 675
         }
676 676
         
677 677
         if ($this->error->isError()) {
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Controller/templates/show.tpl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -248,8 +248,8 @@  discard block
 block discarded – undo
248 248
             $total = 0;
249 249
 
250 250
 
251
-            for ($i = 0, $max = count($items); $i<$max; $i++) {
252
-                $total += $items[$i]["quantity"] * $items[$i]["unit_purchase_price"];
251
+            for ($i = 0, $max = count($items); $i < $max; $i++) {
252
+                $total += $items[$i]["quantity"]*$items[$i]["unit_purchase_price"];
253 253
                 ?>
254 254
                 <tr id="i<?php e($items[$i]["id"]); ?>" <?php if (isset($_GET['item_id']) && $_GET['item_id'] == $items[$i]['id']) {
255 255
                     print(' class="fade"');
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
                     <td class="amount"><?php e(number_format($items[$i]["calculated_unit_price"], 2, ",", ".")); ?></td>
264 264
                     <td class="buttons">
265 265
                         <?php if ($procurement->get("locked") == false) { ?>
266
-                            <a class="edit" href="<?php e(url('item/' .$items[$i]["id"], array('edit'))); ?>">Ret</a>
266
+                            <a class="edit" href="<?php e(url('item/'.$items[$i]["id"], array('edit'))); ?>">Ret</a>
267 267
                             <a class="delete" href="<?php e(url(null, array('delete_item_id' => $items[$i]["id"]))); ?>">Slet</a>
268 268
                         <?php } ?>&nbsp;
269 269
                     </td>
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/Controller/templates/item-edit.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,6 +46,6 @@
 block discarded – undo
46 46
     <input type="hidden" name="product_variation_detail_id" value="<?php e($procurement->item->get('product_variation_detail_id')); ?>" />
47 47
 
48 48
     <input type="submit" name="submit" value="Gem" class="save" />
49
-    <a href="<?php e(url('../'));  ?>">Fortryd</a>
49
+    <a href="<?php e(url('../')); ?>">Fortryd</a>
50 50
 </div>
51 51
 </form>
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.
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/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;
@@ -323,10 +323,10 @@  discard block
 block discarded – undo
323 323
             return false;
324 324
         }
325 325
 
326
-        $sql = "unit_purchase_price = " . $unit_purchase_price->get();
326
+        $sql = "unit_purchase_price = ".$unit_purchase_price->get();
327 327
 
328 328
         $db = new DB_Sql;
329
-        $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
+        $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"));
330 330
         return true;
331 331
     }
332 332
 
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
             product_variation_detail_id = ".$variation_detail_id;
377 377
 
378 378
         $db = new DB_Sql;
379
-        $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
+        $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"));
380 380
 
381 381
         return true;
382 382
     }
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
     public function delete()
389 389
     {
390 390
         $db = new DB_Sql;
391
-        $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
+        $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"));
392 392
         $this->id = 0;
393 393
 
394 394
         return 1;
@@ -402,13 +402,13 @@  discard block
 block discarded – undo
402 402
     public function getList()
403 403
     {
404 404
         $db = new DB_Sql;
405
-        $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
+        $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");
406 406
         $i = 0;
407
-        $item = array ();
407
+        $item = array();
408 408
 
409 409
         if ($this->procurement->get("price_items") > 0) {
410 410
             // calculates shipment etc per item price kr
411
-            $calculated = $this->procurement->get("price_shipment_etc") / $this->procurement->get("price_items");
411
+            $calculated = $this->procurement->get("price_shipment_etc")/$this->procurement->get("price_items");
412 412
         } else {
413 413
             $calculated = 0;
414 414
         }
@@ -424,17 +424,17 @@  discard block
 block discarded – undo
424 424
                 $item[$i]["unit"] = $unit['plural'];
425 425
             }
426 426
             $item[$i]["unit_purchase_price"] = $db->f("unit_purchase_price");
427
-            $item[$i]["calculated_unit_price"] = $db->f("unit_purchase_price") + $db->f("unit_purchase_price") * $calculated;
427
+            $item[$i]["calculated_unit_price"] = $db->f("unit_purchase_price") + $db->f("unit_purchase_price")*$calculated;
428 428
             $item[$i]["quantity"] = $db->f("quantity");
429 429
             $item[$i]["vat"] = $product->get("vat");
430 430
             $item[$i]["product_id"] = $product->get("id");
431
-            $item[$i]["amount"] = $db->f("quantity") * $db->f("unit_purchase_price");
431
+            $item[$i]["amount"] = $db->f("quantity")*$db->f("unit_purchase_price");
432 432
 
433 433
             if ($product->get('has_variation')) {
434 434
                 $variation = $product->getVariation($db->f('product_variation_id'));
435 435
                 $detail = $variation->getDetail($db->f('product_variation_detail_id'));
436 436
                 $item[$i]["name"] = $product->get("name").' - '.$variation->getName();
437
-                $item[$i]["number"]= $product->get("number").'.'.$variation->getNumber();
437
+                $item[$i]["number"] = $product->get("number").'.'.$variation->getNumber();
438 438
                 $item[$i]["price"] = $detail->getPrice($product);
439 439
             } else {
440 440
                 $item[$i]["name"] = $product->get("name");
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
      */
452 452
     public function getQuantity($status, $product_id, $product_variation_id, $from_date = "")
453 453
     {
454
-        if (!in_array($status, array (
454
+        if (!in_array($status, array(
455 455
                 'ordered',
456 456
                 'delivered'
457 457
             ))) {
@@ -465,8 +465,8 @@  discard block
 block discarded – undo
465 465
                         FROM procurement_item INNER JOIN procurement
466 466
                             ON procurement_item.procurement_id = procurement.id
467 467
                         WHERE procurement_item.active = 1 AND procurement.active = 1
468
-                            AND procurement_item.intranet_id = " . $this->procurement->kernel->intranet->get("id") . " AND procurement.intranet_id = " . $this->procurement->kernel->intranet->get("id") . "
469
-                            AND procurement_item.product_id = " . $product_id . " AND procurement.status_key = 0
468
+                            AND procurement_item.intranet_id = " . $this->procurement->kernel->intranet->get("id")." AND procurement.intranet_id = ".$this->procurement->kernel->intranet->get("id")."
469
+                            AND procurement_item.product_id = " . $product_id." AND procurement.status_key = 0
470 470
                             AND procurement_item.product_variation_id = ".$product_variation_id);
471 471
             $db->nextRecord(); // a post will always be present
472 472
             return intval($db->f("on_order"));
@@ -476,11 +476,11 @@  discard block
 block discarded – undo
476 476
                         FROM procurement_item INNER JOIN procurement
477 477
                             ON procurement_item.procurement_id = procurement.id
478 478
                         WHERE procurement_item.active = 1 AND procurement.active = 1
479
-                            AND procurement_item.intranet_id = " . $this->procurement->kernel->intranet->get("id") . " AND procurement.intranet_id = " . $this->procurement->kernel->intranet->get("id") . "
480
-                            AND procurement_item.product_id = " . $product_id . "
479
+                            AND procurement_item.intranet_id = " . $this->procurement->kernel->intranet->get("id")." AND procurement.intranet_id = ".$this->procurement->kernel->intranet->get("id")."
480
+                            AND procurement_item.product_id = " . $product_id."
481 481
                             AND procurement_item.product_variation_id = ".$product_variation_id."
482 482
                             AND procurement.status_key = 1
483
-                            AND procurement.date_recieved > \"" . $from_date . "\"");
483
+                            AND procurement.date_recieved > \"" . $from_date."\"");
484 484
             $db->nextRecord(); // a post will always be present
485 485
             return intval($db->f("stock_in"));
486 486
         }
Please login to merge, or discard this patch.
src/Intraface/modules/webshop/Webshop.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -186,14 +186,14 @@  discard block
 block discarded – undo
186 186
             if ($value['message'] != '') {
187 187
                 $value['message'] .= "\n\n";
188 188
             }
189
-            $value['message'] .= "Kundekupon:". $input['customer_coupon'];
189
+            $value['message'] .= "Kundekupon:".$input['customer_coupon'];
190 190
         }
191 191
 
192 192
         if (isset($input['customer_comment']) && $input['customer_comment'] != '') {
193 193
             if ($value['message'] != '') {
194 194
                 $value['message'] .= "\n\n";
195 195
             }
196
-            $value['message'] .= "Kommentar:\n". $input['customer_comment'];
196
+            $value['message'] .= "Kommentar:\n".$input['customer_comment'];
197 197
         }
198 198
 
199 199
 
@@ -301,8 +301,8 @@  discard block
 block discarded – undo
301 301
         $email = new Email($this->kernel);
302 302
 
303 303
         if (!$email->save(array('contact_id' => $this->contact->get('id'),
304
-                                'subject' => 'Bekræftelse på bestilling #' . $order_id,
305
-                                'body' => $this->kernel->setting->get('intranet', 'webshop.confirmation_text') . "\n" . $this->contact->getLoginUrl() . "\n\nVenlig hilsen\n" . $this->kernel->intranet->address->get('name'),
304
+                                'subject' => 'Bekræftelse på bestilling #'.$order_id,
305
+                                'body' => $this->kernel->setting->get('intranet', 'webshop.confirmation_text')."\n".$this->contact->getLoginUrl()."\n\nVenlig hilsen\n".$this->kernel->intranet->address->get('name'),
306 306
                                 'from_email' => $this->kernel->intranet->address->get('email'),
307 307
                                 'from_name' => $this->kernel->intranet->address->get('name'),
308 308
                                 'type_id' => 12, // webshop
Please login to merge, or discard this patch.
src/Intraface/modules/webshop/BasketEvaluation.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             die($this->db->getMessage());
56 56
         }
57 57
 
58
-        $this->value['settings'] = array (
58
+        $this->value['settings'] = array(
59 59
             'evaluate_target' => array(
60 60
                 0 => 'price',
61 61
                 1 => 'weight',
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->db->quote($this->kernel->intranet->get('id'), 'integer')." AND id = ".$this->db->quote($this->id, 'integer'));
95 95
 
96 96
         if (PEAR::isError($result)) {
97
-            throw new Exception($result->getMessage() . $result->getUserInfo());
97
+            throw new Exception($result->getMessage().$result->getUserInfo());
98 98
         }
99 99
 
100 100
         if ($result->numRows() == 0) {
@@ -152,35 +152,35 @@  discard block
 block discarded – undo
152 152
             return false;
153 153
         }
154 154
 
155
-        $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", " .
156
-                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
157
-                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
158
-                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
159
-                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
160
-                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
161
-                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
162
-                 "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
163
-                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
155
+        $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", ".
156
+                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", ".
157
+                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", ".
158
+                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", ".
159
+                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", ".
160
+                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", ".
161
+                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", ".
162
+                 "action_value = ".$this->db->quote($input['action_value'], 'text').", ".
163
+                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", ".
164 164
                  "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
165 165
 
166 166
         if ($this->id != 0) {
167 167
             $result = $this->db->exec("UPDATE webshop_basket_evaluation SET ".$sql." WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND id = ".$this->id);
168 168
 
169 169
             if (PEAR::isError($result)) {
170
-                throw new Exception($result->getMessage() . $result->getUserInfo());
170
+                throw new Exception($result->getMessage().$result->getUserInfo());
171 171
                 return false;
172 172
             }
173 173
         } else {
174 174
             $result = $this->db->query("INSERT INTO webshop_basket_evaluation SET ".$sql.", intranet_id = ".$this->kernel->intranet->get('id').", id = ".$this->id);
175 175
 
176 176
             if (PEAR::isError($result)) {
177
-                throw new Exception($result->getMessage() . $result->getUserInfo());
177
+                throw new Exception($result->getMessage().$result->getUserInfo());
178 178
                 return false;
179 179
             }
180 180
 
181 181
             $this->id = $this->db->lastInsertID();
182 182
             if (PEAR::isError($this->id)) {
183
-                throw new Exception($result->getMessage() . $result->getUserInfo());
183
+                throw new Exception($result->getMessage().$result->getUserInfo());
184 184
             }
185 185
         }
186 186
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     {
197 197
         $result = $this->db->exec("UPDATE webshop_basket_evaluation SET active = 0 WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND id = ".$this->id);
198 198
         if (PEAR::isError($result)) {
199
-            throw new Exception($result->getMessage() . $result->getUserInfo());
199
+            throw new Exception($result->getMessage().$result->getUserInfo());
200 200
             return false;
201 201
         }
202 202
         return true;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->kernel->intranet->get('id').' ORDER BY running_index');
213 213
 
214 214
         if (PEAR::isError($this->id)) {
215
-            throw new Exception($result->getMessage() . $result->getUserInfo());
215
+            throw new Exception($result->getMessage().$result->getUserInfo());
216 216
         }
217 217
 
218 218
         $i = 0;
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
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         );
17 17
     } else {
18 18
         $db = new DB_Sql;
19
-        $db->query("SELECT * FROM debtor WHERE type = 2 AND status = 0 AND active = 1 AND intranet_id = " . $kernel->intranet->get('id'));
19
+        $db->query("SELECT * FROM debtor WHERE type = 2 AND status = 0 AND active = 1 AND intranet_id = ".$kernel->intranet->get('id'));
20 20
         $orders = $db->numRows();
21 21
         if ($orders > 0) {
22 22
             $_attention_needed[] = array(
Please login to merge, or discard this patch.