@@ -51,7 +51,7 @@ |
||
51 | 51 | 'payments' => $payments, |
52 | 52 | 'onlinepayment' => $onlinepayment); |
53 | 53 | |
54 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/index'); |
|
54 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/index'); |
|
55 | 55 | return $smarty->render($this, $data); |
56 | 56 | } |
57 | 57 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | $this->hasOne( |
34 | 34 | 'Intraface_modules_product_Variation_X_Attribute as variation_x_attribute', |
35 | - array( 'local' => 'id','foreign' => 'product_attribute_id') |
|
35 | + array('local' => 'id', 'foreign' => 'product_attribute_id') |
|
36 | 36 | ); |
37 | 37 | } |
38 | 38 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | $data = array('products' => $products, 'product' => $product); |
20 | 20 | |
21 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/batchpricechanger'); |
|
21 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/batchpricechanger'); |
|
22 | 22 | return $tpl->render($this, $data); |
23 | 23 | } |
24 | 24 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | foreach ($this->body('product_id') as $key => $product_id) { |
30 | 30 | $product = new Product($this->context->getKernel(), $product_id); |
31 | 31 | if ($this->body('change_type') == 'percent') { |
32 | - $new_price = $product->get('price') + intval($product->get('price') * ($_POST['price_change'] / 100)); |
|
32 | + $new_price = $product->get('price') + intval($product->get('price')*($_POST['price_change']/100)); |
|
33 | 33 | if ($this->body('round_off') == 'yes') { |
34 | 34 | $new_price = round($new_price, 0); |
35 | 35 | } |
@@ -19,10 +19,10 @@ |
||
19 | 19 | //$this->loadTemplate('Intraface_Doctrine_Template_Intranet'); |
20 | 20 | $this->actAs('Intraface_Doctrine_Template_Intranet'); |
21 | 21 | |
22 | - $this->hasOne('Intraface_modules_product_Attribute as attribute', array('local' => 'product_attribute_id','foreign' => 'id')); |
|
22 | + $this->hasOne('Intraface_modules_product_Attribute as attribute', array('local' => 'product_attribute_id', 'foreign' => 'id')); |
|
23 | 23 | // Notice that Variation/OneAttributeGroup and TwoAttributeGroup extends Variation, which means we do not get |
24 | 24 | // all functionality in the relation specified below here. |
25 | - $this->hasOne('Intraface_modules_product_Variation as variation', array('local' => 'product_variation_id','foreign' => 'id')); |
|
25 | + $this->hasOne('Intraface_modules_product_Variation as variation', array('local' => 'product_variation_id', 'foreign' => 'id')); |
|
26 | 26 | |
27 | 27 | } |
28 | 28 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $contact = $this->context->getContact(); |
24 | 24 | $person = $contact->loadContactPerson(0); |
25 | 25 | |
26 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/contactperson-edit'); |
|
26 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/contactperson-edit'); |
|
27 | 27 | return $smarty->render($this, array('person' => $person, 'contact' => $contact)); |
28 | 28 | } |
29 | 29 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | $contact = $this->context->context->getContact(); |
19 | 19 | $person = $contact->loadContactPerson($this->name()); |
20 | 20 | |
21 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/contactperson-edit'); |
|
21 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/contactperson-edit'); |
|
22 | 22 | return $smarty->render($this, array('contact' => $contact, 'person' => $person)); |
23 | 23 | } |
24 | 24 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | $this->document->setTitle('Memos'); |
21 | 21 | |
22 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/memos'); |
|
22 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/memos'); |
|
23 | 23 | |
24 | 24 | if (is_numeric($this->context->name())) { |
25 | 25 | return $tpl->render($this, array('memos' => $gateway->findByContactId($this->context->name()))); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $reminder = new ContactReminder($this->context->getKernel()); |
35 | 35 | $contact = $reminder->contact; |
36 | 36 | |
37 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/memo-edit'); |
|
37 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/memo-edit'); |
|
38 | 38 | return $smarty->render($this, array('reminder' => $reminder, 'contact' => $contact)); |
39 | 39 | } |
40 | 40 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function convertAmountToCurrency($amount) |
79 | 79 | { |
80 | - return new Ilib_Variable_Float($amount->getAsIso() / ($this->getRate()->getAsIso() / 100)); |
|
80 | + return new Ilib_Variable_Float($amount->getAsIso()/($this->getRate()->getAsIso()/100)); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public function convertAmountFromCurrency($amount) |
91 | 91 | { |
92 | - return new Ilib_Variable_Float($amount->getAsIso() * ($this->getRate()->getAsIso() / 100)); |
|
92 | + return new Ilib_Variable_Float($amount->getAsIso()*($this->getRate()->getAsIso()/100)); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | public function getUsedForTypes() |
@@ -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 | |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | |
188 | 188 | $tekst = $this->doc->addTextWrap($apointX["tekst"], $this->doc->get('y'), $apointX["tekst_width_small"], $this->doc->get("font_size"), $tekst); |
189 | 189 | $this->doc->setY('-'.$this->doc->get("font_padding_bottom")); |
190 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
190 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
191 | 191 | $this->doc->nextPage(true); |
192 | 192 | } |
193 | 193 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $this->doc->setColor(0, 0, 0); |
211 | 211 | } |
212 | 212 | $this->doc->setY('-'.$this->doc->get("font_spacing")); |
213 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
213 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
214 | 214 | $this->doc->nextPage(true); |
215 | 215 | } |
216 | 216 | } else { |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $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! |
226 | 226 | $this->doc->setY('-'.$this->doc->get("font_padding_bottom")); |
227 | 227 | |
228 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
228 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
229 | 229 | $this->doc->nextPage(true); |
230 | 230 | } |
231 | 231 | } |
@@ -233,12 +233,12 @@ discard block |
||
233 | 233 | } |
234 | 234 | } |
235 | 235 | |
236 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
236 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
237 | 237 | $this->doc->nextPage(true); |
238 | 238 | } |
239 | 239 | |
240 | 240 | // If products with VAT and next post is without we add VAT. |
241 | - if (($vat == 1 && isset($items[$i+1]["vat"]) && $items[$i+1]["vat"] == 0) || ($vat == 1 && $i+1 >= $max)) { |
|
241 | + if (($vat == 1 && isset($items[$i + 1]["vat"]) && $items[$i + 1]["vat"] == 0) || ($vat == 1 && $i + 1 >= $max)) { |
|
242 | 242 | // If VAT on current product, but next has no VAT OR if VAT and last product |
243 | 243 | |
244 | 244 | ($bg_color == 1) ? $bg_color = 0 : $bg_color = 1; |
@@ -253,8 +253,8 @@ discard block |
||
253 | 253 | $this->doc->line($this->doc->get("margin_left"), $this->doc->get('y'), $this->doc->get('right_margin_position'), $this->doc->get('y')); |
254 | 254 | $this->doc->setY('-'.($this->doc->get("font_size") + $this->doc->get("font_padding_top"))); |
255 | 255 | $this->doc->addText($apointX["tekst"], $this->doc->get('y'), $this->doc->get("font_size"), "<b>25% moms af ".number_format($total, 2, ",", ".")."</b>"); |
256 | - $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>"); |
|
257 | - $total = $total * 1.25; |
|
256 | + $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>"); |
|
257 | + $total = $total*1.25; |
|
258 | 258 | $this->doc->setY('-'.$this->doc->get("font_padding_bottom")); |
259 | 259 | $this->doc->line($this->doc->get("margin_left"), $this->doc->get('y'), $this->doc->get('right_margin_position'), $this->doc->get('y')); |
260 | 260 | $this->doc->setLineStyle(1); |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | } |
266 | 266 | |
267 | 267 | |
268 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
268 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
269 | 269 | $this->doc->nextPage(); |
270 | 270 | } |
271 | 271 | |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | $total_text = "Total ".$currency_iso_code.":"; |
291 | 291 | } |
292 | 292 | |
293 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
293 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
294 | 294 | $this->doc->nextPage(true); |
295 | 295 | } |
296 | 296 | |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | |
327 | 327 | $this->doc->setY('-'.$this->doc->get("font_spacing")); |
328 | 328 | |
329 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
329 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
330 | 330 | $this->doc->nextPage(true); |
331 | 331 | } |
332 | 332 | |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | foreach ($text as $line) { |
335 | 335 | if ($line == "") { |
336 | 336 | $this->doc->setY('-'.$this->doc->get("font_spacing")); |
337 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
337 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
338 | 338 | $this->doc->nextPage(true); |
339 | 339 | } |
340 | 340 | } else { |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | $line = $this->doc->addTextWrap($this->doc->get('margin_left'), $this->doc->get('y'), $this->doc->get('content_width'), $this->doc->get("font_size"), $line); |
344 | 344 | $this->doc->setY('-'.$this->doc->get("font_padding_bottom")); |
345 | 345 | |
346 | - if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing") * 2) { |
|
346 | + if ($this->doc->get('y') < $this->doc->get("margin_bottom") + $this->doc->get("font_spacing")*2) { |
|
347 | 347 | $this->doc->nextPage(true); |
348 | 348 | } |
349 | 349 | } |