Subversion Repositories SmartDukaan

Rev

Rev 15435 | 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){
15760 kshitij.so 146
	var courierCost =64;
10098 kshitij.so 147
}
148
else{
149
var slabs = parseInt((parseFloat(itemWeight)-.001)/.5)
15760 kshitij.so 150
var courierCost = 64;
10098 kshitij.so 151
for (var i=0;i<slabs;i++)
152
{
15760 kshitij.so 153
	courierCost = courierCost + 34;
10098 kshitij.so 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>
15435 kshitij.so 273
<div class="product-detail" style="display: block; min-height: 730px;">
10098 kshitij.so 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>
15433 kshitij.so 386
<td class="detail">Last N Day Sale</td>
387
#set($nDaySale=$action.getLastNDaySaleForItem("$itemDetail.getItem_id()","5"))
388
<td class="value">
389
	<input id="lastNDaySale" name="lastNDaySale" value='$action.getnDaySale()' type="text" disabled/></td>
14780 manish.sha 390
</tr>
10098 kshitij.so 391
</tbody>
392
</table>
393
</div>
394
<div class="left" style="float: right; width: 48%;">
395
<table id="upload" style="text-align: center;width: 100%;height:200px;">
396
<thead>
397
</thead>
398
<tbody>
399
<tr>
400
<td class="detail">Average Sale</td>
401
<td class="value">
402
	<input id="avgSale" name="avgSale" value='$action.getAvgSale()' type="text" disabled/></td>
403
</tr>
404
<tr>
405
<td class="detail">Suppress Pricing Feed</td>
406
<td class="value">#if ($itemDetail.isSuppressPriceFeed())
407
      <select name="isSuppressPriceFeed" selectType="1" class="border-highlight-red"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
408
	  #else
409
		<select name="isSuppressPriceFeed" selectType="1"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
410
	  #end
411
</td>
412
</tr>
413
<tr>
414
<td class="detail">Suppress Inventory Feed</td>
415
<td class="value">#if ($itemDetail.isSuppressInventoryFeed())
416
      <select name="isSuppressInventoryFeed" selectType="1" class="border-highlight-red"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
417
	  #else
418
		<select name="isSuppressInventoryFeed" selectType="1"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
419
	  #end
420
</td>
421
</tr>
422
<tr>
423
<td class="detail">Flipkart Listed</td>
424
<td class="value">#if ($itemDetail.isIsListedOnFlipkart())
425
      <select name="isListedOnFlipkart" selectType="2"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
426
	  #else
427
		<select name="isListedOnFlipkart" selectType="2" class="border-highlight-red"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
428
	  #end
429
</td>
430
</tr>
431
<tr>
14780 manish.sha 432
<td class="detail">Flipkart FA Listed</td>
433
<td class="value">#if ($itemDetail.isIsFaListed())
434
      <select name="isFaListedOnFlipkart" selectType="2"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
435
	  #else
436
		<select name="isFaListedOnFlipkart" selectType="2" class="border-highlight-red"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
437
	  #end
438
</td>
439
</tr>
440
<tr>
10098 kshitij.so 441
<td class="detail">Auto Increment</td>
442
<td class="value">#if ($mpDetail.isAutoIncrement())
443
      <select name="isAutoIncrement" selectType="3" class="border-highlight-green"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
444
	  #else
445
		<select name="isAutoIncrement" selectType="3"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
446
	  #end
447
</td>
448
</tr>
449
<tr>
450
<td class="detail">Auto Decrement</td>
451
<td class="value">#if ($mpDetail.isAutoDecrement())
452
      <select name="isAutoDecrement" selectType="3" class="border-highlight-green"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
453
	  #else
454
		<select name="isAutoDecrement" selectType="3"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
455
	  #end
456
</td>
457
</tr>
458
<tr>
459
<td class="detail">Auto Favourite</td>
460
<td class="value">#if ($mpDetail.isAutoFavourite())
461
      <select name="isAutoFavourite" class="border-highlight-green"><option selected="selected" value="True">Active</option></select>
462
	  #else
463
		<select name="isAutoFavourite"><option selected="selected" value="False">InActive</option></select>
464
	  #end
465
</td>
466
</tr>
467
<tr>
468
<td class="detail">Manual Favourite</td>
469
<td class="value">#if ($mpDetail.isManualFavourite())
470
      <select name="isManualFavourite" selectType="3" class="border-highlight-green"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
471
	  #else
472
		<select name="isManualFavourite" selectType="3"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
473
	  #end
474
</td>
475
</tr>
476
<tr>
477
<td class="detail">Commission&nbsp;&#37;</td>
478
<td class="value"><input id="commissionRate" name="commissionRate" value='$mpDetail.getCommission()'type="text" disabled/></td>
479
</tr>
480
<tr>
481
<td class="detail">Exception Price</td>
482
<td class="value"><input id="exceptionPrice" name="exceptionPrice" value='$itemDetail.getExceptionPrice()'type="text"/></td>
483
</tr>
484
<tr>
485
<td class="detail">Commission</td>
486
<td class="value"><input id="commission" name="commission" value='$itemDetail.getCommission()'type="text" readonly/></td>
487
</tr>
488
<tr>
15433 kshitij.so 489
<td class="detail">Return Provision</td>	
490
<td class="value">
491
	<input id="returnProvision" name="returnProvision" value='$mpDetail.getReturnProvision()' type="text" disabled/>
492
</td>
493
</tr>
494
 
495
<tr>
10098 kshitij.so 496
<td class="detail">Service Tax</td>
497
<td class="value"><input id="serviceTax" name="serviceTax" value='$itemDetail.getServiceTax()'type="text" readonly/></td>
498
</tr>
499
<tr>
500
<td class="detail">Courier Cost</td>
501
<td class="value"><input id="courierCost" name="courierCost" value='$mpDetail.getCourierCost()'type="text" readonly/></td>
502
</tr>
503
<tr>
504
<td class="detail">VAT&nbsp;&#37;</td>
505
<td class="value"><input id="vat" name="vat" value='$mpDetail.getVat()' type="text" onkeyup="calculateStuff()"></td>
506
</tr>
507
<tr>
508
<td class="detail">Item Id &#64; Flipkart</td>
509
#if($itemDetail.getSkuAtFlipkart())
510
	<td class="value"><input id="fkItemCode" name="fkItemCode" value='$itemDetail.getSkuAtFlipkart()' type="text"></td>
511
#else
512
	<td class="value"><input id="fkItemCode" name="fkItemCode" value='' type="text"></td>
513
#end
514
</tr>
515
<tr>
516
<td class="detail">Flipkart Serial Number</td>
517
#if($itemDetail.getFlipkartSerialNumber())
518
	<td class="value"><input id="fkSerialNumber" name="fkSerialNumber" value='$itemDetail.getFlipkartSerialNumber()' type="text"></td>
519
#else
520
	<td class="value"><input id="fkSerialNumber" name="fkSerialNumber" value='' type="text"></td>
521
#end
522
</tr>
523
<tr>
524
<td class="detail">Action</td>
525
<td class="value"><input type="submit" value="Update" name="upload" style="width: 25%;">
526
<input type="button" style="padding-left: 5px; margin-left: 10px;width: 25%;" id="cancelbutton" name="cancel" value="Cancel">
527
</td>
528
</tr>
529
<tr class="detail" style="display:none;"></td>
530
<td>
531
	<input id="itemWeight" name="itemWeight" value='$itemDetail.getWeight()' type="text"/>
532
</td>
533
</tr>
534
<tr class="detail" style="display:none;"></td>
535
<td>
536
	<input id="emiFee" name="emiFee" value='$mpDetail.getEmiFee()' type="text" disabled/>
537
</td>
538
</tr>
539
<tr class="detail" style="display:none;"></td>
540
<td>
541
	<input id="closingFee" name="closingFee" value='$mpDetail.getClosingFee()' type="text" disabled/>
542
</td>
543
</tr>
544
<tr class="detail" style="display:none;"></td>
545
<td>
546
	<input id="serviceTaxRate" name="serviceTaxRate" value='$mpDetail.getServiceTax()' type="text" disabled/>
547
</td>
548
</tr>
549
</tbody>
550
</table>
551
</div>
552
</form>
553
</div>
554
<!--product details end-->
555
<!--Inventory details -->
556
<div class="top-header-inventory">
557
<h2 style="font-weight: bolder; font-size: 20px; border-top: 4px solid rgb(134, 163, 189); background-color: rgb(134, 163, 189);color:white;">
558
	Inventory Details
559
</h2>
560
</div>
561
<div class="inventory-details">
562
	<table id="inventory-info" style="width: 100%">
563
        <thead>
564
            <tr>
565
				<th>Id</th>
566
				<th>Warehouse Desc</th>
567
				<th>Warehouse Location</th>
568
				<th>Warehouse Type</th>
569
				<th>Inventory Type</th>
570
				<th>Availability</th>
571
				<th>Reserved</th>
572
				<th>Ebay Held</th>
573
				<th>Snapdeal Held</th>
574
				<th>Flipkart Held</th>
575
            </tr>
576
        </thead>
577
        <tbody>
578
	#set($itemInventory = $action.getItemInventory("$itemDetail.getItem_id()"))
579
	#set($availability = $itemInventory.getAvailability())
580
	#set($reserved = $itemInventory.getReserved())
581
	#set($held = $itemInventory.getHeld())
582
			#foreach( $keyAvailable in $availability.keySet() )
583
			#if($keyAvailable!=16)
584
				<tr style="border: 1px">
585
					#set($whObj = $action.getWarehouse("$keyAvailable","$itemDetail.getItem_id()"))
586
					#set($holdInventoryMap = $action.getHoldInventoryMapForItem())
587
					#set($warehouseCheck="False")
588
					#if ($whObj.getWarehouseType()=="OURS" && $whObj.getInventoryType()=="GOOD")
589
						#set($warehouseCheck="True")
590
					#end
591
					#set($index = $whObj.getLocation().lastIndexOf(","))
592
					#set($index = $index+1)
593
					<td style="text-align:center;width:5%;">$keyAvailable</td>
594
					<td style="text-align:center;width:10%;">$whObj.getDisplayName()</td>
595
					<td style="text-align:center;width:10%;">$whObj.getLocation().substring($index)</td>
596
					<td style="text-align:center;width:10%;">$whObj.getWarehouseType()</td>
597
					<td style="text-align:center;width:8%;">$whObj.getInventoryType()</td>
598
					<td style="text-align:center;width:8%;">$availability.get($keyAvailable)</td>
599
					<td style="text-align:center;width:8%;">$reserved.get($keyAvailable)</td>
600
					<td style="text-align:center;width:8%;">#if($$holdInventoryMap.get(6))$holdInventoryMap.get(6)#{else}0#end</td>
601
					<td style="text-align:center;width:8%;">#if($$holdInventoryMap.get(7))$holdInventoryMap.get(7)#{else}0#end</td>
602
					<td style="text-align:center;">
603
						#if ($warehouseCheck=="True")
604
							<input id="heldInventory_$keyAvailable" name="heldInventory" value='#if($holdInventoryMap.get(8))$holdInventoryMap.get(8)#{else}0#end' type="text" style="width:20%;"/>
605
							<input type="button" class="changeHeld" value="Update" warehouse_id="$keyAvailable" item_id="$itemDetail.getItem_id()" style="width:20%;margin-left:10px;">
606
						#else
607
							<input id="heldInventory_$keyAvailable" name="heldInventory" value='#if($holdInventoryMap.get(8))$holdInventoryMap.get(8)#{else}0#end' type="text" style="width:20%;" readonly/>
608
							<input type="button" value="Update" style="width:20%;margin-left:10px;" disabled/>
609
						#end
610
					</td>
611
            </tr>
612
			#end
613
			#end
614
        </tbody>
615
    </table>
616
</div>
617
 
618
 
619
 
620