<style type="text/css">
    .myTable { border-collapse:collapse; }
    .myTable th {color:white;width:50%; }
    .myTable td, .myTable th { padding:5px;border:1px solid #000; }
</style>
<script type="text/javascript">
    setTimeout(function () {
        window.print();
        window.close();
    }
    , 2000)
</script>


<table class="myTable" style="border: 1px" border="1" dir="rtl">
				<thead>

					<tr>
						<td width="10%" rowspan="3'"
							style="text-align: center; border-left: 1px solid #dddddd;"><img
							src="../upload/upload/upload1549822864356.jpg" width="135" alt="">
						</td>

						<td class="lth" colspan="6"
							style="width: 15%; padding-right: 30px; font-family: GE SS; text-align: right;"><?php echo $this->config->item('company_title') ?>
            </td>
					</tr>

					<tr class="lth">
						<td colspan="6"
							style="width: 15%; padding-right: 30px; font-family: GE SS; text-align: right;"><?php echo $this->config->item('company_email') ?>
						</td>
					</tr>

					<tr class="lth">
						<td colspan="6"
							style="width: 15%; padding-right: 30px; font-family: GE SS; text-align: right;"> <?php echo $this->lang->line('phone') ?><?php echo $this->config->item('company_mobile') ?> - <?php echo $this->config->item('company_address') ?> 
            </td>
					</tr>

					<tr class="lth">
						<td
							style="width: 15%; padding-right: 30px; font-family: GE SS; text-align: right;"><?php echo $this->lang->line('name-the-customer') ?></td>
						<td style="text-align: right;">
                <?= $show['name'] ?>
            </td>
						<td
							style="width: 15%; padding-right: 30px; font-family: GE SS; text-align: right;"><?php echo $this->lang->line('mobile-number') ?> </td>
						<td colspan="4" style="text-align: right;"><?= $show2['phone'] ?></td>
					</tr>

					<tr class="lth">
						<td
							style="width: 15%; padding-right: 30px; font-family: GE SS; text-align: right;"><?php echo $this->lang->line('invoice-number') ?> </td>
						<td style="text-align: right;"> <?= $show['id_orders'] ?></td>


					</tr>

					<tr class="lth">
						<!--            <td style="width: 15%;padding-right: 30px;font-family:GE SS;text-align:right;"><?php echo $this->lang->line('start-date') ?> </td>
            <td style="text-align:right;"><?//= $show['start_date'] ?></td>

            <td style="width: 15%;padding-right: 30px;font-family:GE SS;text-align:right;"> <?php echo $this->lang->line('expiry-date') ?> </td>
            <td style="text-align:right;"><?//= $show['expiry_date'] ?></td>-->

						<td
							style="width: 15%; padding-right: 30px; font-family: GE SS; text-align: right;"><?php echo $this->lang->line('the-date-the-invoice-was-issued') ?> </td>
						<td style="text-align: right;"><?= $show['date_now'] ?></td>
					</tr>
					<tr class="lth">
						<td
							style="width: 15%; padding-right: 30px; font-family: GE SS; text-align: right;"><?php echo $this->lang->line('price') ?> </td>
						<td style="text-align: right;" colspan="5"><?= $price ? $price->total_price : '' ?></td>
					</tr>

					<tr class="lth">
						<td><?= $this->lang->line('product') ?></td>
						<td><?= $this->lang->line('start-date') ?></td>
						<td><?= $this->lang->line('end-date') ?></td>
						<td><?= $this->lang->line('quantity') ?></td>
						<td><?= $this->lang->line('the-amount') ?></td>
						<td><?= $this->lang->line('discount') ?></td>
					</tr>
        <?php foreach ($producer as $value) { ?>
            <tr class="lth">
						<td><?= $value->name_order ?></td>
						<td><?= $value->start_date ? date('d/m/Y', strtotime($value->start_date)) : '---' ?></td>
						<td><?= $value->expiry_date ? date('d/m/Y', strtotime($value->expiry_date)) : '---' ?></td>
						<td><?= $value->quantity == 0 ? '---' : $value->quantity ?></td>
						<td><?= $value->payment ?></td>
						<td><?= $value->discount ?></td>
					</tr>
        <?php } ?>
        <tr class="lth">
						<td
							style="width: 15%; padding-right: 30px; font-family: GE SS; text-align: right;"><?php echo $this->lang->line('payment-status') ?> </td>
						<td colspan="5" style="width: 80%; text-align: right;"><span
							style="color: #0c9824"><?php
    if ($show['paid'] == '')
        echo '<span class="label label-danger">' . $this->lang->line('not-paid') . '</span>';

    if ($show['paid'] == '1')
        echo '<span class="label label-success">' . $this->lang->line('payment-is-made') . '</span>';

    if ($show['paid'] == '3')
        echo '<span class="label label-warning">' . $this->lang->line('complimentary') . '</span>';
    if ($show['paid'] == '4')
        echo '<span class="label label-primary">' . $this->lang->line('retriever') . '</span>';
    ?></span></td>
					</tr>

					<tr class="lth">
						<td
							style="width: 15%; padding-right: 30px; font-family: GE SS; text-align: right;"><?php echo $this->lang->line('terms-and-conditions') ?></td>
						<td colspan="5" style="width: 80%; width: 80%; text-align: right;">1-  <?php echo $this->lang->line('god-almighty-strengthens-and-monitors-it') ?> . 2-<?php echo $this->lang->line('commitment-to-ethics-with-colleagues') ?> <?php echo $this->lang->line('and-trainers') ?><br>3-  <?php echo $this->lang->line('commitment-to-islamic-dress') ?>.4-  <?php echo $this->lang->line('pay-the-fees-regularly') ?><br>5 -  <?php echo $this->lang->line('absence-with-an-excuse') ?>. 6 -  <?php echo $this->lang->line('commitment-in-attendance') ?>.
            </td>
					</tr>

					<tr class="lth">
						<td
							style="width: 15%; padding-right: 30px; font-family: GE SS; text-align: right;"><?php echo $this->lang->line('notes') ?></td>
						<td colspan="5" style="width: 80%; width: 80%; text-align: right;"><?= $show['note'] ?>
            </td>
					</tr>

				</thead>
			</table>