X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep209.php;h=b6b88a4572ee85b310b3493d5109b019c5594441;hb=71575c1115361f37b2035b77917242f60b4bd5c7;hp=9015a1b2564b35525de8bca02450a0f504e00788;hpb=e29ab37ef51f39c200c3772e07eeceef0ce39214;p=fa-stable.git diff --git a/reporting/rep209.php b/reporting/rep209.php index 9015a1b2..b6b88a45 100644 --- a/reporting/rep209.php +++ b/reporting/rep209.php @@ -9,7 +9,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security = 2; + +$page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ? + 'SA_SUPPTRANSVIEW' : 'SA_SUPPBULKREP'; // ---------------------------------------------------------------- // $ Revision: 2.0 $ // Creator: Joe Hunt @@ -60,9 +62,8 @@ function print_po() $from = $_POST['PARAM_0']; $to = $_POST['PARAM_1']; $currency = $_POST['PARAM_2']; - $bankaccount = $_POST['PARAM_3']; - $email = $_POST['PARAM_4']; - $comments = $_POST['PARAM_5']; + $email = $_POST['PARAM_3']; + $comments = $_POST['PARAM_4']; if ($from == null) $from = 0; @@ -75,10 +76,8 @@ function print_po() // $headers in doctext.inc $aligns = array('left', 'left', 'left', 'right', 'left', 'right', 'right'); - $params = array('comments' => $comments, - 'bankaccount' => $bankaccount); + $params = array('comments' => $comments); - $baccount = get_bank_account($params['bankaccount']); $cur = get_company_Pref('curr_default'); if ($email == 0) @@ -92,6 +91,8 @@ function print_po() for ($i = $from; $i <= $to; $i++) { $myrow = get_po($i); + $baccount = get_default_bank_account($myrow['curr_code']); + $params['bankaccount'] = $baccount['id']; if ($email == 1) {