X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep111.php;h=a16a1d7fc0efd7fc7e23657804b90aa9542453f1;hb=07a0b37ca7360c5dbb058f5a0ba4c5752671dda7;hp=4272dbf6aec9f5cb9bbc2038d0e180f5e7aa8f30;hpb=0da4935c1fb5b588bfd7ead31f05069c9566eb8d;p=fa-stable.git diff --git a/reporting/rep111.php b/reporting/rep111.php index 4272dbf6..a16a1d7f 100644 --- a/reporting/rep111.php +++ b/reporting/rep111.php @@ -37,9 +37,8 @@ function print_sales_quotations() $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; @@ -52,10 +51,8 @@ function print_sales_quotations() // $headers in doctext.inc $aligns = array('left', 'left', 'right', 'left', 'right', '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) @@ -68,7 +65,9 @@ function print_sales_quotations() for ($i = $from; $i <= $to; $i++) { - $myrow = get_sales_order_header($i, 32); + $myrow = get_sales_order_header($i, ST_SALESQUOTE); + $baccount = get_default_bank_account($myrow['curr_code']); + $params['bankaccount'] = $baccount['id']; $branch = get_branch($myrow["branch_code"]); if ($email == 1) { @@ -81,7 +80,7 @@ function print_sales_quotations() $rep->title = _("SALES QUOTATION"); $rep->Header2($myrow, $branch, $myrow, $baccount, 7); - $result = get_sales_order_details($i, 32); + $result = get_sales_order_details($i, ST_SALESQUOTE); $SubTotal = 0; while ($myrow2=db_fetch($result)) {