@@ 859-867 (lines=9) @@ | ||
856 | return $available_bal; |
|
857 | } |
|
858 | ||
859 | function update_balance($amount, $accountid, $payment_type) { |
|
860 | if ($payment_type == "debit") { |
|
861 | $query = 'UPDATE `accounts` SET `balance` = (balance - ' . $amount . ') WHERE `id` = ' . $accountid; |
|
862 | return $this->db->query($query); |
|
863 | } else { |
|
864 | $query = 'UPDATE `accounts` SET `balance` = (balance + ' . $amount . ') WHERE `id` = ' . $accountid; |
|
865 | return $this->db->query($query); |
|
866 | } |
|
867 | } |
|
868 | ||
869 | function build_batch_update_array($update_array) { |
|
870 | $updateflg = false; |
@@ 707-715 (lines=9) @@ | ||
704 | } |
|
705 | ||
706 | ||
707 | function update_balance($amount, $accountid, $payment_type) { |
|
708 | if ($payment_type == 0) { |
|
709 | $query = 'UPDATE `accounts` SET `balance` = (balance + ' . $amount . ') WHERE `id` = ' . $accountid; |
|
710 | return $this->db->query($query); |
|
711 | }if ($payment_type == 1) { |
|
712 | $query = 'UPDATE `accounts` SET `balance` = (balance - ' . $amount . ') WHERE `id` = ' . $accountid; |
|
713 | return $this->db->query($query); |
|
714 | } |
|
715 | } |
|
716 | ||
717 | function account_authentication($where_data, $id) { |
|
718 | if ($id != "") { |