Subversion Repositories SmartDukaan

Rev

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

Rev 31093 Rev 31109
Line 320... Line 320...
320
			noGST = item.getHsnCode().equals("NOGST");
320
			noGST = item.getHsnCode().equals("NOGST");
321
			if (item.getType().equals(ItemType.SERIALIZED)) {
321
			if (item.getType().equals(ItemType.SERIALIZED)) {
322
				for (SerialNumberDetail serialNumberDetail : customFofoOrderItem.getSerialNumberDetails()) {
322
				for (SerialNumberDetail serialNumberDetail : customFofoOrderItem.getSerialNumberDetails()) {
323
					serialNumbers.add(serialNumberDetail.getSerialNumber());
323
					serialNumbers.add(serialNumberDetail.getSerialNumber());
324
					if (serialNumberDetail.getAmount() > 0) {
324
					if (serialNumberDetail.getAmount() > 0) {
325
						if (customer.getEmailId() == null || customer.getEmailId().equals("")
325
						if (customer.getEmailId() == null || customer.getEmailId().equals("")) {
326
						) {
-
 
327
							throw new ProfitMandiBusinessException("Email Id is required for insurance", "Email Id is required for insurance",
326
							throw new ProfitMandiBusinessException("Email Id is required for insurance",
328
									"Email Id is required for insurance");
327
									"Email Id is required for insurance", "Email Id is required for insurance");
329
						}
328
						}
330
						InsuranceModel im = new InsuranceModel();
329
						InsuranceModel im = new InsuranceModel();
331
						im.setBrand(item.getBrand());
330
						im.setBrand(item.getBrand());
332
						im.setColor(item.getColor());
331
						im.setColor(item.getColor());
333
						im.setModelName(item.getModelName() + item.getModelNumber());
332
						im.setModelName(item.getModelName() + item.getModelNumber());
Line 598... Line 597...
598
 
597
 
599
		ScratchOffer so2 = new ScratchOffer();
598
		ScratchOffer so2 = new ScratchOffer();
600
		so2.setInvoiceNumber(invoiceNumber);
599
		so2.setInvoiceNumber(invoiceNumber);
601
		so2.setScratched(false);
600
		so2.setScratched(false);
602
		so2.setCreatedTimestamp(LocalDateTime.now());
601
		so2.setCreatedTimestamp(LocalDateTime.now());
603
		so2.setExpiredTimestamp(so.getCreatedTimestamp().plusDays(4));
602
		so2.setExpiredTimestamp(so.getCreatedTimestamp().plusDays(2));
604
		so2.setOfferName(ScratchedGift.ACCESSORIES);
603
		so2.setOfferName(ScratchedGift.ACCESSORIES);
605
		so2.setCustomerId(customerId);
604
		so2.setCustomerId(customerId);
606
 
605
 
607
		LocalDate date = LocalDate.now();
606
		LocalDate date = LocalDate.now();
608
		LocalDateTime seven = LocalDateTime.of(date.getYear(), date.getMonth(), date.getDayOfMonth(), 19, 0);
607
		LocalDateTime seven = LocalDateTime.of(date.getYear(), date.getMonth(), date.getDayOfMonth(), 19, 0);