X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gl%2Fincludes%2Fdb%2Fgl_db_bank_trans.inc;h=90dc8c4afd40d2522d96e2042475e87b271b1ee7;hb=49fa30e88e27b311edaca3ae3789d62e4629eb39;hp=3face339851f19604b27ac28079165c0ae7c3de5;hpb=702a71dbe463765b5fd1892a982ede3e5f264dee;p=fa-stable.git diff --git a/gl/includes/db/gl_db_bank_trans.inc b/gl/includes/db/gl_db_bank_trans.inc index 3face339..90dc8c4a 100644 --- a/gl/includes/db/gl_db_bank_trans.inc +++ b/gl/includes/db/gl_db_bank_trans.inc @@ -150,40 +150,4 @@ function void_bank_trans($type, $type_no, $nested=false) commit_transaction(); } -//---------------------------------------------------------------------------------- - -//---------------------------------------------------------------------------------------- - -function clear_bank_trans($type, $type_no, $nested=false) -{ - global $Refs; - - if (!$nested) - begin_transaction(); - - $sql = "DELETE FROM ".TB_PREF."bank_trans - WHERE type=".db_escape($type)." AND trans_no=".db_escape($type_no); - - $result = db_query($sql, "could not clear bank transactions for type=$type and trans_no=$type_no"); - - clear_gl_trans($type, $type_no, true); - - // in case it's a customer trans - probably better to check first - void_cust_allocations($type, $type_no); - clear_customer_trans($type, $type_no); - - // in case it's a supplier trans - probably better to check first - void_supp_allocations($type, $type_no); - clear_supp_trans($type, $type_no); - - clear_trans_tax_details($type, $type_no); - - //Delete the reference - $Refs->delete($type, $type_no); - - if (!$nested) - commit_transaction(); -} - - ?> \ No newline at end of file