<style>
  .ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-draggable.ui-resizable {
    position: absolute!important;
    height: auto!important;
    width: 80%!important;
    top: 190px!important;
    left: 274.5px!important;
    z-index: 101!important;
}
.table-bordered, .table-bordered td, .table-bordered th {
    border: 1px solid #626e82;
}
th {
    white-space: break-spaces;
    padding: 5px;
}
td{
  padding: 5px;
}
</style>
<div class="container">
      <form action="" id="invoice_form_validate" class="uk-form-stacked"  method="post" autocomplete="off">
         <?php
         if(!empty($single_recipt)){
             $count =1;
             foreach($single_recipt as $record)
          ?>
        <table id="" class="table-bordered">
        <thead>
          <tr class="data_details">
            <th colspan="3">PO No : <?php echo $record->purchase_no; ?></th>         
            <th colspan="3" >PO Date : <?php echo $record->purchase_date; ?></th>
            <th colspan="3" >GRN No : <?php echo $record->grn_no; ?></th>
            <th colspan="3" >GRN Date : <?php echo $record->grn_date; ?></th>
            <th colspan="3">Supplier : <?php echo $record->venders_name; ?></th>
          </tr>
          <tr class="data_heading">
            <th>Product Name</th>
            <th>UOM</th>
            <th>PO Qty</th>
            <th>PO Price</th>
            <th>PO Amount</th>
            <th>Tax</th>
            <th>Tax Amount</th>
            <th>PO Total Amount</th>
            <th>GRN Qty</th>
            <th>GRN Price</th>
            <th>GRN Total Price</th>
            <th>Tax (%)</></th>
            <th>Tax Amount</th>
            <th>GRN Amount</th>
            <th>GRN Remarks</th>                             
          </tr>
        </thead>
        <tbody>
          <?php
            $count = 1;
            
            foreach($single_recipt_item as $data){
            
              ?>
              <tr class="data_list">
                <td><?php echo $data->item_name; ?></td>
                <td><?php echo $data->unit_measurement; ?></td>
                <td><?php echo $data->required_qty; ?></td>
                <td><?php echo $data->item_price; ?></td>
                <td><?php echo $data->actual_amount; ?></td>
                <td><?php echo $data->po_tax; ?></td>
                <td><?php echo $data->po_tax_amount; ?></td>
                <td><?php echo $data->total_amount; ?></td>
                <td><?php echo $data->grn_item_qty; ?></td>
                <td><?php echo $data->grn_item_price; ?></td>
                <td><?php echo $data->grn_total_amount; ?></td>
                <td><?php echo $data->grn_tax; ?></td>
                <td><?php echo $data->grn_tax_amount; ?></td>
                <td><?php echo $data->grn_grand; ?></td>
                <td><?php echo $data->grn_remarks; ?></td>                            
              </tr>
              
          <?php $count++; } ?>  
          <?php
          
              foreach($grn_sumamount as $gsum){ 
            ?>
            <tr>
              <td colspan="4" >Total Amount</td>
              
              <td ><?php echo $gsum->sum_actual_amount; ?></td>
              <td></td>
              <td ><?php echo $gsum->sum_po_tax_amount; ?></td>
              <td ><?php echo $gsum->sum_total_amount; ?></td>
              <td colspan="2"></td>
              <td ><?php echo $gsum->sum_grn_total_amount; ?></td>
              <td></td>
              <td ><?php echo $gsum->sum_tax_amount; ?></td>
              <td ><?php echo $gsum->sum_amount; ?></td>
              <td></td>
            </tr>
            <?php if($record->courier != 0) { ?>
              <tr>
                <td colspan="8"></td>
                <td colspan="5" >Courier Charge</td>
                <!--<td style="font-weight:bold"><?php //echo $row['courier']; ?></td>-->
                <td ><?php echo $record->courier; ?></td>
                <td></td>
              </tr>
            <?php } ?>
            <?php if($record->transport != 0) { ?>
              <tr>
                <td colspan="8"></td>
                <td colspan="5" >Transport Charge</td>
                <!--<td style="font-weight:bold"><?php //echo $row1['sum_tax_amount']; ?></td>-->
                <td ><?php echo $record->transport; ?></td>
                <td></td>
              </tr>
            <?php } ?>
            <?php if($record->insurance != 0) { ?>
              <tr>
                <td colspan="8"></td>
                <td colspan="5" >Insurance Charge</td>
                <!--<td style="font-weight:bold"><?php //echo $row1['sum_tax_amount']; ?></td>-->
                <td><?php echo $record->insurance; ?></td>
                <td></td>
              </tr>
            <?php } ?>
            <tr>
              <td colspan="8"></td>
              <td colspan="5" >Total Charge</td>
              <!--<td style="font-weight:bold"><?php //echo $row1['sum_tax_amount']; ?></td>-->
              <td ><?php echo $record->total_amount; ?></td>
              <td></td>
            </tr>
            <?php
            }
          ?>  
        </tbody>
      </table>
      <?php } ?>
      </form>
    </div>