Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: david Panter
Added: Aug 7, 2018 8:42 AM
Views: 7
Tags: no tags
unsetting cols code
  1. // cols to labels
  2. $qtyhead1 = $CURRENT_USER['qtyheadingcode'];
  3. $qtyHeadings = mysql_get('qty_headings',$qtyhead1);
  4. $colsToLabels = array( // used to header and sorting
  5.  'shl.pallet_no'        =>    'Pallet No',
  6.  'shl.lot_no'           =>    'Lot No',
  7.  'shl.date_code'        =>    'Date Code',
  8.  'shl.bb_date'          =>    'Best Before Date',        
  9.  'shl.rec_date'          =>    'Goods in Date',                                                     // added 10/3/16
  10.  'wn.name'              =>    coalesce(@$companyInfo['warehouse_column_name'],"Warehouse"),
  11.  'shl.qty1'             =>    coalesce(@$qtyHeadings['qty1'],'qty1'),
  12.  'shl.qty2'             =>    coalesce(@$qtyHeadings['qty2'],'qty2'),
  13.  'shl.qty3'             =>    coalesce(@$qtyHeadings['qty3'],'qty3'),
  14.  'shl.qty1_cleared'     =>   'Cleared ' . coalesce(@$qtyHeadings['qty1'],'qty1'),
  15.  'shl.qty1_precleared'  =>   'Pre Cleared ' . coalesce(@$qtyHeadings['qty1'],'qty1'),
  16.  'shl.qty2_cleared'     =>   'Cleared ' . coalesce(@$qtyHeadings['qty2'],'qty2'),
  17.  'shl.qty2_precleared'  =>   'Pre Cleared ' . coalesce(@$qtyHeadings['qty2'],'qty2'),
  18.  'shl.qty3_cleared'     =>   'Cleared ' . coalesce(@$qtyHeadings['qty3'],'qty3'),
  19.  'shl.qty3_precleared'  =>   'Pre Cleared ' . coalesce(@$qtyHeadings['qty3'],'qty3'),
  20.  'shl.all_qty'          =>    "Alloc " . coalesce(@$qtyHeadings[strtolower($qtyHeadings['default'])],''),
  21.  'shl.free_qty'         =>    "Free " . coalesce(@$qtyHeadings[strtolower($qtyHeadings['default'])],''),
  22.   //
  23. );
  24.  
  25. if(@$qtyHeadings['bbd']) {
  26.   unset($colsToLabels['shl.date_code']);
  27. }
  28. else {
  29.   unset($colsToLabels['shl.bb_date']);
  30. }