Subversion Repositories SmartDukaan

Rev

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

Rev 5516 Rev 5586
Line 481... Line 481...
481
 
481
 
482
        if(item.getMrp() != null) {
482
        if(item.getMrp() != null) {
483
            tItem.setMrp(item.getMrp());
483
            tItem.setMrp(item.getMrp());
484
        }
484
        }
485
        
485
        
-
 
486
        if(item.getCatalogItemId() != null) {
-
 
487
            tItem.setCatalogItemId(item.getCatalogItemId());
-
 
488
        }
-
 
489
        
486
        if(item.getSellingPrice() != null) {
490
        if(item.getSellingPrice() != null) {
487
            tItem.setSellingPrice(item.getSellingPrice());
491
            tItem.setSellingPrice(item.getSellingPrice());
488
        }
492
        }
489
        
493
        
490
        if(item.getWeight() != null) {
494
        if(item.getWeight() != null) {
Line 1127... Line 1131...
1127
			voucherType.put((long) voucher.getValue(), voucher.name());
1131
			voucherType.put((long) voucher.getValue(), voucher.name());
1128
		}
1132
		}
1129
		return voucherType;
1133
		return voucherType;
1130
	}
1134
	}
1131
 
1135
 
-
 
1136
	@Override
-
 
1137
	public boolean getConfigforentityIdMandatory() {
-
 
1138
		try {
-
 
1139
			String entityId_mandatory = ConfigClient.getClient().get(ConfigClientKeys.entityId_mandatory.toString());
-
 
1140
			if (entityId_mandatory.equals("TRUE")) {
-
 
1141
				return true;
-
 
1142
			}
-
 
1143
        } catch(ConfigException ce) {
-
 
1144
            logger.error("Unable to connect to the config server. Setting sensible defaults.", ce);
-
 
1145
        }
-
 
1146
		return false;
-
 
1147
	}
-
 
1148
 
-
 
1149
	@Override
-
 
1150
	public boolean checkEntityId(long entityId) {
-
 
1151
		try {
-
 
1152
            CatalogClient catalogServiceClient = new CatalogClient(ConfigClientKeys.catalog_service_server_host_master.toString(), ConfigClientKeys.catalog_service_server_port.toString());
-
 
1153
            InventoryService.Client catalogClient = catalogServiceClient.getClient();
-
 
1154
            return catalogClient.isValidCatalogItemId(entityId);
-
 
1155
        } catch (Exception e) {
-
 
1156
            logger.error("Error while checking for a Catalog Item Id: ", e);
-
 
1157
        }
-
 
1158
		return false;
-
 
1159
	}
-
 
1160
 
1132
}
1161
}
1133
1162