@@ -103,7 +103,7 @@ |
||
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 | } |
@@ -120,7 +120,7 @@ |
||
120 | 120 | $howMany = count($nValues); |
121 | 121 | for ($counter = 0; $counter <= $howMany; $counter++) { |
122 | 122 | if (($lngTaxBase <= $nValues[$counter]['Upper Limit Value'])) { |
123 | - $sLbl = [ |
|
123 | + $sLbl = [ |
|
124 | 124 | 'BDP' => $nValues[$counter]['Base Deducted Percentage'], |
125 | 125 | 'BDV' => $nValues[$counter]['Base Deduction Value'], |
126 | 126 | 'TFV' => $nValues[$counter]['Tax Free Value'], |
@@ -94,6 +94,9 @@ discard block |
||
94 | 94 | ]; |
95 | 95 | } |
96 | 96 | |
97 | + /** |
|
98 | + * @param double $lngBase |
|
99 | + */ |
|
97 | 100 | private function getValues($lngBase, $aStngs) |
98 | 101 | { |
99 | 102 | $inDate = $_REQUEST['ym']; |
@@ -277,6 +280,11 @@ discard block |
||
277 | 280 | return $this->setArrayToSelect($temp, $_REQUEST['ym'], 'ym', ['size' => 1]); |
278 | 281 | } |
279 | 282 | |
283 | + /** |
|
284 | + * @param string $inName |
|
285 | + * @param integer $inSize |
|
286 | + * @param string $inAfterLabel |
|
287 | + */ |
|
280 | 288 | private function setFormInputText($inName, $inSize, $inAfterLabel) |
281 | 289 | { |
282 | 290 | $inputParameters = [ |
@@ -347,6 +355,9 @@ discard block |
||
347 | 355 | ]), 'fieldset', ['style' => 'float: left;']); |
348 | 356 | } |
349 | 357 | |
358 | + /** |
|
359 | + * @param string $text |
|
360 | + */ |
|
350 | 361 | private function setFormRow($text, $value, $type = 'amount') |
351 | 362 | { |
352 | 363 | $a = ''; |
@@ -428,6 +439,9 @@ discard block |
||
428 | 439 | . '<h1>' . $this->tApp->gettext('i18n_ApplicationName') . '</h1>'; |
429 | 440 | } |
430 | 441 | |
442 | + /** |
|
443 | + * @param string $labelId |
|
444 | + */ |
|
431 | 445 | private function setLabel($labelId) |
432 | 446 | { |
433 | 447 | $labelInfo = $this->appFlags['FI'][$labelId]['Label']; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $this->refreshExchangeRatesFile($interfaceElements['Application']); |
56 | 56 | $this->setCurrencyExchangeVariables($interfaceElements['Relevant Currencies']); |
57 | 57 | $this->getExchangeRates($interfaceElements['Application'], $interfaceElements['Relevant Currencies']); |
58 | - $aryStngs = $this->readTypeFromJsonFileUniversal($configPath, 'valuesToCompute'); |
|
58 | + $aryStngs = $this->readTypeFromJsonFileUniversal($configPath, 'valuesToCompute'); |
|
59 | 59 | echo $this->setFormOutput($aryStngs); |
60 | 60 | echo $this->setFooterHtml($interfaceElements['Application']); |
61 | 61 | } |
@@ -134,13 +134,13 @@ discard block |
||
134 | 134 | if ($this->tCmnSuperGlobals->get('ym') < mktime(0, 0, 0, 1, 1, 2008)) { |
135 | 135 | $unemploymentBase = $_REQUEST['sn']; |
136 | 136 | } |
137 | - $aReturn = [ |
|
137 | + $aReturn = [ |
|
138 | 138 | 'ba' => $this->setFoodTicketsValue($inDate, $aStngs[$shLbl['MTV']]) * $nMealDays, |
139 | 139 | 'cas' => $this->setHealthFundTax($inDate, $lngBase, $aStngs[$shLbl['HFP']], $aStngs[$shLbl['HFUL']]), |
140 | 140 | 'sanatate' => $this->setHealthTax($inDate, $lngBase, $aStngs[$shLbl['HTP']]), |
141 | 141 | 'somaj' => $this->setUnemploymentTax($inDate, $unemploymentBase), |
142 | 142 | ]; |
143 | - $pdVal = [ |
|
143 | + $pdVal = [ |
|
144 | 144 | $inDate, |
145 | 145 | ($lngBase + $aReturn['ba']), |
146 | 146 | $_REQUEST['pi'], |
@@ -153,15 +153,15 @@ discard block |
||
153 | 153 | $aReturn['somaj'], |
154 | 154 | $aReturn['pd'], |
155 | 155 | ]; |
156 | - $rest = $lngBase - array_sum($restArrayToDeduct); |
|
156 | + $rest = $lngBase - array_sum($restArrayToDeduct); |
|
157 | 157 | if ($inDate >= mktime(0, 0, 0, 7, 1, 2010)) { |
158 | 158 | $rest += round($aReturn['ba'], -4); |
159 | 159 | if ($inDate >= mktime(0, 0, 0, 10, 1, 2010)) { |
160 | 160 | $aReturn['gbns'] = $_REQUEST['gbns'] * pow(10, 4); |
161 | - $rest += round($aReturn['gbns'], -4); |
|
161 | + $rest += round($aReturn['gbns'], -4); |
|
162 | 162 | } |
163 | 163 | } |
164 | - $rest += $_REQUEST['afet'] * pow(10, 4); |
|
164 | + $rest += $_REQUEST['afet'] * pow(10, 4); |
|
165 | 165 | $aReturn['impozit'] = $this->setIncomeTax($inDate, $rest, $aStngs[$shLbl['IT']]); |
166 | 166 | $aReturn['zile'] = $wkDay; |
167 | 167 | return $aReturn; |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | 'name' => 'action', |
241 | 241 | 'value' => $_SERVER['SERVER_NAME'] |
242 | 242 | ]); |
243 | - $sReturn[] = $this->setStringIntoTag($this->setStringIntoTag($label . $hiddenField, 'td', [ |
|
243 | + $sReturn[] = $this->setStringIntoTag($this->setStringIntoTag($label . $hiddenField, 'td', [ |
|
244 | 244 | 'colspan' => 2, |
245 | 245 | 'style' => 'color: red;' |
246 | 246 | ]), 'tr'); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | 'id' => 'submit', |
251 | 251 | 'value' => $submitBtnTxt |
252 | 252 | ]), 1); |
253 | - $frm = $this->setStringIntoTag($this->setStringIntoTag(implode('', $sReturn), 'table'), 'form', [ |
|
253 | + $frm = $this->setStringIntoTag($this->setStringIntoTag(implode('', $sReturn), 'table'), 'form', [ |
|
254 | 254 | 'method' => 'get', |
255 | 255 | 'action' => $_SERVER['SCRIPT_NAME'] |
256 | 256 | ]); |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | $sReturn[] = $this->setFormRow(sprintf($ovTime['main'], $ovTime[1], '175%'), ($overtime['os175'] * pow(10, 4))); |
328 | 328 | $sReturn[] = $this->setFormRow(sprintf($ovTime['main'], $ovTime[2], '200%'), ($overtime['os200'] * pow(10, 4))); |
329 | 329 | $sReturn[] = $this->setFormRow($this->tApp->gettext('i18n_Form_Label_BruttoSalary'), $brut); |
330 | - $brut += $_REQUEST['afet'] * pow(10, 4); |
|
330 | + $brut += $_REQUEST['afet'] * pow(10, 4); |
|
331 | 331 | $amount = $this->getValues($brut, $aryStngs); |
332 | 332 | $sReturn[] = $this->setFormRow($this->tApp->gettext('i18n_Form_Label_PensionFund'), $amount['cas']); |
333 | 333 | $sReturn[] = $this->setFormRow($this->tApp->gettext('i18n_Form_Label_UnemploymentTax'), $amount['somaj']); |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | $sReturn = ''; |
435 | 435 | if (is_array($labelInfo)) { |
436 | 436 | if (count($labelInfo) == 3) { |
437 | - $pieces = [ |
|
437 | + $pieces = [ |
|
438 | 438 | $this->tApp->gettext($labelInfo[0]), |
439 | 439 | $this->tApp->gettext($labelInfo[1]), |
440 | 440 | ]; |