X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep107.php;h=d3f74dd7999b3e826cc0443fa59196c95edd2b8c;hb=a756adaebf1b5f9bd6265e6f2388a7f2f180f585;hp=19f590ede16052e0eb9c7ac48153d4e0a045021a;hpb=40da959b32eb27fcb0422207a284eed13cc27d7e;p=fa-stable.git diff --git a/reporting/rep107.php b/reporting/rep107.php index 19f590ed..d3f74dd7 100644 --- a/reporting/rep107.php +++ b/reporting/rep107.php @@ -42,7 +42,8 @@ function print_invoices() $email = $_POST['PARAM_3']; $pay_service = $_POST['PARAM_4']; $comments = $_POST['PARAM_5']; - $orientation = $_POST['PARAM_6']; + $customer = $_POST['PARAM_6']; + $orientation = $_POST['PARAM_7']; if (!$from || !$to) return; @@ -73,6 +74,13 @@ function print_invoices() continue; $sign = 1; $myrow = get_customer_trans($i, ST_SALESINVOICE); + + if ($customer && $myrow['debtor_no'] != $customer) { + continue; + } + if ($currency != ALL_TEXT && $myrow['curr_code'] != $currency) { + continue; + } $baccount = get_default_bank_account($myrow['curr_code']); $params['bankaccount'] = $baccount['id']; @@ -89,7 +97,7 @@ function print_invoices() $rep->Font(); $rep->Info($params, $cols, null, $aligns); - $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no'], false); + $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no'], true); $baccount['payment_service'] = $pay_service; $rep->SetCommonData($myrow, $branch, $sales_order, $baccount, ST_SALESINVOICE, $contacts); $rep->NewPage(); @@ -208,4 +216,4 @@ function print_invoices() $rep->End(); } -?> \ No newline at end of file +?>