Subversion Repositories SmartDukaan

Rev

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

<!DOCTYPE html PUBLIC 
    "-//W3C//DTD XHTML 1.1 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Edit Listing Attributes</title>
<link type="image/x-icon" href="/Support/images/favicon_alt.ico" rel="shortcut icon">
#set ($itemDetail = $action.fetchItemDetail())
#set ($item = $action.getSaholicItem("$itemDetail.getItemid()"))
<style>
* { font-family: Verdana; font-size: 96%; }
                label {
    float: left;
}

.spinner {
    position: fixed;
    top: 50%;
    left: 35%;
    margin-top: -50px;
    text-align:center;
    z-index:1234;
    overflow: auto;
}

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

#upload thead {
    background: url("/Support/images/head-bcg.jpg") no-repeat scroll right top #0C2C65;
    color: #FFFFFF;
    font-size: 22px;
    font-weight: bold;
    height: 35px;
    padding: 14px 0 0 24px;
}

#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;
    width: 270px;
}

.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>
function validateForm()
{

var x=document.forms["upload"]["fbaPrice"].value;
var fbaPrice = Math.floor( x );
var y=document.forms["upload"]["sellingPrice"].value;
var nonFbaPrice = Math.floor( y );
var z=document.forms["upload"]["saholicPrice"].value;
var saholicPrice = Math.floor( z );
var holdInventory=document.forms["upload"]["holdInventory"].value;
var defaultInventory=document.forms["upload"]["defaultInventory"].value;
var customHandlingTime=document.forms["upload"]["customHandlingTime"].value;
if ( x==null || x=="" || isNaN(x))
  {
  jAlert('Illegal Entry In Fba Price Field', 'ERROR');
  return false;
  }
if ( y==null || y=="" || isNaN(y) )
  {
  jAlert('Illegal Entry In Non Fba Price Field', 'ERROR');
  return false;
  }
  
if ( customHandlingTime > 30 || customHandlingTime==null || customHandlingTime=="" || isNaN(customHandlingTime) )
  {
  jAlert('Unacceptable Value In Lead Time To Ship', 'ERROR');
  return false;
  }
if ( holdInventory==null || holdInventory=="" || isNaN(holdInventory))
  {
  jAlert('Illegal Entry In Hold Inventory Field', 'ERROR');
  return false;
  }
if ( defaultInventory==null || defaultInventory=="" || isNaN(defaultInventory) )
  {
  jAlert('Illegal Entry In Default Inventory Field', 'ERROR');
  return false;
  }  

}

</script>
<script type="text/javascript">
$(document).ready(function() {
  $('#cancelbutton').click(function(e) {
    window.location.href = '/Support/amazon-list';
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
    $('#submit').click(function() {
        $('#spinner').show();
    });
});
</script>
</head>
<body>
        <a href="/Support/amazon-list">Back To Listing</a>
<div id="spinner" class="spinner" style="display:none;">
    <img id="img-spinner" src="/Support/images/spinner.gif" alt="Loading"/>
</div>
<br>
<div id="amazon-form" style="padding-left:15%;width: 70%; display: inline-block;">
<form id="upload" name="amazonList" action="/Support/amazon-list!update" onsubmit="return validateForm()" method="post">
<table style="text-align: center;width: 100%;">
<thead>
<tr>
<th colspan="2">Product Details</th>
</tr>
</thead>
<tbody>
        <tr>
<td class="detail">Item Id</td>
<td class="value">$itemDetail.getItemid()<input id="itemId" name="itemId" value='$itemDetail.getItemid()'type="hidden"/></td>
</tr>
<tr>    
<td class="detail">Asin</td>
<td class="value">$itemDetail.getAsin()<input id="asin" name="asin" value='$itemDetail.getAsin()'type="hidden"/></td>
</tr>
<tr>
<td class="detail">Item Name</td>
<td class="value">$itemDetail.getName()<input id="itemName" name="itemName" value='$itemDetail.getName()'type="hidden" /></td>
</tr>
<tr>
<td class="detail">Brand</td>
<td class="value">$itemDetail.getBrand()<input id="brand" name="brand" value='$itemDetail.getBrand()'type="hidden"/></td>
</tr>
<tr>
<td class="detail">Manufacturer Name</td>
<td class="value">$itemDetail.getManufacturer_name()<input id="manufacturerName" name="manufacturerName" value='$itemDetail.getManufacturer_name()'type="hidden"/></td>
</tr>
<tr>      
<td class="detail">Part Number</td>
<td class="value">$itemDetail.getPart_number()<input id="manufacturerName" name="manufacturerName" value='$itemDetail.getManufacturer_name()'type="hidden"/></td>
</tr>
<tr>      
<td class="detail">Color</td>
<td class="value">$itemDetail.getColor()<input id="color" name="color" value='$itemDetail.getColor()'type="hidden"/></td>
</tr>
<tr>
<td class="detail">Saholic Price</td>
<td class="value">$item.getSellingPrice()<input id="saholicPrice" name="saholicPrice" value='$item.getSellingPrice()'type="hidden"/></td>
</tr>
<tr>  
<td class="detail">UPC</td>
<td class="value">$itemDetail.getUpc()<input id="upc" name="upc" value='$itemDetail.getUpc()'type="hidden"/></td>
</tr>
<tr>      
<td class="detail">EAN</td>
<td class="value">$itemDetail.getEan()<input id="ean" name="ean" value='$itemDetail.getEan()'type="hidden"/></td>
</tr>
<tr>
<td class="detail">RISKY</td>
<td class="value" style="text-transform : uppercase;">$item.isRisky()</td>
</tr>
<tr>
<td class="detail" style="text-transform : uppercase;">Status</td>
<td class="value">$item.getItemStatus()</td>
</tr>
<tr>      
<td class="detail">Virtual Inventory</td>
<td class="value">$item.getDefaultInventory()</td>
</tr>
<tr>      
<td class="detail">Risky Inventory</td>
<td class="value">$item.getHoldInventory()</td>
</tr>
</tbody>
</table>
<br />
<br />
<table id="upload" style="text-align: center;width: 100%;height:200px;">
<thead>
<tr>
<th colspan="2">Edit Listing Attributes</th>
</tr>
</thead>
<tbody>
        <tr>
<td class="detail">FBA Listing</td>
<td class="value">#if ($itemDetail.isIsFba())
      <select name="" disabled><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
          <input name="isFba" value='True' type="hidden"/>
          #else
                <select name="" disabled><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
                <input name="isFba" value='False' type="hidden"/>
          #end</td>
</tr>
<tr>
<td class="detail">FBA Price</td>
<td class="value"><input id="fbaPrice" name="fbaPrice" value='$itemDetail.getFbaPrice()'type="text"/></td>
</tr>
<tr>
<td class="detail">MFN Listing</td>
<td class="value">#if ($itemDetail.isIsNonFba())
      <select name="" disabled><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
          <input name="isNonFba" value='True' type="hidden"/>
          #else
                <select name="" disabled><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
                <input name="isNonFba" value='False' type="hidden"/>
          #end
</td>
</tr>
<tr>
<td class="detail">MFN Price</td>
<td class="value"><input id="sellingPrice" name="sellingPrice" value='$itemDetail.getSellingPrice()'type="text"/></td>
</tr>
<tr>
<td class="detail">Inventory Override</td>
<td class="value">#if ($itemDetail.isIsInventoryOverride())
      <select name="isInventoryOverride"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
          #else
                <select name="isInventoryOverride"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
          #end
</td>
</tr>
<tr>
<td class="detail">Suppress FBA Price</td>
<td class="value">#if ($itemDetail.isSuppressFbaPriceUpdate())
      <select name="suppressFbaPriceUpdate"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
          #else
                <select name="suppressFbaPriceUpdate"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
          #end</td>
</tr>
<tr>
<td class="detail">Suppress MFN Price</td>
<td class="value">#if ($itemDetail.isSuppressMfnPriceUpdate())
      <select name="suppressMfnPriceUpdate"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
          #else
                <select name="suppressMfnPriceUpdate"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
          #end
</td>
</tr>
<tr>
<td class="detail">Lead Time To Ship</td>
<td class="value">
        #if ( !$itemDetail.isIsCustomTime() )
<input type="radio" value="False" name="isTime" checked="checked" style="width: 10%;">Default
<input type="text" value=$action.getTimetoShip("$itemDetail.getItemid()") name="handlingTime" id="handlingTime" style="width: 10%;" readonly/>
        <span>Days</span>
<input type="radio" value="True" name="isTime" style="width: 10%;">Custom
<input type="text" value='$itemDetail.getHandlingTime()' name="customHandlingTime" id="customHandlingTime" style="width: 10%;">
        <span>Days</span>
        #else
                <input type="radio" value="False" name="isTime" style="width: 10%;">Default
<input type="text" value=$action.getTimetoShip("$itemDetail.getItemid()") name="handlingTime" id="handlingTime" style="width: 10%;" readonly/>
        <span>Days</span>
<input type="radio" value="True" name="isTime" checked="checked" style="width: 10%;">Custom
<input type="text" value='$itemDetail.getHandlingTime()' name="customHandlingTime" id="customHandlingTime" style="width: 10%;">
        <span>Days</span>
        #end
</td>
</tr>
<tr>
<td class="detail">Risky Inventory / Virtual Inventory</td>
<td class="value">
<span>Risky Inventory</span>
<input type="text" value='$item.getHoldInventory()' name="holdInventory" id="holdInventory" style="width: 10%;">
<span>Virtual Inventory</span>
<input type="text" value='$item.getDefaultInventory()' name="defaultInventory" id="defaultInventory" style="width: 10%;">
</td>
</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>
</tbody>
</table>
</form>
</div>
<br />
<br />
#set($mapAvailable = $action.getAvailableItemInventory("$itemDetail.getItemid()"))
#set($mapReserved = $action.getReservedItemInventory("$itemDetail.getItemid()"))
<div style="width: 70%;padding-left:15%;">
        <table id="upload" style="text-align: center;width: 100%">
<thead>
<tr>
<th colspan="3">Inventory Saholic & Amazon (Total)</th>
</tr>
</thead>
<tbody>
        <tr>
<td class="detail">Warehouse</td>
<td class="value">Available</td>
<td class="value">Reserved</td>
</tr>
#foreach( $keyAvailable in $mapAvailable.keySet() )
<tr>
        <td class="detail">$action.getWarehouseName("$keyAvailable")</td>
<td class="value">$mapAvailable.get($keyAvailable)</td>
<td class="value">$mapReserved.get($keyAvailable)</td>
</tr>
#end
</tbody>
</table>
<br />
<br />
#set( $amazonInventory = $action.getInventoryForAmazonItem("$itemDetail.getItemid()") )
<div id="upload" style="width: 100%;">
        <table style="text-align: center; width: 100%; font-size: 14px;">
<thead>
<tr>
<th colspan="2">Amazon Inventory</th>
</tr>
</thead>
<tbody>
        <tr>
<td class="detail">Available</td>
<td class="value">Reserved</td>
</tr>
        <tr>
                        #if ( !$amazonInventory.getAvailability() )
                 <td class="detail"></td>
              #else
                <td class="detail">$amazonInventory.getAvailability()</td>
              #end
              #if ( !$amazonInventory.getReserved() )
                 <td class="value"></td>
              #else
                <td class="value">$amazonInventory.getReserved()</td>
              #end

                </tr>
</tbody>
</table>
</div>
</div>
</body>
</html>