@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | function renderHtml() |
| 37 | 37 | { |
| 38 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/userpreferences'); |
|
| 38 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/userpreferences'); |
|
| 39 | 39 | return $smarty->render($this); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -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 | |
@@ -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 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | if (!$intranet->isFilledIn()) : |
| 11 | 11 | $_advice[] = array( |
| 12 | 12 | 'msg' => 'all information about the intranet has not been filled in', |
| 13 | - 'link' => $administration_module->getPath() . 'intranet?edit', |
|
| 13 | + 'link' => $administration_module->getPath().'intranet?edit', |
|
| 14 | 14 | 'module' => $administration_module->getName() |
| 15 | 15 | ); |
| 16 | 16 | endif; |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | if (!$intranet->get('identifier')) : |
| 19 | 19 | $_attention_needed[] = array( |
| 20 | 20 | 'msg' => 'identifier for the intranet is missing', |
| 21 | - 'link' => $administration_module->getPath() . 'intranet?edit', |
|
| 21 | + 'link' => $administration_module->getPath().'intranet?edit', |
|
| 22 | 22 | 'module' => $administration_module->getName() |
| 23 | 23 | ); |
| 24 | 24 | endif; |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | } ?> |
| 76 | 76 | <?php if (!empty($address['cvr']) and strlen($address['cvr']) == 8) : ?> |
| 77 | 77 | (<a href="http://www.cvr.dk/Site/Forms/PublicService/DisplayCompany.aspx?cvrnr=<?php e($address['cvr']); ?>">se opslaget på virk.dk</a>) |
| 78 | - <?php endif;?> |
|
| 78 | + <?php endif; ?> |
|
| 79 | 79 | </td> |
| 80 | 80 | </tr> |
| 81 | 81 | <tr> |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | function renderHtml() |
| 13 | 13 | { |
| 14 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/intranet'); |
|
| 14 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/intranet'); |
|
| 15 | 15 | return $smarty->render($this); |
| 16 | 16 | } |
| 17 | 17 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $values['pdf_header_file_id'] = $filehandler->get('id'); |
| 34 | 34 | $intranet->update($values); |
| 35 | 35 | } else { |
| 36 | - $filehandler->error->set('Header should be a .jpg image - got '. $filehandler->get('file_type')); |
|
| 36 | + $filehandler->error->set('Header should be a .jpg image - got '.$filehandler->get('file_type')); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $values = $intranet->get(); |
| 42 | 42 | $address = $intranet->address->get(); |
| 43 | 43 | |
| 44 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/intranet-edit'); |
|
| 44 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/intranet-edit'); |
|
| 45 | 45 | return $smarty->render($this, array('intranet' => $intranet, 'kernel' => $this->getKernel())); |
| 46 | 46 | } |
| 47 | 47 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | if ($type['mime_type'] == 'image/jpeg' || $type['mime_type'] == 'image/pjpeg') { |
| 71 | 71 | $values['pdf_header_file_id'] = $id; |
| 72 | 72 | } else { |
| 73 | - $intranet->error->set('Header should be a .jpg image - got ' . $type['mime_type']); |
|
| 73 | + $intranet->error->set('Header should be a .jpg image - got '.$type['mime_type']); |
|
| 74 | 74 | $filehandler->delete(); |
| 75 | 75 | } |
| 76 | 76 | } |
@@ -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 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | function setNewContactId($old_id, $new_id) |
| 42 | 42 | { |
| 43 | 43 | $db = MDB2::singleton(); |
| 44 | - $db->query('UPDATE procurement SET contact_id = ' . $new_id . ' WHERE contact_id = ' . $old_id); |
|
| 44 | + $db->query('UPDATE procurement SET contact_id = '.$new_id.' WHERE contact_id = '.$old_id); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | function find() |
@@ -158,14 +158,14 @@ discard block |
||
| 158 | 158 | function any() |
| 159 | 159 | { |
| 160 | 160 | $db = new DB_Sql; |
| 161 | - $db->query("SELECT id FROM procurement WHERE intranet_id = " . $this->kernel->intranet->get('id')); |
|
| 161 | + $db->query("SELECT id FROM procurement WHERE intranet_id = ".$this->kernel->intranet->get('id')); |
|
| 162 | 162 | return $db->numRows(); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | function anyByContact($contact_id) |
| 166 | 166 | { |
| 167 | 167 | $db = new DB_Sql; |
| 168 | - $db->query("SELECT id FROM procurement WHERE intranet_id = " . $this->kernel->intranet->get('id')." AND contact_id = ".$contact_id." AND active = 1"); |
|
| 168 | + $db->query("SELECT id FROM procurement WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND contact_id = ".$contact_id." AND active = 1"); |
|
| 169 | 169 | return $db->numRows(); |
| 170 | 170 | } |
| 171 | 171 | |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | { |
| 215 | 215 | $sql = "SELECT id |
| 216 | 216 | FROM procurement |
| 217 | - WHERE intranet_id = " . $this->kernel->intranet->get("id") . " |
|
| 217 | + WHERE intranet_id = " . $this->kernel->intranet->get("id")." |
|
| 218 | 218 | AND contact_id = ".(int)$contact_id." |
| 219 | 219 | AND active = 1"; |
| 220 | 220 | |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | |
| 417 | - $text = $translation->get('procurement').'# ' . $this->get('number') . ': ' . $this->get('description'); |
|
| 417 | + $text = $translation->get('procurement').'# '.$this->get('number').': '.$this->get('description'); |
|
| 418 | 418 | require_once 'Intraface/modules/accounting/Voucher.php'; |
| 419 | 419 | $voucher = Voucher::factory($year, $voucher_number); |
| 420 | 420 | $voucher->save(array( |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | $credit_total += $amount; |
| 434 | 434 | |
| 435 | 435 | if (!empty($line['text'])) { |
| 436 | - $line_text = $text. ' - ' . $line['text']; |
|
| 436 | + $line_text = $text.' - '.$line['text']; |
|
| 437 | 437 | } else { |
| 438 | 438 | $line_text = $text; |
| 439 | 439 | } |
@@ -487,7 +487,7 @@ discard block |
||
| 487 | 487 | $voucher_date->convert2db(); |
| 488 | 488 | } |
| 489 | 489 | |
| 490 | - $db->query("UPDATE procurement SET date_stated = '".$voucher_date->get()."', voucher_id = ".intval($voucher_number)." WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id')); |
|
| 490 | + $db->query("UPDATE procurement SET date_stated = '".$voucher_date->get()."', voucher_id = ".intval($voucher_number)." WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id')); |
|
| 491 | 491 | return 1; |
| 492 | 492 | } |
| 493 | 493 | |
@@ -570,15 +570,15 @@ discard block |
||
| 570 | 570 | $total = 0; |
| 571 | 571 | $vat = 0; |
| 572 | 572 | foreach ($debet_accounts as $key => $debet_account) { |
| 573 | - if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', 'greater_than_zero')) { |
|
| 573 | + if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje '.($key + 1).' "'.$debet_account['text'].'"', 'greater_than_zero')) { |
|
| 574 | 574 | $amount = new Intraface_Amount($debet_account['amount']); |
| 575 | 575 | $amount->convert2db(); |
| 576 | 576 | $total += $amount->get(); |
| 577 | 577 | |
| 578 | - $validator->isString($debet_account['text'], 'Ugyldig tekst i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', '', 'allow_empty'); |
|
| 578 | + $validator->isString($debet_account['text'], 'Ugyldig tekst i linje '.($key + 1).' "'.$debet_account['text'].'"', '', 'allow_empty'); |
|
| 579 | 579 | |
| 580 | 580 | if (empty($debet_account['state_account_id'])) { |
| 581 | - $this->error->set('Linje ' . ($key + 1) . ' "' . $debet_account['text'] . '" ved ikke hvor den skal bogføres'); |
|
| 581 | + $this->error->set('Linje '.($key + 1).' "'.$debet_account['text'].'" ved ikke hvor den skal bogføres'); |
|
| 582 | 582 | } else { |
| 583 | 583 | require_once 'Intraface/modules/accounting/Account.php'; |
| 584 | 584 | $account = Account::factory($year, $debet_account['state_account_id']); |
@@ -586,9 +586,9 @@ discard block |
||
| 586 | 586 | // @todo check this. I changed it to make sure that we are able to state varekøb til videresalg |
| 587 | 587 | // || $account->get('type') != 'operating' |
| 588 | 588 | if ($account->get('id') == 0) { |
| 589 | - $this->error->set('Ugyldig konto for bogføring af linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"'); |
|
| 589 | + $this->error->set('Ugyldig konto for bogføring af linje '.($key + 1).' "'.$debet_account['text'].'"'); |
|
| 590 | 590 | } elseif ($account->get('vat') == 'in') { |
| 591 | - $vat += $amount->get() / 100 * $account->get('vat_percent'); |
|
| 591 | + $vat += $amount->get()/100*$account->get('vat_percent'); |
|
| 592 | 592 | } |
| 593 | 593 | } |
| 594 | 594 | } |
@@ -605,8 +605,8 @@ discard block |
||
| 605 | 605 | } |
| 606 | 606 | |
| 607 | 607 | if (round($vat, 2) != $this->get('vat')) { |
| 608 | - $expected = number_format($this->get('vat') * 4, 2, ',', '.'); |
|
| 609 | - $this->error->set('Momsen af de beløb du bogfører på konti med moms stemmer ikke overens med momsen på det samlede indkøb (vi forventede '.number_format($vat, 2, ',', '.').' i moms og det samlede beløb burde have været ' . $expected . '). Har du fået alle varer med? Har du husket at skrive beløbet uden moms for varerne?'); |
|
| 608 | + $expected = number_format($this->get('vat')*4, 2, ',', '.'); |
|
| 609 | + $this->error->set('Momsen af de beløb du bogfører på konti med moms stemmer ikke overens med momsen på det samlede indkøb (vi forventede '.number_format($vat, 2, ',', '.').' i moms og det samlede beløb burde have været '.$expected.'). Har du fået alle varer med? Har du husket at skrive beløbet uden moms for varerne?'); |
|
| 610 | 610 | } |
| 611 | 611 | } |
| 612 | 612 | |
@@ -635,15 +635,15 @@ discard block |
||
| 635 | 635 | $total = 0; |
| 636 | 636 | $vat = 0; |
| 637 | 637 | foreach ($debet_accounts as $key => $debet_account) { |
| 638 | - if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', 'greater_than_zero')) { |
|
| 638 | + if ($validator->isNumeric($debet_account['amount'], 'Ugyldig beløb i linje '.($key + 1).' "'.$debet_account['text'].'"', 'greater_than_zero')) { |
|
| 639 | 639 | $amount = new Intraface_Amount($debet_account['amount']); |
| 640 | 640 | $amount->convert2db(); |
| 641 | 641 | $total += $amount->get(); |
| 642 | 642 | |
| 643 | - $validator->isString($debet_account['text'], 'Ugyldig tekst i linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"', '', 'allow_empty'); |
|
| 643 | + $validator->isString($debet_account['text'], 'Ugyldig tekst i linje '.($key + 1).' "'.$debet_account['text'].'"', '', 'allow_empty'); |
|
| 644 | 644 | |
| 645 | 645 | if (empty($debet_account['state_account_id'])) { |
| 646 | - $this->error->set('Linje ' . ($key + 1) . ' "' . $debet_account['text'] . '" ved ikke hvor den skal bogføres'); |
|
| 646 | + $this->error->set('Linje '.($key + 1).' "'.$debet_account['text'].'" ved ikke hvor den skal bogføres'); |
|
| 647 | 647 | } else { |
| 648 | 648 | require_once 'Intraface/modules/accounting/Account.php'; |
| 649 | 649 | $account = Account::factory($year, $debet_account['state_account_id']); |
@@ -651,9 +651,9 @@ discard block |
||
| 651 | 651 | // @todo check this. I changed it to make sure that we are able to state varekøb til videresalg |
| 652 | 652 | // || $account->get('type') != 'operating' |
| 653 | 653 | if ($account->get('id') == 0) { |
| 654 | - $this->error->set('Ugyldig konto for bogføring af linje ' . ($key + 1) . ' "' . $debet_account['text'] . '"'); |
|
| 654 | + $this->error->set('Ugyldig konto for bogføring af linje '.($key + 1).' "'.$debet_account['text'].'"'); |
|
| 655 | 655 | } elseif ($account->get('vat') == 'in') { |
| 656 | - $vat += $amount->get() / 100 * $account->get('vat_percent'); |
|
| 656 | + $vat += $amount->get()/100*$account->get('vat_percent'); |
|
| 657 | 657 | } |
| 658 | 658 | } |
| 659 | 659 | } |
@@ -670,8 +670,8 @@ discard block |
||
| 670 | 670 | |
| 671 | 671 | if (round($vat, 2) != $this->get('vat')) { |
| 672 | 672 | $expected_vat = number_format($vat, 2, ',', '.'); |
| 673 | - $expected_value = number_format($this->get('vat') * 4, 2, ',', '.'); |
|
| 674 | - $this->error->set('Momsen af de beløb du bogfører på konti med moms stemmer ikke overens med momsen på det samlede indkøb (vi forventede ' . $expected_vat . ' i moms og det samlede beløb burde have været ' . $expected_value . '). Har du fået alle varer med? Har du husket at skrive beløbet uden moms for varerne?'); |
|
| 673 | + $expected_value = number_format($this->get('vat')*4, 2, ',', '.'); |
|
| 674 | + $this->error->set('Momsen af de beløb du bogfører på konti med moms stemmer ikke overens med momsen på det samlede indkøb (vi forventede '.$expected_vat.' i moms og det samlede beløb burde have været '.$expected_value.'). Har du fået alle varer med? Har du husket at skrive beløbet uden moms for varerne?'); |
|
| 675 | 675 | } |
| 676 | 676 | |
| 677 | 677 | if ($this->error->isError()) { |