@@ -8,6 +8,6 @@ |
||
8 | 8 | |
9 | 9 | public function getIdentifier() |
10 | 10 | { |
11 | - return 'BankTransfer'; |
|
11 | + return 'BankTransfer'; |
|
12 | 12 | } |
13 | 13 | } |
@@ -8,6 +8,6 @@ |
||
8 | 8 | |
9 | 9 | function getIdentifier() |
10 | 10 | { |
11 | - return 'CashOnDelivery'; |
|
11 | + return 'CashOnDelivery'; |
|
12 | 12 | } |
13 | 13 | } |
@@ -53,17 +53,17 @@ |
||
53 | 53 | function output($type = 'string', $filename = 'debtor.pdf') |
54 | 54 | { |
55 | 55 | switch ($type) { |
56 | - case 'string': |
|
57 | - return $this->doc->output(); |
|
58 | - break; |
|
59 | - case 'file': |
|
60 | - $data = $this->doc->output(); |
|
61 | - return $this->doc->writeDocument($data, $filename); |
|
62 | - break; |
|
63 | - case 'stream': |
|
64 | - default: |
|
65 | - return $this->doc->stream(); |
|
66 | - break; |
|
56 | + case 'string': |
|
57 | + return $this->doc->output(); |
|
58 | + break; |
|
59 | + case 'file': |
|
60 | + $data = $this->doc->output(); |
|
61 | + return $this->doc->writeDocument($data, $filename); |
|
62 | + break; |
|
63 | + case 'stream': |
|
64 | + default: |
|
65 | + return $this->doc->stream(); |
|
66 | + break; |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $box_padding_top = 8; // space from top box to first line |
88 | 88 | $box_padding_bottom = 9; |
89 | 89 | $box_width = 275; // ($page_width - $margin_left - 10)/2; |
90 | - $box_small_height = $this->doc->get("font_spacing") * 3 + $box_padding_top + $box_padding_bottom + 2; |
|
90 | + $box_small_height = $this->doc->get("font_spacing")*3 + $box_padding_top + $box_padding_bottom + 2; |
|
91 | 91 | |
92 | 92 | // Write the receiver |
93 | 93 | $this->doc->setY('-'.$this->doc->get("font_spacing")); // $pointY -= $box_padding_top; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | if ($i == 2) $i = count($line); |
152 | 152 | } |
153 | 153 | $this->doc->addText($this->doc->get('x') + 10, $this->doc->get('y'), $this->doc->get("font_size"), $intranet["postcode"]." ".$intranet["city"]); |
154 | - $this->doc->setY('-'.($this->doc->get("font_spacing") * 2)); // $pointY -= $this->doc->get("font_spacing") * 2; |
|
154 | + $this->doc->setY('-'.($this->doc->get("font_spacing")*2)); // $pointY -= $this->doc->get("font_spacing") * 2; |
|
155 | 155 | |
156 | 156 | $this->doc->addText($this->doc->get('x') + 10, $this->doc->get('y'), $this->doc->get("font_size"), "CVR.:"); |
157 | 157 | $this->doc->addText($this->doc->get('x') + 10 + 60, $this->doc->get('y'), $this->doc->get("font_size"), $intranet["cvr"]); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | if (is_array($docinfo) && count($docinfo) > 0) { |
189 | 189 | $this->doc->setY('-10'); // $pointY -= 10; |
190 | 190 | $box_small_top = $this->doc->get('y'); |
191 | - $box_small_height = count($docinfo) * $this->doc->get("font_spacing") + $box_padding_top + $box_padding_bottom; |
|
191 | + $box_small_height = count($docinfo)*$this->doc->get("font_spacing") + $box_padding_top + $box_padding_bottom; |
|
192 | 192 | $this->doc->setY('-'.$box_padding_top); // $pointY -= $box_padding_top; |
193 | 193 | |
194 | 194 | for ($i = 0; $i < count($docinfo); $i++) { |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $payment_left = 230; |
281 | 281 | $payment_right = $this->doc->get("right_margin_position") - $this->doc->get("margin_left") - $payment_left; |
282 | 282 | |
283 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") + 4 + $payment_line * 3) { |
|
283 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") + 4 + $payment_line*3) { |
|
284 | 284 | $this->doc->nextPage(true); |
285 | 285 | } |
286 | 286 | |
@@ -298,10 +298,10 @@ discard block |
||
298 | 298 | |
299 | 299 | if ($payment_method == 1) { |
300 | 300 | |
301 | - $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line * 2, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line * 2); |
|
302 | - $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line * 2, $this->doc->get('x') + $payment_left, $this->doc->get('y')); |
|
301 | + $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line*2, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line*2); |
|
302 | + $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line*2, $this->doc->get('x') + $payment_left, $this->doc->get('y')); |
|
303 | 303 | $this->doc->line($this->doc->get('x'), $this->doc->get('y') - $payment_line, $this->doc->get("right_margin_position"), $this->doc->get('y') - $payment_line); |
304 | - $this->doc->line($this->doc->get('x') + $payment_left / 2, $this->doc->get('y') - $payment_line * 2, $this->doc->get('x') + $payment_left / 2, $this->doc->get('y') - $payment_line); |
|
304 | + $this->doc->line($this->doc->get('x') + $payment_left/2, $this->doc->get('y') - $payment_line*2, $this->doc->get('x') + $payment_left/2, $this->doc->get('y') - $payment_line); |
|
305 | 305 | |
306 | 306 | $this->doc->setY('-7'); // $pointY -= 7; |
307 | 307 | $this->doc->addText($this->doc->get('x') + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Bank:"); |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | $this->doc->setValue('y', $payment_start - $payment_line); // Sets exact position |
326 | 326 | $this->doc->setY('-7'); // $pointY -= 7; |
327 | 327 | |
328 | - $this->doc->addText($this->doc->get('x') + $payment_left / 2 + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Betalingsdato:"); |
|
328 | + $this->doc->addText($this->doc->get('x') + $payment_left/2 + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Betalingsdato:"); |
|
329 | 329 | $this->doc->setY('-'.($payment_line - 12)); |
330 | - $this->doc->addText($this->doc->get('x') + $payment_left / 2 + 10, $this->doc->get('y'), $this->doc->get("font_size"), $parameter["due_date"]); |
|
330 | + $this->doc->addText($this->doc->get('x') + $payment_left/2 + 10, $this->doc->get('y'), $this->doc->get("font_size"), $parameter["due_date"]); |
|
331 | 331 | |
332 | 332 | $this->doc->setValue('y', $payment_start - $payment_line); // Sets exact position |
333 | 333 | $this->doc->setY('-7'); |
@@ -339,11 +339,11 @@ discard block |
||
339 | 339 | |
340 | 340 | } elseif ($payment_method == 2) { |
341 | 341 | |
342 | - $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line * 3, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line * 3); |
|
343 | - $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line * 3, $this->doc->get('x') + $payment_left, $this->doc->get('y')); |
|
342 | + $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line*3, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line*3); |
|
343 | + $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line*3, $this->doc->get('x') + $payment_left, $this->doc->get('y')); |
|
344 | 344 | $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line, $this->doc->get("right_margin_position"), $this->doc->get('y') - $payment_line); |
345 | - $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line * 2, $this->doc->get("right_margin_position"), $this->doc->get('y') - $payment_line * 2); |
|
346 | - $this->doc->line($this->doc->get('x') + $payment_left + $payment_right / 2, $this->doc->get('y') - $payment_line * 2, $this->doc->get('x') + $payment_left + $payment_right / 2, $this->doc->get('y') - $payment_line); |
|
345 | + $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line*2, $this->doc->get("right_margin_position"), $this->doc->get('y') - $payment_line*2); |
|
346 | + $this->doc->line($this->doc->get('x') + $payment_left + $payment_right/2, $this->doc->get('y') - $payment_line*2, $this->doc->get('x') + $payment_left + $payment_right/2, $this->doc->get('y') - $payment_line); |
|
347 | 347 | |
348 | 348 | $this->doc->setY('-7'); |
349 | 349 | $this->doc->addText($this->doc->get('x') + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Indbetaler:"); |
@@ -376,11 +376,11 @@ discard block |
||
376 | 376 | $this->doc->setValue('y', $payment_start - $payment_line); // Sets exact position |
377 | 377 | $this->doc->setY('-7'); |
378 | 378 | |
379 | - $this->doc->addText($this->doc->get('x') + $payment_left + $payment_right / 2 + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Betalingsdato:"); |
|
379 | + $this->doc->addText($this->doc->get('x') + $payment_left + $payment_right/2 + 4, $this->doc->get('y'), $this->doc->get("font_size") - 4, "Betalingsdato:"); |
|
380 | 380 | $this->doc->setY('-'.($payment_line - 12)); |
381 | - $this->doc->addText($this->doc->get('x') + $payment_left + $payment_right / 2 + 10, $this->doc->get('y'), $this->doc->get("font_size"), $parameter["due_date"]); |
|
381 | + $this->doc->addText($this->doc->get('x') + $payment_left + $payment_right/2 + 10, $this->doc->get('y'), $this->doc->get("font_size"), $parameter["due_date"]); |
|
382 | 382 | |
383 | - $this->doc->setValue('y', $payment_start - $payment_line * 2); // Sets exact position |
|
383 | + $this->doc->setValue('y', $payment_start - $payment_line*2); // Sets exact position |
|
384 | 384 | $this->doc->setY('-7'); |
385 | 385 | |
386 | 386 | |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | $this->doc->addText($this->doc->get('x') + $payment_left + 10, $this->doc->get('y'), $this->doc->get('font_size'), $this_text); |
393 | 393 | } elseif ($payment_method == 3) { |
394 | 394 | |
395 | - $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line * 2, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line * 2); |
|
395 | + $this->doc->rectangle($this->doc->get('x'), $this->doc->get('y') - $payment_line*2, $this->doc->get("right_margin_position") - $this->doc->get("margin_left"), $payment_line*2); |
|
396 | 396 | $this->doc->line($this->doc->get("margin_left"), $this->doc->get('y') - $payment_line, $this->doc->get("right_margin_position"), $this->doc->get('y') - $payment_line); |
397 | 397 | $this->doc->line($this->doc->get('x') + $payment_left, $this->doc->get('y'), $this->doc->get('x') + $payment_left, $this->doc->get('y') - $payment_line); |
398 | 398 |
@@ -107,7 +107,9 @@ discard block |
||
107 | 107 | $this->doc->addText($this->doc->get('x') + 10, $this->doc->get('y'), $this->doc->get("font_size"), $line[$i]); |
108 | 108 | $this->doc->setY('-'.$this->doc->get("font_spacing")); |
109 | 109 | |
110 | - if ($i == 2) $i = count($line); |
|
110 | + if ($i == 2) { |
|
111 | + $i = count($line); |
|
112 | + } |
|
111 | 113 | } |
112 | 114 | $this->doc->addText($this->doc->get('x') + 10, $this->doc->get('y'), $this->doc->get("font_size"), $contact["postcode"]." ".$contact["city"]); |
113 | 115 | $this->doc->setY('-'.$this->doc->get("font_spacing")); |
@@ -148,7 +150,9 @@ discard block |
||
148 | 150 | for ($i = 0; $i < count($line); $i++) { |
149 | 151 | $this->doc->addText($this->doc->get('x') + 10, $this->doc->get('y'), $this->doc->get("font_size"), $line[$i]); |
150 | 152 | $this->doc->setY('-'.$this->doc->get("font_spacing")); // $pointY -= $this->doc->get("font_spacing"); |
151 | - if ($i == 2) $i = count($line); |
|
153 | + if ($i == 2) { |
|
154 | + $i = count($line); |
|
155 | + } |
|
152 | 156 | } |
153 | 157 | $this->doc->addText($this->doc->get('x') + 10, $this->doc->get('y'), $this->doc->get("font_size"), $intranet["postcode"]." ".$intranet["city"]); |
154 | 158 | $this->doc->setY('-'.($this->doc->get("font_spacing") * 2)); // $pointY -= $this->doc->get("font_spacing") * 2; |
@@ -355,7 +359,9 @@ discard block |
||
355 | 359 | for ($i = 0; $i < count($line); $i++) { |
356 | 360 | $this->doc->addText($this->doc->get('x') + 10, $this->doc->get('y'), $this->doc->get("font_size"), $line[$i]); |
357 | 361 | $this->doc->setY('-'.$this->doc->get('font_spacing')); |
358 | - if ($i == 2) $i = count($line); |
|
362 | + if ($i == 2) { |
|
363 | + $i = count($line); |
|
364 | + } |
|
359 | 365 | } |
360 | 366 | $this->doc->addText($this->doc->get('x') + 10, $this->doc->get('y'), $this->doc->get("font_size"), $parameter["contact"]->address->get("postcode")." ".$parameter["contact"]->address->get("city")); |
361 | 367 |
@@ -89,7 +89,7 @@ |
||
89 | 89 | */ |
90 | 90 | public function getAmount() |
91 | 91 | { |
92 | - return new Ilib_Variable_Float($this->getQuantity()->getAsIso(2) * $this->getProductPriceObject()->getPriceIncludingVat($this->getProduct())->getAsIso(2), 'iso'); |
|
92 | + return new Ilib_Variable_Float($this->getQuantity()->getAsIso(2)*$this->getProductPriceObject()->getPriceIncludingVat($this->getProduct())->getAsIso(2), 'iso'); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | public function getQuantity() |
@@ -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'; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | throw new Exception('Oplysninger om filen kunne ikke opdateres'); |
130 | 130 | } |
131 | 131 | |
132 | - switch($this->getKernel()->getSetting()->get('intranet', 'debtor.sender')) { |
|
132 | + switch ($this->getKernel()->getSetting()->get('intranet', 'debtor.sender')) { |
|
133 | 133 | case 'intranet': |
134 | 134 | $from_email = ''; |
135 | 135 | $from_name = ''; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | if (!$email->save(array( |
155 | 155 | 'contact_id' => $contact->get('id'), |
156 | 156 | 'subject' => $subject, |
157 | - 'body' => $body . "\n\n" . $signature->getAsText(), |
|
157 | + 'body' => $body."\n\n".$signature->getAsText(), |
|
158 | 158 | 'from_email' => $from_email, |
159 | 159 | 'from_name' => $from_name, |
160 | 160 | 'type_id' => 10, // electronic invoice |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $shared_email = $this->getKernel()->useModule('email'); |
175 | 175 | |
176 | 176 | // First vi set the last, because we need this id to the first. |
177 | - $url = $redirect->setDestination($shared_email->getPath().$email->get('id') . '?edit', NET_SCHEME . NET_HOST . $this->url()); |
|
177 | + $url = $redirect->setDestination($shared_email->getPath().$email->get('id').'?edit', NET_SCHEME.NET_HOST.$this->url()); |
|
178 | 178 | $redirect->setIdentifier('send_onlinepaymentlink'); |
179 | 179 | $redirect->askParameter('send_onlinepaymentlink_status'); |
180 | 180 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | // @todo vi skulle faktisk kun videre, hvis det ikke er en tilbagebetaling eller hvad? |
216 | 216 | if ($this->getDebtor()->get("type") == "invoice" && $this->getDebtor()->get("status") == "sent" AND !$this->onlinepayment->error->isError()) { |
217 | 217 | if ($this->getKernel()->user->hasModuleAccess('accounting')) { |
218 | - return new k_SeeOther($this->url('payment/' . $this->onlinepayment->get('create_payment_id') . '/state')); |
|
218 | + return new k_SeeOther($this->url('payment/'.$this->onlinepayment->get('create_payment_id').'/state')); |
|
219 | 219 | } |
220 | 220 | } |
221 | 221 | } |
@@ -226,8 +226,8 @@ discard block |
||
226 | 226 | $debtor_module = $this->getKernel()->module('debtor'); |
227 | 227 | $contact_module = $this->getKernel()->getModule('contact'); |
228 | 228 | $redirect = Intraface_Redirect::factory($this->getKernel(), 'go'); |
229 | - $url = $redirect->setDestination($contact_module->getPath().intval($this->getDebtor()->contact->get('id') . '&edit'), NET_SCHEME . NET_HOST . $this->url()); |
|
230 | - return new k_SeeOther($url . '&edit'); |
|
229 | + $url = $redirect->setDestination($contact_module->getPath().intval($this->getDebtor()->contact->get('id').'&edit'), NET_SCHEME.NET_HOST.$this->url()); |
|
230 | + return new k_SeeOther($url.'&edit'); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | // Redirect til tilføj produkt |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $product_module = $this->getKernel()->useModule('product'); |
237 | 237 | $redirect->setIdentifier('add_item'); |
238 | 238 | |
239 | - $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('selectproduct', array('set_quantity' => true)), NET_SCHEME . NET_HOST . $this->url()); |
|
239 | + $url = $redirect->setDestination(NET_SCHEME.NET_HOST.$this->url('selectproduct', array('set_quantity' => true)), NET_SCHEME.NET_HOST.$this->url()); |
|
240 | 240 | |
241 | 241 | $redirect->askParameter('product_id', 'multiple'); |
242 | 242 | |
@@ -288,13 +288,13 @@ discard block |
||
288 | 288 | } |
289 | 289 | $contact_module = $this->getKernel()->getModule('contact'); |
290 | 290 | |
291 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/show'); |
|
291 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/show'); |
|
292 | 292 | return $tpl->render($this); |
293 | 293 | } |
294 | 294 | |
295 | 295 | function renderHtmlEdit() |
296 | 296 | { |
297 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/edit'); |
|
297 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/edit'); |
|
298 | 298 | return $tpl->render($this); |
299 | 299 | } |
300 | 300 | |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | $this->getKernel()->useModule("invoice"); |
344 | 344 | $invoice = new Invoice($this->getKernel()); |
345 | 345 | if ($id = $invoice->create($this->getDebtor())) { |
346 | - return new k_SeeOther($this->url('../' . $id)); |
|
346 | + return new k_SeeOther($this->url('../'.$id)); |
|
347 | 347 | } |
348 | 348 | } |
349 | 349 | } |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | $invoice->setStatus('executed'); |
391 | 391 | } |
392 | 392 | |
393 | - return new k_SeeOther($this->url('../' . $invoice->get('id'))); |
|
393 | + return new k_SeeOther($this->url('../'.$invoice->get('id'))); |
|
394 | 394 | } |
395 | 395 | } |
396 | 396 | |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | } |
421 | 421 | |
422 | 422 | $this->getDebtor()->setStatus('executed'); |
423 | - return new k_SeeOther($this->url(null . '.pdf')); |
|
423 | + return new k_SeeOther($this->url(null.'.pdf')); |
|
424 | 424 | } |
425 | 425 | } |
426 | 426 | |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | case 'intranet': |
553 | 553 | if ($this->getKernel()->intranet->address->get('name') == '' || $this->getKernel()->intranet->address->get('email') == '') { |
554 | 554 | if ($this->getKernel()->user->hasModuleAccess('administration')) { |
555 | - $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>'; |
|
555 | + $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>'; |
|
556 | 556 | } else { |
557 | 557 | $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>'; |
558 | 558 | |
@@ -669,14 +669,14 @@ discard block |
||
669 | 669 | |
670 | 670 | function renderOioxml() |
671 | 671 | { |
672 | - require_once dirname(__FILE__) . '/../Visitor/OIOXML.php'; |
|
672 | + require_once dirname(__FILE__).'/../Visitor/OIOXML.php'; |
|
673 | 673 | $render = new Debtor_Report_OIOXML; |
674 | 674 | return $render->output($this->getDebtor()); |
675 | 675 | } |
676 | 676 | |
677 | 677 | function renderTxt() |
678 | 678 | { |
679 | - require_once dirname(__FILE__) . '/../Visitor/Text.php'; |
|
679 | + require_once dirname(__FILE__).'/../Visitor/Text.php'; |
|
680 | 680 | $render = new Debtor_Report_Text; |
681 | 681 | return $render->output($this->getDebtor()); |
682 | 682 | } |
@@ -442,9 +442,7 @@ |
||
442 | 442 | |
443 | 443 | $this->onlinepayment->setStatus('cancelled'); |
444 | 444 | $this->getDebtor()->load(); |
445 | - } |
|
446 | - |
|
447 | - else { |
|
445 | + } else { |
|
448 | 446 | $debtor = $this->getDebtor(); |
449 | 447 | $contact = new Contact($this->getKernel(), $_POST["contact_id"]); |
450 | 448 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | // vi skal lige have oversat den her rigtigt |
31 | - $subject = $translation->get($debtor->get('type')) . ' #' . $debtor->get('number'); |
|
31 | + $subject = $translation->get($debtor->get('type')).' #'.$debtor->get('number'); |
|
32 | 32 | |
33 | 33 | // hvad skal den skrive her? |
34 | 34 | if ($debtor->get('type') == 'order') { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | $subject = 'Elektronisk faktura'; |
65 | - $body = 'Hermed faktura #' . $debtor->get('number') . ' til at læse ind'; |
|
65 | + $body = 'Hermed faktura #'.$debtor->get('number').' til at læse ind'; |
|
66 | 66 | |
67 | 67 | break; |
68 | 68 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | } |
106 | 106 | |
107 | - switch($this->context->getKernel()->getSetting()->get('intranet', 'debtor.sender')) { |
|
107 | + switch ($this->context->getKernel()->getSetting()->get('intranet', 'debtor.sender')) { |
|
108 | 108 | case 'intranet': |
109 | 109 | $from_email = ''; |
110 | 110 | $from_name = ''; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | if (!$email->save(array( |
130 | 130 | 'contact_id' => $contact->get('id'), |
131 | 131 | 'subject' => $subject, |
132 | - 'body' => $body . "\n\n" . $signature->getAsText(), |
|
132 | + 'body' => $body."\n\n".$signature->getAsText(), |
|
133 | 133 | 'from_email' => $from_email, |
134 | 134 | 'from_name' => $from_name, |
135 | 135 | 'type_id' => 10, // electronic invoice |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $shared_email = $this->context->getKernel()->useModule('email'); |
152 | 152 | |
153 | 153 | // First vi set the last, because we need this id to the first. |
154 | - $url = $redirect->setDestination($shared_email->getPath().$email->get('id') . '?edit', NET_SCHEME . NET_HOST . $this->url('../')); |
|
154 | + $url = $redirect->setDestination($shared_email->getPath().$email->get('id').'?edit', NET_SCHEME.NET_HOST.$this->url('../')); |
|
155 | 155 | $redirect->setIdentifier('send_email'); |
156 | 156 | $redirect->askParameter('send_email_status'); |
157 | 157 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | } elseif ($this->getKernel()->user->hasModuleAccess("order")) { |
26 | 26 | return new k_SeeOther($this->url('order/list', array('type' => 'order'))); |
27 | 27 | } elseif ($this->getKernel()->user->hasModuleAccess("quotation")) { |
28 | - return new k_SeeOther($this->url('quotation/list', array('type' => 'quotation'))); |
|
28 | + return new k_SeeOther($this->url('quotation/list', array('type' => 'quotation'))); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | $smarty = $this->template->create(dirname(__FILE__) . '/templates/index'); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | return new k_SeeOther($this->url('quotation/list', array('type' => 'quotation'))); |
29 | 29 | } |
30 | 30 | |
31 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/index'); |
|
31 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/index'); |
|
32 | 32 | return $smarty->render($this); |
33 | 33 | } |
34 | 34 |
@@ -93,32 +93,32 @@ discard block |
||
93 | 93 | $contact_id = $this->query('contact_id'); |
94 | 94 | |
95 | 95 | if ($contact_id) { |
96 | - $contact = new Contact($this->getKernel(), $contact_id); |
|
97 | - $this->getGateway()->getDBQuery()->setFilter("contact_id", $contact->get("id")); |
|
96 | + $contact = new Contact($this->getKernel(), $contact_id); |
|
97 | + $this->getGateway()->getDBQuery()->setFilter("contact_id", $contact->get("id")); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | if (isset($_GET["search"])) { |
101 | - if (isset($_GET["text"]) && $_GET["text"] != "") { |
|
102 | - $this->getGateway()->getDBQuery()->setFilter("text", $_GET["text"]); |
|
103 | - } |
|
101 | + if (isset($_GET["text"]) && $_GET["text"] != "") { |
|
102 | + $this->getGateway()->getDBQuery()->setFilter("text", $_GET["text"]); |
|
103 | + } |
|
104 | 104 | |
105 | - if (isset($_GET["from_date"]) && $_GET["from_date"] != "") { |
|
106 | - $this->getGateway()->getDBQuery()->setFilter("from_date", $_GET["from_date"]); |
|
107 | - } |
|
105 | + if (isset($_GET["from_date"]) && $_GET["from_date"] != "") { |
|
106 | + $this->getGateway()->getDBQuery()->setFilter("from_date", $_GET["from_date"]); |
|
107 | + } |
|
108 | 108 | |
109 | - if (isset($_GET["to_date"]) && $_GET["to_date"] != "") { |
|
110 | - $this->getGateway()->getDBQuery()->setFilter("to_date", $_GET["to_date"]); |
|
111 | - } |
|
109 | + if (isset($_GET["to_date"]) && $_GET["to_date"] != "") { |
|
110 | + $this->getGateway()->getDBQuery()->setFilter("to_date", $_GET["to_date"]); |
|
111 | + } |
|
112 | 112 | |
113 | - if (isset($_GET["status"])) { |
|
114 | - $this->getGateway()->getDBQuery()->setFilter("status", $_GET["status"]); |
|
115 | - } |
|
113 | + if (isset($_GET["status"])) { |
|
114 | + $this->getGateway()->getDBQuery()->setFilter("status", $_GET["status"]); |
|
115 | + } |
|
116 | 116 | } else { |
117 | - if ($this->getGateway()->getDBQuery()->checkFilter("contact_id")) { |
|
117 | + if ($this->getGateway()->getDBQuery()->checkFilter("contact_id")) { |
|
118 | 118 | $this->getGateway()->getDBQuery()->setFilter("status", "-1"); |
119 | 119 | } else { |
120 | - $this->getGateway()->getDBQuery()->setFilter("status", "-2"); |
|
121 | - } |
|
120 | + $this->getGateway()->getDBQuery()->setFilter("status", "-2"); |
|
121 | + } |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | $this->getGateway()->getDBQuery()->usePaging("paging"); |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | if ($reminder->save($_POST)) { |
148 | - if ($_POST['send_as'] == 'email') { |
|
149 | - return new k_SeeOther($this->url($reminder->get("id"), array('email', 'flare' => 'Reminder has been created'))); |
|
150 | - } else { |
|
151 | - return new k_SeeOther($this->url($reminder->get("id"), array('flare' => 'Reminder has been created'))); |
|
152 | - } |
|
148 | + if ($_POST['send_as'] == 'email') { |
|
149 | + return new k_SeeOther($this->url($reminder->get("id"), array('email', 'flare' => 'Reminder has been created'))); |
|
150 | + } else { |
|
151 | + return new k_SeeOther($this->url($reminder->get("id"), array('flare' => 'Reminder has been created'))); |
|
152 | + } |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | $value = $_POST; |
@@ -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 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | 'kernel' => $this->context->getKernel(), |
59 | 59 | 'scan_in_contact' => $scan_in_contact); |
60 | 60 | |
61 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/settings'); |
|
61 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/settings'); |
|
62 | 62 | return $smarty->render($this, $data); |
63 | 63 | } |
64 | 64 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $contact_module = $this->context->getKernel()->useModule('contact'); |
116 | 116 | |
117 | 117 | $redirect = Intraface_Redirect::factory($this->context->getKernel(), 'go'); |
118 | - $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('contact'), $debtor_module->getPath()."settings"); |
|
118 | + $url = $redirect->setDestination(NET_SCHEME.NET_HOST.$this->url('contact'), $debtor_module->getPath()."settings"); |
|
119 | 119 | $redirect->askParameter('contact_id'); |
120 | 120 | $redirect->setIdentifier('contact'); |
121 | 121 |