Completed
Branch master (6ed6e7)
by Lars
07:57
created
src/Intraface/modules/accounting/VoucherFile.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,5 +104,5 @@
 block discarded – undo
104 104
     {
105 105
         $gateway = new Intraface_modules_accounting_VoucherFileGateway($this->voucher);
106 106
         return $gateway->getList();
107
-   }
107
+    }
108 108
 }
109 109
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
     );
18 18
     public $error;
19 19
 
20
-    function __construct($voucher, $id=0)
20
+    function __construct($voucher, $id = 0)
21 21
     {
22 22
         if (!is_object($voucher)) {
23 23
             throw new Exception('VoucherFile:: Voucher ikke gyldig');
24 24
         }
25 25
         $this->voucher = $voucher;
26
-        $this->id      = (int) $id;
26
+        $this->id      = (int)$id;
27 27
         $this->error   = new Intraface_Error;
28 28
     }
29 29
 
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 
50 50
         $db = new DB_Sql();
51 51
         $sql = "SELECT id FROM accounting_voucher_file
52
-            WHERE intranet_id = " . $this->voucher->year->kernel->intranet->get('id') . "
52
+            WHERE intranet_id = " . $this->voucher->year->kernel->intranet->get('id')."
53 53
                 AND belong_to_key = ".array_search($var['belong_to'], $this->what_can_i_belong_to)."
54 54
                 AND belong_to_id = ".$var['belong_to_id']."
55
-                AND voucher_id = ".$this->voucher->getId() . " AND active = 1";
55
+                AND voucher_id = ".$this->voucher->getId()." AND active = 1";
56 56
         $db->query($sql);
57 57
         if ($db->nextRecord()) {
58 58
             // hvis filen allerede er tilknyttet lader vi som om alt gik godt, og vi siger go
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
         if ($this->id > 0) {
64 64
             $sql_type = "UPDATE ";
65
-            $sql_end = " WHERE id = " . $this->id;
65
+            $sql_end = " WHERE id = ".$this->id;
66 66
 
67 67
         } else {
68 68
             $sql_type = "INSERT INTO ";
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         if (empty($var['description'])) $var['description'] = '';
73 73
 
74
-        $sql = $sql_type . " accounting_voucher_file SET
74
+        $sql = $sql_type." accounting_voucher_file SET
75 75
             date_updated = NOW(),
76 76
             intranet_id = ".$this->voucher->year->kernel->intranet->get('id').",
77 77
             voucher_id = ".$this->voucher->get('id').",
@@ -89,14 +89,14 @@  discard block
 block discarded – undo
89 89
     function delete()
90 90
     {
91 91
         $db = new DB_Sql;
92
-        $db->query("UPDATE accounting_voucher_file SET active = 0 WHERE id = " . $this->id);
92
+        $db->query("UPDATE accounting_voucher_file SET active = 0 WHERE id = ".$this->id);
93 93
         return 1;
94 94
     }
95 95
 
96 96
     function undelete()
97 97
     {
98 98
         $db = new DB_Sql;
99
-        $db->query("UPDATE accounting_voucher_file SET active = 1 WHERE id = " . $this->id);
99
+        $db->query("UPDATE accounting_voucher_file SET active = 1 WHERE id = ".$this->id);
100 100
         return 1;
101 101
     }
102 102
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,9 @@
 block discarded – undo
69 69
             $sql_end = " , date_created = NOW()";
70 70
         }
71 71
 
72
-        if (empty($var['description'])) $var['description'] = '';
72
+        if (empty($var['description'])) {
73
+            $var['description'] = '';
74
+        }
73 75
 
74 76
         $sql = $sql_type . " accounting_voucher_file SET
75 77
             date_updated = NOW(),
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Vat/Show.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -26,22 +26,22 @@
 block discarded – undo
26 26
 
27 27
     function renderHtml()
28 28
     {
29
-     	$vat_period = $this->getVatPeriod();
30
-       	$vat_period->loadAmounts();
31
-       	$account_vat_in = $vat_period->get('account_vat_in');
32
-       	$account_vat_out = $vat_period->get('account_vat_out');
33
-       	$account_vat_abroad = $vat_period->get('account_vat_abroad');
34
-       	$saldo_rubrik_a = $vat_period->get('saldo_rubrik_a');
35
-       	$saldo_total = $vat_period->get('saldo_total');
29
+            $vat_period = $this->getVatPeriod();
30
+            $vat_period->loadAmounts();
31
+            $account_vat_in = $vat_period->get('account_vat_in');
32
+            $account_vat_out = $vat_period->get('account_vat_out');
33
+            $account_vat_abroad = $vat_period->get('account_vat_abroad');
34
+            $saldo_rubrik_a = $vat_period->get('saldo_rubrik_a');
35
+            $saldo_total = $vat_period->get('saldo_total');
36 36
 
37
-       	$data = array(
38
-       	    'vat_period' => $vat_period,
39
-       	    'account_vat_in' => $account_vat_in,
40
-       	    'account_vat_out' => $account_vat_out,
41
-       	    'account_vat_abroad' => $account_vat_abroad,
42
-       	    'saldo_rubrik_a' => $saldo_rubrik_a,
43
-       	    'saldo_total' => $saldo_total
44
-       	);
37
+            $data = array(
38
+                'vat_period' => $vat_period,
39
+                'account_vat_in' => $account_vat_in,
40
+                'account_vat_out' => $account_vat_out,
41
+                'account_vat_abroad' => $account_vat_abroad,
42
+                'saldo_rubrik_a' => $saldo_rubrik_a,
43
+                'saldo_total' => $saldo_total
44
+            );
45 45
 
46 46
         $smarty = $this->template->create(dirname(__FILE__) . '/../templates/vat/show');
47 47
         return $smarty->render($this, $data);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
        	    'saldo_total' => $saldo_total
44 44
        	);
45 45
 
46
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/vat/show');
46
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/vat/show');
47 47
         return $smarty->render($this, $data);
48 48
     }
49 49
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Vat/Index.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@
 block discarded – undo
47 47
 
48 48
     function postForm()
49 49
     {
50
-    	if (isset($_POST['vat_period_key'])) {
51
-    		$this->getYear()->setSetting('vat_period', $_POST['vat_period_key']);
52
-    	}
53
-    	$vat_period = new VatPeriod($this->getYear());
54
-    	$vat_period->createPeriods();
50
+        if (isset($_POST['vat_period_key'])) {
51
+            $this->getYear()->setSetting('vat_period', $_POST['vat_period_key']);
52
+        }
53
+        $vat_period = new VatPeriod($this->getYear());
54
+        $vat_period->createPeriods();
55 55
 
56
-    	return new k_SeeOther($this->url(null));
56
+        return new k_SeeOther($this->url(null));
57 57
     }
58 58
     
59 59
     function getPeriods()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         $periods = $vat_period->getList();
42 42
         $post = new Post(new Voucher($year));
43 43
 
44
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/vat/period');
44
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/vat/period');
45 45
         return $smarty->render($this);
46 46
     }
47 47
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Year/End.php 3 patches
Indentation   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -8,15 +8,15 @@  discard block
 block discarded – undo
8 8
         $this->template = $template;
9 9
     }
10 10
 
11
-	function renderHtml()
12
-	{
11
+    function renderHtml()
12
+    {
13 13
         $smarty = $this->template->create(dirname(__FILE__) . '/../templates/year/end');
14 14
         return $smarty->render($this);
15
-	}
15
+    }
16 16
 
17 17
     function renderXls()
18 18
     {
19
-    	$module = $this->getKernel()->module('accounting');
19
+        $module = $this->getKernel()->module('accounting');
20 20
         $module->includeFile('YearEnd.php');
21 21
 
22 22
         $kernel = $this->getKernel();
@@ -55,25 +55,25 @@  discard block
 block discarded – undo
55 55
 
56 56
         $i += 2;
57 57
         if (count($accounts) > 0) {
58
-        	foreach ($accounts AS $account) {
59
-        		$style = '';
60
-        		if ($account['type'] == 'headline') {
61
-        			$style = $format_bold;
62
-        		}
63
-        		elseif ($account['type'] == 'sum') {
64
-        			$style = $format_italic;
65
-        		}
66
-        		else {
67
-        			$style = $format;
68
-        		}
69
-
70
-        		$worksheet->write($i, 0, $account['number'], $style);
71
-        		$worksheet->write($i, 1, $account['name'], $style);
72
-        		if ($account['type'] != 'headline') {
73
-        			$worksheet->write($i, 2, abs(round($account['saldo'])), $style);
74
-        		}
75
-        		$i++;
76
-        	}
58
+            foreach ($accounts AS $account) {
59
+                $style = '';
60
+                if ($account['type'] == 'headline') {
61
+                    $style = $format_bold;
62
+                }
63
+                elseif ($account['type'] == 'sum') {
64
+                    $style = $format_italic;
65
+                }
66
+                else {
67
+                    $style = $format;
68
+                }
69
+
70
+                $worksheet->write($i, 0, $account['number'], $style);
71
+                $worksheet->write($i, 1, $account['name'], $style);
72
+                if ($account['type'] != 'headline') {
73
+                    $worksheet->write($i, 2, abs(round($account['saldo'])), $style);
74
+                }
75
+                $i++;
76
+            }
77 77
         }
78 78
 
79 79
         $accounts = $year_end->getStatement('balance');
@@ -82,25 +82,25 @@  discard block
 block discarded – undo
82 82
 
83 83
         $i += 2;
84 84
         if (count($accounts) > 0) {
85
-        	foreach ($accounts AS $account) {
86
-        		$style = '';
87
-        		if ($account['type'] == 'headline') {
88
-        			$style = $format_bold;
89
-        		}
90
-        		elseif ($account['type'] == 'sum') {
91
-        			$style = $format_italic;
92
-        		}
93
-        		else {
94
-        			$style = $format;
95
-        		}
96
-
97
-        		$worksheet->write($i, 0, $account['number'], $style);
98
-        		$worksheet->write($i, 1, $account['name'], $style);
99
-        		if ($account['type'] != 'headline') {
100
-        			$worksheet->write($i, 2, abs(round($account['saldo'])), $style);
101
-        		}
102
-        		$i++;
103
-        	}
85
+            foreach ($accounts AS $account) {
86
+                $style = '';
87
+                if ($account['type'] == 'headline') {
88
+                    $style = $format_bold;
89
+                }
90
+                elseif ($account['type'] == 'sum') {
91
+                    $style = $format_italic;
92
+                }
93
+                else {
94
+                    $style = $format;
95
+                }
96
+
97
+                $worksheet->write($i, 0, $account['number'], $style);
98
+                $worksheet->write($i, 1, $account['name'], $style);
99
+                if ($account['type'] != 'headline') {
100
+                    $worksheet->write($i, 2, abs(round($account['saldo'])), $style);
101
+                }
102
+                $i++;
103
+            }
104 104
 
105 105
 
106 106
         }
@@ -109,95 +109,95 @@  discard block
 block discarded – undo
109 109
         $workbook->close();
110 110
     }
111 111
     
112
-	function postForm()
113
-	{
112
+    function postForm()
113
+    {
114 114
         $year = $this->getYear();
115 115
         $account = new Account($year);
116 116
         $year_end = new YearEnd($year);
117 117
         $post = new Post(new Voucher($year));
118 118
         $vat_period = new VatPeriod($year);
119 119
 
120
-	    // These makes it possible to switch between steps
120
+        // These makes it possible to switch between steps
121 121
         if (!empty($_POST['previous'])) {
122
-        	$year_end = new YearEnd($year);
123
-        	$year_end->setStep($_POST['step'] - 2);
122
+            $year_end = new YearEnd($year);
123
+            $year_end->setStep($_POST['step'] - 2);
124 124
 
125 125
         }
126 126
         elseif (!empty($_POST['next'])) {
127
-        	$year_end = new YearEnd($year);
128
-        	$year_end->setStep($_POST['step']);
127
+            $year_end = new YearEnd($year);
128
+            $year_end->setStep($_POST['step']);
129 129
         }
130 130
 
131 131
         // reacts to the different steps
132 132
         if (!empty($_POST['step_save_result'])) {
133
-        	$year_end = new YearEnd($year);
133
+            $year_end = new YearEnd($year);
134 134
 
135
-        	if (!$year_end->saveStatement('operating')) {
136
-        		throw new Exception('Kunne ikke gemme resultatopgørelsen');
137
-        	}
138
-        	// @todo save "resultatopgørelsen"
135
+            if (!$year_end->saveStatement('operating')) {
136
+                throw new Exception('Kunne ikke gemme resultatopgørelsen');
137
+            }
138
+            // @todo save "resultatopgørelsen"
139 139
 
140
-        	$year_end->setStep($_POST['step']);
140
+            $year_end->setStep($_POST['step']);
141 141
         }
142 142
 
143 143
         elseif (!empty($_POST['step_save_balance'])) {
144
-        	$year_end = new YearEnd($year);
144
+            $year_end = new YearEnd($year);
145 145
 
146
-        	if (!$year_end->saveStatement('balance')) {
147
-        		throw new Exception('Kunne ikke gemme balancen');
148
-        	}
146
+            if (!$year_end->saveStatement('balance')) {
147
+                throw new Exception('Kunne ikke gemme balancen');
148
+            }
149 149
 
150
-        	$year_end->setStep($_POST['step']);
150
+            $year_end->setStep($_POST['step']);
151 151
         }
152 152
         elseif (!empty($_POST['step_transfer_result'])) {
153
-        	$year_end = new YearEnd($year);
153
+            $year_end = new YearEnd($year);
154 154
 
155
-        	if (!$year_end->resetYearResult()) {
156
-        		throw new Exception('Kunne ikke nulstille årets resultat');
157
-        	}
155
+            if (!$year_end->resetYearResult()) {
156
+                throw new Exception('Kunne ikke nulstille årets resultat');
157
+            }
158 158
 
159
-        	$year_end->setStep($_POST['step']);
159
+            $year_end->setStep($_POST['step']);
160 160
         }
161 161
         elseif (!empty($_POST['step_reverse_result_account_reset'])) {
162
-        	$year_end = new YearEnd($year);
163
-        	if (!$year_end->resetYearResult('reverse')) {
164
-        		echo $year_end->error->view();
165
-        		throw new Exception('Kunne ikke tilbageføre årets resultat');
166
-        	}
167
-        	$year_end->setStep($_POST['step'] - 1);
162
+            $year_end = new YearEnd($year);
163
+            if (!$year_end->resetYearResult('reverse')) {
164
+                echo $year_end->error->view();
165
+                throw new Exception('Kunne ikke tilbageføre årets resultat');
166
+            }
167
+            $year_end->setStep($_POST['step'] - 1);
168 168
         }
169 169
 
170 170
         // step 1
171 171
         elseif (!empty($_POST['step_things_stated'])) {
172
-        	$year_end = new YearEnd($year);
173
-        	$year_end->setStep($_POST['step']);
172
+            $year_end = new YearEnd($year);
173
+            $year_end->setStep($_POST['step']);
174 174
         }
175 175
 
176 176
         // transfer "resultatopgørelsen"
177 177
         elseif (!empty($_POST['step_result'])) {
178
-        	$year_end = new YearEnd($year);
179
-        	$account = new Account($year);
180
-        	$year->setSetting('result_account_id', $_POST['result_account_id']);
181
-
182
-        	if ($year_end->resetOperatingAccounts()) {
183
-        		$year_end->setStep($_POST['step']);
184
-        	} else {
185
-        		echo $year_end->error->view();
186
-        	}
178
+            $year_end = new YearEnd($year);
179
+            $account = new Account($year);
180
+            $year->setSetting('result_account_id', $_POST['result_account_id']);
181
+
182
+            if ($year_end->resetOperatingAccounts()) {
183
+                $year_end->setStep($_POST['step']);
184
+            } else {
185
+                echo $year_end->error->view();
186
+            }
187 187
         } elseif (!empty($_POST['step_lock_year'])) {
188
-        	if (!empty($_POST['lock']) AND $_POST['lock'] == '1') {
189
-        		$year->lock();
190
-        	}
191
-        	$year_end = new YearEnd($year);
192
-        	$year_end->setStep($_POST['step']);
188
+            if (!empty($_POST['lock']) AND $_POST['lock'] == '1') {
189
+                $year->lock();
190
+            }
191
+            $year_end = new YearEnd($year);
192
+            $year_end->setStep($_POST['step']);
193 193
         } elseif (!empty($_POST['step_reverse_result_reset'])) {
194
-        	$year_end = new YearEnd($year);
195
-        	$year_end->resetOperatingAccounts('reverse');
196
-        	$year_end->setStep($_POST['step'] - 1);
194
+            $year_end = new YearEnd($year);
195
+            $year_end->resetOperatingAccounts('reverse');
196
+            $year_end->setStep($_POST['step'] - 1);
197 197
         }
198 198
 
199 199
         return $this->render();
200
-	}
200
+    }
201 201
 
202 202
     function getAccount()
203 203
     {
@@ -205,28 +205,28 @@  discard block
 block discarded – undo
205 205
         return $account = new Account($year);
206 206
     }
207 207
 
208
-	function getPost()
209
-	{
208
+    function getPost()
209
+    {
210 210
         return $post = new Post(new Voucher($this->getYear()));
211
-	}
211
+    }
212 212
 
213
-	function getVatPeriod()
214
-	{
213
+    function getVatPeriod()
214
+    {
215 215
         return $vat_period = new VatPeriod($this->getYear());
216
-	}
216
+    }
217 217
 
218
-	function getYearEnd()
219
-	{
218
+    function getYearEnd()
219
+    {
220 220
         return $year_end = new YearEnd($this->getYear());
221
-	}
221
+    }
222 222
 
223
-	function getYear()
224
-	{
225
-	    return $this->context->getYear();
226
-	}
223
+    function getYear()
224
+    {
225
+        return $this->context->getYear();
226
+    }
227 227
 
228
-	function getKernel()
229
-	{
230
-	    return $this->context->getKernel();
231
-	}
228
+    function getKernel()
229
+    {
230
+        return $this->context->getKernel();
231
+    }
232 232
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 	function renderHtml()
12 12
 	{
13
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/year/end');
13
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/year/end');
14 14
         return $smarty->render($this);
15 15
 	}
16 16
 
@@ -29,21 +29,21 @@  discard block
 block discarded – undo
29 29
         $workbook->setVersion(8);
30 30
 
31 31
         // sending HTTP headers
32
-        $workbook->send($kernel->intranet->get('name') . ' - konti ' . $year->get('label') . '.xls');
32
+        $workbook->send($kernel->intranet->get('name').' - konti '.$year->get('label').'.xls');
33 33
 
34 34
         // Creating a worksheet
35
-        $worksheet =& $workbook->addWorksheet('Konti ' . $year->get('label'));
35
+        $worksheet = & $workbook->addWorksheet('Konti '.$year->get('label'));
36 36
         $worksheet->setInputEncoding('UTF-8');
37 37
 
38
-        $format_bold =& $workbook->addFormat();
38
+        $format_bold = & $workbook->addFormat();
39 39
         $format_bold->setBold();
40 40
         $format_bold->setSize(8);
41 41
 
42
-        $format_italic =& $workbook->addFormat();
42
+        $format_italic = & $workbook->addFormat();
43 43
         $format_italic->setItalic();
44 44
         $format_italic->setSize(8);
45 45
 
46
-        $format =& $workbook->addFormat();
46
+        $format = & $workbook->addFormat();
47 47
         $format->setSize(8);
48 48
         $i = 0;
49 49
         $worksheet->write($i, 0, $kernel->intranet->get('name'), $format_bold);
Please login to merge, or discard this patch.
Braces   +8 added lines, -17 removed lines patch added patch discarded remove patch
@@ -59,11 +59,9 @@  discard block
 block discarded – undo
59 59
         		$style = '';
60 60
         		if ($account['type'] == 'headline') {
61 61
         			$style = $format_bold;
62
-        		}
63
-        		elseif ($account['type'] == 'sum') {
62
+        		} elseif ($account['type'] == 'sum') {
64 63
         			$style = $format_italic;
65
-        		}
66
-        		else {
64
+        		} else {
67 65
         			$style = $format;
68 66
         		}
69 67
 
@@ -86,11 +84,9 @@  discard block
 block discarded – undo
86 84
         		$style = '';
87 85
         		if ($account['type'] == 'headline') {
88 86
         			$style = $format_bold;
89
-        		}
90
-        		elseif ($account['type'] == 'sum') {
87
+        		} elseif ($account['type'] == 'sum') {
91 88
         			$style = $format_italic;
92
-        		}
93
-        		else {
89
+        		} else {
94 90
         			$style = $format;
95 91
         		}
96 92
 
@@ -122,8 +118,7 @@  discard block
 block discarded – undo
122 118
         	$year_end = new YearEnd($year);
123 119
         	$year_end->setStep($_POST['step'] - 2);
124 120
 
125
-        }
126
-        elseif (!empty($_POST['next'])) {
121
+        } elseif (!empty($_POST['next'])) {
127 122
         	$year_end = new YearEnd($year);
128 123
         	$year_end->setStep($_POST['step']);
129 124
         }
@@ -138,9 +133,7 @@  discard block
 block discarded – undo
138 133
         	// @todo save "resultatopgørelsen"
139 134
 
140 135
         	$year_end->setStep($_POST['step']);
141
-        }
142
-
143
-        elseif (!empty($_POST['step_save_balance'])) {
136
+        } elseif (!empty($_POST['step_save_balance'])) {
144 137
         	$year_end = new YearEnd($year);
145 138
 
146 139
         	if (!$year_end->saveStatement('balance')) {
@@ -148,8 +141,7 @@  discard block
 block discarded – undo
148 141
         	}
149 142
 
150 143
         	$year_end->setStep($_POST['step']);
151
-        }
152
-        elseif (!empty($_POST['step_transfer_result'])) {
144
+        } elseif (!empty($_POST['step_transfer_result'])) {
153 145
         	$year_end = new YearEnd($year);
154 146
 
155 147
         	if (!$year_end->resetYearResult()) {
@@ -157,8 +149,7 @@  discard block
 block discarded – undo
157 149
         	}
158 150
 
159 151
         	$year_end->setStep($_POST['step']);
160
-        }
161
-        elseif (!empty($_POST['step_reverse_result_account_reset'])) {
152
+        } elseif (!empty($_POST['step_reverse_result_account_reset'])) {
162 153
         	$year_end = new YearEnd($year);
163 154
         	if (!$year_end->resetYearResult('reverse')) {
164 155
         		echo $year_end->error->view();
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Year/Show.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,17 +95,17 @@
 block discarded – undo
95 95
 
96 96
     function getYears()
97 97
     {
98
-    	return $this->getYear()->getList();
98
+        return $this->getYear()->getList();
99 99
     }
100 100
 
101 101
     function getAccount()
102 102
     {
103
-    	return new Account($this->getYear());
103
+        return new Account($this->getYear());
104 104
     }
105 105
 
106 106
     function getVatPeriod()
107 107
     {
108
-    	return new VatPeriod($this->getYear());
108
+        return new VatPeriod($this->getYear());
109 109
     }
110 110
 
111 111
     function getYearGateway()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
     function renderHtml()
47 47
     {
48
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/year/show');
48
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/year/show');
49 49
         return $smarty->render($this);
50 50
     }
51 51
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Year/Index.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
         if ($name == 'create') {
14 14
             return 'Intraface_modules_accounting_Controller_Year_Edit';
15 15
         } elseif (is_numeric($name)) {
16
-        	return 'Intraface_modules_accounting_Controller_Year_Show';
16
+            return 'Intraface_modules_accounting_Controller_Year_Show';
17 17
         }
18 18
     }
19 19
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $year = new Year($this->getKernel(), $_POST['id']);
29 29
 
30 30
         if (!$year->setYear()) {
31
-        	throw new Exception('Could not set the year');
31
+            throw new Exception('Could not set the year');
32 32
         }
33 33
         return new k_SeeOther($this->url($year->getId()));
34 34
     }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     function renderHtml()
21 21
     {
22
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/year/index');
22
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/year/index');
23 23
         return $smarty->render($this);
24 24
     }
25 25
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     function renderHtmlCreate()
49 49
     {
50
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/year/edit');
50
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/year/edit');
51 51
         return $smarty->render($this);
52 52
     }
53 53
 
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 
65 65
     function getValues()
66 66
     {
67
-        $values['from_date_dk'] = '01-01-' . date('Y');
68
-        $values['to_date_dk'] = '31-12-' . date('Y');
67
+        $values['from_date_dk'] = '01-01-'.date('Y');
68
+        $values['to_date_dk'] = '31-12-'.date('Y');
69 69
         return $values;
70 70
     }
71 71
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Year/Edit.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@
 block discarded – undo
34 34
     function getYear()
35 35
     {
36 36
         if (is_numeric($this->context->name())) {
37
-        	return new Year($this->getKernel(), $this->context->name());
37
+            return new Year($this->getKernel(), $this->context->name());
38 38
         } else {
39
-        	return new Year($this->getKernel(), 0, false);
39
+            return new Year($this->getKernel(), 0, false);
40 40
         }
41 41
     }
42 42
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     function renderHtml()
12 12
     {
13
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/year/edit');
13
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/year/edit');
14 14
         return $smarty->render($this);
15 15
     }
16 16
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Year/Primosaldo.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $this->getKernel()->module('accounting');
71 71
 
72
-      	$year = new Year($this->getKernel(), $this->context->name());
72
+            $year = new Year($this->getKernel(), $this->context->name());
73 73
 
74 74
         $account = new Account($year);
75 75
         $accounts = $account->getList('balance');
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
     {
95 95
         $year = $this->getYear();
96 96
         foreach ($_POST['id'] AS $key=>$values) {
97
-        	$account = new Account($year, $_POST['id'][$key]);
98
-        	$account->savePrimosaldo($_POST['debet'][$key], $_POST['credit'][$key]);
97
+            $account = new Account($year, $_POST['id'][$key]);
98
+            $account->savePrimosaldo($_POST['debet'][$key], $_POST['credit'][$key]);
99 99
         }
100 100
         if (!$account->error->isError()) {
101
-        	return new k_SeeOther($this->url());
102
-       	}
101
+            return new k_SeeOther($this->url());
102
+            }
103 103
         return $this->render();
104 104
     }
105 105
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
         $data = array('total_debet' => $total_debet, 'total_credit' => $total_credit, 'account' => $account, 'year' => $year, 'accounts' => $accounts);
22 22
 
23
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/year/primosaldo');
23
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/year/primosaldo');
24 24
         return $smarty->render($this, $data);
25 25
     }
26 26
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             'account' => $account
86 86
         );
87 87
 
88
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/year/primosaldo-edit');
88
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/year/primosaldo-edit');
89 89
         return $smarty->render($this, $data);
90 90
 
91 91
     }
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/State/Depreciation.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@
 block discarded – undo
23 23
         }
24 24
 
25 25
         $data = array(
26
-        	'accounting_module' => $accounting_module,
27
-        	'voucher' => $this->getVoucher(),
28
-        	'year' => $this->getYear(),
29
-        	'depreciation' => $this->getModel(),
30
-        	'object' => $this->getDebtor(),
31
-        	'year' => $this->getYear());
26
+            'accounting_module' => $accounting_module,
27
+            'voucher' => $this->getVoucher(),
28
+            'year' => $this->getYear(),
29
+            'depreciation' => $this->getModel(),
30
+            'object' => $this->getDebtor(),
31
+            'year' => $this->getYear());
32 32
 
33 33
         $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/depreciation');
34 34
         return $smarty->render($this, $data);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         	'object' => $this->getDebtor(),
31 31
         	'year' => $this->getYear());
32 32
 
33
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/depreciation');
33
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/state/depreciation');
34 34
         return $smarty->render($this, $data);
35 35
     }
36 36
 
Please login to merge, or discard this patch.