@extends("include")

@section("body")
      <div class="main-inv">
        <!-- <div class="inv-head">
            <div class="hd-lt">
              <p>APPLY CREDIT</p>
              <p>Enter the amount to apply</p>
            </div>
            <div class="hd-rt">
              <p>10.00 EGP</p>
              <input type="text" placeholder="10.00"><button>Apply Credit</button>
            </div>
        </div> -->
        <div class="inv-ico">
          <a href="#" onclick="window.print()"><i class="fas fa-print"></i>Print</a> <a href="#" onclick="window.open()" ><i class="far fa-file-pdf"></i> PDF</a>
        </div>
        <div class="inv-main">
          <div class="main-lt">
            <h3>Selling invoice</h3>
            <!-- <p>
              Lorem ipsum dolor sit amet dolor sit amet
            </p> -->
          </div>
          <div class="main-rt">
          
            <h1>invoice #{{$lastorderMasterAfterUpdate->order_number}}</h1>
            <div class="inv-date">
              <p><i class="far fa-calendar"></i> Invoice Date</p> <span>{{$lastorderMasterAfterUpdate->order_date}}</span>
            </div>
            <div class="inv-date">
              <!-- <p><i class="far fa-calendar"></i> Due Date</p> <span>08/03/2020</span> -->
            </div>
          </div>
          <div class="clear-fix"></div>
          <div class="inv-mid" style="     margin-top:0px;">
          <table class="table table-bordered">
              <tr>
                <th>item code</th>
                <th>item serial</th>
                <th>item  price</th>
                <th>total price</th>
                <th>item  quantity</th>
              </tr>
              @foreach($allDetails as $details)
              <tr>
              <td >{{$details->item_code}}</td>
                <td >{{$details->item_serial}}</td>
                <td >{{$details->item_price}}</td>
                <td >{{$details->total_price}}</td>
                <td >{{$details->item_quantity}}</td>
              </tr>
              @endforeach
            </table>
          </div>
          <div class="clear-fix"></div>
          <div class="inv-mid-2">
          
            <div class="mid-2-content-rt">
              <div>
                <p style="font-weight: bold; color: #551646;">Discount</p> <span>{{$lastorderMasterAfterUpdate->discount}} EGP</span>
              </div>
              <div>
              <p style="font-weight: bold; color: #551646;">Tax Amount</p> <span>{{$lastorderMasterAfterUpdate->tax_amount}} EGP</span>
              </div>
              <div class="mid-end">
                <p>total</p> <span>{{$lastorderMasterAfterUpdate->total_amount}} EGP</span>
              </div>
            </div>
          </div>
         
          <div class="mid-2-content-rt" style="margin-left: 318px;">
            <div>
                <p style="font-weight: bold; color: #551646;">Invoice to</p> <span>{{$lastorderMasterAfterUpdate->customer_name}}</span>
              </div>
              <div>
                <p style="font-weight: bold; color: #551646;">customer phone</p> <span>{{$lastorderMasterAfterUpdate->customer_phone}}</span>
              </div>
               
            </div>
          <div class="clear-fix"></div>
        
        </div>
      </div>

@endsection
