<style>
    h6{
        color: #222;
        font-size: 1.54em;
        line-height: 24px;
        margin: 0 0 .46em;
        text-align: center;
    }
    #receipt {
        width: 100%;
    }
    #receipt td {
        padding-top:6px;
    }
    hr {
        padding: 0px;
        margin-top: 4px;
        margin-bottom: 4px;
    }
    
</style>

<!-- Page Content -->
<div class="page-content">

    <!-- Page Header -->
    <div class="page-header position-relative">
        <div class="header-title">
            <?php if ($closedcashdetails[0]->DATEEND == NULL) {
             ?>
        <h1 align="left">Partial Cash Details</h1>
            <?php } else {
            ?>
        <h1 align="left">Close Cash Details</h1>
           <?php }
            ?>
        </div>
        <!--Header Buttons-->
        <div class="header-buttons">
            <a class="sidebar-toggler" href="#">
                <i class="fa fa-arrows-h"></i>
            </a>
            <a class="refresh" id="refresh-toggler" href="">
                <i class="glyphicon glyphicon-refresh"></i>
            </a>
            <a class="fullscreen" id="fullscreen-toggler" href="#">
                <i class="glyphicon glyphicon-fullscreen"></i>
            </a>
        </div>
        <!--Header Buttons End-->
    </div>
    <!-- /Page Header -->
    <!-- Page Body -->
    <div class="col-xs-12 col-md-5" id="resources">
        
      <div class="widget" style="margin-top: 15px;">
<div class="widget-body">
    
    <div align="center">
           <table border="0" width="100%" cellpadding="0" cellspacing="0">
                            <tr><th></th><td id="tbl-border-top"></td><th></th></tr>
                             <th rowspan="3" class="sized">
                                 <img src="<?= site_url() ?>images/shared/side_shadowleft.jpg" width="20" height="300" alt="" />
                             </th>
                             <tr valign="top">
                                <td align="center">
                                    <?php
                                    if($company_det->DISPLAYLOGO) {
                                    ?>
                                    <img src="<?php echo $company_det->DISPLAYLOGO; ?>" alt="Logo" style="width: 200px;"/>
                                    <?php
                                    } else {
                                    ?>
                                        <h1 style="font-weight: bold !important;"><?php echo $company_det->COMPANYNAME; ?></h1>
                                    <?php
                                    }
                                    ?>
                                    <?php
                                    echo "<table id='receipt'>";
                                    echo "<tbody>";
                                    if ($closedcashdetails[0]->DATEEND == NULL) {
                                        echo "
     <tr>
     <th colspan='8' align='center'><h6>Partial Cash Report</h6></th>
</tr>
";
                                    } else {
                                        echo "
     <tr>
    <th colspan='8' align='center'><h6>Close Cash Report</h6></th>
</tr>
";
                                    }
                                    echo "
                                            <tr></tr>
     <tr>
<td  colspan='8' align='left'>Payments Report</td>
</tr>
";
                                    echo "<tr><td colspan='5' align='right'>Total</td></tr>";
                                    echo "<tr><td colspan='5'><hr/></td></tr>";
                                    if ($closedcashamount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>Cash</td><td colspan='2' align='right'>", $this->formatslist->formatCurrencywithHash($closedcashamount), "</td></tr>";
                                    }
                                    if ($closedcashinamount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>CashIn</td><td colspan='2' align='right'>", $this->formatslist->formatCurrencywithHash($closedcashinamount), "</td></tr>";
                                    }
                                    if ($closedcashoutamount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>CashOut</td><td colspan='2' align='right'>", $this->formatslist->formatCurrencywithHash($closedcashoutamount), "</td></tr>";
                                    }
                                    
                                    if ($closeddebtamount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>Debt</td><td colspan='2' align='right'>", $this->formatslist->formatCurrencywithHash($closeddebtamount), "</td></tr>";
                                    }
                                     if ($closedcreditpaidamount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>Credit Paid</td><td colspan='2' align='right'>", $this->formatslist->formatCurrencywithHash($closedcreditpaidamount), "</td></tr>";
                                    }
                                    
                                    if ($closeddebtpaidamount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>Debt Paid</td><td colspan='2' align='right'>", $this->formatslist->formatCurrencywithHash($closeddebtpaidamount), "</td></tr>";
                                    }
                                    if ($closedchequeamount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>Cheque</td><td colspan='2' align='right'>", $this->formatslist->formatCurrencywithHash($closedchequeamount), "</td></tr>";
                                    }
                                    if ($closedcardamount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>Card</td><td colspan='2' align='right'>", $this->formatslist->formatCurrencywithHash($closedcardamount), "</td></tr>";
                                    }
                                    if ($closedfreeamount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>Free</td><td colspan='2' align='right'>", $this->formatslist->formatCurrencywithHash($closedfreeamount), "</td></tr>";
                                    }
                                    if ($closedrefundamount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>Refund</td><td colspan='2' align='right'>", $this->formatslist->formatCurrencywithHash($closedrefundamount), "</td></tr>";
                                    }

                                    if ($closedonlineamount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>Online</td><td colspan='2' align='right'>", $this->formatslist->formatCurrencywithHash($closedonlineamount), "</td></tr>";
                                    }
                                    
                                    echo "<tr><td colspan='5'><hr/></td></tr>";
                                    if ($receiptscount != NULL) {

                                        echo "<tr><td colspan='3' align='left'>Receipts:</td><td colspan='2' align='right'>", $receiptscount, "</td></tr>";
                                    }
                                    if ($paymentscount != NULL) {


                                        echo "<tr><td colspan='3' align='left'>Payments:</td><td colspan='2' align='right'>", $paymentscount, "</td></tr>";
                                    }
echo "<tr><th colspan='3' align='left'>Total Sales</th><th colspan='2' align='right' style='text-align: right;'>", $this->formatslist->formatCurrencywithHash(($closedcashamount) + ($closeddebtamount) + ($closeddebtpaidamount) + ($closedchequeamount) + ($closedcardamount) + ($closedfreeamount) + ($closedrefundamount) + ($closedonlineamount)), "</th></tr>";

                                    echo "
                                            <tr><td><br/> </td></tr>
                                            <tr><td></td></tr>
                                            <tr><td></td></tr>";

                                    echo "</tbody>";
                                    echo "</table>";

                                    echo "<table id='receipt'>";
                                    echo "<tbody>";

                                    echo "<tr colspan='3'><td align='left'>Station</td><td align='right'>", $closedcashdetails[0]->HOST, "</td></tr>";
                                    echo "<tr colspan='3'><td align='left'>Sequence</td><td align='right'>", $closedcashdetails[0]->HOSTSEQUENCE, "</td></tr>";
                                    echo "<tr colspan='3'><td align='left'>StartDate</td><td align='right'>", $closedcashdetails[0]->DATESTART, "</td></tr>";
                                    echo "<tr colspan='3'><td align='left'>EndDate</td><td align='right'>", $closedcashdetails[0]->DATEEND, "</td></tr>";
                                    echo "</tbody>";



                                    echo "</table>";
                                    echo "<table id='receipt'>";
                                    echo "<tbody>";
                                    echo "
<tr colspan='3'>
<td align='center'>Thank you for your visit.</td>
</tr>
<tr colspan='3'>
<td><br/> </td>
</tr>
<tr colspan='3'>
<td align='center'>Copyright (C) POSICS. www.posics.com</td>
</tr>";
                                    echo "</tbody>";
                                    echo "</table>";
                                    ?>

                                <td>

                                </td>
                                <th rowspan="3" class="sized"><img src="<?= site_url() ?>images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
                            </tr>
                            <tr>
<!--                                <td><img src="<?= site_url() ?>images/shared/blank.gif" width="195" height="1" alt="blank" /></td>-->
                                <td></td>
                            </tr>
                              <tr>
                <th></th>
                <td id="tbl-border-bottom">&nbsp;</td>
                <th></th>
            </tr>
                        </table>
     

    </div>

</div>
</div>
</div>
<!-- /Page Body -->
</div>
<!-- /Page Content -->

</div>
<!-- /Page Container -->
<!-- Main Container -->

</div>





