projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8f57721
)
Added default bank account
author
Joe Hunt
<joe.hunt.consulting@gmail.com>
Mon, 18 Feb 2008 09:18:27 +0000
(09:18 +0000)
committer
Joe Hunt
<joe.hunt.consulting@gmail.com>
Mon, 18 Feb 2008 09:18:27 +0000
(09:18 +0000)
reporting/includes/reporting.inc
patch
|
blob
|
history
diff --git
a/reporting/includes/reporting.inc
b/reporting/includes/reporting.inc
index 183b59740c76056ab4fc6a8c3944369b28ae20e1..501afcc328e87aa412a98939fe182bc35145ae3c 100644
(file)
--- a/
reporting/includes/reporting.inc
+++ b/
reporting/includes/reporting.inc
@@
-1,6
+1,6
@@
<?php
<?php
-// Put this on the page only once, e.g. print_hidden_script(systypes::sales_order());
+// Put this on the page only once
an outside a form
, e.g. print_hidden_script(systypes::sales_order());
function print_hidden_script($type_no)
{
function print_hidden_script($type_no)
{
@@
-16,7
+16,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_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' => 0, // quote
'PARAM_6' => ""); // comments
'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_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
'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_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;
'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');";
}
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
?>
\ No newline at end of file