<html>

<head>
    <title>Hiring Transfer Receipt</title>
</head>
    <body>
    
    <div class="">
                    <htmlpageheader name="firstpage" style="display:none">
            </htmlpageheader>

            <htmlpageheader name="otherpages" style="display:none">
                <div style="text-align:center; float:left; width:100%;font-family:'Times New Roman', Times, serif;font-style:italic;margin-bottom:10cm;"> 

                    <img src="<?php echo 'images/'.Yii::app()->user->company_logo; ?>" style="height:90px;"/><br />
                    ---- Page {PAGENO} ----
                </div>
            </htmlpageheader>

            <sethtmlpageheader name="firstpage" value="off" show-this-page="1" />
            <sethtmlpageheader name="otherpages" value="on" />
            <?php if(Yii::app()->user->master_company_code == 'ARK'){?>
    <div class="header" style="width:100%;float: left;padding-bottom:10px;">
        <img src="images/arkheader.png"/>
    </div>
    <?php }
    else{
        ?>
        <div class="header" style="width:100%;float: left;border-bottom: 6px solid #850EA6;padding-bottom:10px;">

   <div style="text-align:left; float:left; width:37%; font-family:'Times New Roman', Times, serif;"> 

    

     <p style="margin:0px;padding:0px;font-size: 18px;"><span style="color:#b61f70;">ACE</span><span style="color:#0080e2;"> CENTRO </span><span style="color:#782a88;" > ENTERPRISES</span></p>

     <div style="float:left;font-size:12px;line-height:16px;">

      <p style="padding: 0px;margin:0px;float: left;">P. O. Box 95325, Abu Dhabi - U.A.E.</p>

      <p style="padding: 0px;margin:0px;float: left;">TRN	:	100226227500003</p>

      <p style="padding: 0px;margin:0px;float: left;">T	&nbsp;	&nbsp; &nbsp;: +971 2 6737900 </p>

      <p style="padding: 0px;margin:0px;float: left;">F	&nbsp;	&nbsp; &nbsp;:	+971 2 6737800</p>

      <p style="padding: 0px;margin:0px;float: left;">E	&nbsp;	&nbsp; &nbsp;:	info@acecentro.com</p>

      <p style="padding: 0px;margin:0px;float: left;">W&nbsp;	&nbsp; &nbsp;:	www.acecentro.com </p>

      </div>

   </div>

   <div style="text-align:center; float:left; width:30%;"> 

   <img src="images/logo.png" style="margin-top:10px;height:110px;"/>

   </div>

   <div style="float:right; width:30%;"> 

   <p style="text-align:right;margin:0px;padding:0px;font-size: 20px;"><span style="color:#b61f70;float:right;text-align:right;font-family:tahoma;">ايـــس</span><span style="color:#0080e2;float:right;text-align:right;font-family:tahoma;"> سينـتـرو </span><span style="color:#782a88;float:right;text-align:right;font-family:tahoma;" > للــمشـاريع</span></p>
   <div style="float:left;font-size:12px;text-align:right;">
 	<p style="margin:0px;float: right;font-family:tahoma;">صندوق بريد 95325 ، أبو ظبي - الإمارات العربية المتحدةم.</p>
      <p style="margin:0px;float: right;font-family:tahoma;">رقم التسجيل الضريبي : 100226227500003</p>
      <p style="margin:0px;float: right;font-family:tahoma;">+971 2 6737900	:ت </p>

      <p style="margin:0px;float: right;font-family:tahoma;">+971 2 6737800 : ف </p>

      <p style="margin:0px;float: right;font-family:tahoma;">info@acecentro.com : لإ </p>

      <p style="margin:0px;float: right;font-family:tahoma;">www.acecentro.com : إ    </p>

      </div>

 </div>

</div>
        <?php
        
    }
    ?>
        <div class="col-6">
            <br>
            <?php 
            
            $model = InventoryHiringTransfer::model()->findByPk($id);
            
            ?>
               
        </div>
        <div class="col-5 offset-1" style="color:#101010;">
           
            <br>
            <table class="table" style="width:100%">
                <tr>
                    <td>Transfer #</td>
                    <td><?php echo $id; ?></td>
                </tr>
                <tr>
                    <td>Date</td>
                    <td>
                        <?php echo date('d/m/Y',STRTOTIME($model->transfer_date));?>
                    </td>
                </tr>
                <tr>
                    <td>From</td>
                    <td>
                        <?php echo $model->warehouseFrom->warehouse_name;?>
                    </td>
                </tr>
                <tr>
                    <td>To</td>
                    <td>
                        <?php echo $model->warehouseTo->warehouse_name;?>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <br>
    <div style="float:right;margin-right: 30%; width:60%;padding: 5px 10px; border: 1px solid #7D26CD;border-radius: 4px;font-size:15px;margin-top:4px;margin-bottom:8px;width:270px;" align="center">
        <b>HIRING TRANSFER</b>
    </div> 
    <br/>
    <br/>
    <br/>
    <div class="col-md-12">
        <table id="" class="table">
            <thead>
                <tr>
                    <th class="text-center bc-tl">No</th>
                    <th class="text-center">Product</th>
                    <th class="text-center" style="width:40%">Description</th>
                    <th class="text-center" style="width:8%">Quantity</th>
                    <th class="text-center" style="width:20%">Unit</th>
                </tr>
            </thead>
            <tbody>
               
                    <?php
                $m=1;
                $condition .= '1=1';
                $condition .= ' AND t.transfer_id ="' . $id.'"';
                $model_Items = InventoryHiringTransferItem::model()->findAll(array('condition'=>$condition));
                foreach ( $model_Items as $i =>  $each_Item) {                   
                                      
                ?>
                 <tr>
                        <td>
                            <?php echo $m;?>
                        </td>
                        <td>
                            <?php echo $each_Item->item_name;?>
                        </td>
                        <td>
                            <?php echo $each_Item->item_description;?>
                        </td>

                        <td class="text-right">
                            <?php echo Yii::app()->numberFormatter->formatCurrency($each_Item->transfer_qty," ");?>
                        </td>
                        <td class="text-right">
                            <?php echo $each_Item->unitdetails->name; ?>
                        </td>
                        
                        
                </tr>
                
                    <?php $m++;
       
        
        }
        ?>
                 

            </tbody>
        </table>
        <?php if($model->direct_transfer_description!='')
       {
       ?>
        <div class="box"  style="width: 100%">
            <h5>Description</h5>
            <div class="h5sub-details">
                <?php echo nl2br($model->direct_transfer_description); ?>
            </div>
        </div>
        <?php } ?>
        <?php if($model->reference!='')
       {
       ?>
        <div class="box"  style="width: 100%">
            <h5>Reference</h5>
            <div class="h5sub-details">
                <?php echo nl2br($model->reference); ?>
            </div>
        </div>
        <?php
       }
      ?>
           
    </div>

    
<htmlpagefooter name="firstfooter">
    <div style="text-align:right;width:100%;"><i>Contd...</i></div> 
    <div style="text-align:center;width:100%;"><img src="<?php echo 'images/'.Yii::app()->user->company_footer_logo; ?>" /></div> 
</htmlpagefooter>
<sethtmlpagefooter name="firstfooter" page="all" value="on" />

<htmlpagefooter name="lastfooter">
    <div style="text-align:right;width:100%;">Contd...</div> 

    <div style="text-align:center;width:100%;"><img src="<?php echo 'images/'.Yii::app()->user->company_footer_logo; ?>" /></div> 
</htmlpagefooter>
<sethtmlpagefooter name="lastfooter" value="off" />

<htmlpagefooter name="myfooter">

    <div style="text-align:center;width:100%;"><img src="<?php echo 'images/'.Yii::app()->user->company_footer_logo; ?>" /></div> 
</htmlpagefooter>
<sethtmlpagefooter name="myfooter" page="all" value="on" /> 
</body>

</html>