X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep107.php;h=5d181090fe02a27242deaa06525bb61a51d1b79a;hb=2cb57633d2f3e27b0c2b2e7448564f467e21e1fd;hp=5a297da48397a835a716bef6892478bcb0c22c44;hpb=ddadb47f2620ce6902ad4694ce6512568862ba05;p=fa-stable.git diff --git a/reporting/rep107.php b/reporting/rep107.php index 5a297da4..5d181090 100644 --- a/reporting/rep107.php +++ b/reporting/rep107.php @@ -39,10 +39,9 @@ function print_invoices() $from = $_POST['PARAM_0']; $to = $_POST['PARAM_1']; $currency = $_POST['PARAM_2']; - $bankaccount = $_POST['PARAM_3']; - $email = $_POST['PARAM_4']; - $paylink = $_POST['PARAM_5']; - $comments = $_POST['PARAM_6']; + $email = $_POST['PARAM_3']; + $paylink = $_POST['PARAM_4']; + $comments = $_POST['PARAM_5']; if ($from == null) $from = 0; @@ -58,10 +57,8 @@ function print_invoices() // $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) @@ -76,12 +73,15 @@ function print_invoices() { for ($j = ST_SALESINVOICE; $j <= ST_CUSTCREDIT; $j++) { - if (isset($_POST['PARAM_7']) && $_POST['PARAM_7'] != $j) + if (isset($_POST['PARAM_6']) && $_POST['PARAM_6'] != $j) continue; if (!exists_customer_trans($j, $i)) continue; $sign = $j==ST_SALESINVOICE ? 1 : -1; $myrow = get_customer_trans($i, $j); + $baccount = get_default_bank_account($myrow['curr_code']); + $params['bankaccount'] = $baccount['id']; + $branch = get_branch($myrow["branch_code"]); $branch['disable_branch'] = $paylink; // helper if ($j == ST_SALESINVOICE)