start=$_GET['start']+1; $wc[]="purchaseorder.tracking_no!=''"; if($_GET['submit']){ if($_GET['product_name'])$wc[]="poproductrel.productname like '".$_GET['product_name']."%'"; if($_GET['product_code'])$wc[]="poproductrel.productcode like '".$_GET['product_code']."%'"; if($_GET['purchase_order'])$wc[]="purchaseorder.subject like '".$_GET['purchase_order']."%'"; if($_GET['status'])$wc[]="purchaseorder.postatus like '".$_GET['status']."'"; if($_GET['due_date_from'])$wc[]="purchaseorder.duedate>='".$GLOBALS['timedate']->to_display($_GET['due_date_from'],$GLOBALS['timedate']->get_date_format(),"Y-m-d")."'"; if($_GET['due_date_to'])$wc[]="purchaseorder.duedate<='".$GLOBALS['timedate']->to_display($_GET['due_date_to'],$GLOBALS['timedate']->get_date_format(),"Y-m-d")."'"; if($_GET['delivery_time_from']){ $dtf=$GLOBALS['timedate']->to_display($_GET['delivery_time_from'],$GLOBALS['timedate']->get_date_format(),"Y-m-d"); $exp=explode("-",$dtf); //$ddtf=date("Y-m-d",mktime(0,0,0,$exp[1],$exp[2],$exp[0])-37*24*3600); $ddtf=date("Y-m-d",mktime(0,0,0,$exp[1],$exp[2],$exp[0])); $wc[]="purchaseordercf.cf_532>='".$ddtf."'"; } if($_GET['delivery_time_to']){ $dtt=$GLOBALS['timedate']->to_display($_GET['delivery_time_to'],$GLOBALS['timedate']->get_date_format(),"Y-m-d"); $exp=explode("-",$dtt); //$ddtt=date("Y-m-d",mktime(0,0,0,$exp[1],$exp[2],$exp[0])-37*24*3600); $ddtt=date("Y-m-d",mktime(0,0,0,$exp[1],$exp[2],$exp[0])); $wc[]="purchaseordercf.cf_532<='".$ddtt."'"; } if($_GET['list_price_from'])$wc[]="poproductrel.listprice>='".$vc->unformatNumber($_GET['list_price_from'])."'"; if($_GET['list_price_to'])$wc[]="poproductrel.listprice<='".$vc->unformatNumber($_GET['list_price_to'])."'"; if($_GET['quantity_from'])$wc[]="poproductrel.quantity>='".$vc->unformatNumber($_GET['quantity_from'])."'"; if($_GET['quantity_to'])$wc[]="poproductrel.quantity<='".$vc->unformatNumber($_GET['quantity_to'])."'"; } $vc->pp=99999; $vc->where=@implode(" and ",$wc); if(!$_GET['start'])$vc->limit="0,".$vc->pp; else $vc->limit=$_GET['start'].",".$vc->pp; if($_GET['order_by'])$vc->order_by=$_GET['order_by']; else $vc->order_by="purchaseorder.duedate"; if($_GET['sorder'])$vc->sorder=$_GET['sorder']; else $vc->sorder="desc"; $vc->getData(); $cnt=$vc->getCount(); $data=$vc->data; for($i=0;$i
EcmProducts

Orders Reports: Orders on sea


Orders List

pp>=$vc->count && $_GET['start']-$vc->pp>0){ // >= >= $btns=array(0,0,0,0); } elseif($_GET['start']+$vc->pp<$vc->count && $_GET['start']-$vc->pp>=0){ // < >= $btns=array(1,1,1,1); } elseif($_GET['start']+$vc->pp>=$vc->count){ // >= < $btns=array(1,1,0,0); } elseif($_GET['start']+$vc->pp<$vc->count && $_GET['start']-$vc->pp<0){ // < < $btns=array(0,0,1,1); } print '
'; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print '
'; print ''; ?> '; print $vc->sortableColumn("Delivery date","purchaseorder.cf_532",$_GET['sorder'],20); print $vc->sortableColumn("Id","purchaseorder.purchaseorderid",$_GET['sorder'],10); print $vc->sortableColumn("Subject","purchaseorder.subject",$_GET['sorder'],10); print $vc->sortableColumn("Tracking No","purchaseorder.tracking_no",$_GET['sorder'],10); print $vc->sortableColumn("CBM","purchaseorder.cbm",$_GET['sorder'],10); print ''; foreach($data as $dd){ $do[$dd['purchaseorderid']]=$dd; } foreach($do as $data){ $duedate=$data['duedate']; $deliverydate=$data['deliverydate']; $exp=explode("-",$duedate); $dtime=date("Y-m-d",@mktime(0,0,0,$exp[1],$exp[2],$exp[0])); print ''; print ''; print ''; print ''; print ''; print ''; print ''; } print '
 '; //print ''; ?> generateButtons($btns); ?>
'.$deliverydate.''.$data['purchaseorderid'].''.$data['subject'].''.$data['tracking_no'].''.$data['cbm'].'
'; print '
'; print '
'; ?>