@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $this->doc->setY('-'.$this->doc->get("font_spacing")); |
| 76 | 76 | |
| 77 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 77 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 78 | 78 | $this->doc->nextPage(true); |
| 79 | 79 | } |
| 80 | 80 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | foreach ($text AS $line) { |
| 84 | 84 | if ($line == "") { |
| 85 | 85 | $this->doc->setY('-'.$this->doc->get("font_spacing")); |
| 86 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 86 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 87 | 87 | $this->doc->nextPage(true); |
| 88 | 88 | } |
| 89 | 89 | } else { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $this->doc->setY('-'.($this->doc->get("font_padding_top") + $this->doc->get("font_size"))); |
| 92 | 92 | $line = $this->doc->addTextWrap($this->doc->get('margin_left'), $this->doc->get('y'), $this->doc->get('content_width'), $this->doc->get("font_size"), $line); |
| 93 | 93 | $this->doc->setY('-'.$this->doc->get("font_padding_bottom")); |
| 94 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 94 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 95 | 95 | $this->doc->nextPage(true); |
| 96 | 96 | } |
| 97 | 97 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $this->doc->addText($apointX["tekst"], $this->doc->get('y'), $this->doc->get("font_size"), "Tekst"); |
| 117 | 117 | $this->doc->addText($apointX["antal"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Antal"), $this->doc->get('y'), $this->doc->get("font_size"), "Antal"); |
| 118 | 118 | $this->doc->addText($apointX["pris"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Pris"), $this->doc->get('y'), $this->doc->get("font_size"), "Pris"); |
| 119 | - $this->doc->addText($apointX["beloeb"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Beløb") -3, $this->doc->get('y'), $this->doc->get("font_size"), "Beløb"); |
|
| 119 | + $this->doc->addText($apointX["beloeb"] - $this->doc->getTextWidth($this->doc->get("font_size"), "Beløb") - 3, $this->doc->get('y'), $this->doc->get("font_size"), "Beløb"); |
|
| 120 | 120 | |
| 121 | 121 | $this->doc->setY('-'.($this->doc->get("font_spacing") - $this->doc->get("font_size"))); |
| 122 | 122 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | $bg_color = 0; |
| 140 | 140 | |
| 141 | - for ($i = 0, $max = count($items); $i < $max; $i++) { |
|
| 141 | + for ($i = 0, $max = count($items); $i < $max; $i++) { |
|
| 142 | 142 | $vat = $items[$i]["vat"]; |
| 143 | 143 | |
| 144 | 144 | if ($bg_color == 1) { |
@@ -161,9 +161,9 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | if ($debtor->getCurrency()) { |
| 164 | - $amount = $items[$i]["quantity"] * $items[$i]["price_currency"]->getAsIso(2); |
|
| 164 | + $amount = $items[$i]["quantity"]*$items[$i]["price_currency"]->getAsIso(2); |
|
| 165 | 165 | } else { |
| 166 | - $amount = $items[$i]["quantity"] * $items[$i]["price"]->getAsIso(2); |
|
| 166 | + $amount = $items[$i]["quantity"]*$items[$i]["price"]->getAsIso(2); |
|
| 167 | 167 | } |
| 168 | 168 | $total += $amount; |
| 169 | 169 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | |
| 189 | 189 | $tekst = $this->doc->addTextWrap($apointX["tekst"], $this->doc->get('y'), $apointX["tekst_width_small"], $this->doc->get("font_size"), $tekst); |
| 190 | 190 | $this->doc->setY('-'.$this->doc->get("font_padding_bottom")); |
| 191 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 191 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 192 | 192 | $this->doc->nextPage(true); |
| 193 | 193 | } |
| 194 | 194 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | $this->doc->setColor(0, 0, 0); |
| 212 | 212 | } |
| 213 | 213 | $this->doc->setY('-'.$this->doc->get("font_spacing")); |
| 214 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 214 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 215 | 215 | $this->doc->nextPage(true); |
| 216 | 216 | } |
| 217 | 217 | } else { |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $line = $this->doc->addTextWrap($apointX["tekst"], $this->doc->get('y') + 1, $apointX["tekst_width"], $this->doc->get("font_size"), $line); // Ups Ups, hvor kommer '+ 1' fra - jo ser du, ellers kappes det nederste af teksten! |
| 228 | 228 | $this->doc->setY('-'.$this->doc->get("font_padding_bottom")); |
| 229 | 229 | |
| 230 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 230 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 231 | 231 | $this->doc->nextPage(true); |
| 232 | 232 | } |
| 233 | 233 | } |
@@ -236,12 +236,12 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 239 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 240 | 240 | $this->doc->nextPage(true); |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | // If products with VAT and next post is without we add VAT. |
| 244 | - if (($vat == 1 && isset($items[$i+1]["vat"]) && $items[$i+1]["vat"] == 0) || ($vat == 1 && $i+1 >= $max)) { |
|
| 244 | + if (($vat == 1 && isset($items[$i + 1]["vat"]) && $items[$i + 1]["vat"] == 0) || ($vat == 1 && $i + 1 >= $max)) { |
|
| 245 | 245 | // If VAT on current product, but next has no VAT OR if VAT and last product |
| 246 | 246 | |
| 247 | 247 | ($bg_color == 1) ? $bg_color = 0 : $bg_color = 1; |
@@ -256,8 +256,8 @@ discard block |
||
| 256 | 256 | $this->doc->line($this->doc->get("margin_left"), $this->doc->get('y'), $this->doc->get('right_margin_position'), $this->doc->get('y')); |
| 257 | 257 | $this->doc->setY('-'.($this->doc->get("font_size") + $this->doc->get("font_padding_top"))); |
| 258 | 258 | $this->doc->addText($apointX["tekst"], $this->doc->get('y'), $this->doc->get("font_size"), "<b>25% moms af ".number_format($total, 2, ",", ".")."</b>"); |
| 259 | - $this->doc->addText($apointX["beloeb"] - $this->doc->getTextWidth($this->doc->get("font_size"), "<b>".number_format($total * 0.25, 2, ",", ".")."</b>"), $this->doc->get('y'), $this->doc->get("font_size"), "<b>".number_format($total * 0.25, 2, ",", ".")."</b>"); |
|
| 260 | - $total = $total * 1.25; |
|
| 259 | + $this->doc->addText($apointX["beloeb"] - $this->doc->getTextWidth($this->doc->get("font_size"), "<b>".number_format($total*0.25, 2, ",", ".")."</b>"), $this->doc->get('y'), $this->doc->get("font_size"), "<b>".number_format($total*0.25, 2, ",", ".")."</b>"); |
|
| 260 | + $total = $total*1.25; |
|
| 261 | 261 | $this->doc->setY('-'.$this->doc->get("font_padding_bottom")); |
| 262 | 262 | $this->doc->line($this->doc->get("margin_left"), $this->doc->get('y'), $this->doc->get('right_margin_position'), $this->doc->get('y')); |
| 263 | 263 | $this->doc->setLineStyle(1); |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | |
| 271 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 271 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 272 | 272 | $this->doc->nextPage(); |
| 273 | 273 | } |
| 274 | 274 | |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | $total_text = "Total ".$currency_iso_code.":"; |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 296 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 297 | 297 | $this->doc->nextPage(true); |
| 298 | 298 | } |
| 299 | 299 | |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | |
| 331 | 331 | $this->doc->setY('-'.$this->doc->get("font_spacing")); |
| 332 | 332 | |
| 333 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 333 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 334 | 334 | $this->doc->nextPage(true); |
| 335 | 335 | } |
| 336 | 336 | |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | foreach ($text AS $line) { |
| 339 | 339 | if ($line == "") { |
| 340 | 340 | $this->doc->setY('-'.$this->doc->get("font_spacing")); |
| 341 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 341 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 342 | 342 | $this->doc->nextPage(true); |
| 343 | 343 | } |
| 344 | 344 | } else { |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | $line = $this->doc->addTextWrap($this->doc->get('margin_left'), $this->doc->get('y'), $this->doc->get('content_width'), $this->doc->get("font_size"), $line); |
| 348 | 348 | $this->doc->setY('-'.$this->doc->get("font_padding_bottom")); |
| 349 | 349 | |
| 350 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
| 350 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
| 351 | 351 | $this->doc->nextPage(true); |
| 352 | 352 | } |
| 353 | 353 | } |
@@ -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 | |
@@ -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() |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | $invoice_module = $this->getKernel()->useModule('invoice'); |
| 22 | 22 | $depreciation = $this->getModel(); |
| 23 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/depreciation'); |
|
| 23 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/depreciation'); |
|
| 24 | 24 | return $smarty->render($this); |
| 25 | 25 | } |
| 26 | 26 | |
@@ -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 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | |
| 17 | 17 | function renderHtml() |
| 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); |
| 21 | 21 | } |
| 22 | 22 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | $payment = $this->getModel(); |
| 26 | 26 | if ($id = $payment->update($_POST)) { |
| 27 | 27 | if ($this->getKernel()->user->hasModuleAccess('accounting')) { |
| 28 | - return new k_SeeOther($this->url($id . '/state')); |
|
| 28 | + return new k_SeeOther($this->url($id.'/state')); |
|
| 29 | 29 | } else { |
| 30 | 30 | return new k_SeeOther($this->url('../')); |
| 31 | 31 | } |
@@ -194,12 +194,12 @@ discard block |
||
| 194 | 194 | |
| 195 | 195 | if (isset($input['customer_coupon']) && $input['customer_coupon'] != '') { |
| 196 | 196 | if ($value['message'] != '') $value['message'] .= "\n\n"; |
| 197 | - $value['message'] .= "Kundekupon:". $input['customer_coupon']; |
|
| 197 | + $value['message'] .= "Kundekupon:".$input['customer_coupon']; |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | if (isset($input['customer_comment']) && $input['customer_comment'] != '') { |
| 201 | 201 | if ($value['message'] != '') $value['message'] .= "\n\n"; |
| 202 | - $value['message'] .= "Kommentar:\n". $input['customer_comment']; |
|
| 202 | + $value['message'] .= "Kommentar:\n".$input['customer_comment']; |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | if (isset($input['payment_method']) && is_array($input['payment_method']) && !empty($input['payment_method'])) { |
@@ -324,15 +324,15 @@ discard block |
||
| 324 | 324 | $email = new Email($this->kernel); |
| 325 | 325 | |
| 326 | 326 | if ($this->shop->getConfirmationSubject()) { |
| 327 | - $subject = $this->shop->getConfirmationSubject() . ' (#' . $this->order->get('number') . ')'; |
|
| 327 | + $subject = $this->shop->getConfirmationSubject().' (#'.$this->order->get('number').')'; |
|
| 328 | 328 | } else { |
| 329 | - $subject = 'Bekræftelse på bestilling (#' . $this->order->get('number') . ')'; |
|
| 329 | + $subject = 'Bekræftelse på bestilling (#'.$this->order->get('number').')'; |
|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | $body = $this->shop->getConfirmationText(); |
| 333 | 333 | |
| 334 | 334 | if ($this->shop->showPaymentUrl()) { |
| 335 | - $body .= "\n\n" . $this->shop->getPaymentUrl() . $this->order->getIdentifier(); |
|
| 335 | + $body .= "\n\n".$this->shop->getPaymentUrl().$this->order->getIdentifier(); |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | // @todo improve this table |
@@ -348,19 +348,19 @@ discard block |
||
| 348 | 348 | $currency_iso_code = 'DKK'; |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | - $table->addRow(array(round($item["quantity"]), substr($item["name"], 0, 40), $currency_iso_code.' ' . $amount)); |
|
| 351 | + $table->addRow(array(round($item["quantity"]), substr($item["name"], 0, 40), $currency_iso_code.' '.$amount)); |
|
| 352 | 352 | } |
| 353 | 353 | |
| 354 | - $body .= "\n\n" . $table->getTable(); |
|
| 354 | + $body .= "\n\n".$table->getTable(); |
|
| 355 | 355 | |
| 356 | 356 | if ($this->shop->getConfirmationGreeting()) { |
| 357 | - $body .= "\n\n" . $this->shop->getConfirmationGreeting(); |
|
| 357 | + $body .= "\n\n".$this->shop->getConfirmationGreeting(); |
|
| 358 | 358 | } else { |
| 359 | - $body .= "Venlig hilsen\n". $this->kernel->intranet->address->get('name'); |
|
| 359 | + $body .= "Venlig hilsen\n".$this->kernel->intranet->address->get('name'); |
|
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | if ($this->shop->showLoginUrl()) { |
| 363 | - $body .= "\n\n" . $this->contact->getLoginUrl(); |
|
| 363 | + $body .= "\n\n".$this->contact->getLoginUrl(); |
|
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | if (!$email->save(array('contact_id' => $this->contact->get('id'), |
@@ -435,9 +435,9 @@ discard block |
||
| 435 | 435 | $this->kernel->useShared('email'); |
| 436 | 436 | $email = new Email($this->kernel); |
| 437 | 437 | |
| 438 | - $subject = 'Bekræftelse på betaling (#' . $payment_id . ')'; |
|
| 438 | + $subject = 'Bekræftelse på betaling (#'.$payment_id.')'; |
|
| 439 | 439 | $body = 'Vi har modtaget din betaling. Hvis din ordre var afsendt inden kl. 12.00, sender vi den allerede i dag.'; |
| 440 | - $body .= "\n\nVenlig hilsen\n". $this->kernel->intranet->address->get('name'); |
|
| 440 | + $body .= "\n\nVenlig hilsen\n".$this->kernel->intranet->address->get('name'); |
|
| 441 | 441 | |
| 442 | 442 | if (!$email->save(array('contact_id' => $this->contact->get('id'), |
| 443 | 443 | 'subject' => $subject, |
@@ -42,8 +42,8 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | $result = $this->db->query('SELECT id |
| 44 | 44 | FROM shop_featuredproducts |
| 45 | - WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer') . ' |
|
| 46 | - AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer') . ' |
|
| 45 | + WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer').' |
|
| 46 | + AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer').' |
|
| 47 | 47 | AND keyword_id = ' . $this->db->quote($keyword->getId(), 'integer')); |
| 48 | 48 | if (PEAR::isError($result)) { |
| 49 | 49 | throw new Exception($result->getUserInfo()); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | function delete($id) |
| 73 | 73 | { |
| 74 | - $result = $this->db->query('DELETE FROM shop_featuredproducts WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer') . ' AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer') . ' AND id = ' . $this->db->quote($id, 'integer')); |
|
| 74 | + $result = $this->db->query('DELETE FROM shop_featuredproducts WHERE intranet_id = '.$this->db->quote($this->intranet->getId(), 'integer').' AND shop_id = '.$this->db->quote($this->shop->getId(), 'integer').' AND id = '.$this->db->quote($id, 'integer')); |
|
| 75 | 75 | if (PEAR::isError($result)) { |
| 76 | 76 | throw new Exception($result->getUserInfo()); |
| 77 | 77 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | function getAll() |
| 82 | 82 | { |
| 83 | 83 | $result = $this->db->query('SELECT * FROM shop_featuredproducts |
| 84 | - WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer') . ' |
|
| 84 | + WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer').' |
|
| 85 | 85 | AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer')); |
| 86 | 86 | if (PEAR::isError($result)) { |
| 87 | 87 | throw new Exception($result->getUserInfo()); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | { |
| 26 | 26 | $shop = $this->getShop(); |
| 27 | 27 | |
| 28 | - $this->document->setTitle('Basket evaluation for' . ' ' . $shop->name); |
|
| 28 | + $this->document->setTitle('Basket evaluation for'.' '.$shop->name); |
|
| 29 | 29 | $this->document->options = array($this->url('../') => 'Close'); |
| 30 | 30 | |
| 31 | 31 | $basketevaluation = new Intraface_modules_shop_BasketEvaluation($this->mdb2, $this->getKernel()->intranet, $shop); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | $data = array('shop' => $shop, 'evaluations' => $evaluations); |
| 35 | 35 | |
| 36 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/evaluation-index'); |
|
| 36 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/evaluation-index'); |
|
| 37 | 37 | return $tpl->render($this, $data); |
| 38 | 38 | } |
| 39 | 39 | |