Subversion Repositories SmartDukaan

Rev

Rev 33809 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<div class="col-lg-12">
    <p><b>$customRetailer.getBusinessName()</b> - (<b>Opening Balance: ${openingBalance}</b>)</p>
    ##    <p><b>Period: </b>${startDate} - ${endDate}</p>

    <table class="table table-bordered table-condensed" id="accountStatementSummaryReport" style="width:100%">
        <thead class="row htable" style="background:#F5F5F5;">
        <tr style="color:black;">
            <th>Date</th>
            <th>Transact Type</th>
            <th>Reference Id</th>
            <th>Debit</th>
            <th>Credit</th>
            <th>Running Balance</th>
            <th>Narration</th>
        </tr>
        </thead>
        <tbody>
        <!-- Wallet History Iteration -->
            #foreach($walletEntry in $wallethistory)
            <tr>
                <td>$walletEntry.getFormattedDate()</td>
                <td>$walletEntry.getReferenceType()</td>
                <td>$walletEntry.getReference()</td>
                #if($walletEntry.amount && $walletEntry.amount > 0)
                    <td>0</td>
                    <td>$walletEntry.getAmount()</td>
                #else
                    <td><span>-</span>$walletEntry.getAmount()</td>
                    <td>0</td>
                #end

                <td>
                    #set($runningBalance = $openingBalance+$walletEntry.getAmount())
                        $runningBalance
                </td>

                <td>$walletEntry.getDescription()</td>
            </tr>

            #end

        <!-- Billed Statement Iteration -->
            #foreach($statement in $billedStatementDetails)
            <tr>
                <td>$statement.getOnDate()</td>
                <td>Billing</td>
                <td>$statement.getInvoiceNumber()</td>

                #if($statement.amount && $statement.amount > 0)
                    <td>$statement.getAmount()</td>
                    <td>0</td>
                #else
                    <td>0</td>
                    <td>- $statement.getAmount()</td>
                #end

                <td>
                    #set($runningBalance = $openingBalance - ($statement.getAmount()))
                        $runningBalance
                </td>
                <td>$statement.getReferenceType()</td>
            </tr>
            #end

        <!-- Grand Total Row -->
        </tbody>
        <tfoot>
        <tr>
            <td colspan="3">Grand Total</td>
            <td>${grandTotalDebit}</td>
            <td>${grandTotalCredit}</td>
            <td colspan="2"></td>
        </tr>
        </tfoot>
    </table>
</div>

<script>
    $(document).ready(function () {
        $('#accountStatementSummaryReport').DataTable();
    })

</script>