Subversion Repositories SmartDukaan

Rev

Rev 35084 | Rev 35284 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35084 Rev 35119
Line 46... Line 46...
46
        <th>MTD</th>
46
        <th>MTD</th>
47
        <th>Type</th>
47
        <th>Type</th>
48
        <th></th>
48
        <th></th>
49
    </tr>
49
    </tr>
50
    </thead>
50
    </thead>
-
 
51
    #macro(safe $val)
-
 
52
        #if($val && $val != "null")
-
 
53
            $val
-
 
54
        #else
-
 
55
            -
-
 
56
        #end
-
 
57
    #end
51
 
58
 
52
    <tbody id="monthSalesBody">
59
    <tbody id="monthSalesBody">
53
        #set($start = 1)
60
        #set($start = 1)
54
        #set($end = 6)
61
        #set($end = 6)
55
        #set($range = [$start..$end])
62
        #set($range = [$start..$end])
56
        #foreach($i in $range)
63
        #foreach($i in $range)
57
        <tr class="clickable-row cursor-pointer" data-month="$monthSales.get($i).getMonth()">
64
        <tr class="clickable-row cursor-pointer" data-month="$monthSales.get($i).getMonth()">
58
            <td><b>$monthSales.get($i).getMonth()</b></td>
65
            <td><b>#safe($monthSales.get($i).getMonth())</b></td>
59
            <td>$monthSales.get($i).getMonthlySales()</td>
66
            <td>#safe($monthSales.get($i).getMonthlySales())</td>
60
            <td>$monthSales.get($i).getMtdSales()</td>
67
            <td>#safe($monthSales.get($i).getMtdSales())</td>
61
            <td>$monthSales.get($i).getPartnerType() </td>
68
            <td>#safe($monthSales.get($i).getPartnerType())</td>
62
            <td class="toggle-cell">
69
            <td class="toggle-cell">
63
                <i class="fa fa-angle-down dropdown-icon"
70
                <i class="fa fa-angle-down dropdown-icon"
64
                   style="cursor:pointer; font-size: 27px;width: 27px;height: 27px;margin-top: 0px;color: rgba(255, 255, 255, 0.75);line-height: 27px;"></i>
71
                   style="cursor:pointer; font-size: 27px;width: 27px;height: 27px;margin-top: 0px;color: rgba(255, 255, 255, 0.75);line-height: 27px;"></i>
65
            </td>
72
            </td>
66
        </tr>
73
        </tr>
67
 
74
 
-
 
75
 
68
        <tr class="brand-wise-sale-row cursor-pointer" style="display: none;">
76
        <tr class="brand-wise-sale-row cursor-pointer" style="display: none;">
69
            <td colspan="6">
77
            <td colspan="6">
70
                <!-- Added table-striped and nested-table-striped classes -->
78
                <!-- Added table-striped and nested-table-striped classes -->
71
                <table class="table table-striped nested-table-striped brand-wise-table">
79
                <table class="table table-striped nested-table-striped brand-wise-table">
72
                    <thead>
80
                    <thead>
Line 206... Line 214...
206
                                                    tbody.innerHTML = '';
214
                                                    tbody.innerHTML = '';
207
                                                    response.forEach(item => {
215
                                                    response.forEach(item => {
208
                                                        const tr = document.createElement('tr');
216
                                                        const tr = document.createElement('tr');
209
                                                        tr.innerHTML =
217
                                                        tr.innerHTML =
210
                                                                '<td>' + item.modelName + item.modelNumber + '</td>' +
218
                                                                '<td>' + item.modelName + item.modelNumber + '</td>' +
211
                                                                '<td>' + item.quantity + " pcs" + '</td>';
219
                                                                '<td>' + safe(item.quantity) + " pcs" + '</td>';
212
                                                        tbody.appendChild(tr);
220
                                                        tbody.appendChild(tr);
213
                                                    });
221
                                                    });
214
                                                }
222
                                                }
215
                                        );
223
                                        );
216
                                    } else {
224
                                    } else {