X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep107.php;h=a125995dce7b5a04d4818f0eadbc441cdca21de0;hb=17b390efcf904072b02ec866b2a427490471a260;hp=0e14b7024eda47f140c72574543eba809b56c564;hpb=5b8f4c4b4aa8cf996bc071f116bfce1273200fa2;p=fa-stable.git diff --git a/reporting/rep107.php b/reporting/rep107.php index 0e14b702..a125995d 100644 --- a/reporting/rep107.php +++ b/reporting/rep107.php @@ -97,7 +97,10 @@ function print_invoices() $sign = 1; $myrow = get_customer_trans($row['trans_no'], ST_SALESINVOICE); - if($customer && $myrow['debtor_no'] != $customer) { + if ($customer && $myrow['debtor_no'] != $customer) { + continue; + } + if ($currency != ALL_TEXT && $myrow['curr_code'] != $currency) { continue; } $baccount = get_default_bank_account($myrow['curr_code']); @@ -111,7 +114,6 @@ function print_invoices() $rep->title = _('INVOICE'); $rep->filename = "Invoice" . $myrow['reference'] . ".pdf"; } - $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); @@ -119,6 +121,7 @@ function print_invoices() $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->SetHeaderType('Header2'); $rep->NewPage(); // calculate summary start row for later use $summary_start_row = $rep->bottomMargin + (15 * $rep->lineHeight);