X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Finquiry%2Fcustomer_inquiry.php;h=c9d64bdc00548033f60f05fbe14699c26ff10a60;hb=fd59c60718609c1bf3240a303030167a4f1b1885;hp=e104b682f42392a2644e6066991973e9ef795797;hpb=348062667e6a96e9849bf25de0f2a426b4f0b9c6;p=fa-stable.git diff --git a/sales/inquiry/customer_inquiry.php b/sales/inquiry/customer_inquiry.php index e104b682..c9d64bdc 100644 --- a/sales/inquiry/customer_inquiry.php +++ b/sales/inquiry/customer_inquiry.php @@ -116,12 +116,8 @@ function trans_view($trans) function due_date($row) { - return $row["type"] == 10 ? sql2date($row["due_date"]) : ''; -} - -function fmt_balance($row) -{ - return price_format($row["TotalAmount"] - $row["Allocated"]); + return ($row["type"]==20 || $row["type"]==21) + ? $row["due_date"] : ''; } function gl_view($row) @@ -264,26 +260,27 @@ function check_overdue($row) //------------------------------------------------------------------------------------------------ $cols = array( - _("Type") => array('type'=>'spec', 'fun'=>'systype_name', 'ord'=>''), - _("#") => array('type'=>'spec', 'fun'=>'trans_view', 'ord'=>''), - _("Order") => array('type'=>'spec', 'fun'=>'order_view'), + _("Type") => array('fun'=>'systype_name', 'ord'=>''), + _("#") => array('fun'=>'trans_view', 'ord'=>''), + _("Order") => array('fun'=>'order_view'), _("Reference"), _("Date") => array('type'=>'date', 'ord'=>'desc'), - _("Due Date") => array('type'=>'spec', 'fun'=>'due_date'), - _("Customer"), - _("Branch"), - _("Currency"), - _("Debit") => array('type'=>'spec', 'fun'=>'fmt_debit'), - _("Credit") => array('type'=>'insert', 'fun'=>'fmt_credit'), - array('type'=>'insert', 'fun'=>'alloc_link'), - array('type'=>'insert', 'fun'=>'credit_link'), - array('type'=>'insert', 'fun'=>'edit_link'), - array('type'=>'insert', 'fun'=>'prt_link') + _("Due Date") => array('type=>date', 'fun'=>'due_date'), + _("Customer") => array('ord'=>''), + _("Branch") => array('ord'=>''), + _("Currency") => array('align'=>'center'), + _("Debit") => array('align'=>'right', 'fun'=>'fmt_debit'), + _("Credit") => array('align'=>'right','insert'=>true, 'fun'=>'fmt_credit'), + array('insert'=>true, 'fun'=>'gl_view'), + array('insert'=>true, 'fun'=>'alloc_link'), + array('insert'=>true, 'fun'=>'credit_link'), + array('insert'=>true, 'fun'=>'edit_link'), + array('insert'=>true, 'fun'=>'prt_link') ); if ($_POST['customer_id'] != reserved_words::get_all()) { - array_remove($cols, 6); - array_remove($cols, 8); + $cols[_("Customer")] = 'skip'; + $cols[_("Currency")] = 'skip'; } @@ -294,6 +291,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'); }