Subversion Repositories SmartDukaan

Rev

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

Rev 24508 Rev 24512
Line 32... Line 32...
32
	      Float closing = (float)model.get("closing");
32
	      Float closing = (float)model.get("closing");
33
	      Sheet sheet = workbook.createSheet("Today Currency Rates");
33
	      Sheet sheet = workbook.createSheet("Today Currency Rates");
34
	      UserWalletHistory uwhOpening = getOpeningEntry(opening, startDate);
34
	      UserWalletHistory uwhOpening = getOpeningEntry(opening, startDate);
35
	      UserWalletHistory closingEntry = getClosingEntry(closing, endDate);
35
	      UserWalletHistory closingEntry = getClosingEntry(closing, endDate);
36
	      history.add(0, uwhOpening);
36
	      history.add(0, uwhOpening);
37
	      history.add(closingEntry);
37
	      //history.add(closingEntry);
38
 
38
 
39
	      
39
	      
40
	      sheet.setFitToPage(true);
40
	      sheet.setFitToPage(true);
41
 
41
 
42
	      int rowCount = 0;
42
	      int rowCount = 0;
Line 76... Line 76...
76
 
76
 
77
	}
77
	}
78
 
78
 
79
	private UserWalletHistory getClosingEntry(Float closing, LocalDateTime endDate) {
79
	private UserWalletHistory getClosingEntry(Float closing, LocalDateTime endDate) {
80
		UserWalletHistory uwh = new UserWalletHistory();
80
		UserWalletHistory uwh = new UserWalletHistory();
81
		uwh.setAmount((int)closing.floatValue());
81
		uwh.setAmount(0);
82
		uwh.setDescription("Closing balance");
82
		uwh.setDescription("Final Closing balance");
83
		uwh.setReferenceType(null);
83
		uwh.setReferenceType(null);
84
		uwh.setTimestamp(endDate);
84
		uwh.setTimestamp(endDate);
85
		uwh.setReference(0);
85
		uwh.setReference(0);
86
		return uwh;
86
		return uwh;
87
	}
87
	}