Subversion Repositories SmartDukaan

Rev

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

Rev 26498 Rev 26549
Line 480... Line 480...
480
		if (scheme.getAmountType() == AmountType.PERCENTAGE) {
480
		if (scheme.getAmountType() == AmountType.PERCENTAGE) {
481
			if (scheme.getType().equals(SchemeType.IN)) {
481
			if (scheme.getType().equals(SchemeType.IN)) {
482
				dpForCalc = inventoryItem.getUnitPrice() - inventoryItem.getPriceDropAmount();
482
				dpForCalc = inventoryItem.getUnitPrice() - inventoryItem.getPriceDropAmount();
483
			} else {
483
			} else {
484
				try {
484
				try {
485
					dpForCalc = tagListingRepository.selectByItemId(inventoryItem.getItemId()).getSellingPrice();
485
					dpForCalc = Math.min(inventoryItem.getUnitPrice() - inventoryItem.getPriceDropAmount(), tagListingRepository.selectByItemId(inventoryItem.getItemId()).getSellingPrice();
486
				} catch (Exception e) {
486
				} catch (Exception e) {
487
					LOGGER.info("Could not find tag Listing entry in {}", inventoryItem.getItemId());
487
					LOGGER.info("Could not find tag Listing entry in {}", inventoryItem.getItemId());
488
					e.printStackTrace();
488
					e.printStackTrace();
489
				}
489
				}
490
			}
490
			}