Subversion Repositories SmartDukaan

Rev

Rev 9568 | Rev 9734 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#set ($itemDetail = $action.fetchItemDetail())

<style>
* { font-family: Verdana; font-size: 96%; }
                label {
    float: left;
}

#upload > table {
    color: #747474;
    width: 100%;
}


#upload tbody {
    background: url("/Support/images/center-bcg.png") repeat-y scroll right top #F6F6F6;
    font-weight: bold;
}

.detail {
    background: url("/Support/images/center-blue.png") repeat-y scroll left top #E4EBF8;
    border-bottom: 1px solid #B3C1DB;
    border-right: 1px solid #CED9EC;
    color: #1F3D71;
    height: 25px;
    padding: 10px 0 0 24px;
}

.value {
    border-bottom: 1px solid #B3C1DB;
    border-right: 1px solid #CED9EC;
    height: 24px;
    text-align: center;
    color: #747474;
}

select {
    padding-top: 2px;
    vertical-align: middle;
        direction: ltr;
    font-weight: bold;
    width: 50%;
        height: 22px;
}

input {
    font-size: 12px;
    text-align: center;
    width: 50%;
    font-weight: bold;
}
</style>
<link href="/Support/css/jquery.alerts.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="/Support/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="/Support/js/jquery.alerts.js"></script>
<script type="text/javascript">
$(document).ready(function() {
  $('#cancelbutton').click(function(e) {
    window.location.href = '/Support/snapdeal-list';
});
});
</script>
<script type="text/javascript">
function calculateStuff()
{
var itemWeight=document.forms["snapdeal-form"]["itemWeight"].value;
if (itemWeight==0){
        var courierCost =45;
}
else{
var slabs = parseInt((parseFloat(itemWeight)-.001)/.5)
var courierCost = 45;
for (var i=0;i<slabs;i++)
{
        courierCost = courierCost + 35;
}
}
var transferPrice=document.forms["snapdeal-form"]["transferPrice"].value;
if ( transferPrice==null || transferPrice=="" || isNaN(transferPrice)){
        $('input#sellingPrice').val('0.00');
        $('input#courierCost').val('0.00');
        $('input#commission').val('0.00');
        $('input#serviceTax').val('0.00');
        return false;
}
var sellingPrice=(((parseInt(transferPrice) + courierCost*1.1236)/(100 - 3.59*1.1236))*100).toFixed(2);
var commisionValue=(.0359*sellingPrice + courierCost).toFixed(2);
var commisionPrice=(((.0359*sellingPrice + courierCost)/sellingPrice)*100).toFixed(2);
var serviceTax=(commisionValue*.1236).toFixed(2);
$('input#sellingPrice').val(sellingPrice);
$('input#courierCost').val(courierCost);
$('input#commission').val(commisionPrice);
$('input#serviceTax').val(serviceTax);
}
</script>
<script type="text/javascript">
$('#getMxNlc').live('click', function(){
        var itemId=document.forms["snapdeal-form"]["itemId"].value;
        var warehouseId=document.forms["snapdeal-form"]["warehouseId"].value;
        jQuery.ajax({
        type : "GET",
        url : "/Support/snapdeal-list!ke$ha?itemId="+itemId+"&warehouseId="+warehouseId,
                beforeSend: function(){
        $('#ajax-spinner').show();
        },
        complete: function(){
        $('#ajax-spinner').hide();
        },
        success : function(json){
                var parsedData = JSON.parse(json);
                $('input#maxNlc').val(parsedData.MaxNlc);
        },
                error : function() {
                        alert("Unable to get max nlc");
                 },
    });
        return false;
});
</script>
<form id="snapdeal-form" action="/Support/snapdeal-list!update" enctype="multipart/form-data" method="post">
<div class="left" style="float: left; width: 48%;">
<table id="upload" style="text-align: center;width: 100%;height:200px;">
<thead>
</thead>
<tbody>
<tr>
<td class="detail">Item Id</td>
<td class="value"><input id="itemId" name="itemId" value='$itemDetail.getItem_id()'type="text" readonly/></td>
</tr>
<tr>
<td class="detail">Warehouse Id</td>
<td class="value">
        <input id="warehouseId" name="warehouseId" value='$itemDetail.getWarehouseId()' style="width:25%; type="text" />
        <input type="button" id="getMxNlc" value="Get Max Nlc" style="width:25%;">
</td>
</tr>
<tr>
<td class="detail">Weight</td>
<td class="value">
        <input id="weight" name="weight" value='$itemDetail.getWeight()' type="text" readonly/>
</td>
</tr>
<tr>
<td class="detail">Snapdeal Selling Price</td>
<td class="value">
        <input id="sellingPrice" name="sellingPrice" value='$itemDetail.getSellingPrice()'type="text" readonly/></td>
</tr>
<tr>
<td class="detail">Transfer Price</td>
<td class="value"><input id="transferPrice" name="transferPrice" value='$itemDetail.getTransferPrice()'type="text" onkeyup="calculateStuff()" /></td>
</tr>
<tr>
<td class="detail">Webiste MRP</td>
<td class="value"><input id="webisteMrp" name="webisteMrp" value='$itemDetail.getMrp()'type="text" readonly/></td>
</tr>
<tr>
<td class="detail">Webiste Selling Price</td>
<td class="value"><input id="webisteSellingPrice" name="webisteSellingPrice" value='$itemDetail.getWebsiteSellingPrice()'type="text" readonly/></td>
</tr>
<tr>
<td class="detail">Max NLC</td>
<td class="value"><input id="maxNlc" name="maxNlc" value='$itemDetail.getMaxNlc()'type="text" readonly/></td>
</tr>
<tr>
<td class="detail">Suppress Pricing Feed</td>
<td class="value">#if ($itemDetail.isSuppressPriceFeed())
      <select name="isSuppressPriceFeed"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
          #else
                <select name="isSuppressPriceFeed"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
          #end
</td>
</tr>
</tbody>
</table>
</div>
<div class="left" style="float: right; width: 48%;">
<table id="upload" style="text-align: center;width: 100%;height:200px;">
<thead>
</thead>
<tbody>
<tr>
<td class="detail">Suppress Inventory Feed</td>
<td class="value">#if ($itemDetail.isSuppressInventoryFeed())
      <select name="isSuppressInventoryFeed"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
          #else
                <select name="isSuppressInventoryFeed"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
          #end
</td>
</tr>
<tr>
<td class="detail">Snapdeal Listed</td>
<td class="value">#if ($itemDetail.isIsListedOnSnapdeal())
      <select name="isListedOnSnapdeal"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
          #else
                <select name="isListedOnSnapdeal"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
          #end
</td>
</tr>
<tr>
<td class="detail">Exception Price</td>
<td class="value"><input id="exceptionPrice" name="exceptionPrice" value='$itemDetail.getExceptionPrice()'type="text"/></td>
</tr>
<tr>
<td class="detail">Commission</td>
<td class="value"><input id="commission" name="commission" value='$itemDetail.getCommission()'type="text" readonly/></td>
</tr>
<tr>
<td class="detail">Service Tax</td>
<td class="value"><input id="serviceTax" name="serviceTax" value='$itemDetail.getServiceTax()'type="text" readonly/></td>
</tr>
<tr>
<td class="detail">Courier Cost</td>
<td class="value"><input id="courierCost" name="courierCost" value='$itemDetail.getCourierCost()'type="text" readonly/></td>
</tr>
<tr>
<td class="detail">Item Id &#64; Snapdeal</td>
#if($itemDetail.getSkuAtSnapdeal())
        <td class="value"><input id="sdItemCode" name="sdItemCode" value='$itemDetail.getSkuAtSnapdeal()' type="text"></td>
#else
        <td class="value"><input id="sdItemCode" name="sdItemCode" value='' type="text"></td>
#end
</tr>
<tr>
<td class="detail">SUPC Code</td>
#if($itemDetail.getSupc())
        <td class="value"><input id="supc" name="supc" value='$itemDetail.getSupc()' type="text"></td>
#else
        <td class="value"><input id="supc" name="supc" value='' type="text"></td>
#end
</tr>
<tr>
<td class="detail">Action</td>
<td class="value"><input type="submit" value="Update" name="upload" style="width: 25%;">
<input type="button" style="padding-left: 5px; margin-left: 10px;width: 25%;" id="cancelbutton" name="cancel" value="Cancel">
</td>
</tr>
<tr class="detail" style="display:none;"></td>
<td>
        <input id="itemWeight" name="itemWeight" value='$itemDetail.getWeight()'type="text"/>
</td>
</tr>
</tbody>
</table>
</div>
</form>