|
@@ 844-855 (lines=12) @@
|
| 841 |
|
if($debit >= $credit_total) { |
| 842 |
|
|
| 843 |
|
|
| 844 |
|
if($debit == $credit_total){ |
| 845 |
|
|
| 846 |
|
$this->db->where("id", $invoice_id); |
| 847 |
|
$data = array('status' => '0'); |
| 848 |
|
$this->db->update("invoices", $data); |
| 849 |
|
// echo $this->db->last_query(); exit; |
| 850 |
|
}else{ |
| 851 |
|
$this->db->where("id", $invoice_id); |
| 852 |
|
$data = array('status' => '2'); |
| 853 |
|
$this->db->update("invoices", $data); |
| 854 |
|
// echo $this->db->last_query(); exit; |
| 855 |
|
} |
| 856 |
|
|
| 857 |
|
if($amount > $debit){ |
| 858 |
|
$this->session->set_flashdata('astpp_notification', 'Invoice payment amount should be higher then the invoice amount.'); |
|
@@ 966-977 (lines=12) @@
|
| 963 |
|
if($debit >= $credit_total) { |
| 964 |
|
|
| 965 |
|
|
| 966 |
|
if($debit == $credit_total){ |
| 967 |
|
|
| 968 |
|
$this->db->where("id", $invoice_id); |
| 969 |
|
$data = array('status' => '0'); |
| 970 |
|
$this->db->update("invoices", $data); |
| 971 |
|
// echo $this->db->last_query(); exit; |
| 972 |
|
}else{ |
| 973 |
|
$this->db->where("id", $invoice_id); |
| 974 |
|
$data = array('status' => '2'); |
| 975 |
|
$this->db->update("invoices", $data); |
| 976 |
|
// echo $this->db->last_query(); exit; |
| 977 |
|
} |
| 978 |
|
|
| 979 |
|
if($amount > $debit){ |
| 980 |
|
$this->session->set_flashdata('astpp_notification', 'Invoice payment amount should be higher then the invoice amount.'); |