| 32074 |
tejbeer |
1 |
<script type="text/javascript">
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
$(function () {
|
|
|
5 |
getVendorAheadOptions($("#typeaheadVendor"), function (selectedVendor) {
|
|
|
6 |
$('#vendorId').val(selectedVendor.id + "");
|
|
|
7 |
|
|
|
8 |
});
|
|
|
9 |
|
|
|
10 |
});
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
$(document).ready(function () {
|
|
|
15 |
|
|
|
16 |
var dtable = $('#vendor-pricing').DataTable({
|
|
|
17 |
|
| 32089 |
tejbeer |
18 |
'rowsGroup': [0]
|
|
|
19 |
'rowsGroup': [1]
|
| 32074 |
tejbeer |
20 |
});
|
|
|
21 |
|
|
|
22 |
});
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
</script>
|
|
|
26 |
|
| 32089 |
tejbeer |
27 |
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.12/datatables.min.css"/>
|
|
|
28 |
|
| 32074 |
tejbeer |
29 |
|
|
|
30 |
|
|
|
31 |
|
| 32089 |
tejbeer |
32 |
|
| 32074 |
tejbeer |
33 |
|
|
|
34 |
<div class="row">
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
<div id="filter-details" style="background:white;background-color:white;padding:10px;">
|
|
|
38 |
<div class = "row">
|
|
|
39 |
|
|
|
40 |
<div class="col-lg-2 form-group">
|
|
|
41 |
<label>Vendor</label>
|
|
|
42 |
|
|
|
43 |
<input placeholder="Enter Vendor Name" type="text" class="typeahead form-control"
|
|
|
44 |
id="typeaheadVendor" name="Item" data-provide="typeahead" value="" autocomplete="off">
|
|
|
45 |
<input id="vendorId" type="hidden" />
|
|
|
46 |
</div>
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
<div class="col-lg-1 form-group">
|
|
|
50 |
<label>TP</label>
|
|
|
51 |
|
|
|
52 |
<input type="number" class="form-control" id="transferPrice" autocomplete="off" placeholder="TP"/>
|
|
|
53 |
</div>
|
|
|
54 |
|
|
|
55 |
<div class="col-lg-1 form-group">
|
|
|
56 |
<label>DP</label>
|
|
|
57 |
<input type="number" class="form-control" id="dealerPrice" autocomplete="off" placeholder="DP"/>
|
|
|
58 |
</div>
|
|
|
59 |
|
|
|
60 |
<div class="col-lg-1 form-group">
|
|
|
61 |
<label>Mop</label>
|
|
|
62 |
<input type="number" class="form-control" id="mop" autocomplete="off" placeholder="Mop"/>
|
|
|
63 |
</div>
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
<div class="col-lg-2 form-group">
|
|
|
67 |
<label>Effected On</label>
|
|
|
68 |
<input type="date" class="form-control" id = "effectedOn" autocomplete="off" placeholder="Effected On"/>
|
|
|
69 |
</div>
|
|
|
70 |
|
|
|
71 |
<div class="col-lg-2 form-group">
|
|
|
72 |
<label>Action</label>
|
|
|
73 |
|
|
|
74 |
<input class="form-control btn btn-primary createnewvendorcatalogpricing" type="button" value="Submit">
|
|
|
75 |
</div>
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
</div>
|
|
|
80 |
</div>
|
|
|
81 |
|
|
|
82 |
<div class="col-lg-12">
|
|
|
83 |
<table id="vendor-pricing" class="table table-striped table-advance table-hover" >
|
|
|
84 |
<thead>
|
|
|
85 |
<tr>
|
|
|
86 |
<th> VendorId </th>
|
|
|
87 |
<th> Vendor </th>
|
|
|
88 |
<th> Pricing</th>
|
|
|
89 |
<th> TP</th>
|
|
|
90 |
<th> DP</th>
|
|
|
91 |
<th> MOP</th>
|
|
|
92 |
<th> Effected On</th>
|
|
|
93 |
<th> Status</th>
|
|
|
94 |
<th>Action</th>
|
|
|
95 |
</tr>
|
|
|
96 |
</thead>
|
|
|
97 |
|
|
|
98 |
<tbody>
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
#foreach($supplier in $suppliers)
|
|
|
102 |
|
|
|
103 |
#if($vendorCatalogPricingMap.get($supplier.getId()))
|
|
|
104 |
#set($vendorCatalogPricing = $vendorCatalogPricingMap.get($supplier.getId()))
|
|
|
105 |
|
|
|
106 |
<tr>
|
|
|
107 |
<td rowspan="2">$supplier.getId()</td>
|
|
|
108 |
<td rowspan="2">$supplier.getName()</td>
|
|
|
109 |
<td>Current Pricing</td>
|
|
|
110 |
<td>$vendorCatalogPricing.getTransferPrice()</td>
|
|
|
111 |
<td>$vendorCatalogPricing.getDealerPrice()</td>
|
|
|
112 |
<td>$vendorCatalogPricing.getMop()</td>
|
|
|
113 |
<td>$vendorCatalogPricing.getEffectedOn().format($dateFormatter)</td>
|
|
|
114 |
<td> - </td>
|
|
|
115 |
<td> - </td>
|
|
|
116 |
</tr>
|
|
|
117 |
|
|
|
118 |
#if($vendorCatalogPricingLogMap.get($supplier.getId()))
|
|
|
119 |
#set($vendorCatalogPricingLog = $vendorCatalogPricingLogMap.get($supplier.getId()))
|
|
|
120 |
|
|
|
121 |
<tr>
|
|
|
122 |
|
|
|
123 |
<td>Current Request</td>
|
|
|
124 |
<td>$vendorCatalogPricingLog.getTransferPrice()</td>
|
|
|
125 |
<td>$vendorCatalogPricingLog.getDealerPrice()</td>
|
|
|
126 |
<td>$vendorCatalogPricingLog.getMop()</td>
|
|
|
127 |
<td>$vendorCatalogPricingLog.getEffectedOn().format($dateFormatter)</td>
|
|
|
128 |
<td>$vendorCatalogPricingLog.getStatus()</td>
|
|
|
129 |
<td>-</td>
|
|
|
130 |
</tr>
|
|
|
131 |
|
|
|
132 |
#else
|
|
|
133 |
|
|
|
134 |
<tr>
|
|
|
135 |
|
|
|
136 |
<td>Add Pricing</td>
|
|
|
137 |
<td> <input type="number" class="form-control transferp" name = "transferPrice" autocomplete="off" placeholder="TP"/></td>
|
|
|
138 |
<td> <input type="number" class="form-control dealerp" id="dealerPrice" name = "dealerPrice" autocomplete="off" placeholder="DP"/></td>
|
|
|
139 |
<td> <input type="number" class="form-control mopp" id="mop" name = "mop" autocomplete="off" placeholder="Mop"/></td>
|
|
|
140 |
<td> <input type="date" class="form-control effectedDate" id="effectedOn" name = "effectedOn" autocomplete="off" placeholder="Effected On"/></td>
|
|
|
141 |
<td>-</td>
|
|
|
142 |
<td><input class="form-control btn btn-primary createvendorcatalogpricing" data-vendorid="$supplier.getId()" type="button" value="Submit"> </td>
|
|
|
143 |
|
|
|
144 |
</tr>
|
|
|
145 |
|
|
|
146 |
#end
|
|
|
147 |
|
|
|
148 |
#elseif($vendorCatalogPricingLogMap.get($supplier.getId()))
|
|
|
149 |
#set($vendorCatalogPricingLog = $vendorCatalogPricingLogMap.get($supplier.getId()))
|
|
|
150 |
|
|
|
151 |
<tr>
|
|
|
152 |
<td>$supplier.getId()</td>
|
|
|
153 |
|
|
|
154 |
<td>$supplier.getName() <input id="vendorId" type="hidden" value="$supplier.getId()"/> </td>
|
|
|
155 |
<td>Current Request</td>
|
|
|
156 |
<td>$vendorCatalogPricingLog.getTransferPrice()</td>
|
|
|
157 |
<td>$vendorCatalogPricingLog.getDealerPrice()</td>
|
|
|
158 |
<td>$vendorCatalogPricingLog.getMop()</td>
|
|
|
159 |
<td>$vendorCatalogPricingLog.getEffectedOn().format($dateFormatter)</td>
|
|
|
160 |
<td>$vendorCatalogPricingLog.getStatus()</td>
|
|
|
161 |
<td>-</td>
|
|
|
162 |
</tr>
|
|
|
163 |
|
|
|
164 |
|
|
|
165 |
|
|
|
166 |
#end
|
|
|
167 |
|
|
|
168 |
#end
|
|
|
169 |
|
|
|
170 |
|
|
|
171 |
</tbody>
|
|
|
172 |
</table>
|
|
|
173 |
</div>
|
|
|
174 |
|
|
|
175 |
</div>
|