Completed
Pull Request — master (#26)
by Lars
10:03
created
src/Intraface/modules/debtor/Controller/templates/settings.tpl.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         <?php elseif (empty($scan_in_contact) or !is_object($scan_in_contact)) : ?>
79 79
         <input type="submit" name="add_scan_in_contact" value="<?php e(t('Choose contact')); ?>" />
80 80
         <?php else : ?>
81
-        <strong>Kontakt</strong>: <?php e($scan_in_contact->get('name') . ' <'.$scan_in_contact->address->get('email').'>'); ?> <input type="submit" name="delete_scan_in_contact" value="Slet kontakt" />
81
+        <strong>Kontakt</strong>: <?php e($scan_in_contact->get('name').' <'.$scan_in_contact->address->get('email').'>'); ?> <input type="submit" name="delete_scan_in_contact" value="Slet kontakt" />
82 82
         <?php endif; ?>
83 83
     </fieldset>
84 84
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,11 @@
 block discarded – undo
77 77
         <input type="hidden" name="scan_in_contact" value="<?php e($scan_in_contact->get('id')); ?>" />
78 78
         <?php elseif (empty($scan_in_contact) or !is_object($scan_in_contact)) : ?>
79 79
         <input type="submit" name="add_scan_in_contact" value="<?php e(t('Choose contact')); ?>" />
80
-        <?php else : ?>
81
-        <strong>Kontakt</strong>: <?php e($scan_in_contact->get('name') . ' <'.$scan_in_contact->address->get('email').'>'); ?> <input type="submit" name="delete_scan_in_contact" value="Slet kontakt" />
80
+        <?php else {
81
+    : ?>
82
+        <strong>Kontakt</strong>: <?php e($scan_in_contact->get('name') . ' <'.$scan_in_contact->address->get('email').'>');
83
+}
84
+?> <input type="submit" name="delete_scan_in_contact" value="Slet kontakt" />
82 85
         <?php endif; ?>
83 86
     </fieldset>
84 87
 
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/templates/edit.tpl.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
                     <?php
109 109
                 }
110 110
                 ?>
111
-                <option value="-1"><?php e(t('Create new', 'debtor') . ' >>'); ?></option>
111
+                <option value="-1"><?php e(t('Create new', 'debtor').' >>'); ?></option>
112 112
             </select>
113 113
         </div>
114 114
         <fieldset id="contactperson">
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,14 +10,20 @@
 block discarded – undo
10 10
         $module_administration = $context->getKernel()->useModule('administration');
11 11
         ?>
12 12
         <a href="<?php e($module_administration->getPath().'intranet_edit.php'); ?>"><?php e(t('Fill out address')); ?></a>.
13
-    <?php else : ?>
14
-        <?php e(t('You do not have access to fill out an adress. Please ask an administrator to do that.')); ?>
13
+    <?php else {
14
+    : ?>
15
+        <?php e(t('You do not have access to fill out an adress. Please ask an administrator to do that.'));
16
+}
17
+?>
15 18
     <?php endif; ?>
16 19
     </p>
17
-<?php else : ?>
20
+<?php else {
21
+    : ?>
18 22
 
19 23
 
20
-<?php echo $context->getDebtor()->error->view(); ?>
24
+<?php echo $context->getDebtor()->error->view();
25
+}
26
+?>
21 27
 
22 28
 <form action="<?php e(url(null, array($context->subview(), 'contact_id' => $context->getContact()->get('id')))); ?>" method="post">
23 29
 
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Item.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
         if (isset($_GET['change_product'])) {
33 33
             $redirect = Intraface_Redirect::factory($this->getKernel(), 'go');
34
-            $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('selectproduct'), NET_SCHEME . NET_HOST . $this->url());
34
+            $url = $redirect->setDestination(NET_SCHEME.NET_HOST.$this->url('selectproduct'), NET_SCHEME.NET_HOST.$this->url());
35 35
             $redirect->askParameter('product_id');
36 36
             return new k_SeeOther($url);
37 37
         }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         }
45 45
         */
46 46
 
47
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/item-edit');
47
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/item-edit');
48 48
         return $smarty->render($this);
49 49
     }
50 50
 
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Reminder.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             }
52 52
         }
53 53
 
54
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/reminder');
54
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/reminder');
55 55
         return $smarty->render($this);
56 56
     }
57 57
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             $checked_reminder[] = $reminders[$i]["reminder_id"];
83 83
         }
84 84
 
85
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/reminder-edit');
85
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/reminder-edit');
86 86
         return $smarty->render($this, array('value' => $value, 'checked_invoice' => $checked_invoice, 'checked_reminder' => $checked_reminder));
87 87
     }
88 88
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             throw new Exception('Kontaktpersonen har ikke nogen email');
181 181
         }
182 182
 
183
-        $subject  =     "Påmindelse om betaling";
183
+        $subject = "Påmindelse om betaling";
184 184
 
185 185
         $reminder_text = new Reminder_Text();
186 186
         $reminder_text->visit($reminder);
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         if ($id = $email->save($var)) {
219 219
             $redirect = new Intraface_Redirect($this->getKernel());
220 220
             $shared_email = $this->getKernel()->useModule('email');
221
-            $url = $redirect->setDestination($shared_email->getPath() . $id . '?edit', NET_SCHEME . NET_HOST . $this->url());
221
+            $url = $redirect->setDestination($shared_email->getPath().$id.'?edit', NET_SCHEME.NET_HOST.$this->url());
222 222
             $redirect->setIdentifier('send_email');
223 223
             $redirect->askParameter('send_email_status');
224 224
             return new k_SeeOther($url);
@@ -265,14 +265,14 @@  discard block
 block discarded – undo
265 265
 
266 266
     function visit(Reminder $reminder)
267 267
     {
268
-        $this->output .= "Dato: " . $reminder->get("dk_this_date") ."\n\n";
269
-        $this->output .= $reminder->contact->address->get("name") . "\n";
268
+        $this->output .= "Dato: ".$reminder->get("dk_this_date")."\n\n";
269
+        $this->output .= $reminder->contact->address->get("name")."\n";
270 270
         if ($reminder->get("attention_to") != "") {
271 271
             $this->output .= "Att.: ".$reminder->get("attention_to")."\n";
272 272
         }
273
-        $this->output .= $reminder->contact->address->get("address") . "\n";
274
-        $this->output .= $reminder->contact->address->get("postcode") . "  " .  $reminder->contact->address->get("city") ."\n\n";
275
-        $this->output .= $reminder->get("text") . "\n\n";
273
+        $this->output .= $reminder->contact->address->get("address")."\n";
274
+        $this->output .= $reminder->contact->address->get("postcode")."  ".$reminder->contact->address->get("city")."\n\n";
275
+        $this->output .= $reminder->get("text")."\n\n";
276 276
 
277 277
         // Overskrifter - Vareudskrivning
278 278
         $this->output .= "Beskrivelse          Dato        Forfaldsdato    Bel�b\n";
@@ -286,24 +286,24 @@  discard block
 block discarded – undo
286 286
             $j++) {
287 287
                 $this->output .= ' ';
288 288
             }
289
-                $this->output .= ' ' . $items[$i]["dk_this_date"];
290
-                $this->output .= '  ' . $items[$i]["dk_due_date"];
291
-                $this->output .= '      ' . number_format($items[$i]["arrears"], 2, ",", ".");
289
+                $this->output .= ' '.$items[$i]["dk_this_date"];
290
+                $this->output .= '  '.$items[$i]["dk_due_date"];
291
+                $this->output .= '      '.number_format($items[$i]["arrears"], 2, ",", ".");
292 292
                 $total += $items[$i]["arrears"];
293 293
         }
294 294
             $items = $reminder->item->getList("reminder");
295 295
         for ($i = 0, $max = count($items); $i < $max; $i++) {
296 296
             $this->output .= "\nTidl. rykkkergebyr  ";
297
-            $this->output .= ' ' . $items[$i]["dk_this_date"];
298
-            $this->output .= '  ' .$items[$i]["dk_due_date"];
299
-            $this->output .= '      ' . number_format($items[$i]["reminder_fee"], 2, ",", ".");
297
+            $this->output .= ' '.$items[$i]["dk_this_date"];
298
+            $this->output .= '  '.$items[$i]["dk_due_date"];
299
+            $this->output .= '      '.number_format($items[$i]["reminder_fee"], 2, ",", ".");
300 300
             $total += $items[$i]["reminder_fee"];
301 301
         }
302 302
         if ($reminder->get("reminder_fee") != 0) {
303 303
             $this->output .= "\nRykkergebyr                                      ".number_format($reminder->get("reminder_fee"), 2, ",", ".");
304 304
             $total += $reminder->get("reminder_fee");
305 305
         }
306
-            $this->output .= "\n\nTotal:                                           " . number_format($total, 2, ",", ".");
306
+            $this->output .= "\n\nTotal:                                           ".number_format($total, 2, ",", ".");
307 307
 
308 308
             $parameter = array(
309 309
                 "contact" => $reminder->contact,
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
                 "amount" => $total,
312 312
                 "due_date" => $reminder->get("dk_due_date"),
313 313
                 "girocode" => $reminder->get("girocode"));
314
-            $this->output .= "\n\nDet skyldige beløb betales senest: " . $parameter['due_date'];
314
+            $this->output .= "\n\nDet skyldige beløb betales senest: ".$parameter['due_date'];
315 315
 
316 316
             // TODO: change to payment_method
317 317
             switch ($reminder->get('payment_method_key')) {
@@ -321,16 +321,16 @@  discard block
 block discarded – undo
321 321
                     $this->output .= "\nBank:                ".$reminder->kernel->setting->get('intranet', 'bank_name');
322 322
                     $this->output .= "\nRegnr.:              ".$reminder->kernel->setting->get('intranet', 'bank_reg_number');
323 323
                     $this->output .= "\nKontonr.:            ".$reminder->kernel->setting->get('intranet', 'bank_account_number');
324
-                    $this->output .= "\nBesked til modtager: " . "Kunde #" . $reminder->contact->get("number");
324
+                    $this->output .= "\nBesked til modtager: "."Kunde #".$reminder->contact->get("number");
325 325
                     break;
326 326
                 case 3:
327 327
                     $this->output .= "\n\nBetaling via homebanking\n+71< ".str_repeat("0", 15 - strlen($parameter["girocode"])).$parameter["girocode"]." +".$kernel->setting->get('intranet', 'giro_account_number')."<";
328 328
                     break;
329 329
             }
330 330
 
331
-            $this->output .= "\n\nMed venlig hilsen\n\n" . $reminder->kernel->user->getAddress()->get("name") . "\n" .$reminder->kernel->intranet->get("name");
332
-            $this->output .= "\n" . $reminder->kernel->intranet->address->get("address");
333
-            $this->output .= "\n" . $reminder->kernel->intranet->address->get("postcode") . "  " . $reminder->kernel->intranet->address->get("city");
331
+            $this->output .= "\n\nMed venlig hilsen\n\n".$reminder->kernel->user->getAddress()->get("name")."\n".$reminder->kernel->intranet->get("name");
332
+            $this->output .= "\n".$reminder->kernel->intranet->address->get("address");
333
+            $this->output .= "\n".$reminder->kernel->intranet->address->get("postcode")."  ".$reminder->kernel->intranet->address->get("city");
334 334
     }
335 335
 
336 336
     public function getText()
Please login to merge, or discard this patch.
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/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/debtor/Controller/ReminderEmail.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@  discard block
 block discarded – undo
12 12
 
13 13
     function visit(Reminder $reminder)
14 14
     {
15
-        $this->output .= "Dato: " . $reminder->get("dk_this_date") ."\n\n";
16
-        $this->output .= $reminder->contact->address->get("name") . "\n";
15
+        $this->output .= "Dato: ".$reminder->get("dk_this_date")."\n\n";
16
+        $this->output .= $reminder->contact->address->get("name")."\n";
17 17
         if ($reminder->get("attention_to") != "") {
18 18
             $this->output .= "Att.: ".$reminder->get("attention_to")."\n";
19 19
         }
20
-        $this->output .= $reminder->contact->address->get("address") . "\n";
21
-        $this->output .= $reminder->contact->address->get("postcode") . "  " .  $reminder->contact->address->get("city") ."\n\n";
22
-        $this->output .= $reminder->get("text") . "\n\n";
20
+        $this->output .= $reminder->contact->address->get("address")."\n";
21
+        $this->output .= $reminder->contact->address->get("postcode")."  ".$reminder->contact->address->get("city")."\n\n";
22
+        $this->output .= $reminder->get("text")."\n\n";
23 23
 
24 24
         // Overskrifter - Vareudskrivning
25 25
         $this->output .= "Beskrivelse          Dato        Forfaldsdato    Beløb\n";
@@ -33,24 +33,24 @@  discard block
 block discarded – undo
33 33
             $j++) {
34 34
                 $this->output .= ' ';
35 35
             }
36
-                $this->output .= ' ' . $items[$i]["dk_this_date"];
37
-                $this->output .= '  ' . $items[$i]["dk_due_date"];
38
-                $this->output .= '      ' . number_format($items[$i]["arrears"], 2, ",", ".");
36
+                $this->output .= ' '.$items[$i]["dk_this_date"];
37
+                $this->output .= '  '.$items[$i]["dk_due_date"];
38
+                $this->output .= '      '.number_format($items[$i]["arrears"], 2, ",", ".");
39 39
                 $total += $items[$i]["arrears"];
40 40
         }
41 41
             $items = $reminder->item->getList("reminder");
42 42
         for ($i = 0, $max = count($items); $i < $max; $i++) {
43 43
             $this->output .= "\nTidl. rykkkergebyr  ";
44
-            $this->output .= ' ' . $items[$i]["dk_this_date"];
45
-            $this->output .= '  ' .$items[$i]["dk_due_date"];
46
-            $this->output .= '      ' . number_format($items[$i]["reminder_fee"], 2, ",", ".");
44
+            $this->output .= ' '.$items[$i]["dk_this_date"];
45
+            $this->output .= '  '.$items[$i]["dk_due_date"];
46
+            $this->output .= '      '.number_format($items[$i]["reminder_fee"], 2, ",", ".");
47 47
             $total += $items[$i]["reminder_fee"];
48 48
         }
49 49
         if ($reminder->get("reminder_fee") != 0) {
50 50
             $this->output .= "\nRykkergebyr                                      ".number_format($reminder->get("reminder_fee"), 2, ",", ".");
51 51
             $total += $reminder->get("reminder_fee");
52 52
         }
53
-            $this->output .= "\n\nTotal:                                           " . number_format($total, 2, ",", ".");
53
+            $this->output .= "\n\nTotal:                                           ".number_format($total, 2, ",", ".");
54 54
 
55 55
             $parameter = array(
56 56
                 "contact" => $reminder->contact,
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 "amount" => $total,
59 59
                 "due_date" => $reminder->get("dk_due_date"),
60 60
                 "girocode" => $reminder->get("girocode"));
61
-            $this->output .= "\n\nDet skyldige beløb betales senest: " . $parameter['due_date'];
61
+            $this->output .= "\n\nDet skyldige beløb betales senest: ".$parameter['due_date'];
62 62
 
63 63
             // TODO: change to payment_method
64 64
             switch ($reminder->get('payment_method_key')) {
@@ -68,16 +68,16 @@  discard block
 block discarded – undo
68 68
                     $this->output .= "\nBank:                ".$reminder->kernel->setting->get('intranet', 'bank_name');
69 69
                     $this->output .= "\nRegnr.:              ".$reminder->kernel->setting->get('intranet', 'bank_reg_number');
70 70
                     $this->output .= "\nKontonr.:            ".$reminder->kernel->setting->get('intranet', 'bank_account_number');
71
-                    $this->output .= "\nBesked til modtager: " . "Kunde #" . $reminder->contact->get("number");
71
+                    $this->output .= "\nBesked til modtager: "."Kunde #".$reminder->contact->get("number");
72 72
                     break;
73 73
                 case 3:
74 74
                     $this->output .= "\n\nBetaling via homebanking\n+71< ".str_repeat("0", 15 - strlen($parameter["girocode"])).$parameter["girocode"]." +".$this->context->getKernel()->setting->get('intranet', 'giro_account_number')."<";
75 75
                     break;
76 76
             }
77 77
 
78
-            $this->output .= "\n\nMed venlig hilsen\n\n" . $reminder->kernel->user->getAddress()->get("name") . "\n" .$reminder->kernel->intranet->get("name");
79
-            $this->output .= "\n" . $reminder->kernel->intranet->address->get("address");
80
-            $this->output .= "\n" . $reminder->kernel->intranet->address->get("postcode") . "  " . $reminder->kernel->intranet->address->get("city");
78
+            $this->output .= "\n\nMed venlig hilsen\n\n".$reminder->kernel->user->getAddress()->get("name")."\n".$reminder->kernel->intranet->get("name");
79
+            $this->output .= "\n".$reminder->kernel->intranet->address->get("address");
80
+            $this->output .= "\n".$reminder->kernel->intranet->address->get("postcode")."  ".$reminder->kernel->intranet->address->get("city");
81 81
     }
82 82
 
83 83
     public function getText()
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             throw new Exception('Kontaktpersonen har ikke nogen email');
109 109
         }
110 110
 
111
-        $subject  =     "Påmindelse om betaling";
111
+        $subject = "Påmindelse om betaling";
112 112
 
113 113
         $reminder_text = new Reminder_Text();
114 114
         $reminder_text->visit($reminder);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         if ($id = $email->save($var)) {
147 147
             $redirect = new Intraface_Redirect($this->context->getKernel());
148 148
             $shared_email = $this->context->getKernel()->useModule('email');
149
-            $url = $redirect->setDestination($shared_email->getPath().$id . '?edit', NET_SCHME . NET_HOST . $this->context->url());
149
+            $url = $redirect->setDestination($shared_email->getPath().$id.'?edit', NET_SCHME.NET_HOST.$this->context->url());
150 150
             $redirect->setIdentifier('send_email');
151 151
             $redirect->askParameter('send_email_status');
152 152
             return new k_SeeOther($url);
Please login to merge, or discard this patch.