X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Freporting.inc;h=501afcc328e87aa412a98939fe182bc35145ae3c;hb=2c94ba2bc9f3b332bceead3ad7bede2a9e979f25;hp=183b59740c76056ab4fc6a8c3944369b28ae20e1;hpb=8f5772176b209e19c73078ed92483f18dede93a4;p=fa-stable.git diff --git a/reporting/includes/reporting.inc b/reporting/includes/reporting.inc index 183b5974..501afcc3 100644 --- a/reporting/includes/reporting.inc +++ b/reporting/includes/reporting.inc @@ -1,6 +1,6 @@ 0, // from - these values are updated in print_document_link() 'PARAM_1' => 0, // to 'PARAM_2' => "", // currency - 'PARAM_3' => "", // bank account + 'PARAM_3' => get_first_bank_account(), // bank account 'PARAM_4' => 0, // email 'PARAM_5' => 0, // quote 'PARAM_6' => ""); // comments @@ -36,7 +36,7 @@ function print_hidden_script($type_no) 'PARAM_0' => 0, // from - these values are updated in print_document_link() 'PARAM_1' => 0, // to 'PARAM_2' => "", // currency - 'PARAM_3' => "", // bank account + 'PARAM_3' => get_first_bank_account(), // bank account 'PARAM_4' => 0, // email 'PARAM_5' => "", // paylink 'PARAM_6' => ""); // comments @@ -47,7 +47,7 @@ function print_hidden_script($type_no) 'PARAM_0' => 0, // from - these values are updated in print_document_link() 'PARAM_1' => 0, // to 'PARAM_2' => "", // currency - 'PARAM_3' => "", // bank account + 'PARAM_3' => get_first_bank_account(), // bank account 'PARAM_4' => 0, // email 'PARAM_5' => ""); // comments break; @@ -86,4 +86,13 @@ function print_document_link($doc_no, $link_text, $link=true) else return "javascript:printDocument('$doc_no');"; } + +function get_first_bank_account() +{ + $sql = "SELECT ".TB_PREF."bank_accounts.account_code FROM ".TB_PREF."bank_accounts, ".TB_PREF."company + WHERE bank_curr_code=curr_default LIMIT 0, 1"; + $result = db_query($sql); + $row = db_fetch_row($result); + return $row[0]; +} ?> \ No newline at end of file