<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">

    <title>Purchase Invoice</title>
    <style>
 

        @page {
           size: A4;
           margin: 0;
        }
        @media print {
          html, body{
            padding:5px;
            font-size:12px;
            


          }
          /* ... the rest of the rules ... */
        }
         a{
              text-decoration: none;
         }

    </style>
</head>
<body>
    <center><button id="noprint" class="d-print-none" onclick="window.print()">Print this page</button></center>
    <div class="container-fluid">
        
        <div class="row">
                <div class="col-6">
                <h4>Purchase Invoice</h4>
                </div>
                <div class="col-6 pt-3 ">
                <p class="text-end"><small>Print time : <?php echo e(date('d-M-y H:i:s')); ?></small></p>
                </div>
        </div>
    

    </div>
    
    
    
    
    
<div class="container-fluid">

   
    <div class="row pt-2">
        <div class="col-6">

    <div class="row mb-3">
      <label for="colFormLabelSm" class="col-sm-3 col-form-label col-form-label-sm">Project Name</label>
      <input type="hidden" id="project_id" name="project_id">
      <div class="col-sm-7">
        <input list="project_name_options" id="project_name" name="project_name" placeholder="Project Name" autocomplete="off" class="form-control form-control-sm" value="<?php echo e($record->project_name); ?>">
        <datalist id="project_name_options">
            <?php $__currentLoopData = $projects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option data-id="<?php echo e($data->id); ?>" value="<?php echo e($data->project_name); ?>"> 
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </datalist>
      </div>
    </div>
    <div class="row mb-3">
      <label for="colFormLabelSm" class="col-sm-3 col-form-label col-form-label-sm">Header code</label>
      <div class="col-sm-7">
        <input type="text" class="form-control form-control-sm" id="header_code" name="header_code" placeholder="Header Code" value="<?php echo e($record->header_code); ?>">
      </div>
    </div>
    <div class="row mb-3">
      <label for="colFormLabelSm" class="col-sm-3 col-form-label col-form-label-sm">Account Id</label>
      <div class="col-sm-7">
        <input type="text" class="form-control form-control-sm" id="account_id" name="account_id" placeholder="Account Id" value="<?php echo e($record->account_id); ?>">
      </div>
    </div>
    <div class="row mb-3">
      <label for="colFormLabelSm" class="col-sm-3 col-form-label col-form-label-sm">Account Name</label>
      <div class="col-sm-7">
        <input list="account_name_options" id="account_name" name="account_name" placeholder="Account Name" autocomplete="off" class="form-control form-control-sm" value="<?php echo e($record->account_name); ?>">
        <datalist id="account_name_options">

        </datalist>
      </div>
    </div>    
</div>
        <div class="col-6">

    <div class="row mb-3">
      <label for="colFormLabelSm" class="offset-2 col-sm-3 col-form-label col-form-label-sm text-end">Invoice #</label>
      <div class="col-sm-7 ">
        <input type="text" class="form-control form-control-sm"  id="id" placeholder="Invoice #" value="<?php echo e($record->id); ?>" name="invoice_no">
      </div>
    </div>

<div class="row mb-3">
      <label for="colFormLabelSm" class="offset-2 col-sm-3 col-form-label col-form-label-sm text-end">Manual #</label>
      <div class="col-sm-7">
        <input type="text" class="form-control form-control-sm"  id="manual_no" name="manual_no" placeholder="Manual No #" value="<?php echo e($record->manual_no); ?>">
      </div>
    </div>

<div class="row mb-3">
      <label for="colFormLabelSm" class="offset-2 col-sm-3 col-form-label col-form-label-sm text-end">Entered By</label>
      <div class="col-sm-7">
        <input type="text" class="form-control form-control-sm" name="entered_by" id="entered_by" placeholder="Entered By" value="<?php echo e($record->entered_by); ?>">
      </div>
    </div>
<div class="row mb-3">
      <label for="colFormLabelSm" class="offset-2 col-sm-3 col-form-label col-form-label-sm text-end">Date</label>
      <div class="col-sm-7">
        <input type="date" class="form-control form-control-sm" name="inv_date" id="date" placeholder="Date" value="<?php echo e($record->inv_date); ?>">
      </div>
    </div>

            
        </div>
    </div>
    <div class="row pt-2">
        <div class="col-12">
            <table class="table table-bordered">
                <tr>
                    <th style="width:10%;"><small>Item Id</small></td>
                    <th style="width:20%"><small>Item Name</small></td>
                    <th><small>Type</small></td>
                    <th><small>Category</small></td>
                    <th class="text-end"><small>Size</small></td>
                    <th class="text-end"><small>Rate</small></td>
                    <th class="text-end"><small>Quantity</small></td>
                    <th class="text-end"><small>Total</small></td>

                    
                </tr>
                
              
                <tbody id="tbl">
 
                
                <?php $__currentLoopData = $record_sub; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sub): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                 
                <tr>
                    <td class="d-none"><input type="number" class="form-control form-control-sm" name="id[]" id="value" value="<?php echo e($sub->id); ?>"></td>
                    <td style="width:10%"><input type="text" class="form-control  form-control-sm" id="item_id1" name="item_id[]" value="<?php echo e($sub->item_id); ?>"></td>
                    <td style="width:20%">
                        <input list="item_name_options" id="item_name1"  placeholder="Item Name" autocomplete="off" class="form-control form-control-sm" name="item_name[]" value="<?php echo e($sub->item_name); ?>">
                        <datalist id="item_name_options">
                            <?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option data-id="<?php echo e($data->id); ?>" value="<?php echo e($data->item_name); ?>"> 
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </datalist>
                    </td>
                    <td>
                        <input list="item_type_options" id="type1"  placeholder="Type" autocomplete="off" class="form-control form-control-sm" name="type[]" value="<?php echo e($sub->type); ?>">
                        <datalist id="item_type_options">
                            <?php $__currentLoopData = $type; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option data-id="<?php echo e($data->id); ?>" value="<?php echo e($data->type); ?>"> 
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </datalist>
                        </td>
                    <td>
                        <input list="item_category_options" id="category1"  placeholder="Category" autocomplete="off" class="form-control form-control-sm" name="category[]" value="<?php echo e($sub->category); ?>">
                        <datalist id="item_category_options">
                            <?php $__currentLoopData = $category; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option data-id="<?php echo e($data->id); ?>" value="<?php echo e($data->category); ?>"> 
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </datalist>
                        </td>
                   
                    <td><input type="text" class="form-control form-control-sm text-end" name="size[]" id="value" value="<?php echo e($sub->size); ?>"></td>
                    <td><input type="text" class="form-control form-control-sm rate text-end" name="rate[]" id="rate" value="<?php echo e($sub->rate); ?>" onchange="Calc(this);"></td>
                    <td><input type="text" class="form-control form-control-sm qty text-end" name="qty[]" id="qty" value="<?php echo e($sub->qty); ?>" onchange="Calc(this);"></td>
                    <td><input type="text" class="form-control form-control-sm total text-end" name="total[]" id="total" value="<?php echo e($sub->total); ?>" onchange="Calc(this);"></td>
                    
                    
                    
                    </tr>  
                
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>    
                
              <tfoot>
                <tr>
                  <td colspan="7" class="text-end">Invoice Amount</td>
                  <td><input type="text" id="FTotal" name="total_amount" class="form-control form-control-sm text-end" value="<?php echo e($record->total_amount); ?>"></td>
                </tr>
              </tfoot>  
            </table>
            

        </div>
    </div>
   
    

	
</div>


</body>
</html><?php /**PATH /home/alameenb/public_html/resources/views/Purchase/show.blade.php ENDPATH**/ ?>