changing the default.css style sheets to handle the new navibar/buttons
[fa-stable.git] / sales / inquiry / customer_inquiry.php
index e104b682f42392a2644e6066991973e9ef795797..aa6dd6cec51f3d440ba69f1475c083dc4408806a 100644 (file)
@@ -116,7 +116,7 @@ function trans_view($trans)
 
 function due_date($row)
 {
-       return $row["type"] == 10 ? sql2date($row["due_date"]) : '';
+       return ($row["type"]==20 || $row["type"]==21)? sql2date($row["due_date"]) : '';
 }
 
 function fmt_balance($row)
@@ -270,11 +270,12 @@ $cols = array(
        _("Reference"), 
        _("Date") => array('type'=>'date', 'ord'=>'desc'),
        _("Due Date") => array('type'=>'spec', 'fun'=>'due_date'),
-       _("Customer"), 
-       _("Branch"), 
-       _("Currency"),
+       _("Customer") => array('ord'=>'')
+       _("Branch") => array('ord'=>'')
+       _("Currency") => 'text',
        _("Debit") => array('type'=>'spec', 'fun'=>'fmt_debit'), 
        _("Credit") => array('type'=>'insert', 'fun'=>'fmt_credit'), 
+               array('type'=>'insert', 'fun'=>'gl_view'),
                array('type'=>'insert', 'fun'=>'alloc_link'),
                array('type'=>'insert', 'fun'=>'credit_link'),
                array('type'=>'insert', 'fun'=>'edit_link'),
@@ -282,8 +283,8 @@ $cols = array(
        );
 
 if ($_POST['customer_id'] != reserved_words::get_all()) {
-       array_remove($cols, 6);
-       array_remove($cols, 8);
+       $cols[_("Customer")] = 'skip';
+       $cols[_("Currency")] = 'skip';
 }
 
 
@@ -294,6 +295,7 @@ $table->set_marker('check_overdue', _("Marked items are overdue."));
 if(get_post('RefreshInquiry'))
 {
        $table->set_sql($sql);
+       $table->set_columns($cols);
        $Ajax->activate('trans_tbl');
        $Ajax->activate('totals_tbl');
 }