<?php
$queryorders = $queryorders->toArray();
?>
<?php if(empty($errors) AND (!empty($this->request->getData('submit')))){?>
<div class="success-box-panel">
<div class="success-box">
<i class="fa fa-check"></i>
<div class="message"><p>Record Updated</p></div>
<div class="closebutton"><?php echo $this->Html->link('Close', array('controller'=>'sales','action'=>'tracking',$orderid),array('escape' => false));?></div>
</div>
</div>
<?php  } ?>

<div class="content-wrapper"> 
<section class="content-header sty-one">
<h1>GENERATE TRACKING</h1>
<ol class="breadcrumb">
<li><?php echo $this->Html->link('<i class="fa fa-home"></i>Home', array('controller'=>'sales','action'=>'orderview',$orderid),array('escape' => false));?></li>
<li><i class="fa fa-angle-right"></i> GENERATE TRACKING</li>
</ol>
</section>

<section class="content-header sty-three">
<ol class="order-menu">
<li><?php echo $this->Html->link('View Invoice', array('controller'=>'sales','action'=>'orderview',$orderid),array('escape' => false));?></li>
<li><?php echo $this->Html->link('Send Invoice', array('controller'=>'sales','action'=>'sendinvoice',$orderid),array('escape' => false));?></li>
<li><?php echo $this->Html->link('Update Customer', array('controller'=>'sales','action'=>'updatecustomer',$orderid),array('escape' => false));?></li>
<li><?php echo $this->Html->link('Shipment', array('controller'=>'sales','action'=>'tracking',$orderid),array('escape' => false));?></li>
<li><?php echo $this->Html->link('Print Label', array('controller'=>'sales','action'=>'printlabel',$orderid),array('escape' => false));?></li>
</ol>
</section>

<?php echo $this->Form->create('meetingadd',array('type'=>'file','class'=>'form'));?>
<section class="content">
<div class="card-body">
<div class="row">
<div class="col-md-3 col-sm-12"><?php echo $this->Form->control('status', array('class'=>'form-control','label'=>'delivery status','default'=>$queryorders[0]['status'],'options'=>array('Pending'=>'Pending','Shipped'=>'Shipped','Delivered'=>'Delivered','Cancel'=>'Cancel','Return'=>'Return')));?></div>
<div class="col-md-6 col-sm-12"><?php echo $this->Form->control('trackingurl', array('class'=>'form-control','label'=>'tracking url','value'=>$queryorders[0]['trackingurl'],'required'=>'required'));?></div>
<div class="col-md-3 col-sm-12"><?php echo $this->Form->control('trackingid', array('class'=>'form-control','label'=>'tracking id','value'=>$queryorders[0]['trackingid'],'required'=>'required'));?></div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12"><?php echo $this->Form->submit('submit',array( 'div' => false,'name' => 'submit','class'=>'submitbutton'));?></div>
</div>
</div>
</section>
<?php echo $this->Form->end();?>

</div>