Completed
Pull Request — master (#27)
by Lars
11:31 queued 01:30
created
src/Intraface/modules/invoice/CreditNote.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
             for ($i = 0, $max = count($items); $i < $max; $i++) {
79 79
                 $product = new Product($this->kernel, $items[$i]['product_id']);
80 80
                 if ($product->get('state_account_id') == 0) {
81
-                    $this->error->set('Produktet ' . $product->get('name') . ' ved ikke hvor den skal bogf�res');
81
+                    $this->error->set('Produktet '.$product->get('name').' ved ikke hvor den skal bogf�res');
82 82
                 } else {
83 83
                     require_once 'Intraface/modules/accounting/Account.php';
84 84
                     $account = Account::factory($year, $product->get('state_account_id'));
85 85
                     if ($account->get('id') == 0 || $account->get('type') != 'operating') {
86
-                        $this->error->set('Ugyldig konto for bogf�ring af produktet ' . $product->get('name'));
86
+                        $this->error->set('Ugyldig konto for bogf�ring af produktet '.$product->get('name'));
87 87
                         $return = false;
88 88
                     }
89 89
                 }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $voucher->save(array(
134 134
             'voucher_number' => $voucher_number,
135 135
             'date' => $voucher_date,
136
-            'text' => 'Kreditnota #' . $this->get('number')
136
+            'text' => 'Kreditnota #'.$this->get('number')
137 137
         ));
138 138
 
139 139
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             $credit_account_number = $credit_account->get('number');
149 149
             $voucher = Voucher::factory($year, $voucher_number);
150 150
 
151
-            $amount = $item['quantity'] * $item['price']->getAsIso(2);
151
+            $amount = $item['quantity']*$item['price']->getAsIso(2);
152 152
 
153 153
             // hvis bel�bet er mindre end nul, skal konti byttes om og bel�bet skal g�res positivt
154 154
             if ($amount < 0) {
@@ -165,10 +165,10 @@  discard block
 block discarded – undo
165 165
                 'debet_account_number' => $debet_account_number,
166 166
                 'credit_account_number' => $credit_account_number,
167 167
                 'vat_off' => 1,
168
-                'text' => $text.' #' . $this->get('number') . ' - ' . $item['name']
168
+                'text' => $text.' #'.$this->get('number').' - '.$item['name']
169 169
             );
170 170
             if ($debet_account->get('vat') == 'out') {
171
-                $total_with_vat += $item["quantity"] * $item["price"]->getAsIso(2);
171
+                $total_with_vat += $item["quantity"]*$item["price"]->getAsIso(2);
172 172
             }
173 173
 
174 174
             if (!$voucher->saveInDaybook($input_values, true)) {
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
                     'voucher_number' => $voucher_number,
186 186
                     'reference' => $this->get('number'),
187 187
                     'date' => $voucher_date,
188
-                    'amount' => number_format($total_with_vat * $this->kernel->setting->get('intranet', 'vatpercent') / 100, 2, ",", "."), // opm�rksom p� at vat bliver rigtig defineret
188
+                    'amount' => number_format($total_with_vat*$this->kernel->setting->get('intranet', 'vatpercent')/100, 2, ",", "."), // opm�rksom p� at vat bliver rigtig defineret
189 189
                     'debet_account_number' => $debet_account->get('number'),
190 190
                     'credit_account_number' => $credit_account->get('number'),
191 191
                     'vat_off' => 1,
192
-                    'text' => $text.' #' . $this->get('number') . ' - ' . $debet_account->get('name')
192
+                    'text' => $text.' #'.$this->get('number').' - '.$debet_account->get('name')
193 193
             );
194 194
             if (!$voucher->saveInDaybook($input_values, true)) {
195 195
                 $this->error->merge($voucher->error->getMessage());
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
         require_once 'Intraface/modules/accounting/VoucherFile.php';
200 200
         $voucher_file = new VoucherFile($voucher);
201
-        if (!$voucher_file->save(array('description' => $text.' #' . $this->get('number'), 'belong_to'=>'credit_note','belong_to_id'=>$this->get('id')))) {
201
+        if (!$voucher_file->save(array('description' => $text.' #'.$this->get('number'), 'belong_to'=>'credit_note', 'belong_to_id'=>$this->get('id')))) {
202 202
             $this->error->merge($voucher_file->error->getMessage());
203 203
             $this->error->set('Filen blev ikke overflyttet');
204 204
         }
Please login to merge, or discard this patch.
src/Intraface/modules/invoice/Pdf/Reminder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             if ($line == "") {
62 62
                 $this->doc->setY('-'.$this->doc->get('font_spacing'));
63 63
 
64
-                if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
64
+                if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
65 65
                     $this->doc->nextPage(true);
66 66
                 }
67 67
             } else {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
               
72 72
                     $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
73 73
 
74
-                    if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
74
+                    if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
75 75
                         $this->doc->nextPage(true);
76 76
                     }
77 77
                 }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
         $this->doc->setY('-20'); // space to product list
84 84
 
85
-        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 3) {
85
+        if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*3) {
86 86
             $this->doc->nextPage(true);
87 87
         }
88 88
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $this->doc->addText($apointX["text"], $this->doc->get('y'), $this->doc->get("font_size"), "Beskrivelse");
97 97
         $this->doc->addText($apointX["invoice_date"], $this->doc->get('y'), $this->doc->get("font_size"), "Dato");
98 98
         $this->doc->addText($apointX["due_date"], $this->doc->get('y'), $this->doc->get("font_size"), "Forfaldsdato");
99
-        $this->doc->addText($apointX["amount"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Beløb") -3, $this->doc->get('y'), $this->doc->get("font_size"), "Bel�b");
99
+        $this->doc->addText($apointX["amount"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Beløb") - 3, $this->doc->get('y'), $this->doc->get("font_size"), "Bel�b");
100 100
 
101 101
         $this->doc->setY('-'.($this->doc->get("font_spacing") - $this->doc->get("font_size")));
102 102
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
130 130
             $total += $items[$i]["arrears"];
131 131
 
132
-            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
132
+            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
133 133
                 $this->doc->nextPage(true);
134 134
             }
135 135
         }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
155 155
             $total += $items[$i]["reminder_fee"];
156 156
 
157
-            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
157
+            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
158 158
                 $this->doc->nextPage(true);
159 159
             }
160 160
         }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             $this->doc->setY('-'.$this->doc->get("font_padding_bottom"));
176 176
             $total += $reminder->get("reminder_fee");
177 177
 
178
-            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) {
178
+            if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) {
179 179
                 $this->doc->nextPage(true);
180 180
             }
181 181
         }
Please login to merge, or discard this patch.
src/Intraface/modules/email/Controller/templates/show.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
     <?php if ($email->get('status') != 'sent') : ?>
6 6
     <li><a href="<?php e(url(null, array('edit'))); ?>"><?php e(t('Edit')); ?></a></li>
7 7
     <?php endif; ?>
8
-    <li><a class="pdf" href="<?php e(url(null . '.pdf')); ?>"><?php e(t('Pdf')); ?></a></li>
8
+    <li><a class="pdf" href="<?php e(url(null.'.pdf')); ?>"><?php e(t('Pdf')); ?></a></li>
9 9
 </ul>
10 10
 
11 11
 <?php if ($email->get('status') == 'sent') : ?>
Please login to merge, or discard this patch.
src/Intraface/modules/email/Controller/Email.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         $value = $email->get();
18 18
         $contact = $email->getContact();
19 19
 
20
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/show');
20
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/show');
21 21
         $data = array(
22 22
             'contact' => $contact,
23 23
             'value' => $value,
@@ -35,18 +35,18 @@  discard block
 block discarded – undo
35 35
         $size = 12; // font size
36 36
 
37 37
         // udskriv adressehoved
38
-        $text = $this->getEmail()->getContact()->address->get('name') .
39
-            "\n" . $this->getEmail()->getContact()->address->get('address') .
40
-            "\n" . $this->getEmail()->getContact()->address->get('postcode') .
41
-            "  " . $this->getEmail()->getContact()->address->get('city') . "\n\n\n";
38
+        $text = $this->getEmail()->getContact()->address->get('name').
39
+            "\n".$this->getEmail()->getContact()->address->get('address').
40
+            "\n".$this->getEmail()->getContact()->address->get('postcode').
41
+            "  ".$this->getEmail()->getContact()->address->get('city')."\n\n\n";
42 42
 
43 43
         $pdf->ezText($text, $size);
44 44
 
45 45
         // uskriv subject
46
-        $pdf->ezText($this->getEmail()->get('subject') . "\n\n", $size);
46
+        $pdf->ezText($this->getEmail()->get('subject')."\n\n", $size);
47 47
 
48 48
         // udskriv body
49
-        $pdf->ezText($this->getEmail()->get('body') . "\n", $size);
49
+        $pdf->ezText($this->getEmail()->get('body')."\n", $size);
50 50
 
51 51
         // udskriv greeting
52 52
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $contact = $email->getContact();
105 105
         $redirect = Intraface_Redirect::factory($this->getKernel(), 'receive');
106 106
 
107
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/edit');
107
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/edit');
108 108
         $data = array(
109 109
             'contact' => $contact,
110 110
             'value' => $value,
Please login to merge, or discard this patch.
src/Intraface/modules/onlinepayment/OnlinePayment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -664,7 +664,7 @@
 block discarded – undo
664 664
 
665 665
     function getStatus()
666 666
     {
667
-        $status =  $this->getStatusTypes();
667
+        $status = $this->getStatusTypes();
668 668
         return $status[$this->value['status_key']];
669 669
     }
670 670
 }
Please login to merge, or discard this patch.
src/Intraface/modules/onlinepayment/provider/DanDomain.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,8 +142,8 @@
 block discarded – undo
142 142
 
143 143
     function getSettings()
144 144
     {
145
-        $this->value['password'] =  $this->kernel->setting->get('intranet', 'onlinepayment.dandomain.password');
146
-        $this->value['merchant_id'] =   $this->kernel->setting->get('intranet', 'onlinepayment.dandomain.merchant_id');
145
+        $this->value['password'] = $this->kernel->setting->get('intranet', 'onlinepayment.dandomain.password');
146
+        $this->value['merchant_id'] = $this->kernel->setting->get('intranet', 'onlinepayment.dandomain.merchant_id');
147 147
         return $this->value;
148 148
     }
149 149
 
Please login to merge, or discard this patch.
src/Intraface/modules/onlinepayment/provider/QuickPay.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->quickpay = new quickpay;
59 59
         $this->quickpay->set_md5checkword($this->settings['md5_secret']);
60 60
         $this->quickpay->set_merchant($this->settings['merchant_id']);
61
-        $this->quickpay->set_curl_certificate(dirname(__FILE__) . '/../../../certificates/cacert.pem');
61
+        $this->quickpay->set_curl_certificate(dirname(__FILE__).'/../../../certificates/cacert.pem');
62 62
 
63 63
         // hvordan bliver disse sat - og hvad er det n�jagtigt?
64 64
         $this->quickpay->set_posc($this->posc);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
             // henter bel�bene fra denne onlinebetaling
106 106
             $this->quickpay->set_transaction($this->get('transaction_number'));
107
-            $this->quickpay->set_amount(round($this->get('amount') * 100));
107
+            $this->quickpay->set_amount(round($this->get('amount')*100));
108 108
 
109 109
             $this->eval = $this->quickpay->capture();
110 110
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                 $this->setStatus("reversed");
131 131
                 return true;
132 132
             } else {
133
-                $this->error->set('Betalingen kunne ikke tilbagebetales: ' . $this->eval['qpstatmsg']);
133
+                $this->error->set('Betalingen kunne ikke tilbagebetales: '.$this->eval['qpstatmsg']);
134 134
                 return false;
135 135
             }
136 136
         } else {
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
      */
185 185
     function getSettings()
186 186
     {
187
-        $this->value['md5_secret'] =    $this->kernel->setting->get('intranet', 'onlinepayment.quickpay.md5_secret');
188
-        $this->value['merchant_id'] =   $this->kernel->setting->get('intranet', 'onlinepayment.quickpay.merchant_id');
187
+        $this->value['md5_secret'] = $this->kernel->setting->get('intranet', 'onlinepayment.quickpay.md5_secret');
188
+        $this->value['merchant_id'] = $this->kernel->setting->get('intranet', 'onlinepayment.quickpay.merchant_id');
189 189
         return $this->value;
190 190
     }
191 191
 
Please login to merge, or discard this patch.
src/Intraface/modules/onlinepayment/OnlinePaymentGateway.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $type = 'id';
27 27
         $db = new DB_Sql;
28
-        $db->query("SELECT provider_key FROM onlinepayment WHERE id = ".(int)$value. " AND intranet_id = " . $this->kernel->intranet->get('id'));
28
+        $db->query("SELECT provider_key FROM onlinepayment WHERE id = ".(int)$value." AND intranet_id = ".$this->kernel->intranet->get('id'));
29 29
         if (!$db->nextRecord()) {
30 30
             throw new Exception('OnlinePayment::factory: Ikke et gyldigt id');
31 31
         }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public function findByTransactionNumber($value)
46 46
     {
47 47
         $db = new DB_Sql;
48
-        $db->query("SELECT provider_key FROM onlinepayment WHERE transaction_number = '".$value."' AND intranet_id = " . $kernel->intranet->get('id'));
48
+        $db->query("SELECT provider_key FROM onlinepayment WHERE transaction_number = '".$value."' AND intranet_id = ".$kernel->intranet->get('id'));
49 49
         if (!$db->nextRecord()) {
50 50
             throw new Exception('OnlinePayment::factory: Ikke et gyldigt transactionnumber');
51 51
         }
Please login to merge, or discard this patch.
src/Intraface/modules/onlinepayment/Controller/Payment.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
         $value['dk_amount'] = $onlinepayment->get('dk_amount');
18 18
 
19
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/payment');
19
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/payment');
20 20
         return $smarty->render($this, array('value' => $value, 'kernel' => $this->context->getKernel(), 'onlinepayment' => $onlinepayment));
21 21
     }
22 22
 
Please login to merge, or discard this patch.