Subversion Repositories SmartDukaan

Rev

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

Rev 24049 Rev 24050
Line 225... Line 225...
225
		if (priceDrop.getProcessTimestamp() == null) {
225
		if (priceDrop.getProcessTimestamp() == null) {
226
			priceDrop.setPartnerPayout(priceDropProcess.getPartnerPayout());
226
			priceDrop.setPartnerPayout(priceDropProcess.getPartnerPayout());
227
			priceDrop.setPriceDropIn(priceDropProcess.getPriceDropIn());
227
			priceDrop.setPriceDropIn(priceDropProcess.getPriceDropIn());
228
			priceDrop.setProcessTimestamp(LocalDateTime.now());
228
			priceDrop.setProcessTimestamp(LocalDateTime.now());
229
			priceDropRepository.persist(priceDrop);
229
			priceDropRepository.persist(priceDrop);
230
			String description = itemRepository.selectAllByCatalogItemId(priceDrop.getCatalogItemId()).get(0)
230
			Item item = itemRepository.selectAllByCatalogItemId(priceDrop.getCatalogItemId()).get(0);
231
					.getItemDescriptionNoColor();
231
			String description = item.getItemDescriptionNoColor();
232
			List<ImeiDropSummaryModel> imeiDropSummaryModels = this.getAllSerialNumbersByAffectedDate(priceDrop.getAffectedOn(),
232
			List<ImeiDropSummaryModel> imeiDropSummaryModels = this.getAllSerialNumbersByAffectedDate(priceDrop.getAffectedOn(),
233
					priceDrop.getCatalogItemId());
233
					priceDrop.getCatalogItemId());
234
			
234
			
235
			
235
			
236
			if (imeiDropSummaryModels.size() > 0) {
236
			if (imeiDropSummaryModels.size() > 0) {
Line 250... Line 250...
250
					String aReason = MessageFormat.format(
250
					String aReason = MessageFormat.format(
251
							"Payout of Rs.{4} per unit for Price Drop of Rs.{0} on {1}, on {3}. Total {2} item(s)",
251
							"Payout of Rs.{4} per unit for Price Drop of Rs.{0} on {1}, on {3}. Total {2} item(s)",
252
							priceDrop.getAmount(), description, fofoInventoryList.size(),
252
							priceDrop.getAmount(), description, fofoInventoryList.size(),
253
							FormattingUtils.formatDate(priceDrop.getAffectedOn()), priceDropProcess.getPartnerPayout());
253
							FormattingUtils.formatDate(priceDrop.getAffectedOn()), priceDropProcess.getPartnerPayout());
254
					inventoryService.updatePriceDrop(fofoInventoryList, priceDrop.getAmount());
254
					inventoryService.updatePriceDrop(fofoInventoryList, priceDrop.getAmount());
-
 
255
					if(item.getBrand().equals("Samsung")) {
255
					schemeService.reverseSchemes(fofoInventoryList, priceDropProcess.getPriceDropId(), reversalReason);
256
						schemeService.reverseSchemes(fofoInventoryList, priceDropProcess.getPriceDropId(), reversalReason);
-
 
257
					}
256
					walletService.addAmountToWallet(fofoId, priceDrop.getId(), WalletReferenceType.PRICE_DROP, aReason,
258
					walletService.addAmountToWallet(fofoId, priceDrop.getId(), WalletReferenceType.PRICE_DROP, aReason,
257
							priceDrop.getPartnerPayout() * fofoInventoryList.size());
259
							priceDrop.getPartnerPayout() * fofoInventoryList.size());
258
				}
260
				}
259
 
261
 
260
			}
262
			}