Subversion Repositories SmartDukaan

Rev

Rev 7260 | Rev 8901 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7260 Rev 7291
Line 46... Line 46...
46
                      TABLE_INDEX_NLC = 5;
46
                      TABLE_INDEX_NLC = 5;
47
    
47
    
48
    private static boolean entityIdMandatory = Utils.isEntityIdMandatory();
48
    private static boolean entityIdMandatory = Utils.isEntityIdMandatory();
49
 
49
 
50
    @UiField TextBox productGroup, catalogItemId;
50
    @UiField TextBox productGroup, catalogItemId;
51
    @UiField TextBox brand, modelNumber, modelName, color, comments;
51
    @UiField TextBox brand, modelNumber, modelName, color, comments,holdInventory,defaultInventory;
52
    @UiField TextBox mrp, sellingPrice, weight, bestDealText, bestDealValue, bestSellingRank,bestDealsDetailsText,bestDealsDetailsLink, minStockLevel, numOfDaysStock, freebieItemId;
52
    @UiField TextBox mrp, sellingPrice, weight, bestDealText, bestDealValue, bestSellingRank,bestDealsDetailsText,bestDealsDetailsLink, minStockLevel, numOfDaysStock, freebieItemId,asin;
53
    @UiField DateBox startDate, retireDate, comingSoonStartDate, expectedArrivalDate;
53
    @UiField DateBox startDate, retireDate, comingSoonStartDate, expectedArrivalDate;
54
    @UiField Button addButton, cancelButton, comingSoonButton;
54
    @UiField Button addButton, cancelButton, comingSoonButton;
55
    @UiField CheckBox defaultForEntity, risky, itemType, hasItemNo, clearance, showSellingPrice;
55
    @UiField CheckBox defaultForEntity, risky, itemType, hasItemNo, clearance, showSellingPrice;
56
    @UiField FlexTable headerVendor, vendorTable;
56
    @UiField FlexTable headerVendor, vendorTable;
57
    @UiField FlexTable headerVendorM, vendorTableM;
57
    @UiField FlexTable headerVendorM, vendorTableM;
Line 425... Line 425...
425
            }
425
            }
426
        } catch(NumberFormatException ex) {
426
        } catch(NumberFormatException ex) {
427
            Window.alert("Invalid freebie ItemId");
427
            Window.alert("Invalid freebie ItemId");
428
            return;
428
            return;
429
        }
429
        }
-
 
430
	    item.setAsin(asin.getText().trim());
-
 
431
	    	    
-
 
432
        try {
-
 
433
            if(!holdInventory.getText().trim().equals("")) {
-
 
434
                long hold_inventory = Long.parseLong(holdInventory.getText().trim());
-
 
435
                if(hold_inventory < 0) {
-
 
436
                    throw new NumberFormatException("Negative value of Hold Inventory");
-
 
437
                }
-
 
438
                item.setHoldInventory(hold_inventory);
-
 
439
            }
-
 
440
        } catch(NumberFormatException ex) {
-
 
441
            Window.alert("Invalid Hold Inventory Value");
-
 
442
            return;
-
 
443
        }
430
	    
444
      
-
 
445
        try {
-
 
446
            if(!defaultInventory.getText().trim().equals("")) {
-
 
447
                long default_inventory = Long.parseLong(defaultInventory.getText().trim());
-
 
448
                if(default_inventory < 0) {
-
 
449
                    throw new NumberFormatException("Negative value of Default Inventory");
-
 
450
                }
-
 
451
                item.setDefaultInventory(default_inventory);
-
 
452
            }
-
 
453
        } catch(NumberFormatException ex) {
-
 
454
            Window.alert("Invalid Default Inventory Value");
-
 
455
            return;
-
 
456
        }
431
        item.setDefaultForEntity(defaultForEntity.getValue());
457
        item.setDefaultForEntity(defaultForEntity.getValue());
432
        item.setRisky(risky.getValue());
458
        item.setRisky(risky.getValue());
433
        item.setHasItemNo(hasItemNo.getValue());
459
        item.setHasItemNo(hasItemNo.getValue());
434
        item.setItemType(itemType.getValue());
460
        item.setItemType(itemType.getValue());
435
        if(preferredVendor.getSelectedIndex() == 0) {
461
        if(preferredVendor.getSelectedIndex() == 0) {