Subversion Repositories SmartDukaan

Rev

Rev 13474 | Rev 15433 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10098 kshitij.so 1
#set ($itemDetail = $action.fetchItemDetail())
2
#set ($mpDetail = $action.fetchMarketplaceDetail())
3
<style>
4
* { font-family: Verdana; font-size: 96%; }
5
		label {
6
    float: left;
7
}
8
 
9
#upload > table {
10
    color: #747474;
11
    width: 100%;
12
}
13
 
14
 
15
#upload tbody {
16
    background: url("/Support/images/center-bcg.png") repeat-y scroll right top #F6F6F6;
17
    font-weight: bold;
18
}
19
 
20
.mpUpload > table {
21
    color: #747474;
22
    width: 100%;
23
}
24
 
25
 
26
.mpUpload tbody {
27
    background: url("/Support/images/center-bcg.png") repeat-y scroll right top #F6F6F6;
28
    font-weight: bold;
29
}
30
 
31
.detail {
32
    background: url("/Support/images/center-blue.png") repeat-y scroll left top #E4EBF8;
33
    border-bottom: 1px solid #B3C1DB;
34
    border-right: 1px solid #CED9EC;
35
    color: #1F3D71;
36
    height: 25px;
37
    padding: 10px 0 0 24px;
38
}
39
 
40
.value {
41
    border-bottom: 1px solid #B3C1DB;
42
    border-right: 1px solid #CED9EC;
43
    height: 24px;
44
    text-align: center;
45
    color: #747474;
46
}
47
 
48
select {
49
    padding-top: 2px;
50
    vertical-align: middle;
51
	direction: ltr;
52
    font-weight: bold;
53
    width: 50%;
54
	height: 22px;
55
}
56
 
57
input {
58
    font-size: 12px;
59
    text-align: center;
60
    width: 50%;
61
    font-weight: bold;
62
}
63
.top-header {
64
    background-color: #2789C1;
65
    display: block;
66
    height: 27px;
67
    width: 100%;
68
}
69
 
70
input[type="text"][readonly] {
71
   background-color: #D1D1D1;
72
}
73
 
74
input[type="text"][disabled] {
75
   background-color: #D1D1D1;
76
}
77
 
78
.border-highlight{
79
	border : 3px solid #00BFFF;
80
}
81
 
82
.border-highlight-green{
83
	border : 3px solid green;
84
}
85
 
86
.border-highlight-red{
87
	border : 3px solid red;
88
}
89
</style>
90
<link href="/Support/css/jquery.alerts.css" type="text/css" rel="stylesheet">
91
<script type="text/javascript" src="/Support/js/jquery-1.4.2.js"></script>
92
<script type="text/javascript" src="/Support/js/jquery.alerts.js"></script>
93
<script type="text/javascript">
94
$(document).ready(function() {
95
  $('#cancelbutton').click(function(e) {
96
    window.location.href = '/Support/flipkart-list';
97
});
98
});
99
</script>
100
<script type="text/javascript">
101
$('select').change(function(){
102
	var optionValue = $(this).val();
103
	var selectType = parseInt($(this).attr('selectType'));
104
	switch(selectType)
105
	{
106
	case 1:
107
		if (optionValue=='True'){
108
			$(this).removeClass().addClass('border-highlight-red');
109
		}
110
		else{
111
			$(this).removeClass();
112
		}
113
		break;
114
	case 2:
115
		if (optionValue=='False'){
116
			$(this).removeClass().addClass('border-highlight-red');
117
		}
118
		else{
119
			$(this).removeClass();
120
		}
121
		break;
122
	case 3:
123
		if (optionValue=='True'){
124
			$(this).removeClass().addClass('border-highlight-green');
125
		}
126
		else{
127
			$(this).removeClass();
128
		}
129
		break;
130
	}
131
});
132
</script>
133
<script type="text/javascript">
134
function calculateStuff()
135
{
136
$('input#minPosTp').removeClass();
137
$('input#minPosSp').removeClass();
138
$('input#transferPrice').removeClass();
139
$('input#serviceTax').removeClass();
140
$('input#commission').removeClass();
141
$('input#margin').removeClass();
142
$('input#marginPer').removeClass();
143
var itemWeight=$('#itemWeight').val();
144
itemWeight = +itemWeight+.05;
145
if (itemWeight==0){
13474 kshitij.so 146
	var courierCost =55;
10098 kshitij.so 147
}
148
else{
149
var slabs = parseInt((parseFloat(itemWeight)-.001)/.5)
13474 kshitij.so 150
var courierCost = 55;
10098 kshitij.so 151
for (var i=0;i<slabs;i++)
152
{
153
	courierCost = courierCost + 40;
154
}
155
}
156
var sellingPrice=$('#sellingPrice').val();
157
var nlc=$('#maxNlc').val();
158
var otherCost=$('#otherCost').val();
159
var othCost=parseFloat(otherCost);
160
if ( sellingPrice==null || sellingPrice=="" || isNaN(sellingPrice) || nlc==null || nlc=="" || isNaN(nlc)){
161
	$('input#courierCost').val('0.00');
162
	$('input#commission').val('0.00');
163
	$('input#serviceTax').val('0.00');
164
	$('input#transferPrice').val('0.00');
165
	$('input#minPosTp').val('0.00');
166
	$('input#minPosSp').val('0.00');
167
}
168
else{
169
var com=$('#commissionRate').val();
170
var comRate=com/100;
171
var serviceTaxRate=$('#serviceTaxRate').val();
172
var stRate = serviceTaxRate/100;
173
var emiFeeRate=$('#emiFee').val();
174
var emiFee=emiFeeRate/100;
175
var closingFee=parseFloat($('#closingFee').val());
176
var returnProvision=parseFloat($('#returnProvision').val());
177
var margin=$('#margin').val();
178
var vatRate=$('#vat').val();
179
var vat=vatRate/100;
180
var commisionPrice=((comRate)*sellingPrice).toFixed(2);
181
var ourTp=(parseFloat(sellingPrice)-parseFloat(sellingPrice)*(1+stRate)*((comRate)+emiFee)-((courierCost+closingFee)*(1+stRate)));
182
var vatValue=(((sellingPrice/(1+vat))-(nlc/(1+vat)))*vat).toFixed(2);
183
var inHouseCost=(+vatValue+15+((returnProvision/100)*sellingPrice)+othCost);
184
console.log(inHouseCost);
185
var lowestTp=(+nlc+inHouseCost).toFixed(2);
186
var lowestSp=(+nlc+(courierCost+closingFee)*(1+stRate)*(1+vat)+(15+othCost)*(1+vat))/(1-(comRate+emiFee)*(1+stRate)*(1+vat)-(returnProvision/100)*(1+vat));
187
ourTp = (parseFloat(ourTp)).toFixed(2);
188
$('input#minPosTp').val(lowestTp);
189
$('input#minPosSp').val(parseFloat(lowestSp).toFixed(2));
190
$('input#transferPrice').val(ourTp);
191
var serviceTax=(stRate*(+commisionPrice+courierCost)).toFixed(2);
192
lowest_possible_tp=parseFloat(lowestTp);
193
newMargin=(ourTp-lowest_possible_tp).toFixed(2);
194
marginPercentage=(((ourTp-lowest_possible_tp)/sellingPrice)*100).toFixed(2);
195
$('input#marginPer').val(marginPercentage);
196
$('input#margin').val(newMargin);
197
$('input#sellingPrice').val(sellingPrice);
198
$('input#courierCost').val(courierCost);
199
$('input#commission').val(commisionPrice);
200
$('input#serviceTax').val(serviceTax);
201
$('input#minPosTp').addClass("border-highlight");
202
$('input#minPosSp').addClass("border-highlight");
203
$('input#transferPrice').addClass("border-highlight");
204
$('input#serviceTax').addClass("border-highlight");
205
$('input#commission').addClass("border-highlight");
206
$('input#margin').addClass("border-highlight");
207
$('input#marginPer').addClass("border-highlight");
208
if (ourTp-lowest_possible_tp < 0){
209
	$('input#margin').removeClass().addClass("border-highlight-red");
210
	$('input#marginPer').addClass("border-highlight-red");
211
}
212
}
213
}
214
</script>
215
<script type="text/javascript">
216
$('#getMxNlc').live('click', function(){
217
	var itemId=$('#itemId').val();
218
	var warehouseId=$('#warehouseId').val();
219
	var sellingPrice=$('#sellingPrice').val();
220
	if ( warehouseId==null || warehouseId=="" || isNaN(warehouseId)){
221
		jAlert('Please enter valid warehouse id', 'ERROR');
222
		return false;
223
	}
224
	if (sellingPrice==0 || sellingPrice=="" || isNaN(sellingPrice)){
225
		jAlert('Illegal Entry In Selling Price', 'ERROR');
226
		return false;
227
	}
228
	jQuery.ajax({
229
        type : "GET",
230
        url : "/Support/flipkart-list!ke$ha?itemId="+itemId+"&warehouseId="+warehouseId+"&sellingPrice="+sellingPrice,
231
		beforeSend: function(){
232
        $('#ajax-spinner').show();
233
        },
234
        complete: function(){
235
        $('#ajax-spinner').hide();
236
        },
237
        success : function(json){
238
		var parsedData = JSON.parse(json);
239
		$('input#maxNlc').val(parsedData.MaxNlc);
240
		$('input#vat').val(parsedData.VatRate);
241
		calculateStuff();
242
        },
243
		error : function() {
244
			$('input#warehouseId').val('');
245
			$('input#maxNlc').val('');
246
			alert("Unable to get max nlc possibly wrong warehouse");
247
		 },
248
    });
249
	return false;
250
});
251
</script>
252
<script type="text/javascript">
253
  $(".top-header").click(function(){
254
    $(".product-detail").slideToggle("slow");
255
  });
256
</script>
257
<script type="text/javascript">
258
  $(".top-header-inventory").click(function(){
259
    $(".inventory-details").slideToggle("slow");
260
  });
261
</script>
262
<script type="text/javascript">
263
  $(".top-header-marketplace").click(function(){
264
    $(".mp-detail").slideToggle("slow");
265
  });
266
</script>
267
<!--Product details-->
268
<div class="top-header">
269
<h2 style="font-weight: bolder; font-size: 20px; border-top: 4px solid rgb(134, 163, 189); background-color: rgb(134, 163, 189);color:white;">
270
	Product Details
271
</h2>
272
</div>
273
<div class="product-detail" style="display: block; min-height: 670px;">
274
<form id="snapdeal-form" action="/Support/flipkart-list!update" enctype="multipart/form-data" method="post">
275
<div class="left" style="float: left; width: 48%;">
276
<table id="upload" style="text-align: center;width: 100%;height:200px;">
277
<thead>
278
</thead>
279
<tbody>
280
<tr>
281
<td class="detail">Item Id</td>
282
<td class="value"><input id="itemId" name="itemId" value='$itemDetail.getItem_id()'type="text" readonly/></td>
283
</tr>
284
<tr>
285
<td class="detail">Warehouse Id</td>
286
<td class="value">
287
	<input id="warehouseId" name="warehouseId" value='$itemDetail.getWarehouseId()' style="width:25%; type="text" />
288
	<input type="button" id="getMxNlc" value="Get Max Nlc" style="width:25%;">
289
</td>
290
</tr>
291
<tr>
292
<td class="detail">Max NLC</td>
293
<td class="value"><input id="maxNlc" name="maxNlc" value='$itemDetail.getMaxNlc()'type="text" readonly/></td>
294
</tr>
295
<tr>
296
<td class="detail">Weight</td>
297
<td class="value">
298
	<input id="weight" name="weight" value='$itemDetail.getWeight()' type="text" readonly/>
299
</td>
300
</tr>
301
<tr>
302
<td class="detail">Flipkart Selling Price</td>
303
<td class="value">
304
	<input id="sellingPrice" name="sellingPrice" value='$mpDetail.getCurrentSp()'type="text" onkeyup="calculateStuff()"></td>
305
</tr>
306
<tr>
307
<td class="detail">Transfer Price</td>
308
<td class="value"><input id="transferPrice" name="transferPrice" value='$mpDetail.getCurrentTp()'type="text" readonly/></td>
309
</tr>
310
<tr>
311
<td class="detail">Webiste MRP</td>
312
<td class="value"><input id="webisteMrp" name="webisteMrp" value='$itemDetail.getMrp()'type="text" disabled/></td>
313
</tr>
314
<tr>
315
<td class="detail">Webiste Selling Price</td>
316
<td class="value"><input id="webisteSellingPrice" name="webisteSellingPrice" value='$itemDetail.getWebsiteSellingPrice()'type="text" disabled/></td>
317
</tr>
318
<tr>
319
<td class="detail">Other Cost</td>
320
<td class="value"><input id="otherCost" name="otherCost" value='$mpDetail.getOtherCost()' type="text" onkeyup="calculateStuff()"</td>
321
</tr>
322
<tr>
323
<td class="detail">Minimum Possible SP (Calculated)</td>
324
<td class="value"><input id="minPosSp" name="minPosSp" value='$mpDetail.getMinimumPossibleSp()'type="text" readonly/></td>
325
</tr>
326
<tr>
327
<td class="detail">Minimum Possible TP (Calculated)</td>
328
<td class="value">
329
	<input id="minPosTp" name="minPosTp" value='$mpDetail.getMinimumPossibleTp()' type="text" readonly/>
330
</td>
331
</tr>
332
<tr>
333
<td class="detail">Last Updated SP</td>
334
<td class="value">
335
	<input id="currentSp" name="currentSp" value='$mpDetail.getCurrentSp()' type="text" readonly/>
336
</td>
337
</tr>
338
<tr>
339
<td class="detail">Last Updated TP</td>
340
<td class="value">
341
	<input id="currentTp" name="currentTp" value='$mpDetail.getCurrentTp()'type="text" readonly/></td>
342
</tr>
343
#set ($margin = $mpDetail.getCurrentTp() - $mpDetail.getMinimumPossibleTp())
344
#if ($margin < 0)
345
	#set ($cls = 'border-highlight-red')
346
#else
347
	#set ($cls='')
348
#end
349
<tr>
350
<td class="detail">Margin</td>
351
<td class="value"><input id="margin" name="margin" class='$cls' value='$action.getRoundOfValue("$margin")'type="text" style="width:20%;" disabled/>
352
#if($mpDetail.getCurrentSp()==0)
353
	#set ($marginPercentage = 0)
354
#else
355
	#set ($marginPercentage = ($margin/$mpDetail.getCurrentSp()*100))
356
#end
357
#set($roundMarginPer = $action.getRoundOfValue("$marginPercentage"))
358
<span style="font-weight:bold;color:black;">Margin&nbsp;&#37;</span><input id="marginPer" class='$cls' name="marginPer" value='$roundMarginPer' type="text" style="width:20%;" disabled/></td>
359
</tr>
360
<tr>
361
<td class="detail">Last Updated Inventory</td>
362
<td class="value"><input id="lastUpdatedInventory" name="lastUpdatedInventory" value='$itemDetail.getLastUpdatedInventory()' type="text" disabled></td>
363
</tr>
364
<tr>
365
<td class="detail">Last Updated Inventory TimeStamp</td>
366
#if ($itemDetail.getLastUpdatedInventoryTimestamp()==0)
367
		<td class="value"><input id="lastUpdatedInventoryTimestamp" name="lastUpdatedInventoryTimestamp" value='Not Available' type="text" disabled/></td>
368
	  #else
369
		<td class="value"><input id="lastUpdatedInventoryTimestamp" name="lastUpdatedInventoryTimestamp" value='$action.getLastUpdatedInventoryTimestamp()' type="text" disabled/></td>
370
#end
371
</tr>
372
<tr>
373
<td class="detail">Last Updated Price Timestamp</td>
374
#if ($mpDetail.getLastCheckedTimestamp()==0)
375
	<td class="value"><input id="lastCheckedPriceTimestamp" name="lastCheckedPriceTimestamp" value='Not Available' type="text" disabled/></td>
376
#else
377
<td class="value"><input id="lastCheckedPriceTimestamp" name="lastCheckedPriceTimestamp" value='$action.getLastCheckedTimestamp()' type="text" disabled/></td>
378
#end
379
</tr>
380
<tr>
381
<td class="detail">Maximum Selling Price</td>
382
<td class="value">
383
	<input id="maxSp" name="maxSp" value='$mpDetail.getMaximumSellingPrice()' type="text"></td>
384
</tr>
14780 manish.sha 385
<tr>
386
<td class ="detail"></td>
387
<td class ="value"></td>
388
</tr>
10098 kshitij.so 389
</tbody>
390
</table>
391
</div>
392
<div class="left" style="float: right; width: 48%;">
393
<table id="upload" style="text-align: center;width: 100%;height:200px;">
394
<thead>
395
</thead>
396
<tbody>
397
<tr>
398
<td class="detail">Last N Day Sale</td>
399
#set($nDaySale=$action.getLastNDaySaleForItem("$itemDetail.getItem_id()","5"))
400
<td class="value">
401
	<input id="lastNDaySale" name="lastNDaySale" value='$action.getnDaySale()' type="text" disabled/></td>
402
</tr>
403
<tr>
404
<td class="detail">Average Sale</td>
405
<td class="value">
406
	<input id="avgSale" name="avgSale" value='$action.getAvgSale()' type="text" disabled/></td>
407
</tr>
408
<tr>
409
<td class="detail">Suppress Pricing Feed</td>
410
<td class="value">#if ($itemDetail.isSuppressPriceFeed())
411
      <select name="isSuppressPriceFeed" selectType="1" class="border-highlight-red"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
412
	  #else
413
		<select name="isSuppressPriceFeed" selectType="1"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
414
	  #end
415
</td>
416
</tr>
417
<tr>
418
<td class="detail">Suppress Inventory Feed</td>
419
<td class="value">#if ($itemDetail.isSuppressInventoryFeed())
420
      <select name="isSuppressInventoryFeed" selectType="1" class="border-highlight-red"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
421
	  #else
422
		<select name="isSuppressInventoryFeed" selectType="1"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
423
	  #end
424
</td>
425
</tr>
426
<tr>
427
<td class="detail">Flipkart Listed</td>
428
<td class="value">#if ($itemDetail.isIsListedOnFlipkart())
429
      <select name="isListedOnFlipkart" selectType="2"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
430
	  #else
431
		<select name="isListedOnFlipkart" selectType="2" class="border-highlight-red"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
432
	  #end
433
</td>
434
</tr>
435
<tr>
14780 manish.sha 436
<td class="detail">Flipkart FA Listed</td>
437
<td class="value">#if ($itemDetail.isIsFaListed())
438
      <select name="isFaListedOnFlipkart" selectType="2"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
439
	  #else
440
		<select name="isFaListedOnFlipkart" selectType="2" class="border-highlight-red"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
441
	  #end
442
</td>
443
</tr>
444
<tr>
10098 kshitij.so 445
<td class="detail">Auto Increment</td>
446
<td class="value">#if ($mpDetail.isAutoIncrement())
447
      <select name="isAutoIncrement" selectType="3" class="border-highlight-green"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
448
	  #else
449
		<select name="isAutoIncrement" selectType="3"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
450
	  #end
451
</td>
452
</tr>
453
<tr>
454
<td class="detail">Auto Decrement</td>
455
<td class="value">#if ($mpDetail.isAutoDecrement())
456
      <select name="isAutoDecrement" selectType="3" class="border-highlight-green"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
457
	  #else
458
		<select name="isAutoDecrement" selectType="3"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
459
	  #end
460
</td>
461
</tr>
462
<tr>
463
<td class="detail">Auto Favourite</td>
464
<td class="value">#if ($mpDetail.isAutoFavourite())
465
      <select name="isAutoFavourite" class="border-highlight-green"><option selected="selected" value="True">Active</option></select>
466
	  #else
467
		<select name="isAutoFavourite"><option selected="selected" value="False">InActive</option></select>
468
	  #end
469
</td>
470
</tr>
471
<tr>
472
<td class="detail">Manual Favourite</td>
473
<td class="value">#if ($mpDetail.isManualFavourite())
474
      <select name="isManualFavourite" selectType="3" class="border-highlight-green"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
475
	  #else
476
		<select name="isManualFavourite" selectType="3"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
477
	  #end
478
</td>
479
</tr>
480
<tr>
481
<td class="detail">Commission&nbsp;&#37;</td>
482
<td class="value"><input id="commissionRate" name="commissionRate" value='$mpDetail.getCommission()'type="text" disabled/></td>
483
</tr>
484
<tr>
485
<td class="detail">Exception Price</td>
486
<td class="value"><input id="exceptionPrice" name="exceptionPrice" value='$itemDetail.getExceptionPrice()'type="text"/></td>
487
</tr>
488
<tr>
489
<td class="detail">Commission</td>
490
<td class="value"><input id="commission" name="commission" value='$itemDetail.getCommission()'type="text" readonly/></td>
491
</tr>
492
<tr>
493
<td class="detail">Service Tax</td>
494
<td class="value"><input id="serviceTax" name="serviceTax" value='$itemDetail.getServiceTax()'type="text" readonly/></td>
495
</tr>
496
<tr>
497
<td class="detail">Courier Cost</td>
498
<td class="value"><input id="courierCost" name="courierCost" value='$mpDetail.getCourierCost()'type="text" readonly/></td>
499
</tr>
500
<tr>
501
<td class="detail">VAT&nbsp;&#37;</td>
502
<td class="value"><input id="vat" name="vat" value='$mpDetail.getVat()' type="text" onkeyup="calculateStuff()"></td>
503
</tr>
504
<tr>
505
<td class="detail">Item Id &#64; Flipkart</td>
506
#if($itemDetail.getSkuAtFlipkart())
507
	<td class="value"><input id="fkItemCode" name="fkItemCode" value='$itemDetail.getSkuAtFlipkart()' type="text"></td>
508
#else
509
	<td class="value"><input id="fkItemCode" name="fkItemCode" value='' type="text"></td>
510
#end
511
</tr>
512
<tr>
513
<td class="detail">Flipkart Serial Number</td>
514
#if($itemDetail.getFlipkartSerialNumber())
515
	<td class="value"><input id="fkSerialNumber" name="fkSerialNumber" value='$itemDetail.getFlipkartSerialNumber()' type="text"></td>
516
#else
517
	<td class="value"><input id="fkSerialNumber" name="fkSerialNumber" value='' type="text"></td>
518
#end
519
</tr>
520
<tr>
521
<td class="detail">Action</td>
522
<td class="value"><input type="submit" value="Update" name="upload" style="width: 25%;">
523
<input type="button" style="padding-left: 5px; margin-left: 10px;width: 25%;" id="cancelbutton" name="cancel" value="Cancel">
524
</td>
525
</tr>
526
<tr class="detail" style="display:none;"></td>
527
<td>
528
	<input id="itemWeight" name="itemWeight" value='$itemDetail.getWeight()' type="text"/>
529
</td>
530
</tr>
531
<tr class="detail" style="display:none;"></td>
532
<td>
533
	<input id="returnProvision" name="returnProvision" value='$mpDetail.getReturnProvision()' type="text" disabled/>
534
</td>
535
</tr>
536
<tr class="detail" style="display:none;"></td>
537
<td>
538
	<input id="emiFee" name="emiFee" value='$mpDetail.getEmiFee()' type="text" disabled/>
539
</td>
540
</tr>
541
<tr class="detail" style="display:none;"></td>
542
<td>
543
	<input id="closingFee" name="closingFee" value='$mpDetail.getClosingFee()' type="text" disabled/>
544
</td>
545
</tr>
546
<tr class="detail" style="display:none;"></td>
547
<td>
548
	<input id="serviceTaxRate" name="serviceTaxRate" value='$mpDetail.getServiceTax()' type="text" disabled/>
549
</td>
550
</tr>
551
</tbody>
552
</table>
553
</div>
554
</form>
555
</div>
556
<!--product details end-->
557
<!--Inventory details -->
558
<div class="top-header-inventory">
559
<h2 style="font-weight: bolder; font-size: 20px; border-top: 4px solid rgb(134, 163, 189); background-color: rgb(134, 163, 189);color:white;">
560
	Inventory Details
561
</h2>
562
</div>
563
<div class="inventory-details">
564
	<table id="inventory-info" style="width: 100%">
565
        <thead>
566
            <tr>
567
				<th>Id</th>
568
				<th>Warehouse Desc</th>
569
				<th>Warehouse Location</th>
570
				<th>Warehouse Type</th>
571
				<th>Inventory Type</th>
572
				<th>Availability</th>
573
				<th>Reserved</th>
574
				<th>Ebay Held</th>
575
				<th>Snapdeal Held</th>
576
				<th>Flipkart Held</th>
577
            </tr>
578
        </thead>
579
        <tbody>
580
	#set($itemInventory = $action.getItemInventory("$itemDetail.getItem_id()"))
581
	#set($availability = $itemInventory.getAvailability())
582
	#set($reserved = $itemInventory.getReserved())
583
	#set($held = $itemInventory.getHeld())
584
			#foreach( $keyAvailable in $availability.keySet() )
585
			#if($keyAvailable!=16)
586
				<tr style="border: 1px">
587
					#set($whObj = $action.getWarehouse("$keyAvailable","$itemDetail.getItem_id()"))
588
					#set($holdInventoryMap = $action.getHoldInventoryMapForItem())
589
					#set($warehouseCheck="False")
590
					#if ($whObj.getWarehouseType()=="OURS" && $whObj.getInventoryType()=="GOOD")
591
						#set($warehouseCheck="True")
592
					#end
593
					#set($index = $whObj.getLocation().lastIndexOf(","))
594
					#set($index = $index+1)
595
					<td style="text-align:center;width:5%;">$keyAvailable</td>
596
					<td style="text-align:center;width:10%;">$whObj.getDisplayName()</td>
597
					<td style="text-align:center;width:10%;">$whObj.getLocation().substring($index)</td>
598
					<td style="text-align:center;width:10%;">$whObj.getWarehouseType()</td>
599
					<td style="text-align:center;width:8%;">$whObj.getInventoryType()</td>
600
					<td style="text-align:center;width:8%;">$availability.get($keyAvailable)</td>
601
					<td style="text-align:center;width:8%;">$reserved.get($keyAvailable)</td>
602
					<td style="text-align:center;width:8%;">#if($$holdInventoryMap.get(6))$holdInventoryMap.get(6)#{else}0#end</td>
603
					<td style="text-align:center;width:8%;">#if($$holdInventoryMap.get(7))$holdInventoryMap.get(7)#{else}0#end</td>
604
					<td style="text-align:center;">
605
						#if ($warehouseCheck=="True")
606
							<input id="heldInventory_$keyAvailable" name="heldInventory" value='#if($holdInventoryMap.get(8))$holdInventoryMap.get(8)#{else}0#end' type="text" style="width:20%;"/>
607
							<input type="button" class="changeHeld" value="Update" warehouse_id="$keyAvailable" item_id="$itemDetail.getItem_id()" style="width:20%;margin-left:10px;">
608
						#else
609
							<input id="heldInventory_$keyAvailable" name="heldInventory" value='#if($holdInventoryMap.get(8))$holdInventoryMap.get(8)#{else}0#end' type="text" style="width:20%;" readonly/>
610
							<input type="button" value="Update" style="width:20%;margin-left:10px;" disabled/>
611
						#end
612
					</td>
613
            </tr>
614
			#end
615
			#end
616
        </tbody>
617
    </table>
618
</div>
619
 
620
 
621
 
622