Fixed printing sequences of Sales Invoices.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 13 Jan 2018 13:14:24 +0000 (14:14 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sat, 13 Jan 2018 13:14:24 +0000 (14:14 +0100)
reporting/rep107.php

index 7982f8a1175d4857238aad6f986b9d706238bf71..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");