@@ -29,10 +29,10 @@ |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | $data = array( |
32 | - 'kernel' => $this->getKernel(), |
|
33 | - 'voucher' => $voucher, |
|
34 | - 'payment' => $this->getModel(), |
|
35 | - 'year' => $this->getYear(), |
|
32 | + 'kernel' => $this->getKernel(), |
|
33 | + 'voucher' => $voucher, |
|
34 | + 'payment' => $this->getModel(), |
|
35 | + 'year' => $this->getYear(), |
|
36 | 36 | 'accounting_module' => $accounting_module); |
37 | 37 | |
38 | 38 | $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/payment'); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | 'year' => $this->getYear(), |
36 | 36 | 'accounting_module' => $accounting_module); |
37 | 37 | |
38 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/payment'); |
|
38 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/state/payment'); |
|
39 | 39 | return $smarty->render($this, $data); |
40 | 40 | } |
41 | 41 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | return new k_SeeOther($this->url('selectyear')); |
37 | 37 | } |
38 | 38 | |
39 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/creditnote'); |
|
39 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/state/creditnote'); |
|
40 | 40 | return $smarty->render($this); |
41 | 41 | |
42 | 42 | } |
@@ -28,12 +28,12 @@ discard block |
||
28 | 28 | $this->document->setTitle('State procurement #' . $this->getProcurement()->get('id')); |
29 | 29 | |
30 | 30 | $data = array( |
31 | - 'procurement' => $this->getProcurement(), |
|
32 | - 'year' => $this->getYear(), |
|
31 | + 'procurement' => $this->getProcurement(), |
|
32 | + 'year' => $this->getYear(), |
|
33 | 33 | 'account' => new Account($this->getYear()), |
34 | - 'voucher' => new Voucher($this->getYear()), |
|
35 | - 'items' => $this->getProcurement()->getItems(), |
|
36 | - 'value' => $this->getValues(), |
|
34 | + 'voucher' => new Voucher($this->getYear()), |
|
35 | + 'items' => $this->getProcurement()->getItems(), |
|
36 | + 'value' => $this->getValues(), |
|
37 | 37 | 'vat_account' => new Account($this->getYear(), $this->getYear()->getSetting('vat_in_account_id'))); |
38 | 38 | |
39 | 39 | $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/procurement'); |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | $this->value = $procurement->get(); |
82 | 82 | if ($procurement->get('price_items') - $items_amount > 0) { |
83 | 83 | $this->value['debet_account'][$i++] = array( |
84 | - 'text' => '', |
|
84 | + 'text' => '', |
|
85 | 85 | 'amount' => number_format($procurement->get('price_items') - $items_amount, 2, ',', '.')); |
86 | 86 | } |
87 | 87 | |
88 | 88 | if ($procurement->get('price_shipment_etc') > 0) { |
89 | 89 | $this->value['debet_account'][$i++] = array( |
90 | - 'text' => $this->t('shipment etc'), |
|
91 | - 'amount' => $procurement->get('dk_price_shipment_etc')); |
|
90 | + 'text' => $this->t('shipment etc'), |
|
91 | + 'amount' => $procurement->get('dk_price_shipment_etc')); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | return new k_SeeOther($this->url('selectyear')); |
26 | 26 | } |
27 | 27 | |
28 | - $this->document->setTitle('State procurement #' . $this->getProcurement()->get('id')); |
|
28 | + $this->document->setTitle('State procurement #'.$this->getProcurement()->get('id')); |
|
29 | 29 | |
30 | 30 | $data = array( |
31 | 31 | 'procurement' => $this->getProcurement(), |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | 'value' => $this->getValues(), |
37 | 37 | 'vat_account' => new Account($this->getYear(), $this->getYear()->getSetting('vat_in_account_id'))); |
38 | 38 | |
39 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/procurement'); |
|
39 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/state/procurement'); |
|
40 | 40 | return $smarty->render($this, $data); |
41 | 41 | } |
42 | 42 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | function getProposeButton() |
119 | 119 | { |
120 | 120 | if ($this->add_propose_button === true) { |
121 | - return '<input type="submit" name="propose_changes" value="' . $this->t('Propose changes') . '" />'; |
|
121 | + return '<input type="submit" name="propose_changes" value="'.$this->t('Propose changes').'" />'; |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | $accounting_module = $this->getKernel()->useModule('accounting'); |
15 | 15 | |
16 | 16 | if (!$this->getYear()->readyForState($this->getModel()->get('this_date'))) { |
17 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/year-not-ready'); |
|
17 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/state/year-not-ready'); |
|
18 | 18 | return $smarty->render($this); |
19 | 19 | } |
20 | 20 | return new k_SeeOther($this->url('../')); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | return new k_SeeOther($this->url('selectyear')); |
31 | 31 | } |
32 | 32 | |
33 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/reminder'); |
|
33 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/state/reminder'); |
|
34 | 34 | return $smarty->render($this, array('voucher' => $voucher, 'year' => $this->getYear(), 'reminder' => $reminder, 'value' => $value, 'year' => $year)); |
35 | 35 | } |
36 | 36 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $available_from_index = array('year', 'search'); |
17 | 17 | |
18 | 18 | if (in_array($this->next(), $next) and !in_array($this->next(), $available_from_index)) { |
19 | - return new k_SeeOther($this->url('year/' . $this->getYear()->get('id') . '/' . $this->next())); |
|
19 | + return new k_SeeOther($this->url('year/'.$this->getYear()->get('id').'/'.$this->next())); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | return parent::dispatch(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | return new k_SeeOther($this->url('daybook')); |
40 | 40 | } |
41 | 41 | |
42 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/index'); |
|
42 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/index'); |
|
43 | 43 | return $smarty->render($this); |
44 | 44 | } |
45 | 45 |
@@ -68,11 +68,11 @@ |
||
68 | 68 | |
69 | 69 | function getAccount() |
70 | 70 | { |
71 | - return new Account($this->getYear()); |
|
71 | + return new Account($this->getYear()); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | function getPost() |
75 | 75 | { |
76 | - return new Post($this->getVoucher()); |
|
76 | + return new Post($this->getVoucher()); |
|
77 | 77 | } |
78 | 78 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $this->getKernel()->setting->set('user', 'accounting.state.message2', 'hide'); |
19 | 19 | } |
20 | 20 | |
21 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/state'); |
|
21 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/state'); |
|
22 | 22 | return $tpl->render($this); |
23 | 23 | } |
24 | 24 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | function getVoucher() |
64 | 64 | { |
65 | - require_once dirname(__FILE__) . '/../Voucher.php'; |
|
65 | + require_once dirname(__FILE__).'/../Voucher.php'; |
|
66 | 66 | return new Voucher($this->getYear()); |
67 | 67 | } |
68 | 68 |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | $this->document->setTitle('Account'); |
39 | 39 | |
40 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/account/show'); |
|
40 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/account/show'); |
|
41 | 41 | return $smarty->render($this, array('posts' => $posts, 'saldo' => $saldo)); |
42 | 42 | } |
43 | 43 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | { |
46 | 46 | $this->document->addScript($this->url('accounting/edit_account.js')); |
47 | 47 | |
48 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/account/edit'); |
|
48 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/account/edit'); |
|
49 | 49 | return $smarty->render($this); |
50 | 50 | } |
51 | 51 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | function getValues() |
77 | 77 | { |
78 | - return $this->getAccount()->get();; |
|
78 | + return $this->getAccount()->get(); ; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | function getAccount() |
@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | protected function map($name) |
12 | 12 | { |
13 | 13 | if (is_numeric($name)) { |
14 | - return 'Intraface_modules_accounting_Controller_Account_Show'; |
|
14 | + return 'Intraface_modules_accounting_Controller_Account_Show'; |
|
15 | 15 | } elseif ($name == 'popup') { |
16 | - return 'Intraface_modules_accounting_Controller_Account_Popup'; |
|
16 | + return 'Intraface_modules_accounting_Controller_Account_Popup'; |
|
17 | 17 | } |
18 | 18 | } |
19 | 19 | |
@@ -66,24 +66,24 @@ discard block |
||
66 | 66 | $worksheet->write($i, 0, $kernel->intranet->get('name'), $format_bold); |
67 | 67 | |
68 | 68 | $i = 2; |
69 | - foreach ($accounts AS $account) { |
|
70 | - $style = ''; |
|
71 | - if ($account['type'] == 'headline') { |
|
72 | - $style = $format_bold; |
|
73 | - } elseif ($account['type'] == 'sum') { |
|
74 | - $style = $format_italic; |
|
75 | - } else { |
|
76 | - $style = $format; |
|
77 | - } |
|
78 | - |
|
79 | - $worksheet->write($i, 0, $account['number'], $style); |
|
80 | - $worksheet->write($i, 1, $account['name'], $style); |
|
81 | - $worksheet->write($i, 2, $account['type'], $style); |
|
82 | - if ($account['type'] != 'Headline') { |
|
83 | - $worksheet->write($i, 3, abs(round($account['saldo'])), $style); |
|
84 | - } |
|
85 | - $i++; |
|
86 | - } |
|
69 | + foreach ($accounts AS $account) { |
|
70 | + $style = ''; |
|
71 | + if ($account['type'] == 'headline') { |
|
72 | + $style = $format_bold; |
|
73 | + } elseif ($account['type'] == 'sum') { |
|
74 | + $style = $format_italic; |
|
75 | + } else { |
|
76 | + $style = $format; |
|
77 | + } |
|
78 | + |
|
79 | + $worksheet->write($i, 0, $account['number'], $style); |
|
80 | + $worksheet->write($i, 1, $account['name'], $style); |
|
81 | + $worksheet->write($i, 2, $account['type'], $style); |
|
82 | + if ($account['type'] != 'Headline') { |
|
83 | + $worksheet->write($i, 3, abs(round($account['saldo'])), $style); |
|
84 | + } |
|
85 | + $i++; |
|
86 | + } |
|
87 | 87 | |
88 | 88 | $worksheet->hideGridLines(); |
89 | 89 | |
@@ -126,12 +126,12 @@ discard block |
||
126 | 126 | |
127 | 127 | function getAccount() |
128 | 128 | { |
129 | - return new Account($this->getYear()); |
|
129 | + return new Account($this->getYear()); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | function getAccounts() |
133 | 133 | { |
134 | - return $this->getAccountGateway()->findByType('stated', true); |
|
134 | + return $this->getAccountGateway()->findByType('stated', true); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | function getKernel() |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | 'accounts' => $accounts |
28 | 28 | ); |
29 | 29 | |
30 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/account/index'); |
|
30 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/account/index'); |
|
31 | 31 | return $smarty->render($this, $data); |
32 | 32 | } |
33 | 33 | |
@@ -45,21 +45,21 @@ discard block |
||
45 | 45 | $workbook->setVersion(8); |
46 | 46 | |
47 | 47 | // sending HTTP headers |
48 | - $workbook->send($kernel->intranet->get('name') . ' - konti ' . $year->get('label')); |
|
48 | + $workbook->send($kernel->intranet->get('name').' - konti '.$year->get('label')); |
|
49 | 49 | |
50 | 50 | // Creating a worksheet |
51 | - $worksheet =& $workbook->addWorksheet('Konti ' . $year->get('label')); |
|
51 | + $worksheet = & $workbook->addWorksheet('Konti '.$year->get('label')); |
|
52 | 52 | $worksheet->setInputEncoding('UTF-8'); |
53 | 53 | |
54 | - $format_bold =& $workbook->addFormat(); |
|
54 | + $format_bold = & $workbook->addFormat(); |
|
55 | 55 | $format_bold->setBold(); |
56 | 56 | $format_bold->setSize(8); |
57 | 57 | |
58 | - $format_italic =& $workbook->addFormat(); |
|
58 | + $format_italic = & $workbook->addFormat(); |
|
59 | 59 | $format_italic->setItalic(); |
60 | 60 | $format_italic->setSize(8); |
61 | 61 | |
62 | - $format =& $workbook->addFormat(); |
|
62 | + $format = & $workbook->addFormat(); |
|
63 | 63 | $format->setSize(8); |
64 | 64 | |
65 | 65 | $i = 0; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | { |
97 | 97 | $this->document->addScript('accounting/edit_account.js'); |
98 | 98 | |
99 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/account/edit'); |
|
99 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/account/edit'); |
|
100 | 100 | return $smarty->render($this); |
101 | 101 | } |
102 | 102 |