Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
9242 kshitij.so 1
#set ($itemDetail = $action.fetchItemDetail())
2
 
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
.detail {
21
    background: url("/Support/images/center-blue.png") repeat-y scroll left top #E4EBF8;
22
    border-bottom: 1px solid #B3C1DB;
23
    border-right: 1px solid #CED9EC;
24
    color: #1F3D71;
25
    height: 25px;
26
    padding: 10px 0 0 24px;
27
}
28
 
29
.value {
30
    border-bottom: 1px solid #B3C1DB;
31
    border-right: 1px solid #CED9EC;
32
    height: 24px;
33
    text-align: center;
34
    color: #747474;
35
}
36
 
37
select {
38
    padding-top: 2px;
39
    vertical-align: middle;
40
	direction: ltr;
41
    font-weight: bold;
42
    width: 50%;
43
	height: 22px;
44
}
45
 
46
input {
47
    font-size: 12px;
48
    text-align: center;
49
    width: 50%;
50
    font-weight: bold;
51
}
52
</style>
53
<link href="/Support/css/jquery.alerts.css" type="text/css" rel="stylesheet">
54
<script type="text/javascript" src="/Support/js/jquery-1.4.2.js"></script>
55
<script type="text/javascript" src="/Support/js/jquery.alerts.js"></script>
56
<script type="text/javascript">
57
$(document).ready(function() {
58
  $('#cancelbutton').click(function(e) {
59
    window.location.href = '/Support/snapdeal-list';
60
});
61
});
62
</script>
63
<script type="text/javascript">
64
function calculateStuff()
65
{
66
var itemWeight=document.forms["snapdeal-form"]["itemWeight"].value;
67
if (itemWeight==0){
68
	var courierCost =45;
69
}
70
else{
71
var slabs = parseInt((parseFloat(itemWeight)-.001)/.5)
72
var courierCost = 45;
73
for (var i=0;i<slabs;i++)
74
{
75
	courierCost = courierCost + 35;
76
}
77
}
78
var transferPrice=document.forms["snapdeal-form"]["transferPrice"].value;
79
if ( transferPrice==null || transferPrice=="" || isNaN(transferPrice)){
80
	$('input#sellingPrice').val('0.00');
81
	$('input#courierCost').val('0.00');
82
	$('input#commission').val('0.00');
83
	$('input#serviceTax').val('0.00');
84
	return false;
85
}
86
var sellingPrice=(((parseInt(transferPrice) + courierCost*1.1236)/(100 - 3.59*1.1236))*100).toFixed(2);
87
var commisionValue=(.0359*sellingPrice + courierCost).toFixed(2);
88
var commisionPrice=(((.0359*sellingPrice + courierCost)/sellingPrice)*100).toFixed(2);
89
var serviceTax=(commisionValue*.1236).toFixed(2);
90
$('input#sellingPrice').val(sellingPrice);
91
$('input#courierCost').val(courierCost);
92
$('input#commission').val(commisionPrice);
93
$('input#serviceTax').val(serviceTax);
94
}
95
</script>
9478 kshitij.so 96
<script type="text/javascript">
97
$('#getMxNlc').live('click', function(){
98
	var itemId=document.forms["snapdeal-form"]["itemId"].value;
99
	var warehouseId=document.forms["snapdeal-form"]["warehouseId"].value;
100
	jQuery.ajax({
101
        type : "GET",
102
        url : "/Support/snapdeal-list!ke$ha?itemId="+itemId+"&warehouseId="+warehouseId,
103
		beforeSend: function(){
104
        $('#ajax-spinner').show();
105
        },
106
        complete: function(){
107
        $('#ajax-spinner').hide();
108
        },
109
        success : function(json){
110
		var parsedData = JSON.parse(json);
111
		$('input#maxNlc').val(parsedData.MaxNlc);
112
        },
113
		error : function() {
114
			alert("Unable to get max nlc");
115
		 },
116
    });
117
	return false;
118
});
119
</script>
9242 kshitij.so 120
<form id="snapdeal-form" action="/Support/snapdeal-list!update" enctype="multipart/form-data" method="post">
121
<div class="left" style="float: left; width: 48%;">
122
<table id="upload" style="text-align: center;width: 100%;height:200px;">
123
<thead>
124
</thead>
125
<tbody>
126
<tr>
127
<td class="detail">Item Id</td>
128
<td class="value"><input id="itemId" name="itemId" value='$itemDetail.getItem_id()'type="text" readonly/></td>
129
</tr>
130
<tr>
131
<td class="detail">Warehouse Id</td>
132
<td class="value">
9478 kshitij.so 133
	<input id="warehouseId" name="warehouseId" value='$itemDetail.getWarehouseId()' style="width:25%; type="text" />
134
	<input type="button" id="getMxNlc" value="Get Max Nlc" style="width:25%;">
135
</td>
9242 kshitij.so 136
</tr>
137
<tr>
9568 kshitij.so 138
<td class="detail">Weight</td>
139
<td class="value">
140
	<input id="weight" name="weight" value='$itemDetail.getWeight()' type="text" readonly/>
141
</td>
142
</tr>
143
<tr>
9242 kshitij.so 144
<td class="detail">Snapdeal Selling Price</td>
145
<td class="value">
146
	<input id="sellingPrice" name="sellingPrice" value='$itemDetail.getSellingPrice()'type="text" readonly/></td>
147
</tr>
148
<tr>
149
<td class="detail">Transfer Price</td>
150
<td class="value"><input id="transferPrice" name="transferPrice" value='$itemDetail.getTransferPrice()'type="text" onkeyup="calculateStuff()" /></td>
151
</tr>
152
<tr>
153
<td class="detail">Webiste MRP</td>
154
<td class="value"><input id="webisteMrp" name="webisteMrp" value='$itemDetail.getMrp()'type="text" readonly/></td>
155
</tr>
156
<tr>
157
<td class="detail">Webiste Selling Price</td>
158
<td class="value"><input id="webisteSellingPrice" name="webisteSellingPrice" value='$itemDetail.getWebsiteSellingPrice()'type="text" readonly/></td>
159
</tr>
160
<tr>
9478 kshitij.so 161
<td class="detail">Max NLC</td>
162
<td class="value"><input id="maxNlc" name="maxNlc" value='$itemDetail.getMaxNlc()'type="text"></td>
163
</tr>
164
<tr>
9242 kshitij.so 165
<td class="detail">Suppress Pricing Feed</td>
166
<td class="value">#if ($itemDetail.isSuppressPriceFeed())
167
      <select name="isSuppressPriceFeed"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
168
	  #else
169
		<select name="isSuppressPriceFeed"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
170
	  #end
171
</td>
172
</tr>
173
</tbody>
174
</table>
175
</div>
176
<div class="left" style="float: right; width: 48%;">
177
<table id="upload" style="text-align: center;width: 100%;height:200px;">
178
<thead>
179
</thead>
180
<tbody>
181
<tr>
182
<td class="detail">Suppress Inventory Feed</td>
183
<td class="value">#if ($itemDetail.isSuppressInventoryFeed())
184
      <select name="isSuppressInventoryFeed"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
185
	  #else
186
		<select name="isSuppressInventoryFeed"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
187
	  #end
188
</td>
189
</tr>
190
<tr>
191
<td class="detail">Snapdeal Listed</td>
192
<td class="value">#if ($itemDetail.isIsListedOnSnapdeal())
193
      <select name="isListedOnSnapdeal"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
194
	  #else
195
		<select name="isListedOnSnapdeal"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
196
	  #end
197
</td>
198
</tr>
199
<tr>
200
<td class="detail">Exception Price</td>
201
<td class="value"><input id="exceptionPrice" name="exceptionPrice" value='$itemDetail.getExceptionPrice()'type="text"/></td>
202
</tr>
203
<tr>
204
<td class="detail">Commission</td>
205
<td class="value"><input id="commission" name="commission" value='$itemDetail.getCommission()'type="text" readonly/></td>
206
</tr>
207
<tr>
208
<td class="detail">Service Tax</td>
209
<td class="value"><input id="serviceTax" name="serviceTax" value='$itemDetail.getServiceTax()'type="text" readonly/></td>
210
</tr>
211
<tr>
212
<td class="detail">Courier Cost</td>
213
<td class="value"><input id="courierCost" name="courierCost" value='$itemDetail.getCourierCost()'type="text" readonly/></td>
214
</tr>
215
<tr>
9478 kshitij.so 216
<td class="detail">Item Id &#64; Snapdeal</td>
9479 kshitij.so 217
#if($itemDetail.getSkuAtSnapdeal())
218
	<td class="value"><input id="sdItemCode" name="sdItemCode" value='$itemDetail.getSkuAtSnapdeal()' type="text"></td>
9478 kshitij.so 219
#else
220
	<td class="value"><input id="sdItemCode" name="sdItemCode" value='' type="text"></td>
221
#end
222
</tr>
223
<tr>
9568 kshitij.so 224
<td class="detail">SUPC Code</td>
225
#if($itemDetail.getSupc())
226
	<td class="value"><input id="supc" name="supc" value='$itemDetail.getSupc()' type="text"></td>
227
#else
228
	<td class="value"><input id="supc" name="supc" value='' type="text"></td>
229
#end
230
</tr>
231
<tr>
9242 kshitij.so 232
<td class="detail">Action</td>
233
<td class="value"><input type="submit" value="Update" name="upload" style="width: 25%;">
234
<input type="button" style="padding-left: 5px; margin-left: 10px;width: 25%;" id="cancelbutton" name="cancel" value="Cancel">
235
</td>
236
</tr>
237
<tr class="detail" style="display:none;"></td>
238
<td>
239
	<input id="itemWeight" name="itemWeight" value='$itemDetail.getWeight()'type="text"/>
240
</td>
241
</tr>
242
</tbody>
243
</table>
244
</div>
245
</form>