


<!DOCTYPE html>
<html>
<head>

  <title>Purchase Order</title>


  <style type="text/css">


    *{

        margin: 0;
     }

     /* GENERAL CSS APPLY ALL SECTIONS*/


  *{
    margin: 0;
  /*  padding-top: 6px;*/
  }
  .margin{
    padding-top: 8px;
  }

  .title{

    text-align: center;
    font-weight: bold;
  }


  .container1{

    margin-left: 7%;
    margin-right: 5%;

  }

  .image-section1{

    width: 100px;
    height: 100px;

w
    margin-left:  -5%;
/*    top:  -500%;*/
bottom:  10%;


  }

  .title1{

    text-align: center;
    margin-top: 2%;
    background: #a8a8a8;
    color: #fff;
    width: 30%;
    height: 2%;
    border-radius: 15px;
    vertical-align: middle;
    line-height: 29px;
    margin-left: 34.5%;
  }



  .clear{

    clear: both;
  }

  .top-section{
    margin-left: 4%;
  }

  input[type=text]
  {



    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid;
    font-size: 12px;
    text-align: center;
    background-color: transparent;

  }

/*  #START=> APPARTMENT SECTION */
  .main-section .row .col{


    width: 25%;
    margin-right: 30px;
    padding-right: 10px;
    float: left;
  }

  .main-section .row{

    /*margin-left: 4%;*/


  }

  .main-section .col label{
    font-size: 16px;
    /*font-weight: bold;*/
  }



  .main-section .row .col .check{
    vertical-align: middle;
    margin-top: 10px;
    margin-right:  90px;
  }

/*  #END=> APPARTMENT SECTION */







/*  #END=> OFFICE USE SECTION */

/*  #START=>  IMAGE SECTION */

 .image-section{

    width: 85px;
    height: 85px;

    border: 1px solid #000;
    text-align: center;
    position: absolute;
    margin-left:  83%;
    top:  18%;


  }



  small{
    font-size: 12px;
    margin-left: 15;
  }

     .container{


     }


table {
  border: 1% solid black;
}

th, td {
  border-right: 1% solid black;
  padding-right: 1%;
}

  </style>
</head>

<body style="margin:3% 7.5% 4% 7.5%;">

     <br>
         <div class="header">


      <div style = "text-align: center; margin-bottom:2%;">
      <img  src="graphics/logo/logo.jpg" width="20%" />
     </div>
      </div>



      <div class="container">
         <div class="main-section">
            <center> <h2><u>Purchase Order</u></h2></center>

            <br>

            <div class="row clear margin">


             <div class="col margin" style="width: 70%;">
               <label><b>Entry #: </b>{{$po[0]->p_number}}</label>
             </div>


             <div class="col margin" style="width: 30%;">
               <label><b>Date: </b>{{EF::dateFormat($po[0]->created_at)}}</label>
             </div>
           </div>

            <div class="row clear margin">


             <div class="col margin" style="width: 70%;">
               <label><b>Vendor: </b>{{$po[0]->user->name}}</label>
             </div>


             <div class="col margin" style="width: 30%;">
               <label><b>BOQ: </b>{{$po[0]->boq->sr_no}}</label>
             </div>
           </div>

             <div class="row clear margin">


               <div class="col margin" style="width: 70%;">
                <label><b>Project: </b>{{$po[0]->boq->branch->name}}</label>
              </div>


             <div class="col margin" style="width: 30%;">
               <label><b>Pur. Req. #: </b>RS/PR/000{{$po[0]->boq->id}}</label>
             </div>
           </div>

             <!-- <div class="row clear margin">


             <div class="col margin" style="width: 70%;">

             </div>


             <div class="col margin" style="width: 30%;">
               <label><b>Ref. #: </b>{{$po[0]->boq->sr_no}}</label>
             </div>
           </div> -->

               <div class="row clear margin">
             <div class="col margin" style="width: 70%;">
               <label><b>Remarks: </b>{{$po[0]->boq->remarks}}</label>
             </div>

           </div>





                <div class="row clear" style="margin-bottom:30%;">
          <table border="1" style="border-collapse: collapse; margin-top:3%; text-align: center; width:100%;">
            <thead>


              <tr>

                 <th style ="width:5%;" >S/N. </th>
                 <th style ="width:60%;">Item</th>

                  <th>Unit</th>
<th>Brand</th>
                  <th>Qty</th>
                  <th>Rate</th>
                  <th>Amount</th>

              </tr>
              <tbody>
                  @php ($totalquantity = 0)
                  @php($totalamount = 0)
             @foreach($po as $row)
              <tr>
                <td>{{$loop->iteration}}</td>
                <td>{{$row->boqitem->item->name}}</td>
                 <td>{{$row->boqitem->item->inventoryUnit->name}}</td>
                 <td>{{$row->brand}}</td>
                <td>{{EF::numberFormat($row->boqitem->quantity)}}</td>
                <td>{{EF::numberFormat($row->unit_price)}}</td>
                <td>{{EF::numberFormat($row->unit_price*$row->boqitem->quantity)}}</td>


                @php($totalquantity = $totalquantity + ($row->boqitem->quantity))
                 @php($totalamount = $totalamount + ($row->unit_price*$row->boqitem->quantity))
              </tr>
               @endforeach
                 <tr>
                  <td colspan="7" >
                    <p> Total
          <label  style ="margin-left:48%;">{{EF::numberFormat($totalquantity)}}</label>
                    </p>
                    <p style ="margin-left:65%;">  Gross Amount
          <label style="float: right;">{{EF::numberFormat($totalamount)}}</label>
                    </p>
          <p style ="margin-left:65%;">  Less:Discount 0.00%
          <label style="float: right;">0.00</label>
                    </p>
              <p style ="margin-left:65%;">  Net Amount
          <label style="float: right;">{{EF::numberFormat($totalamount)}}</label>
                    </p>
                  </td>
                </tr>



        </tbody>
            </thead>
          </table>
            <p>In Words: Rupees {{EF::numberToWords($totalamount)}} Only</p>
      </div>


      <div class="row clear margin">


        <div class="col margin" style="width: 30%;">
          <p style = "text-align:center;"><b style = "text-align:center;"> {{$po[0]->approvedby->name}}</p></br></br><p style = "text-align:center;">Prepared By</p></label>
        </div>


        <div class="col margin" style="width: 30%;">
          <p style = "text-align:center;"><b style = "text-align:center;">{{$po[0]->approvedby->name}}</p></br></br><p style = "text-align:center;">Approved By</p></label>
        </div>

          <div class="col margin" style="width: 30%;">
          <p style = "text-align:center;"><b>________________________</p></br></br><p style = "text-align:center;">Verified By</p></label>
        </div>
     </div>






        </div>
          </div>


</body>
</html>
