X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fincludes%2Fdb%2Fgl_db_bank_accounts.inc;h=01c6067507886ba601898c26b9b4193d2711de5c;hb=9bfa65240d069737c719bdbc472b870414baeeae;hp=8716c77996a268174d26c20fb3da2213e3cc93b2;hpb=2b68593d0729223bc7bc9d9307e3d9672267ff12;p=fa-stable.git diff --git a/gl/includes/db/gl_db_bank_accounts.inc b/gl/includes/db/gl_db_bank_accounts.inc index 8716c779..01c60675 100644 --- a/gl/includes/db/gl_db_bank_accounts.inc +++ b/gl/includes/db/gl_db_bank_accounts.inc @@ -1,12 +1,12 @@ . ***********************************************************************/ //--------------------------------------------------------------------------------------------- @@ -78,8 +78,8 @@ function get_bank_account($id) function get_bank_accounts($show_inactive=false) { - $sql = "SELECT account.*, gl_account.account_name - FROM ".TB_PREF."bank_accounts account, ".TB_PREF."chart_master gl_account + $sql = "SELECT account.*, gl_account.account_name + FROM ".TB_PREF."bank_accounts account, ".TB_PREF."chart_master gl_account WHERE account.account_code = gl_account.account_code"; if (!$show_inactive) $sql .= " AND !account.inactive"; $sql .= " ORDER BY account_code, bank_curr_code"; @@ -209,7 +209,7 @@ function get_quick_entry($selected_id) $result = db_query($sql, "could not retreive quick entry $selected_id"); return db_fetch($result); -} +} function get_quick_entry_lines($qid) { @@ -277,11 +277,12 @@ function get_ending_reconciled($bank_account, $bank_date) function get_sql_for_bank_account_reconcile($bank_account, $date) { - $sql = "SELECT type, trans_no, ref, trans_date, + $sql = "SELECT type, trans_no, ref, trans_date, amount, person_id, person_type_id, reconciled, id FROM ".TB_PREF."bank_trans WHERE bank_act = ".db_escape($bank_account) . " AND (reconciled IS NULL OR reconciled='". date2sql($date) ."') + AND amount != 0 ORDER BY trans_date, id"; return $sql; }