@@ -54,7 +54,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -27,7 +27,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -24,7 +24,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | function renderHtml() |
24 | 24 | { |
25 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/index'); |
|
25 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/index'); |
|
26 | 26 | return $smarty->render($this); |
27 | 27 | } |
28 | 28 |
@@ -12,14 +12,14 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -66,7 +66,7 @@ |
||
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> |
@@ -65,8 +65,11 @@ |
||
65 | 65 | <td><?php e($payment['amount']); ?></td> |
66 | 66 | <?php if ($payment['is_stated']) : ?> |
67 | 67 | <td><?php e(t('Yes')); ?></td> |
68 | - <?php else : ?> |
|
69 | - <td><a href="<?php e(url($payment['id'] . '/state')); ?>"><?php e(t('No')); ?></a></td> |
|
68 | + <?php else { |
|
69 | + : ?> |
|
70 | + <td><a href="<?php e(url($payment['id'] . '/state')); |
|
71 | +} |
|
72 | +?>"><?php e(t('No')); ?></a></td> |
|
70 | 73 | <?php endif; ?> |
71 | 74 | |
72 | 75 | </tr> |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | function renderHtml() |
24 | 24 | { |
25 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/index'); |
|
25 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/index'); |
|
26 | 26 | return $smarty->render($this); |
27 | 27 | } |
28 | 28 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | $this->hasOne( |
26 | 26 | 'Intraface_modules_product_Attribute_Group as attribute_group', |
27 | - array('local' => 'product_attribute_group_id','foreign' => 'id') |
|
27 | + array('local' => 'product_attribute_group_id', 'foreign' => 'id') |
|
28 | 28 | ); |
29 | 29 | } |
30 | 30 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | $data = array('product' => $product, 'groups' => $groups); |
36 | 36 | |
37 | - $smarty = $this->template->create(dirname(__FILE__) . '/tpl/productattributegroup'); |
|
37 | + $smarty = $this->template->create(dirname(__FILE__).'/tpl/productattributegroup'); |
|
38 | 38 | return $smarty->render($this, $data); |
39 | 39 | } |
40 | 40 |