Invoice Prepaid Orders: Added new payments column for direct review of order invoicin...
[fa-stable.git] / sales / includes / db / sales_order_db.inc
index 9d43fb3af94b8427c5cc9cb3d2da0f8e9ba81beb..9b790ce65861573f8bd9e803455c41d5256eb44d 100644 (file)
@@ -493,7 +493,8 @@ function get_sql_for_sales_orders_view($trans_type, $trans_no, $filter,
                        allocs.ord_payments,
                        inv.inv_payments,
                        sorder.total,
-                       sorder.trans_type
+                       sorder.trans_type,
+                       sorder.debtor_no
                FROM ".TB_PREF."sales_orders as sorder
                LEFT JOIN (SELECT trans_no_to, sum(amt) ord_payments FROM ".TB_PREF."cust_allocations WHERE trans_type_to=".ST_SALESORDER." GROUP BY trans_no_to)
                         allocs ON sorder.trans_type=".ST_SALESORDER." AND allocs.trans_no_to=sorder.order_no