CHANGELOG.txt
[fa-stable.git] / sales / inquiry / customer_allocation_inquiry.php
index f32bd6cbb2c4212b1ef41d81aa7db91bd05fb84f..66bbb58c5ec69dcffbf8046f2486468a10e868f5 100644 (file)
@@ -112,7 +112,10 @@ function alloc_link($row)
        {
                /*its a negative receipt */
                return '';
-       }
+       } elseif ($row["type"] == ST_SALESINVOICE && ($row['TotalAmount'] - $row['Allocated']) > 0)
+               return pager_link(_("Payment"),
+                       "/sales/customer_payments.php?customer_id=".$row["debtor_no"]."&SInvoice=" . $row["trans_no"], ICON_MONEY);
+
 }
 
 function fmt_debit($row)
@@ -136,15 +139,14 @@ function fmt_credit($row)
 $sql = get_sql_for_customer_allocation_inquiry();
 
 //------------------------------------------------------------------------------------------------
-
 $cols = array(
        _("Type") => array('fun'=>'systype_name'),
        _("#") => array('fun'=>'view_link'),
        _("Reference"), 
-       _("Order") => array('fun'=>'order_link'), 
+       _("Order") => array('fun'=>'order_link', 'ord'=>''), 
        _("Date") => array('name'=>'tran_date', 'type'=>'date', 'ord'=>'asc'),
        _("Due Date") => array('type'=>'date', 'fun'=>'due_date'),
-       _("Customer"), 
+       _("Customer") => array('name' =>'name',  'ord'=>'asc')
        _("Currency") => array('align'=>'center'),
        _("Debit") => array('align'=>'right','fun'=>'fmt_debit'), 
        _("Credit") => array('align'=>'right','insert'=>true, 'fun'=>'fmt_credit'),