<div class="wrapper">
    <div class="panel invoice">
        <div class="panel-body">
            <div class="row">
                <div class="col-xs-3">
                    <div class="invoice-logo">
                        <img src="<?= upload_url;?>org_logo/invoice_logo.jpg" alt=""style="max-width:250px"/>
                    </div>
                </div>
                <div class="col-xs-5">
                    <h1><?php echo CommonLanguage::getMessage($IsQuotation ? ($IsPurchase == 1 ? "purchase_quotation_details" : "sales_quotation_details") : ($is_actual == 1 ? ($IsPurchase == 1 ? 'actual_purchase_order_details' : 'actual_sales_order_details') : ($IsPurchase == 1 ? 'purchase_order_details' : 'sales_order_details'))); ?></h1>
                </div>
            </div>
            <br/>
            <br/>
            <br/>
            <div class="row">
                <div class="col-xs-6">
                    <strong><?php print CommonLanguage::getMessage('From');?></strong>
                    <br/><?php print CommonLanguage::getMessage('Name');?>: <?php echo !$IsPurchase ? $org_details[0]["Organization_Name"] : $list['Person']['Name']; ?>
                    <br/><?php print CommonLanguage::getMessage('address');?>: <?php echo !$IsPurchase ? $org_details[0]['Organization_Street'] : $list['Person']["Address"]?>
                    <br/><?php print CommonLanguage::getMessage('Email');?>: <?php echo !$IsPurchase ? $org_details[0]['Organization_Email'] : $list['Person']["Email"] ?>
                    <br/><?php print CommonLanguage::getMessage('Phone');?>: <?php echo !$IsPurchase ? $org_details[0]['Organization_Phone'] : $list['Person']["Phone"] ?>
                </div>
                <div class="col-xs-6">
                    <strong>
                        <?php print CommonLanguage::getMessage('To');?>
                    </strong>
                    <br/><?php print CommonLanguage::getMessage('Name');?>: <?php echo $IsPurchase ? $org_details[0]["Organization_Name"] : $list['Person']['Name']; ?>
                    <br/><?php print CommonLanguage::getMessage('address');?>: <?php echo $IsPurchase ? $org_details[0]['Organization_Street'] : $list['Person']["Address"];?>
                    <br/><?php print CommonLanguage::getMessage('Email');?>: <?php echo $IsPurchase ? $org_details[0]['Organization_Email'] : $list['Person']["Email"]; ?>
                    <br/><?php print CommonLanguage::getMessage('Phone');?>: <?php echo $IsPurchase ? $org_details[0]['Organization_Phone'] : $list['Person']["Phone"]; ?>
                </div>
            </div>
            <br/>
            <br/>
            <br/>
            <table class="table table-striped table-hover">
                <thead>
                    <tr>
                        <th>#</th>
                        <th><?php print CommonLanguage::getMessage('Code'); ?></th>
                        <th class=""><?php print CommonLanguage::getMessage('Item'); ?></th>
                        <th class=""><?php print CommonLanguage::getMessage('Quantity'); ?></th>
                        <th class=""><?php print CommonLanguage::getMessage('unit_price'); ?></th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    $i=0;
                    foreach ($list['Details'] as $item) {
                    ?>
                    <tr>
                        <td><?php echo $i+1; ?></td>
                        <td><?php echo $item["Code"]; ?></td>
                        <td><?php echo $item["Name"]; ?></td>
                        <td><?php echo $item["Item_Quantity_Current"]; ?> </td>
                        <td><?php echo CommonFunctions::public_round_number($item["Product_Net_Price"]) .' '.$list['Main']['Currency_Symbol']; ?> </td>
                    </tr>
                    <?php $i++; } ?>
                </tbody>
            </table>
            <br/>
            <br/>
            <div class="row no-print">
                <div class="col-md-12">
                    <div class="pull-right">
                        <a class="btn btn-danger" onclick="javascript:window.print();"><i class="fa fa-print"></i> <?php print CommonLanguage::getMessage('print'); ?></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
