<?php $this->load->view('settings/partials/header') ?>
<div class="window-content">
    <div class="page-loader" style="display: none;"></div>
    <div class="pane-group">
        <?php $this->load->view('settings/partials/sidebar') ?>
        <div class="pane content-configuration">
            <div class="caption">
                <div class="caption-inner" style="padding: 9px;" onclick="zamanEposNavigator('', '<?php echo site_url('settings/branchadd') ?>', '')"><?php echo $this->lang->line('add_new_branch') ?></div>
            </div>
            <table class="text-center report-table">
                <thead class="table-bg">
                    <tr>
                        <?php if ($this->session->userdata('group') === '2'): ?>
                            <th><?php echo $this->lang->line('id') ?></th>
                        <?php endif; ?>
                        <th><?php echo $this->lang->line('branch') ?></th>
                        <th><?php echo $this->lang->line('email_address') ?></th>
                        <th><?php echo $this->lang->line('phone') ?></th>
                        <th><?php echo $this->lang->line('mobile') ?></th>
                        <th><?php echo $this->lang->line('area') ?></th>
                        <th><?php echo $this->lang->line('city') ?></th>
                        <th><?php echo $this->lang->line('region') ?></th>
                        <th><?php echo $this->lang->line('country') ?></th>
                        <th><?php echo $this->lang->line('action') ?></th>
                    </tr>
                </thead>
                <tbody>
                    <?php if (!empty($plans)): ?>
                        <?php foreach ($plans as $plan): ?>
                            <tr>
                                <?php if ($this->session->userdata('group') === '2'): ?>
                                    <td><?php echo $plan->id ?></td>
                                <?php endif; ?>
                                <td><?php echo $plan->title ?></td>
                                <td><?php echo $plan->general_email ?></td>
                                <td><?php echo $plan->general_phone ?></td>
                                <td><?php echo $plan->general_mobile ?></td>
                                <td><?php echo $plan->address_area ?></td>
                                <td><?php echo $plan->address_city ?></td>
                                <td><?php echo $plan->address_region ?></td>
                                <td><?php echo $plan->address_country ?></td>
                                <td onclick="zamanEposNavigator('', '<?php echo site_url('settings/branchadd/' . $plan->id) ?>', '')"><span class="icon icon-pencil"></span></td>
                            </tr>
                        <?php endforeach; ?>
                    <?php else: ?>
                        <tr><td colspan="12"><?php echo sprintf($this->lang->line('not_found'), $this->lang->line('delivery_plan')) ?></td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
<?php $this->load->view('settings/partials/footer') ?>
