Subversion Repositories SmartDukaan

Rev

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

Rev 2126 Rev 2359
Line 21... Line 21...
21
                            DELETED = 1,
21
                            DELETED = 1,
22
                            PAUSED = 2,
22
                            PAUSED = 2,
23
                            ACTIVE = 3,
23
                            ACTIVE = 3,
24
                            IN_PROCESS = 4,
24
                            IN_PROCESS = 4,
25
                            CONTENT_COMPLETE = 5;
25
                            CONTENT_COMPLETE = 5;
26
    
-
 
-
 
26
    public static final int ROLE_STAGING = 0, ROLE_PRODUCTION = 1;
27
    private static Map<Long, String> vendors, warehouses;
27
    private static Map<Long, String> vendors, warehouses;
28
    private static final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
28
    private static final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
29
    
29
    
30
    
30
    
31
 
31
 
Line 35... Line 35...
35
            public void onSuccess(Map<Long, String> result) {
35
            public void onSuccess(Map<Long, String> result) {
36
                vendors = result;
36
                vendors = result;
37
            }
37
            }
38
            @Override
38
            @Override
39
            public void onFailure(Throwable caught) {
39
            public void onFailure(Throwable caught) {
-
 
40
                caught.printStackTrace();
40
            }
41
            }
41
        });
42
        });
42
        
43
        
43
        catalogService.getAllWarehouses(new AsyncCallback<Map<Long,String>>() {
44
        catalogService.getAllWarehouses(new AsyncCallback<Map<Long,String>>() {
44
            @Override
45
            @Override
45
            public void onSuccess(Map<Long, String> result) {
46
            public void onSuccess(Map<Long, String> result) {
46
                warehouses = result;
47
                warehouses = result;
47
            }
48
            }
48
            @Override
49
            @Override
49
            public void onFailure(Throwable caught) {
50
            public void onFailure(Throwable caught) {
-
 
51
                caught.printStackTrace();
50
            }
52
            }
51
        });
53
        });
52
    }
54
    }
53
    
55
    
54
    public static Map<Long, String> getAllVendors() {
56
    public static Map<Long, String> getAllVendors() {
Line 122... Line 124...
122
                    Window.alert("Transfer Price cannot be more than MOP. Vendor: " + Utils.getVendorDesc(v.getVendorId()));
124
                    Window.alert("Transfer Price cannot be more than MOP. Vendor: " + Utils.getVendorDesc(v.getVendorId()));
123
                    return false;
125
                    return false;
124
                }
126
                }
125
            }
127
            }
126
        }
128
        }
127
        if(item.getVendorMappingsMap() != null && !item.getVendorMappingsMap().isEmpty()) {
129
        if(item.getVendorKeysMap() != null && !item.getVendorKeysMap().isEmpty()) {
128
            for(VendorItemMapping v : item.getVendorMappingsMap().values()) {
130
            for(VendorItemMapping v : item.getVendorKeysMap().values()) {
129
                if(v.getItemKey() == null || v.getItemKey().isEmpty()) {
131
                if(v.getItemKey() == null || v.getItemKey().isEmpty()) {
130
                    Window.alert("Item Key cannot be empty. Vendor: " + Utils.getVendorDesc(v.getVendorId()));
132
                    Window.alert("Item Key cannot be empty. Vendor: " + Utils.getVendorDesc(v.getVendorId()));
131
                    return false;
133
                    return false;
132
                }
134
                }
133
            }
135
            }