Subversion Repositories SmartDukaan

Rev

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

Rev 25367 Rev 25437
Line 323... Line 323...
323
			throw new ProfitMandiBusinessException(ProfitMandiConstants.EXPIRE_TIMESTAMP, scheme.getExpireTimestamp(),
323
			throw new ProfitMandiBusinessException(ProfitMandiConstants.EXPIRE_TIMESTAMP, scheme.getExpireTimestamp(),
324
					"SCHM_1006");
324
					"SCHM_1006");
325
		}
325
		}
326
		scheme.setActiveTimestamp(LocalDateTime.now());
326
		scheme.setActiveTimestamp(LocalDateTime.now());
327
		schemeRepository.persist(scheme);
327
		schemeRepository.persist(scheme);
328
		if (scheme.getType() == SchemeType.IN) {
328
		/*if (scheme.getType() == SchemeType.IN) {
329
			this.processPreviousPurchases(scheme);
329
			this.processPreviousPurchases(scheme);
330
		} else if (scheme.getType() == SchemeType.OUT) {
330
		} else if (scheme.getType() == SchemeType.OUT) {
331
			this.processPreviousSales(scheme);
331
			this.processPreviousSales(scheme);
332
		}
332
		}*/
333
	}
333
	}
334
 
334
 
335
	private void processPreviousPurchases(Scheme scheme) throws ProfitMandiBusinessException {
335
	private void processPreviousPurchases(Scheme scheme) throws ProfitMandiBusinessException {
336
		List<InventoryItem> inventoryItems = inventoryItemRepository.selectBetweenDates(scheme.getStartDateTime(),
336
		List<InventoryItem> inventoryItems = inventoryItemRepository.selectBetweenDates(scheme.getStartDateTime(),
337
				scheme.getEndDateTime());
337
				scheme.getEndDateTime());