<?php
/* Smarty version 3.1.34-dev-7, created on 2020-05-17 18:34:04
  from 'C:\xampp\htdocs\apstrix\crm-backend\ui\theme\default\crmdeliverychallan_list.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.34-dev-7',
  'unifunc' => 'content_5ec1131cd6cad6_38062569',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'be9b067a8b39f76cad2dec679ddcfbdf22ebdcbd' => 
    array (
      0 => 'C:\\xampp\\htdocs\\apstrix\\crm-backend\\ui\\theme\\default\\crmdeliverychallan_list.tpl',
      1 => 1589710516,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5ec1131cd6cad6_38062569 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>


<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_21468624505ec1131cc291c8_30271771', "content");
$_smarty_tpl->inheritance->endChild($_smarty_tpl, ((string)$_smarty_tpl->tpl_vars['layouts_admin']->value));
}
/* {block "content"} */
class Block_21468624505ec1131cc291c8_30271771 extends Smarty_Internal_Block
{
public $subBlocks = array (
  'content' => 
  array (
    0 => 'Block_21468624505ec1131cc291c8_30271771',
  ),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'C:\\xampp\\htdocs\\apstrix\\crm-backend\\vendor\\smarty\\smarty\\libs\\plugins\\modifier.date_format.php','function'=>'smarty_modifier_date_format',),));
?>



    <div class="row">
        <div class="col-md-12">
            <h3 class="ibilling-page-header">Delivery Challans</h3>
        </div>
    </div>
 
    <div class="row">
        <div class="col-md-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                                                                                                            
                    Delivery Orders


                    <div class="ibox-tools">
                                                                                                                                                        
                        <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
crmdelivery/deliverychallan-add/" class="btn btn-primary btn-xs"><i class="fa fa-plus"></i> Add Delivery Chellan</a>
                        <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
crmdelivery/driver-assign"  class="btn btn-inverse  btn-sm"><i class="fa fa-car"></i> Smart Assign Driver </a>

                      
                    </div>
                </div>
                <div class="ibox-content">




                    <?php if ($_smarty_tpl->tpl_vars['view_type']->value == 'filter') {?>
                        <form class="form-horizontal" method="post" action="">
                            <div class="form-group">
                                <div class="col-md-12">
                                    <div class="input-group">
                                        <div class="input-group-addon">
                                            <span class="fa fa-search"></span>
                                        </div>
                                        <input type="text" name="name" id="foo_filter" class="form-control" placeholder="<?php echo $_smarty_tpl->tpl_vars['_L']->value['Search'];?>
..."/>

                                    </div>
                                </div>

                            </div>
                        </form>
                    <?php }?>

                    <table class="table table-bordered table-hover sys_table footable" <?php if ($_smarty_tpl->tpl_vars['view_type']->value == 'filter') {?> data-filter="#foo_filter" data-page-size="50" <?php }?>>
                        <thead>
                        <tr>
                            <th>#</th>
                            <th>Customer</th>
                            <th>Delivery Date</th>
                            <th>Assigned Driver</th>
                            <th>
                                <?php echo $_smarty_tpl->tpl_vars['_L']->value['Status'];?>

                            </th>
                            <th class="text-right" width="140px;"><?php echo $_smarty_tpl->tpl_vars['_L']->value['Manage'];?>
</th>
                        </tr>
                        </thead>
                        <tbody>

                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['dn']->value, 'ds');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['ds']->value) {
?>
                            <tr>
                                <td  data-value="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
"><a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
crmdelivery/view/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
/"><?php echo $_smarty_tpl->tpl_vars['ds']->value['invoicenum'];
if ($_smarty_tpl->tpl_vars['ds']->value['cn'] != '') {?> <?php echo $_smarty_tpl->tpl_vars['ds']->value['cn'];?>
 <?php } else { ?> <?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
 <?php }?></a> </td>
                                <td>
                                    <?php if (isset($_smarty_tpl->tpl_vars['contacts']->value[$_smarty_tpl->tpl_vars['ds']->value['userid']])) {?>
                                        <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
crmdelivery/view/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
/">
                                            <?php echo $_smarty_tpl->tpl_vars['ds']->value['account'];?>

                                            <?php if ($_smarty_tpl->tpl_vars['contacts']->value[$_smarty_tpl->tpl_vars['ds']->value['userid']]->company != '') {?>
                                              <br>  <?php echo $_smarty_tpl->tpl_vars['contacts']->value[$_smarty_tpl->tpl_vars['ds']->value['userid']]->company;?>

                                            <?php }?>

                                        </a>
                                    <?php }?>
                                </td>
                                <td><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['ds']->value['c2'],"%d-%m-%Y");?>
</td>
                                <td> <?php echo $_smarty_tpl->tpl_vars['ds']->value['fullname'];?>
</td>
                                <td>
                                                <?php if ($_smarty_tpl->tpl_vars['ds']->value['delivery_status'] == 'Unassigned') {?>
                                                <span class="label label-danger"><?php echo $_smarty_tpl->tpl_vars['ds']->value['delivery_status'];?>
</span>
                                                <?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['delivery_status'] == 'Assigned') {?>
                                                    <span class="label label-info"><?php echo $_smarty_tpl->tpl_vars['ds']->value['delivery_status'];?>
</span>
                                                <?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['delivery_status'] == 'Acknowledged') {?>
                                                    <span class="label label-primary"><?php echo $_smarty_tpl->tpl_vars['ds']->value['delivery_status'];?>
</span>
                                                <?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['delivery_status'] == 'Started') {?>
                                                    <span class="label label-warning"><?php echo $_smarty_tpl->tpl_vars['ds']->value['delivery_status'];?>
</span>
                                                <?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['delivery_status'] == 'Inprogress') {?>
                                                    <span class="label label-default"><?php echo $_smarty_tpl->tpl_vars['ds']->value['delivery_status'];?>
</span>
                                                <?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['delivery_status'] == 'Successful') {?>
                                                    <span class="label label-success"><?php echo $_smarty_tpl->tpl_vars['ds']->value['delivery_status'];?>
</span>
                                                <?php } else { ?>
                                                    <span class="label label-danger"><?php echo $_smarty_tpl->tpl_vars['ds']->value['delivery_status'];?>
</span>
                                                <?php }?>
                                </td>
                               
                           
                                <td class="text-right">

                                                                                                            
                                    <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
crmdelivery/view/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
/" class="btn btn-primary btn-xs" data-toggle="tooltip" data-placement="top" title="<?php echo $_smarty_tpl->tpl_vars['_L']->value['View'];?>
"><i class="fa fa-file-text-o"></i></a>

                                    <?php if ($_smarty_tpl->tpl_vars['ds']->value['delivery_status'] == 'Unassigned' || $_smarty_tpl->tpl_vars['ds']->value['delivery_status'] == 'Assigned') {?>
                                        <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
crmdelivery/edit/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
/" class="btn btn-info btn-xs" data-toggle="tooltip" data-placement="top" title="<?php echo $_smarty_tpl->tpl_vars['_L']->value['Edit'];?>
"><i class="fa fa-pencil"></i></a>

                        

                                        <a href="#" class="btn btn-danger btn-xs cdelete" id="iid<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
" data-toggle="tooltip" data-placement="top" title="<?php echo $_smarty_tpl->tpl_vars['_L']->value['Delete'];?>
"><i class="fa fa-trash"></i></a>
                                    <?php }?>


                                </td>
                            </tr>
                        <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>

                        </tbody>

                        <?php if ($_smarty_tpl->tpl_vars['view_type']->value == 'filter') {?>
                            <tfoot>
                            <tr>
                                <td colspan="8">
                                    <ul class="pagination">
                                    </ul>
                                </td>
                            </tr>
                            </tfoot>
                        <?php }?>

                    </table>
                    <?php echo $_smarty_tpl->tpl_vars['paginator']->value['contents'];?>

                </div>
            </div>
        </div>
    </div>
<?php
}
}
/* {/block "content"} */
}
