Additional bugfixes for prepayment handling in sales reports (Customer Balances,...
[fa-stable.git] / reporting / rep107.php
index 0ac5f03b803e9e0e82392da61263f08f10de7a1b..1362d5d1591816a6304cf7fa8f2765f14c4a2ff6 100644 (file)
@@ -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))