[0004212] Work Order Entry: fixed error when voided WO refence is reused.
[fa-stable.git] / reporting / rep107.php
index 1e9cc1487d4ad7afd419be68184aa649071a3d13..580e3abe4359b1d5280fb0fa61b55bc518567247 100644 (file)
@@ -36,8 +36,7 @@ function get_invoice_range($from, $to)
                        LEFT JOIN ".TB_PREF."voided voided ON trans.type=voided.type AND trans.trans_no=voided.id
                WHERE trans.type=".ST_SALESINVOICE
                        ." AND ISNULL(voided.id)"
-                       ." AND trans.reference>=".db_escape(get_reference(ST_SALESINVOICE, $from))
-                       ." AND trans.reference<=".db_escape(get_reference(ST_SALESINVOICE, $to))
+                       ." AND trans.trans_no BETWEEN ".db_escape($from)." AND ".db_escape($to)                 
                ." ORDER BY trans.tran_date, trans.$ref";
 
        return db_query($sql, "Cant retrieve invoice range");
@@ -184,7 +183,7 @@ function print_invoices()
                        if ($memo != "")
                        {
                                $rep->NewLine();
-                               $rep->TextColLines(1, 5, $memo, -2);
+                               $rep->TextColLines(1, 3, $memo, -2);
                        }
 
                        $DisplaySubTot = number_format2($SubTotal,$dec);
@@ -267,7 +266,7 @@ function print_invoices()
                                                $first = false;
                                }
                                else
-                                               $rep->TextCol(3, 7, _("Included") . " " . $tax_type_name . _("Amount") . ": " . $DisplayTax, -2);
+                                               $rep->TextCol(3, 6, _("Included") . " " . $tax_type_name . _("Amount") . ": " . $DisplayTax, -2);
                                }
                        else
                        {