X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep107.php;h=1362d5d1591816a6304cf7fa8f2765f14c4a2ff6;hb=b750d151463ad2693d753c5f61ab800595014787;hp=83476d2135de1dce8f249627b8a4abc0cdca4c2c;hpb=168c69772ccf5c63c948d947e71d5719d36d9b4e;p=fa-stable.git diff --git a/reporting/rep107.php b/reporting/rep107.php index 83476d21..1362d5d1 100644 --- a/reporting/rep107.php +++ b/reporting/rep107.php @@ -47,7 +47,7 @@ function get_invoice_range($from, $to, $currency=false) ." AND trans.trans_no BETWEEN ".db_escape($from)." AND ".db_escape($to); if ($currency !== false) - " AND cust.curr_code=".db_escape($currency); + $sql .= " AND cust.curr_code=".db_escape($currency); $sql .= " ORDER BY trans.tran_date, trans.$ref"; @@ -61,8 +61,6 @@ print_invoices(); function print_invoices() { global $path_to_root, $SysPrefs; - - $show_this_payment = true; // include payments invoiced here in summary include_once($path_to_root . "/reporting/includes/pdf_report.inc"); @@ -143,8 +141,11 @@ function print_invoices() // calculate summary start row for later use $summary_start_row = $rep->bottomMargin + (15 * $rep->lineHeight); + $show_this_payment = $rep->formData['prepaid'] == 'partial'; // include payments invoiced here in summary + if ($rep->formData['prepaid']) { + $result = get_sales_order_invoices($myrow['order_']); $prepayments = array(); while($inv = db_fetch($result)) @@ -323,7 +324,7 @@ function print_invoices() $rep->Font(); if ($email == 1) { - $rep->End($email); + $rep->End($email, sprintf(_("Invoice %s from %s"), $myrow['reference'], get_company_pref('coy_name'))); } } if ($email == 0)