| Line 149... |
Line 149... |
| 149 |
@UiField Button comingSoonButton;
|
149 |
@UiField Button comingSoonButton;
|
| 150 |
@UiField FlexTable headerVouchers, tableVouchers;
|
150 |
@UiField FlexTable headerVouchers, tableVouchers;
|
| 151 |
@UiField FlexTable headerIgnoredWarehouse,tableIgnoredWarehouse;
|
151 |
@UiField FlexTable headerIgnoredWarehouse,tableIgnoredWarehouse;
|
| 152 |
@UiField TextBox minStockLevel, numOfDaysStock;
|
152 |
@UiField TextBox minStockLevel, numOfDaysStock;
|
| 153 |
@UiField TextBox freebieItemId;
|
153 |
@UiField TextBox freebieItemId;
|
| - |
|
154 |
@UiField TextBox asin;
|
| - |
|
155 |
@UiField TextBox holdInventory;
|
| - |
|
156 |
@UiField TextBox defaultInventory;
|
| - |
|
157 |
|
| 154 |
public ItemDetails(Item item){
|
158 |
public ItemDetails(Item item){
|
| 155 |
this();
|
159 |
this();
|
| 156 |
setItemDetails(item);
|
160 |
setItemDetails(item);
|
| 157 |
}
|
161 |
}
|
| 158 |
|
162 |
|
| Line 277... |
Line 281... |
| 277 |
defaultForEntity.setValue(item.isDefaultForEntity());
|
281 |
defaultForEntity.setValue(item.isDefaultForEntity());
|
| 278 |
risky.setValue(item.isRisky());
|
282 |
risky.setValue(item.isRisky());
|
| 279 |
|
283 |
|
| 280 |
itemStatus.setText(item.getItemStatus());
|
284 |
itemStatus.setText(item.getItemStatus());
|
| 281 |
freebieItemId.setText(item.getFreebieItemId().toString());
|
285 |
freebieItemId.setText(item.getFreebieItemId().toString());
|
| - |
|
286 |
asin.setText(item.getAsin());
|
| - |
|
287 |
holdInventory.setText(Long.toString(item.getHoldInventory()));
|
| - |
|
288 |
defaultInventory.setText(Long.toString(item.getDefaultInventory()));
|
| 282 |
updateAvailabilityTable(item.getItemInventory());
|
289 |
updateAvailabilityTable(item.getItemInventory());
|
| 283 |
updateVendorKeysTable(item.getVendorKeysMap());
|
290 |
updateVendorKeysTable(item.getVendorKeysMap());
|
| 284 |
updateVendorPricingTable(item.getVendorPricesMap());
|
291 |
updateVendorPricingTable(item.getVendorPricesMap());
|
| 285 |
updateSourcePricingTable(item.getSourcePricesMap());
|
292 |
updateSourcePricingTable(item.getSourcePricesMap());
|
| 286 |
updateSimilarItemsTable(item.getSimilarItems());
|
293 |
updateSimilarItemsTable(item.getSimilarItems());
|
| Line 1357... |
Line 1364... |
| 1357 |
}
|
1364 |
}
|
| 1358 |
newItem.setPreferredInsurer(Long.parseLong(preferredInsurer.getValue(preferredInsurer.getSelectedIndex())));
|
1365 |
newItem.setPreferredInsurer(Long.parseLong(preferredInsurer.getValue(preferredInsurer.getSelectedIndex())));
|
| 1359 |
newItem.setWarehouseStickiness(warehouseStickiness.getValue());
|
1366 |
newItem.setWarehouseStickiness(warehouseStickiness.getValue());
|
| 1360 |
newItem.setHasItemNo(hasItemNo.getValue());
|
1367 |
newItem.setHasItemNo(hasItemNo.getValue());
|
| 1361 |
newItem.setItemType(itemType.getValue());
|
1368 |
newItem.setItemType(itemType.getValue());
|
| - |
|
1369 |
newItem.setAsin(asin.getText().trim());
|
| - |
|
1370 |
try {
|
| - |
|
1371 |
if(!holdInventory.getText().trim().equals("")) {
|
| - |
|
1372 |
long hold_inventory = Long.parseLong(holdInventory.getText().trim());
|
| - |
|
1373 |
if(hold_inventory < 0) {
|
| - |
|
1374 |
throw new NumberFormatException("Negative value of Hold Inventory");
|
| - |
|
1375 |
}
|
| - |
|
1376 |
newItem.setHoldInventory(hold_inventory);
|
| - |
|
1377 |
}
|
| - |
|
1378 |
} catch(NumberFormatException ex) {
|
| - |
|
1379 |
Window.alert("Invalid Hold Inventory Value");
|
| - |
|
1380 |
return false;
|
| 1362 |
|
1381 |
}
|
| - |
|
1382 |
|
| - |
|
1383 |
try {
|
| - |
|
1384 |
if(!defaultInventory.getText().trim().equals("")) {
|
| - |
|
1385 |
long default_inventory = Long.parseLong(defaultInventory.getText().trim());
|
| - |
|
1386 |
if(default_inventory < 0) {
|
| - |
|
1387 |
throw new NumberFormatException("Negative value of Default Inventory");
|
| - |
|
1388 |
}
|
| - |
|
1389 |
newItem.setDefaultInventory(default_inventory);
|
| - |
|
1390 |
}
|
| - |
|
1391 |
} catch(NumberFormatException ex) {
|
| - |
|
1392 |
Window.alert("Invalid Default Inventory Value");
|
| - |
|
1393 |
return false;
|
| - |
|
1394 |
}
|
| 1363 |
/*Create an instance of VendorPricings for each row in vendor pricing table. Set the vendor prices to the instance.
|
1395 |
/*Create an instance of VendorPricings for each row in vendor pricing table. Set the vendor prices to the instance.
|
| 1364 |
Add the instance to map and set the map to the item instance created above.*/
|
1396 |
Add the instance to map and set the map to the item instance created above.*/
|
| 1365 |
Map<Long, VendorPricings> vendorPrices = new HashMap<Long, VendorPricings>();
|
1397 |
Map<Long, VendorPricings> vendorPrices = new HashMap<Long, VendorPricings>();
|
| 1366 |
VendorPricings v;
|
1398 |
VendorPricings v;
|
| 1367 |
for(int row = 0; row < tableVendorPrices.getRowCount(); row++) {
|
1399 |
for(int row = 0; row < tableVendorPrices.getRowCount(); row++) {
|
| Line 1602... |
Line 1634... |
| 1602 |
}
|
1634 |
}
|
| 1603 |
if(!checkParameterIfEqual(newItem.getFreebieItemId(), item.getFreebieItemId())) {
|
1635 |
if(!checkParameterIfEqual(newItem.getFreebieItemId(), item.getFreebieItemId())) {
|
| 1604 |
mandatoryChangedValMap.put(MANDATORY_FREEBIE_ITEM_ID, freebieItemId.getText().trim());
|
1636 |
mandatoryChangedValMap.put(MANDATORY_FREEBIE_ITEM_ID, freebieItemId.getText().trim());
|
| 1605 |
sb.append("\n-Freebie Item Id");
|
1637 |
sb.append("\n-Freebie Item Id");
|
| 1606 |
}
|
1638 |
}
|
| - |
|
1639 |
if(!checkParameterIfEqual(asin.getText().trim(), item.getAsin())) {
|
| - |
|
1640 |
sb.append("\n-Asin");
|
| 1607 |
|
1641 |
}
|
| - |
|
1642 |
if(!checkParameterIfEqual(newItem.getHoldInventory(), item.getHoldInventory())) {
|
| - |
|
1643 |
sb.append("\n-Hold Inventory");
|
| - |
|
1644 |
}
|
| - |
|
1645 |
if(!checkParameterIfEqual(newItem.getDefaultInventory(), item.getDefaultInventory())) {
|
| - |
|
1646 |
sb.append("\n-Default Inventory");
|
| - |
|
1647 |
}
|
| 1608 |
VendorPricings vendorPricings;
|
1648 |
VendorPricings vendorPricings;
|
| 1609 |
long vendorId;
|
1649 |
long vendorId;
|
| 1610 |
boolean vendorPricingsChanged = false;
|
1650 |
boolean vendorPricingsChanged = false;
|
| 1611 |
for(int row = 0; row < tableVendorPrices.getRowCount(); row++) {
|
1651 |
for(int row = 0; row < tableVendorPrices.getRowCount(); row++) {
|
| 1612 |
vendorId = Long.parseLong(tableVendorPrices.getText(row, TABLE_INDEX_PRICING_VENDORID));
|
1652 |
vendorId = Long.parseLong(tableVendorPrices.getText(row, TABLE_INDEX_PRICING_VENDORID));
|
| Line 1947... |
Line 1987... |
| 1947 |
|
1987 |
|
| 1948 |
@Override
|
1988 |
@Override
|
| 1949 |
public String getBestDealsText() {
|
1989 |
public String getBestDealsText() {
|
| 1950 |
return this.bestDealsText.getValue();
|
1990 |
return this.bestDealsText.getValue();
|
| 1951 |
}
|
1991 |
}
|
| 1952 |
|
1992 |
|
| 1953 |
public void setBestDealsDetailsText(String bestDealsDetailsText) {
|
1993 |
public void setBestDealsDetailsText(String bestDealsDetailsText) {
|
| 1954 |
this.bestDealsDetailsText.setValue(bestDealsDetailsText);
|
1994 |
this.bestDealsDetailsText.setValue(bestDealsDetailsText);
|
| 1955 |
|
1995 |
|
| 1956 |
}
|
1996 |
}
|
| 1957 |
|
1997 |
|