| @@ 1169-1178 (lines=10) @@ | ||
| 1166 | ||
| 1167 | ||
| 1168 | $download="<a href=" . $url .$value['id']. " class='btn btn-royelblue btn-sm' title='Download Invoice' ><i class='fa fa-cloud-download fa-fw'></i></a> "; |
|
| 1169 | if($value['type'] == 'R'){ |
|
| 1170 | $payment =''; |
|
| 1171 | $outstanding=0; |
|
| 1172 | }else{ |
|
| 1173 | if($outstanding > 0){ |
|
| 1174 | $payment = '<a style="padding: 0 8px;" href="'. base_url() .'invoices/invoice_summary/' . $value['id'] . '" class="btn btn-warning" title="Payment">Unpaid</i></a>'; |
|
| 1175 | }else{ |
|
| 1176 | $payment = ' <button style="padding: 0 8px;" type="button" class="btn btn-success">Paid</button>'; |
|
| 1177 | } |
|
| 1178 | } |
|
| 1179 | ||
| 1180 | $account_arr = $this->db_model->getSelect('first_name,number,last_name','accounts', array('id'=>$value['accountid'])); |
|
| 1181 | $account_array = $account_arr->result_array(); |
|
| @@ 824-832 (lines=9) @@ | ||
| 821 | $invoice_total_result = $invoice_total_query->result_array(); |
|
| 822 | } |
|
| 823 | $download = '<a href="' . base_url() . '/user/user_invoice_download/' . $value['id'] . '/00' . $value['invoice_prefix'] . $value['invoiceid'] . '" class="btn btn-royelblue btn-sm" title="Download Invoice" ><i class="fa fa-cloud-download fa-fw"></i></a> '; |
|
| 824 | if($value['type'] == 'I'){ |
|
| 825 | if ($outstanding > 0) { |
|
| 826 | $payment = ' <a style="padding: 0 8px;" href="' . base_url() . 'user/user_invoice_payment/' . $value['id'] . '" class="btn btn-warning" title="Payment">Unpaid</a>'; |
|
| 827 | } else { |
|
| 828 | $payment = ' <button style="padding: 0 8px;" class="btn btn-success" type="button">Paid</button>'; |
|
| 829 | } |
|
| 830 | }else{ |
|
| 831 | $payment = ''; |
|
| 832 | } |
|
| 833 | if($value['generate_type'] == 1){ |
|
| 834 | $invoice_type='Manually'; |
|
| 835 | }else{ |
|