Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
35775 ranu 1
## IMEI-wise margin results only - no breadcrumbs, no search boxes
2
#if($searchImei && $searchImei.length() > 0)
3
<div style="background: #e8f5e9; padding: 8px 12px; border-radius: 4px; margin-bottom: 10px; font-weight: 600; color: #2e7d32;">
4
    <i class="fa fa-barcode"></i> IMEI: $searchImei
5
    #if($customRetailer)
6
        <span style="margin-left: 15px; background-color: #d4edda; color: #155724; padding: 3px 8px; border-radius: 3px;">$customRetailer.getBusinessName()</span>
7
    #end
8
    #if($item)
9
        <span style="margin-left: 15px; font-weight: 600; color: #333;">Model: $item.getItemDescription()</span>
10
    #end
11
</div>
12
 
13
<div class="row">
14
    <div class="col-md-6">
15
        <div style="font-size: 13px; font-weight: 600; color: #4169e1; text-align: center; margin: 8px 0;">Purchase
16
            Summary
17
        </div>
18
        <table class="table table-bordered table-condensed" style="font-size: 12px;">
19
            <thead>
20
            <tr>
21
                <th>Item Id</th>
22
                <th>Invoice No</th>
23
                <th>Buy Price</th>
24
                <th>Invoice Date</th>
25
            </tr>
26
            </thead>
27
            <tbody>
28
                #if($itemPurchaseSummaryModels && !$itemPurchaseSummaryModels.isEmpty())
29
                    #foreach($itemPurchaseSummaryMode in $itemPurchaseSummaryModels)
30
                    <tr>
31
                        <td>$itemPurchaseSummaryMode.getItem().getId()</td>
32
                        <td>$itemPurchaseSummaryMode.getInvoiceNumber()</td>
33
                        <td>$itemPurchaseSummaryMode.getBuyPrice()</td>
34
                        <td>$itemPurchaseSummaryMode.getInvoiceDate().format($dateFormatter)</td>
35
                    </tr>
36
                    #end
37
                #else
38
                <tr>
39
                    <td colspan="4" class="text-center">No data</td>
40
                </tr>
41
                #end
42
            </tbody>
43
        </table>
44
    </div>
45
    <div class="col-md-6">
46
        <div style="font-size: 13px; font-weight: 600; color: #4169e1; text-align: center; margin: 8px 0;">Sales
47
            Summary
48
        </div>
49
        <table class="table table-bordered table-condensed" style="font-size: 12px;">
50
            <thead>
51
            <tr>
52
                <th>Invoice No</th>
53
                <th>Sale Price</th>
54
                <th>Invoice Date</th>
55
                <th>Activation</th>
56
            </tr>
57
            </thead>
58
            <tbody>
59
                #if($fofoOrders && !$fofoOrders.isEmpty())
60
                    #foreach($fo in $fofoOrders)
61
                    <tr>
62
                        <td>$fo.getInvoiceNumber()</td>
63
                        <td>$fo.getTotalAmount()</td>
64
                        <td>$fo.getCreateTimestamp().format($dateFormatter)</td>
65
                        #if($activatedImei && $activatedImei.getActivationTimestamp())
66
                            <td>$activatedImei.getActivationTimestamp().format($dateFormatter)</td>
67
                        #else
68
                            <td>--</td>
69
                        #end
70
                    </tr>
71
                    #end
72
                #else
73
                <tr>
74
                    <td colspan="4" class="text-center">No data</td>
75
                </tr>
76
                #end
77
            </tbody>
78
        </table>
79
    </div>
80
</div>
81
 
82
    #if($schemeInOut || $offerPayouts)
83
    <div style="font-size: 14px; font-weight: 600; color: #28a745; margin: 5px 0 10px 0;">Net Margin:
84
        Rs. $nf.format($netEarnings)</div>
85
    <div style="font-size: 13px; font-weight: 600; color: #4169e1; text-align: center; margin: 8px 0;">Margin Status
86
    </div>
87
    <table class="table table-bordered table-condensed" style="font-size: 12px;">
88
        <thead>
89
        <tr>
90
            <th>ID</th>
91
            <th>Name</th>
92
            <th>Type</th>
93
            <th>Amount</th>
94
            <th>Paid</th>
95
            <th>Status</th>
96
            <th>Credit Date</th>
97
        </tr>
98
        </thead>
99
        <tbody>
100
            #if($schemeInOut && !$schemeInOut.isEmpty())
101
                #foreach($sio in $schemeInOut)
102
                <tr>
103
                    <td>$schemeMap.get($sio.getSchemeId()).getId()</td>
104
                    <td>$schemeMap.get($sio.getSchemeId()).getName()</td>
105
                    <td>$schemeMap.get($sio.getSchemeId()).getType()</td>
106
                    <td>$schemeMap.get($sio.getSchemeId()).getAmountModel()</td>
107
                    <td>$sio.getAmount()</td>
108
                    <td>$sio.getStatus()</td>
109
                    #if($sio.getCreditTimestamp())
110
                        <td>$sio.getCreditTimestamp().format($dateFormatter)</td>
111
                    #else
112
                        <td>-</td>
113
                    #end
114
                </tr>
115
                #end
116
            #end
117
            #if($offerPayouts && !$offerPayouts.isEmpty())
118
                #foreach($offerPayout in $offerPayouts)
119
                <tr>
120
                    <td colspan="2">$offerPayout.getDescription()</td>
121
                    <td>$offerRequestMap.get($offerPayout.getOfferId().intValue()).getSchemeType()</td>
122
                    <td>$nf.format($inventoryItem.getMarginPercentage($offerPayout.getAmount()))%</td>
123
                    <td>$offerPayout.getAmount()</td>
124
                    <td>$offerPayout.getStatus()</td>
125
                    <td>$offerPayout.getCreateTimestamp().format($dateFormatter)</td>
126
                </tr>
127
                #end
128
            #end
129
        </tbody>
130
    </table>
131
    #end
132
 
133
    #if($priceDropImeis && !$priceDropImeis.isEmpty())
134
    <div style="font-size: 13px; font-weight: 600; color: #4169e1; text-align: center; margin: 8px 0;">Price Drop</div>
135
    <table class="table table-bordered table-condensed" style="font-size: 12px;">
136
        <thead>
137
        <tr>
138
            <th>ID</th>
139
            <th>Date</th>
140
            <th>Status</th>
141
            <th>Amount</th>
142
            <th>Credited On</th>
143
        </tr>
144
        </thead>
145
        <tbody>
146
            #foreach($pdi in $priceDropImeis)
147
            <tr>
148
                <td>$pdi.getPriceDrop().getId()</td>
149
                <td>$pdi.getPriceDrop().getAffectedOn().format($dateFormatter)</td>
150
                <td>$pdi.getStatus()</td>
151
                <td>$pdi.getPriceDrop().getAmount()</td>
152
                #if($pdi.getCreditTimestamp())
153
                    <td>$pdi.getCreditTimestamp().format($dateFormatter)</td>
154
                #else
155
                    <td>-</td>
156
                #end
157
            </tr>
158
            #end
159
        </tbody>
160
    </table>
161
    #end
162
#else
163
<div class="text-center" style="padding: 30px; color: #666;">
164
    <i class="fa fa-exclamation-circle fa-2x" style="margin-bottom: 10px;"></i>
165
    <p>No data found for this IMEI</p>
166
</div>
167
#end