@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | $yearArray = range($start_year, $end_year); |
376 | 376 | foreach ($yearArray as $year) { |
377 | 377 | $selected = ($year == $currentyear) ? 'selected' : ''; |
378 | - echo '<option ' . $selected . ' value="' . $year . '">' . $year . '</option>'; |
|
378 | + echo '<option '.$selected.' value="'.$year.'">'.$year.'</option>'; |
|
379 | 379 | } |
380 | 380 | ?> |
381 | 381 | </select> |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | $monthPadding = str_pad($month, 2, "0", STR_PAD_LEFT); |
389 | 389 | $fdate = date("F", strtotime($monthPadding)); |
390 | 390 | $selected = (date("m") == $monthPadding) ? 'selected' : null; |
391 | - echo '<option value="' . $monthPadding . '" ' . $selected . '>' . date("F", mktime(null, null, null, $monthPadding, 1)) . '</option>'; |
|
391 | + echo '<option value="'.$monthPadding.'" '.$selected.'>'.date("F", mktime(null, null, null, $monthPadding, 1)).'</option>'; |
|
392 | 392 | } |
393 | 393 | ?> |
394 | 394 | </select> |
@@ -181,13 +181,13 @@ discard block |
||
181 | 181 | </tr> |
182 | 182 | <tr> |
183 | 183 | <td> |
184 | - <b>From Date : </b><span style="color:#a09d9d;"> <?php echo date('Y-m-d', strtotime($from_date)) ; ?></span> |
|
184 | + <b>From Date : </b><span style="color:#a09d9d;"> <?php echo date('Y-m-d', strtotime($from_date)); ?></span> |
|
185 | 185 | </td> |
186 | 186 | </tr> |
187 | 187 | <tr> |
188 | 188 | <td> |
189 | 189 | <b>Due Date : </b><span style="color:#a09d9d;"><?php |
190 | - echo date('Y-m-d', strtotime($payment_due_date)) ; |
|
190 | + echo date('Y-m-d', strtotime($payment_due_date)); |
|
191 | 191 | ?></span> |
192 | 192 | </td> |
193 | 193 | </tr> |
@@ -218,12 +218,12 @@ discard block |
||
218 | 218 | <th >Amount</th> |
219 | 219 | </tr> |
220 | 220 | <?php |
221 | -$j=1; |
|
221 | +$j = 1; |
|
222 | 222 | |
223 | - foreach($invoice_total_query as $value){ |
|
224 | - $id=$value['id']; |
|
225 | - $debit=$value['debit']; |
|
226 | - $created_date=$value['created_date']; |
|
223 | + foreach ($invoice_total_query as $value) { |
|
224 | + $id = $value['id']; |
|
225 | + $debit = $value['debit']; |
|
226 | + $created_date = $value['created_date']; |
|
227 | 227 | ?> |
228 | 228 | <tr> |
229 | 229 | <td width="20" align="center"> |
@@ -158,13 +158,13 @@ |
||
158 | 158 | </tr> |
159 | 159 | <tr> |
160 | 160 | <td> |
161 | - <b>From Date : </b><span style="color:#a09d9d;"> <?php echo date('Y-m-d', strtotime($from_date)) ; ?></span> |
|
161 | + <b>From Date : </b><span style="color:#a09d9d;"> <?php echo date('Y-m-d', strtotime($from_date)); ?></span> |
|
162 | 162 | </td> |
163 | 163 | </tr> |
164 | 164 | <tr> |
165 | 165 | <td> |
166 | 166 | <b>Due Date : </b><span style="color:#a09d9d;"><?php |
167 | - echo date('Y-m-d', strtotime($payment_due_date)) ; |
|
167 | + echo date('Y-m-d', strtotime($payment_due_date)); |
|
168 | 168 | ?></span> |
169 | 169 | </td> |
170 | 170 | </tr> |
@@ -100,13 +100,13 @@ discard block |
||
100 | 100 | </tr> |
101 | 101 | <tr> |
102 | 102 | <td> |
103 | - <b>From Date : </b><span style="color:#a09d9d;"> <?php echo date('Y-m-d', strtotime($from_date)) ; ?></span> |
|
103 | + <b>From Date : </b><span style="color:#a09d9d;"> <?php echo date('Y-m-d', strtotime($from_date)); ?></span> |
|
104 | 104 | </td> |
105 | 105 | </tr> |
106 | 106 | <tr> |
107 | 107 | <td> |
108 | 108 | <b>Due Date : </b><span style="color:#a09d9d;"><?php |
109 | - echo date('Y-m-d', strtotime($payment_due_date)) ; |
|
109 | + echo date('Y-m-d', strtotime($payment_due_date)); |
|
110 | 110 | ?></span> |
111 | 111 | </td> |
112 | 112 | </tr> |
@@ -140,24 +140,24 @@ discard block |
||
140 | 140 | </th> |
141 | 141 | </tr> |
142 | 142 | <?php |
143 | -$paypal=0; |
|
144 | - foreach($invoice_final_query as $value){ |
|
143 | +$paypal = 0; |
|
144 | + foreach ($invoice_final_query as $value) { |
|
145 | 145 | |
146 | - if($value['item_type'] != 'INVPAY' && $value['item_type'] != 'PAYMENT') { |
|
147 | - $debit=$value['debit']; |
|
148 | - $credit=$value['credit']; |
|
149 | - $paypal+=$credit; |
|
150 | - $created_date=$value['created_date']; |
|
151 | - $paypalid=$value['item_id']; |
|
152 | - $outstanding=$amount-$paypal; |
|
153 | - $amount_visible='0000'; |
|
146 | + if ($value['item_type'] != 'INVPAY' && $value['item_type'] != 'PAYMENT') { |
|
147 | + $debit = $value['debit']; |
|
148 | + $credit = $value['credit']; |
|
149 | + $paypal += $credit; |
|
150 | + $created_date = $value['created_date']; |
|
151 | + $paypalid = $value['item_id']; |
|
152 | + $outstanding = $amount - $paypal; |
|
153 | + $amount_visible = '0000'; |
|
154 | 154 | |
155 | 155 | |
156 | 156 | |
157 | 157 | ?> |
158 | 158 | <tr style="height:20px;"> |
159 | 159 | <td><?php echo $value['description']; ?> </td> |
160 | - <td><div class="pull-right"><?php echo $this->common->currency_decimal($this->common_model->calculate_currency($debit)); ?> <?php echo $to_currency; ?></div></td> |
|
160 | + <td><div class="pull-right"><?php echo $this->common->currency_decimal($this->common_model->calculate_currency($debit)); ?> <?php echo $to_currency; ?></div></td> |
|
161 | 161 | <input type="hidden" name="new_amount" value="<?php echo $this->common->currency_decimal($this->common_model->calculate_currency($debit)); ?>"> |
162 | 162 | |
163 | 163 | |
@@ -196,18 +196,18 @@ discard block |
||
196 | 196 | |
197 | 197 | </tr> |
198 | 198 | <?php |
199 | -$paypal=0; |
|
200 | -if($invoice_date){ |
|
201 | - foreach($invoice_total_query as $value){ |
|
199 | +$paypal = 0; |
|
200 | +if ($invoice_date) { |
|
201 | + foreach ($invoice_total_query as $value) { |
|
202 | 202 | |
203 | 203 | |
204 | - $debit=$value['debit']; |
|
205 | - $credit=$value['credit']; |
|
206 | - $paypal+=$credit; |
|
207 | - $created_date=$value['created_date']; |
|
208 | - $paypalid=$value['item_id']; |
|
209 | - $outstanding=$amount-$paypal; |
|
210 | - $amount_visible='0000'; |
|
204 | + $debit = $value['debit']; |
|
205 | + $credit = $value['credit']; |
|
206 | + $paypal += $credit; |
|
207 | + $created_date = $value['created_date']; |
|
208 | + $paypalid = $value['item_id']; |
|
209 | + $outstanding = $amount - $paypal; |
|
210 | + $amount_visible = '0000'; |
|
211 | 211 | |
212 | 212 | |
213 | 213 |
@@ -298,7 +298,7 @@ |
||
298 | 298 | </td> |
299 | 299 | </tr> |
300 | 300 | </table> |
301 | -<?php }elseif ($logintype == 1) {?> |
|
301 | +<?php } elseif ($logintype == 1) {?> |
|
302 | 302 | <table class="invoice_table1 pull-right"> |
303 | 303 | <tr style="border-bottom:2px solid #dfdfe1; color:#474747;"><th colspan="2">Payment Amount :</th></tr> |
304 | 304 | <tr> |
@@ -1025,18 +1025,15 @@ |
||
1025 | 1025 | { |
1026 | 1026 | include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php'); |
1027 | 1027 | break; |
1028 | - } |
|
1029 | - elseif (defined('ENVIRONMENT') AND file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php')) |
|
1028 | + } elseif (defined('ENVIRONMENT') AND file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php')) |
|
1030 | 1029 | { |
1031 | 1030 | include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'); |
1032 | 1031 | break; |
1033 | - } |
|
1034 | - elseif (file_exists($path.'config/'.strtolower($class).'.php')) |
|
1032 | + } elseif (file_exists($path.'config/'.strtolower($class).'.php')) |
|
1035 | 1033 | { |
1036 | 1034 | include($path.'config/'.strtolower($class).'.php'); |
1037 | 1035 | break; |
1038 | - } |
|
1039 | - elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php')) |
|
1036 | + } elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php')) |
|
1040 | 1037 | { |
1041 | 1038 | include($path.'config/'.ucfirst(strtolower($class)).'.php'); |
1042 | 1039 | break; |
@@ -136,14 +136,14 @@ discard block |
||
136 | 136 | // -------------------------------------------------------------------- |
137 | 137 | |
138 | 138 | /** |
139 | - * Fetch an item from the GET array |
|
140 | - * |
|
141 | - * @access public |
|
142 | - * @param string |
|
143 | - * @param bool |
|
144 | - * @param string $index |
|
145 | - * @return string |
|
146 | - */ |
|
139 | + * Fetch an item from the GET array |
|
140 | + * |
|
141 | + * @access public |
|
142 | + * @param string |
|
143 | + * @param bool |
|
144 | + * @param string $index |
|
145 | + * @return string |
|
146 | + */ |
|
147 | 147 | function get($index = NULL, $xss_clean = FALSE) |
148 | 148 | { |
149 | 149 | // Check if a field has been provided |
@@ -165,14 +165,14 @@ discard block |
||
165 | 165 | // -------------------------------------------------------------------- |
166 | 166 | |
167 | 167 | /** |
168 | - * Fetch an item from the POST array |
|
169 | - * |
|
170 | - * @access public |
|
171 | - * @param string |
|
172 | - * @param bool |
|
173 | - * @param string $index |
|
174 | - * @return string |
|
175 | - */ |
|
168 | + * Fetch an item from the POST array |
|
169 | + * |
|
170 | + * @access public |
|
171 | + * @param string |
|
172 | + * @param bool |
|
173 | + * @param string $index |
|
174 | + * @return string |
|
175 | + */ |
|
176 | 176 | function post($index = NULL, $xss_clean = FALSE) |
177 | 177 | { |
178 | 178 | // Check if a field has been provided |
@@ -361,14 +361,14 @@ discard block |
||
361 | 361 | // -------------------------------------------------------------------- |
362 | 362 | |
363 | 363 | /** |
364 | - * Validate IP Address |
|
365 | - * |
|
366 | - * Updated version suggested by Geert De Deckere |
|
367 | - * |
|
368 | - * @access public |
|
369 | - * @param string |
|
370 | - * @return boolean |
|
371 | - */ |
|
364 | + * Validate IP Address |
|
365 | + * |
|
366 | + * Updated version suggested by Geert De Deckere |
|
367 | + * |
|
368 | + * @access public |
|
369 | + * @param string |
|
370 | + * @return boolean |
|
371 | + */ |
|
372 | 372 | function valid_ip($ip) |
373 | 373 | { |
374 | 374 | $ip_segments = explode('.', $ip); |
@@ -99,8 +99,7 @@ |
||
99 | 99 | if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) |
100 | 100 | { |
101 | 101 | include APPPATH.'config/'.ENVIRONMENT.'/mimes.php'; |
102 | - } |
|
103 | - else |
|
102 | + } else |
|
104 | 103 | { |
105 | 104 | include APPPATH.'config/mimes.php'; |
106 | 105 | } |
@@ -162,9 +162,9 @@ |
||
162 | 162 | $str = remove_invisible_characters($str, FALSE); |
163 | 163 | //================ITPL======================= |
164 | 164 | $pos = strpos($str, "_json"); |
165 | - if($pos > 0 && !isset($_SERVER['HTTP_X_REQUESTED_WITH'])){ |
|
165 | + if ($pos > 0 && ! isset($_SERVER['HTTP_X_REQUESTED_WITH'])) { |
|
166 | 166 | $this->uri_string = str_replace('_json', '', trim($str, '/')); |
167 | - }else{ |
|
167 | + } else { |
|
168 | 168 | // If the URI contains only a slash we'll kill it |
169 | 169 | $this->uri_string = ($str == '/') ? '' : $str; |
170 | 170 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $pos = strpos($str, "_json"); |
165 | 165 | if($pos > 0 && !isset($_SERVER['HTTP_X_REQUESTED_WITH'])){ |
166 | 166 | $this->uri_string = str_replace('_json', '', trim($str, '/')); |
167 | - }else{ |
|
167 | + } else{ |
|
168 | 168 | // If the URI contains only a slash we'll kill it |
169 | 169 | $this->uri_string = ($str == '/') ? '' : $str; |
170 | 170 | } |
@@ -562,8 +562,7 @@ discard block |
||
562 | 562 | if ($where == 'trailing') |
563 | 563 | { |
564 | 564 | $leading = ''; |
565 | - } |
|
566 | - elseif ($where == 'leading') |
|
565 | + } elseif ($where == 'leading') |
|
567 | 566 | { |
568 | 567 | $trailing = ''; |
569 | 568 | } |
@@ -254,7 +254,7 @@ |
||
254 | 254 | } |
255 | 255 | } |
256 | 256 | } |
257 | - $_config[0] =& $config; |
|
257 | + $_config[0] = & $config; |
|
258 | 258 | return $_config[0]; |
259 | 259 | |
260 | 260 | } |