X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fincludes%2Fdb%2Fsupp_trans_db.inc;h=bf5e539f747f8c66c92e86e8d0a66196c0f71516;hb=45e45a854c40a7a2f9cc8f11e07a259c6923babd;hp=0ddabcec3d27f4cb36cb8dc431ac437a17b4969a;hpb=f15c44d373692556ffe23fe6461d26cb9fd5d2f6;p=fa-stable.git diff --git a/purchasing/includes/db/supp_trans_db.inc b/purchasing/includes/db/supp_trans_db.inc index 0ddabcec..bf5e539f 100644 --- a/purchasing/includes/db/supp_trans_db.inc +++ b/purchasing/includes/db/supp_trans_db.inc @@ -41,7 +41,7 @@ function get_supp_trans($trans_no, $trans_type=-1) { // it's a payment so also get the bank account $sql .= ", ".TB_PREF."bank_accounts.bank_name, ".TB_PREF."bank_accounts.bank_account_name, ".TB_PREF."bank_accounts.bank_curr_code, - ".TB_PREF."bank_trans_types.name AS BankTransType, ".TB_PREF."bank_trans.amount AS BankAmount, + ".TB_PREF."bank_accounts.account_type AS BankTransType, ".TB_PREF."bank_trans.amount AS BankAmount, ".TB_PREF."bank_trans.ref "; } @@ -50,7 +50,7 @@ function get_supp_trans($trans_no, $trans_type=-1) if ($trans_type == 22) { // it's a payment so also get the bank account - $sql .= ", ".TB_PREF."bank_trans, ".TB_PREF."bank_accounts, ".TB_PREF."bank_trans_types "; + $sql .= ", ".TB_PREF."bank_trans, ".TB_PREF."bank_accounts"; } $sql .= " WHERE ".TB_PREF."supp_trans.trans_no=$trans_no @@ -64,8 +64,7 @@ function get_supp_trans($trans_no, $trans_type=-1) // it's a payment so also get the bank account $sql .= " AND ".TB_PREF."bank_trans.trans_no =$trans_no AND ".TB_PREF."bank_trans.type=$trans_type - AND ".TB_PREF."bank_trans_types.id = ".TB_PREF."bank_trans.bank_trans_type_id - AND ".TB_PREF."bank_accounts.account_code=".TB_PREF."bank_trans.bank_act "; + AND ".TB_PREF."bank_accounts.id=".TB_PREF."bank_trans.bank_act "; } $result = db_query($sql, "Cannot retreive a supplier transaction");