| @@ 135-138 (lines=4) @@ | ||
| 132 | $db->run($query); |
|
| 133 | ||
| 134 | //Update customer balance |
|
| 135 | if($debit > 0 && $dataVariable['calltype'] != "FREE") |
|
| 136 | { |
|
| 137 | update_balance($accountid, $debit, 0, $logger, $db); |
|
| 138 | } |
|
| 139 | ||
| 140 | //Update parent or provider balance |
|
| 141 | if($parent_cost > 0){ |
|
| @@ 249-251 (lines=3) @@ | ||
| 246 | $db->run($query); |
|
| 247 | ||
| 248 | //Update reseller balance |
|
| 249 | if ($debit > 0 && $dataVariable['calltype'] != "FREE") { |
|
| 250 | update_balance($accountid, $debit, 0, $logger, $db); |
|
| 251 | } |
|
| 252 | } |
|
| 253 | //return true; |
|
| 254 | } |
|
| @@ 301-304 (lines=4) @@ | ||
| 298 | $logger->log($query); |
|
| 299 | $db->run($query); |
|
| 300 | ||
| 301 | if ($debit > 0 && ($dataVariable['calltype'] != "FREE" && $dataVariable['calltype'] != "LOCAL")) |
|
| 302 | { |
|
| 303 | update_balance($accountid, $debit, 0, $logger, $db); |
|
| 304 | } |
|
| 305 | return true; |
|
| 306 | } |
|
| 307 | ||