| Line 124... |
Line 124... |
| 124 |
OPTIONAL_PREFERRED_INSURER = "Preferred Insurer",
|
124 |
OPTIONAL_PREFERRED_INSURER = "Preferred Insurer",
|
| 125 |
OPTIONAL_SOURCE_PRICING = "Source Pricing",
|
125 |
OPTIONAL_SOURCE_PRICING = "Source Pricing",
|
| 126 |
OPTIONAL_FREEBIE_ITEM_ID = "Freebie Item Id",
|
126 |
OPTIONAL_FREEBIE_ITEM_ID = "Freebie Item Id",
|
| 127 |
OPTIONAL_PACK_QUANTITY = "Pack Quantity",
|
127 |
OPTIONAL_PACK_QUANTITY = "Pack Quantity",
|
| 128 |
OPTIONAL_QUANTITY_STEP="Quantity Step",
|
128 |
OPTIONAL_QUANTITY_STEP="Quantity Step",
|
| 129 |
OPTIONAL_MINIMUM_BUY_QTY="Minimum Buy Qty";
|
129 |
OPTIONAL_MINIMUM_BUY_QTY="Minimum Buy Qty",
|
| - |
|
130 |
OPTIONAL_MAXIMUM_BUY_QTY = "Maximum Buy Qty";
|
| 130 |
|
131 |
|
| 131 |
private final String PRICE_WIDTH = "100px", VENDOR_DESC_WIDTH = "130px",
|
132 |
private final String PRICE_WIDTH = "100px", VENDOR_DESC_WIDTH = "130px",
|
| 132 |
VENDOR_ID_WIDTH = "100px", ITEM_KEY_WIDTH = "200px",
|
133 |
VENDOR_ID_WIDTH = "100px", ITEM_KEY_WIDTH = "200px",
|
| 133 |
BUTTON_WIDTH = "50px";
|
134 |
BUTTON_WIDTH = "50px";
|
| 134 |
|
135 |
|
| Line 178... |
Line 179... |
| 178 |
@UiField TextBox asin;
|
179 |
@UiField TextBox asin;
|
| 179 |
@UiField TextBox holdInventory;
|
180 |
@UiField TextBox holdInventory;
|
| 180 |
@UiField TextBox defaultInventory;
|
181 |
@UiField TextBox defaultInventory;
|
| 181 |
@UiField TextBox dealFreebieItemId;
|
182 |
@UiField TextBox dealFreebieItemId;
|
| 182 |
@UiField TextBox dealPrice;
|
183 |
@UiField TextBox dealPrice;
|
| 183 |
@UiField TextBox packQuantity, quantityStep, minimumBuyQuantity;
|
184 |
@UiField TextBox packQuantity, quantityStep, minimumBuyQuantity, maximumBuyQuantity;
|
| 184 |
|
185 |
|
| 185 |
public ItemDetails(Item item){
|
186 |
public ItemDetails(Item item){
|
| 186 |
this();
|
187 |
this();
|
| 187 |
setItemDetails(item);
|
188 |
setItemDetails(item);
|
| 188 |
}
|
189 |
}
|
| Line 373... |
Line 374... |
| 373 |
}
|
374 |
}
|
| 374 |
dealText.setText(item.getPrivateDeal().getDealText());
|
375 |
dealText.setText(item.getPrivateDeal().getDealText());
|
| 375 |
packQuantity.setText(item.getPackQuantity().toString());
|
376 |
packQuantity.setText(item.getPackQuantity().toString());
|
| 376 |
quantityStep.setText(item.getQuantityStep().toString());
|
377 |
quantityStep.setText(item.getQuantityStep().toString());
|
| 377 |
minimumBuyQuantity.setText(item.getMinimumBuyQuantity().toString());
|
378 |
minimumBuyQuantity.setText(item.getMinimumBuyQuantity().toString());
|
| - |
|
379 |
maximumBuyQuantity.setText(item.getMaximumBuyQuantity().toString());
|
| 378 |
initVatDetailsHeader();
|
380 |
initVatDetailsHeader();
|
| 379 |
updateVatDetailsTable(item.getStateNameVatPercentageMap());
|
381 |
updateVatDetailsTable(item.getStateNameVatPercentageMap());
|
| 380 |
updateAvailabilityTable(item.getItemInventory());
|
382 |
updateAvailabilityTable(item.getItemInventory());
|
| 381 |
updateVendorKeysTable(item.getVendorKeysMap());
|
383 |
updateVendorKeysTable(item.getVendorKeysMap());
|
| 382 |
updateVendorPricingTable(item.getVendorPricesMap());
|
384 |
updateVendorPricingTable(item.getVendorPricesMap());
|
| Line 1761... |
Line 1763... |
| 1761 |
}
|
1763 |
}
|
| 1762 |
} catch(NumberFormatException ex) {
|
1764 |
} catch(NumberFormatException ex) {
|
| 1763 |
Window.alert("Invalid Min Buy Qty format/value. Value should be greater than zero");
|
1765 |
Window.alert("Invalid Min Buy Qty format/value. Value should be greater than zero");
|
| 1764 |
return false;
|
1766 |
return false;
|
| 1765 |
}
|
1767 |
}
|
| - |
|
1768 |
|
| - |
|
1769 |
try {
|
| - |
|
1770 |
if(!maximumBuyQuantity.getText().trim().isEmpty()) {
|
| - |
|
1771 |
long maximumBuyQuantityValue= Long.parseLong(maximumBuyQuantity.getText().trim());
|
| - |
|
1772 |
if(maximumBuyQuantityValue < 0) {
|
| - |
|
1773 |
throw new NumberFormatException("Illegal value of Max Buy Qty");
|
| - |
|
1774 |
}
|
| - |
|
1775 |
newItem.setMaximumBuyQuantity(maximumBuyQuantityValue);
|
| - |
|
1776 |
}
|
| - |
|
1777 |
else{
|
| - |
|
1778 |
Window.alert("Invalid Max Buy Qty format/value. Value should can't be empty");
|
| - |
|
1779 |
return false;
|
| - |
|
1780 |
}
|
| - |
|
1781 |
} catch(NumberFormatException ex) {
|
| - |
|
1782 |
Window.alert("Invalid Min Buy Qty format/value.");
|
| - |
|
1783 |
return false;
|
| - |
|
1784 |
}
|
| - |
|
1785 |
|
| 1766 |
|
1786 |
|
| 1767 |
if(newItem.getPrivateDeal().getDealPrice()!=0 && newItem.getPrivateDeal().getDealPrice() >= newItem.getSellingPrice()){
|
1787 |
if(newItem.getPrivateDeal().getDealPrice()!=0 && newItem.getPrivateDeal().getDealPrice() >= newItem.getSellingPrice()){
|
| 1768 |
Window.alert("Deal Price can't be more than Selling Price");
|
1788 |
Window.alert("Deal Price can't be more than Selling Price");
|
| 1769 |
return false;
|
1789 |
return false;
|
| 1770 |
}
|
1790 |
}
|
| Line 2215... |
Line 2235... |
| 2215 |
|
2235 |
|
| 2216 |
if(!checkParameterIfEqual(newItem.getMinimumBuyQuantity(),item.getMinimumBuyQuantity())) {
|
2236 |
if(!checkParameterIfEqual(newItem.getMinimumBuyQuantity(),item.getMinimumBuyQuantity())) {
|
| 2217 |
mandatoryChangedValMap.put(OPTIONAL_MINIMUM_BUY_QTY, newItem.getMinimumBuyQuantity());
|
2237 |
mandatoryChangedValMap.put(OPTIONAL_MINIMUM_BUY_QTY, newItem.getMinimumBuyQuantity());
|
| 2218 |
sb.append("\n-Min Buy Qty");
|
2238 |
sb.append("\n-Min Buy Qty");
|
| 2219 |
}
|
2239 |
}
|
| - |
|
2240 |
|
| - |
|
2241 |
if(!checkParameterIfEqual(newItem.getMaximumBuyQuantity(),item.getMaximumBuyQuantity())) {
|
| - |
|
2242 |
mandatoryChangedValMap.put(OPTIONAL_MAXIMUM_BUY_QTY, newItem.getMaximumBuyQuantity());
|
| - |
|
2243 |
sb.append("\n-Max Buy Qty");
|
| - |
|
2244 |
}
|
| 2220 |
|
2245 |
|
| 2221 |
VendorPricings vendorPricings;
|
2246 |
VendorPricings vendorPricings;
|
| 2222 |
long vendorId;
|
2247 |
long vendorId;
|
| 2223 |
boolean vendorPricingsChanged = false;
|
2248 |
boolean vendorPricingsChanged = false;
|
| 2224 |
for(int row = 0; row < tableVendorPrices.getRowCount(); row++) {
|
2249 |
for(int row = 0; row < tableVendorPrices.getRowCount(); row++) {
|