Completed
Pull Request — master (#27)
by Lars
11:31 queued 01:30
created
src/Intraface/modules/debtor/Controller/Collection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             $data['contact'] = new Contact($this->getKernel(), $this->getGateway()->getDBQuery()->getFilter('contact_id'));
95 95
         }
96 96
 
97
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/collection');
97
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/collection');
98 98
         return $smarty->render($this, $data);
99 99
     }
100 100
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         }
125 125
 
126 126
         if ($debtor->update($_POST)) {
127
-            return new k_SeeOther($this->url('../list/' . $debtor->get('id')));
127
+            return new k_SeeOther($this->url('../list/'.$debtor->get('id')));
128 128
         }
129 129
 
130 130
         return $this->render();
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Create.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         if ($this->query('contact_id') == '') {
26 26
             return new k_SeeOther($this->url('contact'));
27 27
         }
28
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/edit');
28
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/edit');
29 29
         return $smarty->render($this);
30 30
     }
31 31
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         }
56 56
 
57 57
         if ($debtor->update($_POST)) {
58
-            return new k_SeeOther($this->url('../' . $debtor->get('id')));
58
+            return new k_SeeOther($this->url('../'.$debtor->get('id')));
59 59
         }
60 60
 
61 61
         return $this->render();
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             return $this->body();
68 68
         }
69 69
 
70
-        $due_time = time() + $this->getContact()->get('paymentcondition') * 24 * 60 * 60;
70
+        $due_time = time() + $this->getContact()->get('paymentcondition')*24*60*60;
71 71
         $due_date = date('d-m-Y', $due_time);
72 72
 
73 73
         return array(
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Reminders.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $kernel = $this->getKernel();
55 55
         $contact_id = $this->query('contact_id');
56 56
 
57
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/reminders');
57
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/reminders');
58 58
         return $smarty->render($this);
59 59
     }
60 60
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $contact = new Contact($this->getKernel(), $this->query('contact_id'));
73 73
 
74 74
         $value["dk_this_date"] = date("d-m-Y");
75
-        $value["dk_due_date"] = date("d-m-Y", time()+3*24*60*60);
75
+        $value["dk_due_date"] = date("d-m-Y", time() + 3*24*60*60);
76 76
 
77 77
         if ($contact->address->get("name") != $contact->address->get("contactname")) {
78 78
             $value["attention_to"] = $contact->address->get("contactname");
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         $data = array('value' => $value);
86 86
 
87
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/reminder-edit');
87
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/reminder-edit');
88 88
         return $smarty->render($this, $data);
89 89
     }
90 90
 
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Send.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
                 }
28 28
 
29 29
                 // vi skal lige have oversat den her rigtigt
30
-                $subject = $translation->get($debtor->get('type')) . ' #' . $debtor->get('number');
30
+                $subject = $translation->get($debtor->get('type')).' #'.$debtor->get('number');
31 31
 
32 32
                 // hvad skal den skrive her?
33 33
                 if ($debtor->get('type') == 'order') {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                 }
61 61
 
62 62
                 $subject = 'Elektronisk faktura';
63
-                $body = 'Hermed faktura #' . $debtor->get('number') . ' til at læse ind';
63
+                $body = 'Hermed faktura #'.$debtor->get('number').' til at læse ind';
64 64
 
65 65
                 break;
66 66
         }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         if (!$email->save(array(
126 126
                 'contact_id' => $contact->get('id'),
127 127
                 'subject' => $subject,
128
-                'body' => $body . "\n\n" . $signature->getAsText(),
128
+                'body' => $body."\n\n".$signature->getAsText(),
129 129
                 'from_email' => $from_email,
130 130
                 'from_name' => $from_name,
131 131
                 'type_id' => 10, // electronic invoice
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                     $shared_email = $this->context->getKernel()->useModule('email');
148 148
 
149 149
                     // First vi set the last, because we need this id to the first.
150
-                    $url = $redirect->setDestination($shared_email->getPath().$email->get('id') . '?edit', NET_SCHEME . NET_HOST . $this->url('../'));
150
+                    $url = $redirect->setDestination($shared_email->getPath().$email->get('id').'?edit', NET_SCHEME.NET_HOST.$this->url('../'));
151 151
                     $redirect->setIdentifier('send_email');
152 152
                     $redirect->askParameter('send_email_status');
153 153
 
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Show.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             throw new k_PageNotFound();
25 25
         }
26 26
         if ($this->context->getType() != $this->getType()) {
27
-            return new k_SeeOther($this->url('../../../' . $this->getType() . '/list/' . $this->getDebtor()->getId()));
27
+            return new k_SeeOther($this->url('../../../'.$this->getType().'/list/'.$this->getDebtor()->getId()));
28 28
         }
29 29
 
30 30
         return parent::dispatch();
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             } elseif ($this->getType() == 'invoice') {
51 51
                 return 'Intraface_modules_accounting_Controller_State_Invoice';
52 52
             } else {
53
-                throw new Exception('Cannot state type ' . $this->getType());
53
+                throw new Exception('Cannot state type '.$this->getType());
54 54
             }
55 55
         } elseif ($name == 'item') {
56 56
             return 'Intraface_modules_debtor_Controller_Items';
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             if (!$email->save(array(
154 154
                     'contact_id' => $contact->get('id'),
155 155
                     'subject' => $subject,
156
-                    'body' => $body . "\n\n" . $signature->getAsText(),
156
+                    'body' => $body."\n\n".$signature->getAsText(),
157 157
                     'from_email' => $from_email,
158 158
                     'from_name' => $from_name,
159 159
                     'type_id' => 10, // electronic invoice
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             $shared_email = $this->getKernel()->useModule('email');
174 174
 
175 175
             // First vi set the last, because we need this id to the first.
176
-            $url = $redirect->setDestination($shared_email->getPath().$email->get('id') . '?edit', NET_SCHEME . NET_HOST . $this->url());
176
+            $url = $redirect->setDestination($shared_email->getPath().$email->get('id').'?edit', NET_SCHEME.NET_HOST.$this->url());
177 177
             $redirect->setIdentifier('send_onlinepaymentlink');
178 178
             $redirect->askParameter('send_onlinepaymentlink_status');
179 179
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                 // @todo vi skulle faktisk kun videre, hvis det ikke er en tilbagebetaling eller hvad?
215 215
                 if ($this->getDebtor()->get("type") == "invoice" && $this->getDebtor()->get("status") == "sent" and !$this->onlinepayment->error->isError()) {
216 216
                     if ($this->getKernel()->user->hasModuleAccess('accounting')) {
217
-                        return new k_SeeOther($this->url('payment/' . $this->onlinepayment->get('create_payment_id') . '/state'));
217
+                        return new k_SeeOther($this->url('payment/'.$this->onlinepayment->get('create_payment_id').'/state'));
218 218
                     }
219 219
                 }
220 220
             }
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
             $debtor_module = $this->getKernel()->module('debtor');
226 226
             $contact_module = $this->getKernel()->getModule('contact');
227 227
             $redirect = Intraface_Redirect::factory($this->getKernel(), 'go');
228
-            $url = $redirect->setDestination($contact_module->getPath().intval($this->getDebtor()->contact->get('id') . '&edit'), NET_SCHEME . NET_HOST . $this->url());
229
-            return new k_SeeOther($url . '&edit');
228
+            $url = $redirect->setDestination($contact_module->getPath().intval($this->getDebtor()->contact->get('id').'&edit'), NET_SCHEME.NET_HOST.$this->url());
229
+            return new k_SeeOther($url.'&edit');
230 230
         }
231 231
 
232 232
         // Redirect til tilføj produkt
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
             $product_module = $this->getKernel()->useModule('product');
236 236
             $redirect->setIdentifier('add_item');
237 237
 
238
-            $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('selectproduct', array('set_quantity' => true)), NET_SCHEME . NET_HOST . $this->url());
238
+            $url = $redirect->setDestination(NET_SCHEME.NET_HOST.$this->url('selectproduct', array('set_quantity' => true)), NET_SCHEME.NET_HOST.$this->url());
239 239
 
240 240
             $redirect->askParameter('product_id', 'multiple');
241 241
 
@@ -285,13 +285,13 @@  discard block
 block discarded – undo
285 285
         }
286 286
         $contact_module = $this->getKernel()->getModule('contact');
287 287
 
288
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/show');
288
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/show');
289 289
         return $tpl->render($this);
290 290
     }
291 291
 
292 292
     function renderHtmlEdit()
293 293
     {
294
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/edit');
294
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/edit');
295 295
         return $tpl->render($this);
296 296
     }
297 297
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
                 $this->getKernel()->useModule("invoice");
333 333
                 $invoice = new Invoice($this->getKernel());
334 334
                 if ($id = $invoice->create($this->getDebtor())) {
335
-                    return new k_SeeOther($this->url('../' . $id));
335
+                    return new k_SeeOther($this->url('../'.$id));
336 336
                 }
337 337
             }
338 338
         } // Quick process order
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
                     $invoice->setStatus('executed');
377 377
                 }
378 378
 
379
-                return new k_SeeOther($this->url('../' . $invoice->get('id')));
379
+                return new k_SeeOther($this->url('../'.$invoice->get('id')));
380 380
             }
381 381
         } // Execute invoice
382 382
         elseif ($this->body('quickprocess_invoice')) {
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
                 }
404 404
 
405 405
                 $this->getDebtor()->setStatus('executed');
406
-                return new k_SeeOther($this->url(null . '.pdf'));
406
+                return new k_SeeOther($this->url(null.'.pdf'));
407 407
             }
408 408
         } // create credit note
409 409
         elseif ($this->body('credit_note')) {
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
                     case 'intranet':
530 530
                         if ($this->getKernel()->intranet->address->get('name') == '' || $this->getKernel()->intranet->address->get('email') == '') {
531 531
                             if ($this->getKernel()->user->hasModuleAccess('administration')) {
532
-                                $msg = '<div class="message-dependent"><p>'.$this->t('You need to fill in an e-mail address to send e-mail').'. <a href="'.url('../../../../administration/intranet', array('edit')) . '">'.t('do it now').'</a>.</p></div>';
532
+                                $msg = '<div class="message-dependent"><p>'.$this->t('You need to fill in an e-mail address to send e-mail').'. <a href="'.url('../../../../administration/intranet', array('edit')).'">'.t('do it now').'</a>.</p></div>';
533 533
                             } else {
534 534
                                 $msg = '<div class="message-dependent"><p>'.$this->t('You need to ask your administrator to fill in an e-mail address, so that you can send emails').'</p></div>';
535 535
                             }
@@ -641,14 +641,14 @@  discard block
 block discarded – undo
641 641
 
642 642
     function renderOioxml()
643 643
     {
644
-        require_once dirname(__FILE__) . '/../Visitor/OIOXML.php';
644
+        require_once dirname(__FILE__).'/../Visitor/OIOXML.php';
645 645
         $render = new Debtor_Report_OIOXML;
646 646
         return $render->output($this->getDebtor());
647 647
     }
648 648
 
649 649
     function renderTxt()
650 650
     {
651
-        require_once dirname(__FILE__) . '/../Visitor/Text.php';
651
+        require_once dirname(__FILE__).'/../Visitor/Text.php';
652 652
         $render = new Debtor_Report_Text;
653 653
         return $render->output($this->getDebtor());
654 654
     }
Please login to merge, or discard this patch.
src/Intraface/modules/payment/Controller/templates/index.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         <?php if ($payment['is_stated']) : ?>
67 67
         <td><?php e(t('Yes')); ?></td>
68 68
         <?php else : ?>
69
-        <td><a href="<?php e(url($payment['id'] . '/state')); ?>"><?php e(t('No')); ?></a></td>
69
+        <td><a href="<?php e(url($payment['id'].'/state')); ?>"><?php e(t('No')); ?></a></td>
70 70
         <?php endif; ?>
71 71
 
72 72
     </tr>
Please login to merge, or discard this patch.
src/Intraface/modules/product/Variation/Detail.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function getPriceInCurrency($currency, $exchange_rate_id = 0, $product)
101 101
     {
102
-        return new Ilib_Variable_Float(round($this->getPrice($product)->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100), 2));
102
+        return new Ilib_Variable_Float(round($this->getPrice($product)->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100), 2));
103 103
     }
104 104
 
105 105
     /**
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
     public function getPriceIncludingVat($product)
115 115
     {
116 116
         if (get_class($product) == 'Intraface_modules_product_ProductDoctrine') {
117
-            return new Ilib_Variable_Float($this->getPrice($product)->getAsIso(2) * (1 + $product->getDetails()->getVatPercent()->getAsIso()/100));
117
+            return new Ilib_Variable_Float($this->getPrice($product)->getAsIso(2)*(1 + $product->getDetails()->getVatPercent()->getAsIso()/100));
118 118
         } else {
119
-            return new Ilib_Variable_Float($this->getPrice($product)->getAsIso(2) * (1 + $product->get('vat_percent')/100));
119
+            return new Ilib_Variable_Float($this->getPrice($product)->getAsIso(2)*(1 + $product->get('vat_percent')/100));
120 120
         }
121 121
     }
122 122
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function getPriceIncludingVatInCurrency($currency, $exchange_rate_id, $product)
135 135
     {
136
-        return new Ilib_Variable_Float($this->getPriceIncludingVat($product)->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100));
136
+        return new Ilib_Variable_Float($this->getPriceIncludingVat($product)->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100));
137 137
     }
138 138
 
139 139
     /**
Please login to merge, or discard this patch.
src/Intraface/modules/product/Gateway.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
                 'INNER',
140 140
                 'ilib_category',
141 141
                 'ilib_category_append.category_id = ilib_category.id',
142
-                'ilib_category.intranet_id = '.$this->kernel->intranet->getId(). ' ' .
143
-                    'AND ilib_category.belong_to = '.$category_type->getBelongTo().' ' .
142
+                'ilib_category.intranet_id = '.$this->kernel->intranet->getId().' '.
143
+                    'AND ilib_category.belong_to = '.$category_type->getBelongTo().' '.
144 144
                 'AND ilib_category.belong_to_id = '.$category_type->getBelongToId()
145 145
             );
146 146
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
             // den her skal vist lige kigges igennem, for den tager jo alt med p� nettet?
209 209
             // 0 = only stock
210
-            if ($this->kernel->setting->get('intranet', 'webshop.show_online') == 0 and $which=='webshop') { // only stock
210
+            if ($this->kernel->setting->get('intranet', 'webshop.show_online') == 0 and $which == 'webshop') { // only stock
211 211
                 if (array_key_exists('for_sale', $products[$i]['stock_status']) and $products[$i]['stock_status']['for_sale'] <= 0) {
212 212
                     continue;
213 213
                 }
Please login to merge, or discard this patch.
src/Intraface/modules/product/Product/Details.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -73,15 +73,15 @@  discard block
 block discarded – undo
73 73
             //->innerJoin('Intraface_modules_product_ProductDoctrine.details AS details')
74 74
             //->addWhere('active = 1')
75 75
             ->addWhere('active = 1')
76
-            ->addWhere('number = ' . $this->number)
77
-            ->addWhere('intranet_id = ' . $this->intranet_id)
78
-            ->addWhere('product_id <> ' . $product_id);
76
+            ->addWhere('number = '.$this->number)
77
+            ->addWhere('intranet_id = '.$this->intranet_id)
78
+            ->addWhere('product_id <> '.$product_id);
79 79
 
80 80
         // not necessary to execute query when counting
81 81
         //$collection = $dql->execute();
82 82
 
83 83
         if ($dql->count() > 0) {
84
-            $this->getErrorStack()->add('number', $this->number . ' has already been added');
84
+            $this->getErrorStack()->add('number', $this->number.' has already been added');
85 85
         }
86 86
 
87 87
         return true;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public function getPriceInCurrency($currency, $exchange_rate_id = 0)
214 214
     {
215
-        return new Ilib_Variable_Float(round($this->getPrice()->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100), 2));
215
+        return new Ilib_Variable_Float(round($this->getPrice()->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100), 2));
216 216
     }
217 217
 
218 218
     /**
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
      */
223 223
     public function getPriceIncludingVat()
224 224
     {
225
-        return new Ilib_Variable_Float($this->getPrice()->getAsIso(2) * (1 + $this->getVatPercent()->getAsIso()/100));
225
+        return new Ilib_Variable_Float($this->getPrice()->getAsIso(2)*(1 + $this->getVatPercent()->getAsIso()/100));
226 226
     }
227 227
 
228 228
     /**
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function getPriceIncludingVatInCurrency($currency, $exchange_rate_id)
236 236
     {
237
-        return new Ilib_Variable_Float($this->getPriceIncludingVat()->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100));
237
+        return new Ilib_Variable_Float($this->getPriceIncludingVat()->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100));
238 238
     }
239 239
 
240 240
     public function setBeforePrice(Ilib_Variable_Float $value)
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      */
263 263
     public function getBeforePriceInCurrency($currency, $exchange_rate_id = 0)
264 264
     {
265
-        return new Ilib_Variable_Float(round($this->getBeforePrice($product)->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100), 2));
265
+        return new Ilib_Variable_Float(round($this->getBeforePrice($product)->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100), 2));
266 266
     }
267 267
 
268 268
     /**
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
      */
273 273
     public function getBeforePriceIncludingVat()
274 274
     {
275
-        return new Ilib_Variable_Float($this->getBeforePrice()->getAsIso(2) * (1 + $this->getVatPercent()->getAsIso()/100));
275
+        return new Ilib_Variable_Float($this->getBeforePrice()->getAsIso(2)*(1 + $this->getVatPercent()->getAsIso()/100));
276 276
     }
277 277
 
278 278
     /**
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      */
285 285
     public function getBeforePriceIncludingVatInCurrency($currency, $exchange_rate_id)
286 286
     {
287
-        return new Ilib_Variable_Float($this->getBeforePriceIncludingVat()->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100));
287
+        return new Ilib_Variable_Float($this->getBeforePriceIncludingVat()->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100));
288 288
     }
289 289
 
290 290
     /**
Please login to merge, or discard this patch.