Completed
Push — master ( 4b9f77...969087 )
by Daniel
02:23
created
Salariu/Salariu.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -146,6 +146,9 @@  discard block
 block discarded – undo
146 146
         ];
147 147
     }
148 148
 
149
+    /**
150
+     * @param double $lngBase
151
+     */
149 152
     private function getValues($lngBase)
150 153
     {
151 154
         $aReturn['cas']      = $this->setHealthFundTax($_REQUEST['ym'], $lngBase);
@@ -406,6 +409,9 @@  discard block
 block discarded – undo
406 409
                         ]), 'fieldset', ['style' => 'float: left;']);
407 410
     }
408 411
 
412
+    /**
413
+     * @param string $text
414
+     */
409 415
     private function setFormRow($text, $value, $type = 'amount')
410 416
     {
411 417
         $a                = '';
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -124,13 +124,13 @@  discard block
 block discarded – undo
124 124
         if ($_REQUEST['ym'] < mktime(0, 0, 0, 1, 1, 2008)) {
125 125
             $unemploymentBase = $_REQUEST['sn'];
126 126
         }
127
-        $aReturn           = [
127
+        $aReturn = [
128 128
             'ba'       => $this->setFoodTicketsValue($_REQUEST['ym'], $aryStngs['Meal Ticket Value']) * $nMealDays,
129 129
             'cas'      => $this->setHealthFundTax($_REQUEST['ym'], $lngBase),
130 130
             'sanatate' => $this->setHealthTax($_REQUEST['ym'], $lngBase),
131 131
             'somaj'    => $this->setUnemploymentTax($_REQUEST['ym'], $unemploymentBase),
132 132
         ];
133
-        $pdVal             = [
133
+        $pdVal = [
134 134
             $_REQUEST['ym'],
135 135
             ($lngBase + $aReturn['ba']),
136 136
             $_REQUEST['pi'],
@@ -143,13 +143,13 @@  discard block
 block discarded – undo
143 143
             $aReturn['somaj'],
144 144
             $aReturn['pd'],
145 145
         ];
146
-        $rest              = $lngBase - array_sum($restArrayToDeduct);
146
+        $rest = $lngBase - array_sum($restArrayToDeduct);
147 147
         if ($_REQUEST['ym'] >= mktime(0, 0, 0, 7, 1, 2010)) {
148 148
             $rest += round($aReturn['ba'], -4);
149 149
         }
150 150
         if ($_REQUEST['ym'] >= mktime(0, 0, 0, 10, 1, 2010)) {
151 151
             $aReturn['gbns'] = $_REQUEST['gbns'] * pow(10, 4);
152
-            $rest            += round($aReturn['gbns'], -4);
152
+            $rest += round($aReturn['gbns'], -4);
153 153
         }
154 154
         $rest               += $_REQUEST['afet'] * pow(10, 4);
155 155
         $aReturn['impozit'] = $this->setIncomeTax($_REQUEST['ym'], $rest);
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
                     'value' => $_REQUEST['pn'],
232 232
                     'size'  => 10
233 233
                 ]) . ' RON', 1);
234
-        $pieces    = [
234
+        $pieces = [
235 235
             $this->tApp->gettext('i18n_Form_Label_OvertimeHours'),
236 236
             $this->tApp->gettext('i18n_Form_Label_OvertimeChoice1'),
237 237
         ];
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                     'value' => $_REQUEST['os175'],
243 243
                     'size'  => 2
244 244
                 ]), 1);
245
-        $pieces    = [
245
+        $pieces = [
246 246
             $this->tApp->gettext('i18n_Form_Label_OvertimeHours'),
247 247
             $this->tApp->gettext('i18n_Form_Label_OvertimeChoice2'),
248 248
         ];
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
                     'value' => $_REQUEST['os200'],
254 254
                     'size'  => 2
255 255
                 ]), 1);
256
-        $temp2     = [];
256
+        $temp2 = [];
257 257
         for ($counter = 0; $counter <= 4; $counter++) {
258 258
             $temp2[] = $counter;
259 259
         }
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
                     'id'    => 'submit',
316 316
                     'value' => $submitBtnTxt
317 317
                 ]), 1);
318
-        $frm       = $this->setStringIntoTag($this->setStringIntoTag(implode('', $sReturn), 'table'), 'form', [
318
+        $frm = $this->setStringIntoTag($this->setStringIntoTag(implode('', $sReturn), 'table'), 'form', [
319 319
             'method' => 'get',
320 320
             'action' => $_SERVER['SCRIPT_NAME']
321 321
         ]);
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         $sReturn[] = $this->setFormRow(sprintf($ovTime['main'], $ovTime[1], '175%'), ($overtime['os175'] * pow(10, 4)));
364 364
         $sReturn[] = $this->setFormRow(sprintf($ovTime['main'], $ovTime[2], '200%'), ($overtime['os200'] * pow(10, 4)));
365 365
         $sReturn[] = $this->setFormRow($this->tApp->gettext('i18n_Form_Label_BruttoSalary'), $brut);
366
-        $brut      += $_REQUEST['afet'] * pow(10, 4);
366
+        $brut += $_REQUEST['afet'] * pow(10, 4);
367 367
         $amount    = $this->getValues($brut, $aryStngs);
368 368
         $sReturn[] = $this->setFormRow($this->tApp->gettext('i18n_Form_Label_PensionFund'), $amount['cas']);
369 369
         $sReturn[] = $this->setFormRow($this->tApp->gettext('i18n_Form_Label_UnemploymentTax'), $amount['somaj']);
Please login to merge, or discard this patch.
Salariu/Bonuses.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
                 2003 => 1800000,
104 104
                 2004 => 2000000,
105 105
             ];
106
-            $nReturn      = $valuesYearly[$yrDate];
106
+            $nReturn = $valuesYearly[$yrDate];
107 107
         } elseif ($yr == 2001) {
108 108
             $nReturn = $this->setPersonalDeductionSimple2001($lngDate);
109 109
         }
Please login to merge, or discard this patch.
Salariu/Taxation.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -148,37 +148,37 @@  discard block
 block discarded – undo
148 148
     {
149 149
         $mnth = date('n', $lngDate);
150 150
         if ($mnth <= 6) {
151
-            $nReturn = 1822070 + ($lngTaxBase - 6867000 ) * 40 / 100;
151
+            $nReturn = 1822070 + ($lngTaxBase - 6867000) * 40 / 100;
152 152
             if ($lngTaxBase <= 1259000) {
153 153
                 $nReturn = $lngTaxBase * 18 / 100;
154 154
             } elseif ($lngTaxBase <= 3090000) {
155
-                $nReturn = 226620 + ($lngTaxBase - 1259000 ) * 23 / 100;
155
+                $nReturn = 226620 + ($lngTaxBase - 1259000) * 23 / 100;
156 156
             } elseif ($lngTaxBase <= 4921000) {
157
-                $nReturn = 647750 + ($lngTaxBase - 3090000 ) * 28 / 100;
157
+                $nReturn = 647750 + ($lngTaxBase - 3090000) * 28 / 100;
158 158
             } elseif ($lngTaxBase <= 6867000) {
159
-                $nReturn = 1160430 + ($lngTaxBase - 4921000 ) * 34 / 100;
159
+                $nReturn = 1160430 + ($lngTaxBase - 4921000) * 34 / 100;
160 160
             }
161 161
         } elseif ($mnth <= 9) {
162
-            $nReturn = 2109940 + ($lngTaxBase - 7952000 ) * 40 / 100;
162
+            $nReturn = 2109940 + ($lngTaxBase - 7952000) * 40 / 100;
163 163
             if ($lngTaxBase <= 1458000) {
164 164
                 $nReturn = $lngTaxBase * 18 / 100;
165 165
             } elseif ($lngTaxBase <= 3578000) {
166
-                $nReturn = 262440 + ($lngTaxBase - 1458000 ) * 23 / 100;
166
+                $nReturn = 262440 + ($lngTaxBase - 1458000) * 23 / 100;
167 167
             } elseif ($lngTaxBase <= 5699000) {
168
-                $nReturn = 750040 + ($lngTaxBase - 3578000 ) * 28 / 100;
168
+                $nReturn = 750040 + ($lngTaxBase - 3578000) * 28 / 100;
169 169
             } elseif ($lngTaxBase <= 7952000) {
170
-                $nReturn = 1343920 + ($lngTaxBase - 5699000 ) * 34 / 100;
170
+                $nReturn = 1343920 + ($lngTaxBase - 5699000) * 34 / 100;
171 171
             }
172 172
         } elseif ($mnth > 9) {
173
-            $nReturn = 2231000 + ($lngTaxBase - 8400000 ) * 40 / 100;
173
+            $nReturn = 2231000 + ($lngTaxBase - 8400000) * 40 / 100;
174 174
             if ($lngTaxBase <= 1500000) {
175 175
                 $nReturn = $lngTaxBase * 18 / 100;
176 176
             } elseif ($lngTaxBase <= 3800000) {
177
-                $nReturn = 270000 + ($lngTaxBase - 1500000 ) * 23 / 100;
177
+                $nReturn = 270000 + ($lngTaxBase - 1500000) * 23 / 100;
178 178
             } elseif ($lngTaxBase <= 6000000) {
179
-                $nReturn = 799000 + ($lngTaxBase - 3800000 ) * 28 / 100;
179
+                $nReturn = 799000 + ($lngTaxBase - 3800000) * 28 / 100;
180 180
             } elseif ($lngTaxBase <= 8400000) {
181
-                $nReturn = 1415000 + ($lngTaxBase - 6000000 ) * 34 / 100;
181
+                $nReturn = 1415000 + ($lngTaxBase - 6000000) * 34 / 100;
182 182
             }
183 183
         }
184 184
         return $nReturn;
@@ -186,45 +186,45 @@  discard block
 block discarded – undo
186 186
 
187 187
     private function setIncomeTax2002($lngTaxBase)
188 188
     {
189
-        $nReturn = 2710000 + ($lngTaxBase - 10200000 ) * 40 / 100;
189
+        $nReturn = 2710000 + ($lngTaxBase - 10200000) * 40 / 100;
190 190
         if ($lngTaxBase <= 1800000) {
191 191
             $nReturn = $lngTaxBase * 18 / 100;
192 192
         } elseif ($lngTaxBase <= 4600000) {
193
-            $nReturn = 324000 + ($lngTaxBase - 1800000 ) * 23 / 100;
193
+            $nReturn = 324000 + ($lngTaxBase - 1800000) * 23 / 100;
194 194
         } elseif ($lngTaxBase <= 7300000) {
195
-            $nReturn = 968000 + ($lngTaxBase - 4600000 ) * 28 / 100;
195
+            $nReturn = 968000 + ($lngTaxBase - 4600000) * 28 / 100;
196 196
         } elseif ($lngTaxBase <= 10200000) {
197
-            $nReturn = 1724000 + ($lngTaxBase - 7300000 ) * 34 / 100;
197
+            $nReturn = 1724000 + ($lngTaxBase - 7300000) * 34 / 100;
198 198
         }
199 199
         return $nReturn;
200 200
     }
201 201
 
202 202
     private function setIncomeTax2003($lngTaxBase)
203 203
     {
204
-        $nReturn = 3081000 + ($lngTaxBase - 11600000 ) * 40 / 100;
204
+        $nReturn = 3081000 + ($lngTaxBase - 11600000) * 40 / 100;
205 205
         if ($lngTaxBase <= 2100000) {
206 206
             $nReturn = ($lngTaxBase * 18) / 100;
207 207
         } elseif ($lngTaxBase <= 5200000) {
208
-            $nReturn = 324000 + ($lngTaxBase - 2100000 ) * 23 / 100;
208
+            $nReturn = 324000 + ($lngTaxBase - 2100000) * 23 / 100;
209 209
         } elseif ($lngTaxBase <= 8300000) {
210
-            $nReturn = 1091000 + ($lngTaxBase - 5200000 ) * 28 / 100;
210
+            $nReturn = 1091000 + ($lngTaxBase - 5200000) * 28 / 100;
211 211
         } elseif ($lngTaxBase <= 11600000) {
212
-            $nReturn = 1959000 + ($lngTaxBase - 8300000 ) * 34 / 100;
212
+            $nReturn = 1959000 + ($lngTaxBase - 8300000) * 34 / 100;
213 213
         }
214 214
         return $nReturn;
215 215
     }
216 216
 
217 217
     private function setIncomeTax2004($lngTaxBase)
218 218
     {
219
-        $nReturn = 3452000 + ($lngTaxBase - 13000000 ) * 40 / 100;
219
+        $nReturn = 3452000 + ($lngTaxBase - 13000000) * 40 / 100;
220 220
         if ($lngTaxBase <= 2400000) {
221 221
             $nReturn = ($lngTaxBase * 18) / 100;
222 222
         } elseif ($lngTaxBase <= 5800000) {
223
-            $nReturn = 432000 + ($lngTaxBase - 2400000 ) * 23 / 100;
223
+            $nReturn = 432000 + ($lngTaxBase - 2400000) * 23 / 100;
224 224
         } elseif ($lngTaxBase <= 9300000) {
225
-            $nReturn = 1214000 + ($lngTaxBase - 5800000 ) * 28 / 100;
225
+            $nReturn = 1214000 + ($lngTaxBase - 5800000) * 28 / 100;
226 226
         } elseif ($lngTaxBase <= 13000000) {
227
-            $nReturn = 2194000 + ($lngTaxBase - 9300000 ) * 34 / 100;
227
+            $nReturn = 2194000 + ($lngTaxBase - 9300000) * 34 / 100;
228 228
         }
229 229
         return $nReturn;
230 230
     }
Please login to merge, or discard this patch.