Subversion Repositories SmartDukaan

Rev

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

Rev 5586 Rev 6530
Line 37... Line 37...
37
    private static Map<Long, String> vendors, warehouses, sources, voucherType;
37
    private static Map<Long, String> vendors, warehouses, sources, voucherType;
38
    private static List<String> categories, brands;
38
    private static List<String> categories, brands;
39
    
39
    
40
    private static final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
40
    private static final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
41
    
41
    
-
 
42
    private static List<ItemWarehouse> ignoredInventoryUpdateItemsIdsWarehouseIds;
-
 
43
    
42
    static {
44
    static {
43
    	catalogService.getConfigforentityIdMandatory(new AsyncCallback<Boolean>() {
45
    	catalogService.getConfigforentityIdMandatory(new AsyncCallback<Boolean>() {
44
	        @Override
46
	        @Override
45
	        public void onSuccess(Boolean result) {
47
	        public void onSuccess(Boolean result) {
46
	        	setEntityIdMandatory(result);
48
	        	setEntityIdMandatory(result);
Line 48... Line 50...
48
	        @Override
50
	        @Override
49
	        public void onFailure(Throwable caught) {
51
	        public void onFailure(Throwable caught) {
50
	            caught.printStackTrace();
52
	            caught.printStackTrace();
51
	        }
53
	        }
52
	    });
54
	    });
-
 
55
    	catalogService.getignoredInventoryUpdateItemsIdsWarehouseIds(new AsyncCallback<List<ItemWarehouse>>() {
-
 
56
	        @Override
-
 
57
	        public void onSuccess(List<ItemWarehouse> result) {
-
 
58
	        	ignoredInventoryUpdateItemsIdsWarehouseIds=result;
-
 
59
	        }
-
 
60
	        @Override
-
 
61
	        public void onFailure(Throwable caught) {
-
 
62
	            caught.printStackTrace();
-
 
63
	        }
-
 
64
	    });
-
 
65
 
53
    	
66
    	
54
        catalogService.getAllVendors(new AsyncCallback<Map<Long,String>>() {
67
        catalogService.getAllVendors(new AsyncCallback<Map<Long,String>>() {
55
            @Override
68
            @Override
56
            public void onSuccess(Map<Long, String> result) {
69
            public void onSuccess(Map<Long, String> result) {
57
                vendors = result;
70
                vendors = result;
Line 152... Line 165...
152
            return null;
165
            return null;
153
        }
166
        }
154
        return vendors.get(id);
167
        return vendors.get(id);
155
    }
168
    }
156
    
169
    
-
 
170
    public static List<ItemWarehouse> getignoredInventoryUpdateItemsIdsWarehouseIds(){
-
 
171
    	return ignoredInventoryUpdateItemsIdsWarehouseIds;
-
 
172
    }
-
 
173
    
157
    public static String getSourceDesc(long id) {
174
    public static String getSourceDesc(long id) {
158
        if(sources == null) {
175
        if(sources == null) {
159
            return null;
176
            return null;
160
        }
177
        }
161
        return sources.get(id);
178
        return sources.get(id);