Subversion Repositories SmartDukaan

Rev

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

Rev 25095 Rev 25252
Line 607... Line 607...
607
		// throw new Exception();
607
		// throw new Exception();
608
	}
608
	}
609
 
609
 
610
	public void fixSchemePayouts() throws Exception {
610
	public void fixSchemePayouts() throws Exception {
611
 
611
 
612
		LocalDateTime startDate = LocalDate.of(2018, 02, 01).atStartOfDay();
612
		LocalDateTime startDate = LocalDate.of(2019, 07, 01).atStartOfDay();
613
		List<SchemeInOut> sios = schemeInOutRepository.selectAllByCreateDate(startDate, startDate.plusDays(15));
613
		List<SchemeInOut> sios = schemeInOutRepository.selectAllByCreateDate(startDate, startDate.plusDays(15));
614
 
614
 
615
		for (SchemeInOut sio : sios) {
615
		for (SchemeInOut sio : sios) {
616
			genericRepository.delete(sio);
616
			genericRepository.delete(sio);
617
			InventoryItem ii = inventoryItemRepository.selectById(sio.getInventoryItemId());
617
			InventoryItem ii = inventoryItemRepository.selectById(sio.getInventoryItemId());
Line 645... Line 645...
645
						userWallet.setAmount(userWallet.getAmount() - uwh.getAmount());
645
						userWallet.setAmount(userWallet.getAmount() - uwh.getAmount());
646
					}
646
					}
647
				}
647
				}
648
			}
648
			}
649
 
649
 
650
			// System.out.println("Total Amount Rolled Back is " + totalRollbackAmount);
650
			//System.out.println("Total Amount Rolled Back is " + totalRollbackAmount);
651
		}
651
		}
652
		scheduledTasks.processScheme(startDate, startDate.plusDays(15));
652
		scheduledTasks.processScheme(startDate, startDate.plusDays(10));
653
		
653
		
654
		throw new Exception();
654
		throw new Exception();
655
	}
655
	}
656
}
656
}
657
 
657