Subversion Repositories SmartDukaan

Rev

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

Rev 24002 Rev 24003
Line 81... Line 81...
81
	@Autowired
81
	@Autowired
82
	private PurchaseRepository purchaseRepository;
82
	private PurchaseRepository purchaseRepository;
83
	
83
	
84
	public void schemeRollback() {
84
	public void schemeRollback() {
85
		Map<Integer, Float> fofoIdAmount = new HashMap<>();
85
		Map<Integer, Float> fofoIdAmount = new HashMap<>();
86
		fofoIdAmount.put(157112773, 21f);
-
 
87
		fofoIdAmount.put(175134343, 11787f);
86
		fofoIdAmount.put(175135218, 1942f);
88
		fofoIdAmount.put(175135214, 43f);
87
		fofoIdAmount.put(175135218, 438f);
89
		fofoIdAmount.put(175135218, 1752f);
88
		fofoIdAmount.put(175135218, -478f);
90
		fofoIdAmount.put(175135597, 274f);
-
 
91
		String description = "Scheme IN rolled out for returned items, Now reversed";
89
		String description = "Price drop/differential rolled out as, they were already returned, Total 2pcs.";
92
		for(Map.Entry<Integer, Float> fofoIdAmountEntry: fofoIdAmount.entrySet()) {
90
		for(Map.Entry<Integer, Float> fofoIdAmountEntry: fofoIdAmount.entrySet()) {
93
			Integer fofoId=fofoIdAmountEntry.getKey();
91
			Integer fofoId=fofoIdAmountEntry.getKey();
94
			Float amount = fofoIdAmountEntry.getValue();
92
			Float amount = fofoIdAmountEntry.getValue();
95
			walletService.rollbackAmountFromWallet(fofoId, amount, -1, WalletReferenceType.SCHEME_IN, description);
93
			walletService.rollbackAmountFromWallet(fofoId, amount, 4, WalletReferenceType.PRICE_DROP, description);
96
		}
94
		}
97
	}
95
	}
98
 
96
 
99
	public void populateGrnTimestamp() {
97
	public void populateGrnTimestamp() {
100
		List<Purchase> allPurchases = purchaseRepository.selectAll();
98
		List<Purchase> allPurchases = purchaseRepository.selectAll();