Completed
Push — master ( 9d10c2...bf46e5 )
by Lars
05:14
created
src/Intraface/modules/procurement/Procurement.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
 
124 124
     function loadItem($id = 0)
125 125
     {
126
-         $this->item = new ProcurementItem($this, (int)$id);
126
+            $this->item = new ProcurementItem($this, (int)$id);
127 127
     }
128 128
 
129 129
     function update($input)
Please login to merge, or discard this patch.
Doc Comments   +10 added lines, -2 removed lines patch added patch discarded remove patch
@@ -280,6 +280,9 @@  discard block
 block discarded – undo
280 280
         return true;
281 281
     }
282 282
 
283
+    /**
284
+     * @param string $dk_paid_date
285
+     */
283 286
     function setPaid($dk_paid_date)
284 287
     {
285 288
         if ($this->get('id') == 0) {
@@ -369,6 +372,11 @@  discard block
 block discarded – undo
369 372
      *
370 373
      * @param object year year object
371 374
      * @param integer voucher_number
375
+     * @param Year $year
376
+     * @param integer $voucher_number
377
+     * @param string $voucher_date
378
+     * @param integer $credit_account_id
379
+     * @param Stub_Translation $translation
372 380
      *
373 381
      * @return boolean
374 382
      */
@@ -685,7 +693,7 @@  discard block
 block discarded – undo
685 693
      *
686 694
      * @todo: duplicate in Procurement class
687 695
      *
688
-     * @return array status types
696
+     * @return string[] status types
689 697
      */
690 698
     private function getStatusTypes()
691 699
     {
@@ -700,7 +708,7 @@  discard block
 block discarded – undo
700 708
      * returns the possible regions where procurement is bought
701 709
      * @todo: duplicate in Procurement class
702 710
      *
703
-     * @return array possible regions
711
+     * @return string[] possible regions
704 712
      */
705 713
     public function getRegionTypes()
706 714
     {
Please login to merge, or discard this 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/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/debtor/Visitor/Text.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
                 $currency_iso_code = 'DKK';
14 14
             }
15 15
 
16
-            $table->addRow(array(round($item["quantity"]), substr($item["name"], 0, 40), $currency_iso_code.' ' . $amount));
16
+            $table->addRow(array(round($item["quantity"]), substr($item["name"], 0, 40), $currency_iso_code.' '.$amount));
17 17
         }
18 18
         return $table->getTable();
19 19
     }
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Visitor/Pdf.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         $this->doc->setY('-'.$this->doc->get("font_spacing"));
76 76
 
77
-        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
77
+        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
78 78
             $this->doc->nextPage(true);
79 79
         }
80 80
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             foreach ($text AS $line) {
84 84
                 if ($line == "") {
85 85
                     $this->doc->setY('-'.$this->doc->get("font_spacing"));
86
-                    if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
86
+                    if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
87 87
                         $this->doc->nextPage(true);
88 88
                     }
89 89
                 } else {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                         $this->doc->setY('-'.($this->doc->get("font_padding_top") + $this->doc->get("font_size")));
92 92
                         $line = $this->doc->addTextWrap($this->doc->get('margin_left'), $this->doc->get('y'), $this->doc->get('content_width'), $this->doc->get("font_size"), $line);
93 93
                         $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
94
-                        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
94
+                        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
95 95
                             $this->doc->nextPage(true);
96 96
                         }
97 97
                     }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $this->doc->addText($apointX["tekst"], $this->doc->get('y'), $this->doc->get("font_size"), "Tekst");
117 117
         $this->doc->addText($apointX["antal"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Antal"), $this->doc->get('y'), $this->doc->get("font_size"), "Antal");
118 118
         $this->doc->addText($apointX["pris"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Pris"), $this->doc->get('y'), $this->doc->get("font_size"), "Pris");
119
-        $this->doc->addText($apointX["beloeb"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Beløb") -3, $this->doc->get('y'), $this->doc->get("font_size"), "Beløb");
119
+        $this->doc->addText($apointX["beloeb"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Beløb") - 3, $this->doc->get('y'), $this->doc->get("font_size"), "Beløb");
120 120
 
121 121
         $this->doc->setY('-'.($this->doc->get("font_spacing") - $this->doc->get("font_size")));
122 122
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
         $bg_color = 0;
140 140
 
141
-        for ($i = 0, $max = count($items); $i <  $max; $i++) {
141
+        for ($i = 0, $max = count($items); $i < $max; $i++) {
142 142
             $vat = $items[$i]["vat"];
143 143
 
144 144
             if ($bg_color == 1) {
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
             }
162 162
             
163 163
             if ($debtor->getCurrency()) {
164
-                $amount =  $items[$i]["quantity"] * $items[$i]["price_currency"]->getAsIso(2);
164
+                $amount = $items[$i]["quantity"]*$items[$i]["price_currency"]->getAsIso(2);
165 165
             } else {
166
-                $amount =  $items[$i]["quantity"] * $items[$i]["price"]->getAsIso(2);
166
+                $amount = $items[$i]["quantity"]*$items[$i]["price"]->getAsIso(2);
167 167
             }
168 168
             $total += $amount;
169 169
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
                 $tekst = $this->doc->addTextWrap($apointX["tekst"], $this->doc->get('y'), $apointX["tekst_width_small"], $this->doc->get("font_size"), $tekst);
190 190
                 $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
191
-                if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
191
+                if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
192 192
                     $this->doc->nextPage(true);
193 193
                 }
194 194
             }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
                             $this->doc->setColor(0, 0, 0);
212 212
                         }
213 213
                         $this->doc->setY('-'.$this->doc->get("font_spacing"));
214
-                        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
214
+                        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
215 215
                             $this->doc->nextPage(true);
216 216
                         }
217 217
                     } else {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
                             $line = $this->doc->addTextWrap($apointX["tekst"], $this->doc->get('y') + 1, $apointX["tekst_width"], $this->doc->get("font_size"), $line); // Ups Ups, hvor kommer '+ 1' fra - jo ser du, ellers kappes det nederste af teksten!
228 228
                             $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
229 229
 
230
-                            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
230
+                            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
231 231
                                 $this->doc->nextPage(true);
232 232
                             }
233 233
                         }
@@ -236,12 +236,12 @@  discard block
 block discarded – undo
236 236
 
237 237
             }
238 238
 
239
-            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
239
+            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
240 240
                 $this->doc->nextPage(true);
241 241
             }
242 242
 
243 243
             // If products with VAT and next post is without we add VAT.
244
-            if (($vat == 1 && isset($items[$i+1]["vat"]) && $items[$i+1]["vat"] == 0) || ($vat == 1 && $i+1 >= $max)) {
244
+            if (($vat == 1 && isset($items[$i + 1]["vat"]) && $items[$i + 1]["vat"] == 0) || ($vat == 1 && $i + 1 >= $max)) {
245 245
                 // If VAT on current product, but next has no VAT OR if VAT and last product
246 246
 
247 247
                 ($bg_color == 1) ? $bg_color = 0 : $bg_color = 1;
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
                 $this->doc->line($this->doc->get("margin_left"), $this->doc->get('y'), $this->doc->get('right_margin_position'), $this->doc->get('y'));
257 257
                 $this->doc->setY('-'.($this->doc->get("font_size") + $this->doc->get("font_padding_top")));
258 258
                 $this->doc->addText($apointX["tekst"], $this->doc->get('y'), $this->doc->get("font_size"), "<b>25% moms af ".number_format($total, 2, ",", ".")."</b>");
259
-                $this->doc->addText($apointX["beloeb"] - $this->doc->getTextWidth($this->doc->get("font_size"), "<b>".number_format($total * 0.25, 2, ",", ".")."</b>"), $this->doc->get('y'), $this->doc->get("font_size"), "<b>".number_format($total * 0.25, 2, ",", ".")."</b>");
260
-                $total = $total * 1.25;
259
+                $this->doc->addText($apointX["beloeb"] - $this->doc->getTextWidth($this->doc->get("font_size"), "<b>".number_format($total*0.25, 2, ",", ".")."</b>"), $this->doc->get('y'), $this->doc->get("font_size"), "<b>".number_format($total*0.25, 2, ",", ".")."</b>");
260
+                $total = $total*1.25;
261 261
                 $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
262 262
                 $this->doc->line($this->doc->get("margin_left"), $this->doc->get('y'), $this->doc->get('right_margin_position'), $this->doc->get('y'));
263 263
                 $this->doc->setLineStyle(1);
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         }
269 269
 
270 270
 
271
-        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
271
+        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
272 272
             $this->doc->nextPage();
273 273
         }
274 274
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
             $total_text = "Total ".$currency_iso_code.":";
294 294
         }
295 295
 
296
-        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
296
+        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
297 297
             $this->doc->nextPage(true);
298 298
         }
299 299
 
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 
331 331
             $this->doc->setY('-'.$this->doc->get("font_spacing"));
332 332
 
333
-            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
333
+            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
334 334
                 $this->doc->nextPage(true);
335 335
             }
336 336
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
             foreach ($text AS $line) {
339 339
                 if ($line == "") {
340 340
                     $this->doc->setY('-'.$this->doc->get("font_spacing"));
341
-                    if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
341
+                    if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
342 342
                         $this->doc->nextPage(true);
343 343
                     }
344 344
                 } else {
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
                         $line = $this->doc->addTextWrap($this->doc->get('margin_left'), $this->doc->get('y'), $this->doc->get('content_width'), $this->doc->get("font_size"), $line);
348 348
                         $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
349 349
 
350
-                        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
350
+                        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
351 351
                             $this->doc->nextPage(true);
352 352
                         }
353 353
                     }
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Pdf.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $box_padding_top = 8; // space from top box to first line
88 88
         $box_padding_bottom = 9;
89 89
         $box_width = 275; // ($page_width - $margin_left - 10)/2;
90
-        $box_small_height = $this->doc->get("font_spacing") * 3 + $box_padding_top + $box_padding_bottom + 2;
90
+        $box_small_height = $this->doc->get("font_spacing")*3 + $box_padding_top + $box_padding_bottom + 2;
91 91
 
92 92
         // Write the receiver
93 93
         $this->doc->setY('-'.$this->doc->get("font_spacing")); // $pointY -= $box_padding_top;
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                 if ($i == 2) $i = count($line);
152 152
             }
153 153
             $this->doc->addText($this->doc->get('x') + 10, $this->doc->get('y'), $this->doc->get("font_size"), $intranet["postcode"]." ".$intranet["city"]);
154
-            $this->doc->setY('-'.($this->doc->get("font_spacing") * 2)); // $pointY -= $this->doc->get("font_spacing") * 2;
154
+            $this->doc->setY('-'.($this->doc->get("font_spacing")*2)); // $pointY -= $this->doc->get("font_spacing") * 2;
155 155
 
156 156
             $this->doc->addText($this->doc->get('x') + 10, $this->doc->get('y'), $this->doc->get("font_size"), "CVR.:");
157 157
             $this->doc->addText($this->doc->get('x') + 10 + 60, $this->doc->get('y'), $this->doc->get("font_size"), $intranet["cvr"]);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         if (is_array($docinfo) && count($docinfo) > 0) {
189 189
             $this->doc->setY('-10'); // $pointY -= 10;
190 190
             $box_small_top = $this->doc->get('y');
191
-            $box_small_height = count($docinfo) * $this->doc->get("font_spacing") + $box_padding_top + $box_padding_bottom;
191
+            $box_small_height = count($docinfo)*$this->doc->get("font_spacing") + $box_padding_top + $box_padding_bottom;
192 192
             $this->doc->setY('-'.$box_padding_top); // $pointY -= $box_padding_top;
193 193
 
194 194
             for ($i = 0; $i < count($docinfo); $i++) {
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
             $payment_left = 230;
281 281
             $payment_right = $this->doc->get("right_margin_position") - $this->doc->get("margin_left") - $payment_left;
282 282
 
283
-            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") + 4 + $payment_line * 3) {
283
+            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") + 4 + $payment_line*3) {
284 284
                 $this->doc->nextPage(true);
285 285
             }
286 286
 
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
 
299 299
             if ($payment_method == 1) {
300 300
 
301
-                $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line * 2, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line * 2);
302
-                $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line * 2, $this->doc->get('x') + $payment_left, $this->doc->get('y'));
301
+                $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line*2, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line*2);
302
+                $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line*2, $this->doc->get('x') + $payment_left, $this->doc->get('y'));
303 303
                 $this->doc->line($this->doc->get('x'), $this->doc->get('y') - $payment_line, $this->doc->get("right_margin_position"), $this->doc->get('y') - $payment_line);
304
-                $this->doc->line($this->doc->get('x') + $payment_left / 2, $this->doc->get('y') - $payment_line * 2, $this->doc->get('x') + $payment_left / 2, $this->doc->get('y') - $payment_line);
304
+                $this->doc->line($this->doc->get('x') + $payment_left/2, $this->doc->get('y') - $payment_line*2, $this->doc->get('x') + $payment_left/2, $this->doc->get('y') - $payment_line);
305 305
 
306 306
                 $this->doc->setY('-7'); // $pointY -= 7;
307 307
                 $this->doc->addText($this->doc->get('x') + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Bank:");
@@ -325,9 +325,9 @@  discard block
 block discarded – undo
325 325
                 $this->doc->setValue('y', $payment_start - $payment_line); // Sets exact position
326 326
                 $this->doc->setY('-7'); // $pointY -= 7;
327 327
 
328
-                $this->doc->addText($this->doc->get('x') + $payment_left / 2 + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Betalingsdato:");
328
+                $this->doc->addText($this->doc->get('x') + $payment_left/2 + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Betalingsdato:");
329 329
                 $this->doc->setY('-'.($payment_line - 12));
330
-                $this->doc->addText($this->doc->get('x') + $payment_left / 2 + 10, $this->doc->get('y'), $this->doc->get("font_size"), $parameter["due_date"]);
330
+                $this->doc->addText($this->doc->get('x') + $payment_left/2 + 10, $this->doc->get('y'), $this->doc->get("font_size"), $parameter["due_date"]);
331 331
 
332 332
                 $this->doc->setValue('y', $payment_start - $payment_line); // Sets exact position
333 333
                 $this->doc->setY('-7');
@@ -339,11 +339,11 @@  discard block
 block discarded – undo
339 339
 
340 340
             } elseif ($payment_method == 2) {
341 341
 
342
-                $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line * 3, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line * 3);
343
-                $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line * 3, $this->doc->get('x') + $payment_left, $this->doc->get('y'));
342
+                $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line*3, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line*3);
343
+                $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line*3, $this->doc->get('x') + $payment_left, $this->doc->get('y'));
344 344
                 $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line, $this->doc->get("right_margin_position"), $this->doc->get('y') - $payment_line);
345
-                $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line * 2, $this->doc->get("right_margin_position"), $this->doc->get('y') - $payment_line * 2);
346
-                $this->doc->line($this->doc->get('x') + $payment_left + $payment_right / 2, $this->doc->get('y') - $payment_line * 2, $this->doc->get('x') + $payment_left + $payment_right / 2, $this->doc->get('y') - $payment_line);
345
+                $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line*2, $this->doc->get("right_margin_position"), $this->doc->get('y') - $payment_line*2);
346
+                $this->doc->line($this->doc->get('x') + $payment_left + $payment_right/2, $this->doc->get('y') - $payment_line*2, $this->doc->get('x') + $payment_left + $payment_right/2, $this->doc->get('y') - $payment_line);
347 347
 
348 348
                 $this->doc->setY('-7');
349 349
                 $this->doc->addText($this->doc->get('x') + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Indbetaler:");
@@ -376,11 +376,11 @@  discard block
 block discarded – undo
376 376
                 $this->doc->setValue('y', $payment_start - $payment_line); // Sets exact position
377 377
                 $this->doc->setY('-7');
378 378
 
379
-                $this->doc->addText($this->doc->get('x') + $payment_left + $payment_right / 2 + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Betalingsdato:");
379
+                $this->doc->addText($this->doc->get('x') + $payment_left + $payment_right/2 + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Betalingsdato:");
380 380
                 $this->doc->setY('-'.($payment_line - 12));
381
-                $this->doc->addText($this->doc->get('x') + $payment_left + $payment_right / 2 + 10, $this->doc->get('y'), $this->doc->get("font_size"), $parameter["due_date"]);
381
+                $this->doc->addText($this->doc->get('x') + $payment_left + $payment_right/2 + 10, $this->doc->get('y'), $this->doc->get("font_size"), $parameter["due_date"]);
382 382
 
383
-                $this->doc->setValue('y', $payment_start - $payment_line * 2); // Sets exact position
383
+                $this->doc->setValue('y', $payment_start - $payment_line*2); // Sets exact position
384 384
                 $this->doc->setY('-7');
385 385
 
386 386
 
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
                 $this->doc->addText($this->doc->get('x') + $payment_left + 10, $this->doc->get('y'), $this->doc->get('font_size'), $this_text);
393 393
             } elseif ($payment_method == 3) {
394 394
 
395
-                $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line * 2, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line * 2);
395
+                $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line*2, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line*2);
396 396
                 $this->doc->line($this->doc->get("margin_left"), $this->doc->get('y') - $payment_line, $this->doc->get("right_margin_position"), $this->doc->get('y') - $payment_line);
397 397
                 $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y'), $this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line);
398 398
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     /**
35 35
      * Creates the document to write
36 36
      *
37
-     * @return PdfMaker object
37
+     * @return Intraface_Pdf object
38 38
      */
39 39
     protected function getDocument()
40 40
     {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @param string $type     Output to type (string or file)
49 49
      * @param string $filename Filename
50 50
      *
51
-     * @return void
51
+     * @return string|null
52 52
      */
53 53
     function output($type = 'string', $filename = 'debtor.pdf')
54 54
     {
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Debtor/Item.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
      */
90 90
     public function getAmount()
91 91
     {
92
-        return new Ilib_Variable_Float($this->getQuantity()->getAsIso(2) * $this->getProductPriceObject()->getPriceIncludingVat($this->getProduct())->getAsIso(2), 'iso');
92
+        return new Ilib_Variable_Float($this->getQuantity()->getAsIso(2)*$this->getProductPriceObject()->getPriceIncludingVat($this->getProduct())->getAsIso(2), 'iso');
93 93
     }
94 94
     
95 95
     public function getQuantity()
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Depreciation.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     {
21 21
         $invoice_module = $this->getKernel()->useModule('invoice');
22 22
         $depreciation = $this->getModel();
23
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/depreciation');
23
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/depreciation');
24 24
         return $smarty->render($this);
25 25
     }
26 26
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@
 block discarded – undo
23 23
         return $this->context->getKernel();
24 24
     }
25 25
 
26
+    /**
27
+     * @return Invoice
28
+     */
26 29
     function getModel()
27 30
     {
28 31
         return $this->context->getModel();
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Settings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             'kernel' => $this->context->getKernel(),
59 59
             'scan_in_contact' => $scan_in_contact);
60 60
 
61
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/settings');
61
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/settings');
62 62
         return $smarty->render($this, $data);
63 63
     }
64 64
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                 $contact_module = $this->context->getKernel()->useModule('contact');
116 116
 
117 117
                 $redirect = Intraface_Redirect::factory($this->context->getKernel(), 'go');
118
-                $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('contact'), $debtor_module->getPath()."settings");
118
+                $url = $redirect->setDestination(NET_SCHEME.NET_HOST.$this->url('contact'), $debtor_module->getPath()."settings");
119 119
                 $redirect->askParameter('contact_id');
120 120
                 $redirect->setIdentifier('contact');
121 121
 
Please login to merge, or discard this patch.