+$cols = array(
+ _("Type") => array('type'=>'spec', 'fun'=>'systype_name', 'ord'=>''),
+ _("#") => array('type'=>'spec', 'fun'=>'trans_view', 'ord'=>''),
+ _("Order") => array('type'=>'spec', 'fun'=>'order_view'),
+ _("Reference"),
+ _("Date") => array('type'=>'date', 'ord'=>'desc'),
+ _("Due Date") => array('type'=>'spec', 'fun'=>'due_date'),
+ _("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'),
+ array('type'=>'insert', 'fun'=>'prt_link')
+ );
+
+if ($_POST['customer_id'] != reserved_words::get_all()) {
+ $cols[_("Customer")] = 'skip';
+ $cols[_("Currency")] = 'skip';
+}