-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.html
215 lines (182 loc) · 9.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!doctype html>
<html lang="en" ng-app="myApp">
<head>
<meta charset="utf-8">
<title>Simply Do - Balance Projector</title>
<link rel="stylesheet" href="css/default.css"/>
</head>
<body>
<div id="simplyDoBanner">Balance Projector is a <a href="http://simplydo.com" target="new">Simply Do</a> project.</div>
<div id="top">
<div class="container">
<div class="row">
<div class="span12">
<ul class="social-buttons cf">
<li><a href="http://twitter.com/share" class="socialite twitter-share" data-text="Projecting my cash flow with Simply Do Balance Projector" data-url="http://simplydo.com/projector" data-count="vertical" data-via="simplydothat" rel="nofollow" target="_blank"><span class="vhidden">Twitter</span></a></li>
<li><a href="https://plus.google.com/share?url=http://simplydo.com/projector" class="socialite googleplus-one" data-size="tall" data-href="http://simplydo.com/projector" rel="nofollow" target="_blank"><span class="vhidden">Google+</span></a></li>
<li><a href="http://www.facebook.com/sharer.php?u=http://simplydo.com/projector&t=Simply%20Do%20Balanace%20Projector" class="socialite facebook-like" data-href="http://simplydo.com/projector" data-send="false" data-layout="box_count" data-width="60" data-show-faces="false" rel="nofollow" target="_blank"><span class="vhidden">Facebook</span></a></li>
</ul>
<h1>Balance Projector</h1>
<p>A <strong>real time</strong> personal finance projector.</p>
</div>
</div>
</div>
</div>
<div class="container" ng-controller="projectorCtrl">
<div class="row">
<div class="span7">
<div class="box">
<h2>How much money do you have today?</h2>
<input type="text" ng-model="startBalance" placeholder="Enter your current balance" />
</div>
<div class="box">
<h2>What is your regular income?</h2>
<ul>
<li ng-repeat="income in incomes" class="active-{{income.active}}">
<span><input type="checkbox" ng-model="income.active"></span>
<input type="text" ng-model="income.name" placeholder="What is it? e.g. Salary..." class="span3" />
<input type="text" ng-model="income.amount" placeholder="Enter Amount" class="span1"/>
<select class="span2" ng-model='income.frequency'>
<option value="30.4166666666667">daily</option>
<option value="21.6666666666667">work days</option>
<option value="4.33333333333333">weekly</option>
<option value="2.16666666666667">every 2 weeks</option>
<option value="1">monthly</option>
</select>
<a class="" ng-click="removeIncome($index);"><i class="icon-minus-sign"></i></a>
</li>
</ul>
<button class="btn btn-indented" ng-click="addIncome();"><i class="icon-plus"></i> Add</button>
</div>
<div class="box">
<h2>What are your regular expenses?</h2>
<ul>
<li ng-repeat="expense in expenses" class="active-{{expense.active}}">
<span><input type="checkbox" ng-model="expense.active"></span>
<input type="text" ng-model="expense.name" placeholder="e.g. Rent..." class="span3" />
<input type="text" ng-model="expense.amount" placeholder="Enter Amount" class="span1" />
<select class="span2" ng-model='expense.frequency'>
<option value="30.4166666666667">Daily</option>
<option value="21.6666666666667">Business Daily</option>
<option value="4.33333333333333">Weekly</option>
<option value="2.16666666666667">Every 2 Weeks</option>
<option value="1">Monthly</option>
</select>
<a class="" ng-click="removeExpense($index);"><i class="icon-minus-sign"></i></a>
</li>
</ul>
<button class="btn btn-indented" ng-click="addExpense();"><i class="icon-plus"></i> Add</button>
</div>
<div class="box">
<h2>Any non-Recurring transactions?</h2>
<ul>
<li ng-repeat="transaction in nonRecurring" class="active-{{transaction.active}}">
<span><input type="checkbox" ng-model="transaction.active"></span>
<input type="text" ng-model="transaction.name" placeholder="e.g. Bonus..." class="span3" />
<input type="text" ng-model="transaction.amount" placeholder="Enter Amount" class="span1" />
<select class="span2" ng-model='transaction.month' ng-options="getMonthLabel(value) for value in [1,2,3,4,5,6,7,8,9,10,11,12]">
</select>
<a class="" ng-click="removeTransaction($index);"><i class="icon-minus-sign"></i></a>
</li>
</ul>
<button class="btn btn-indented" ng-click="addTransaction();"><i class="icon-plus"></i> Add</button>
</div>
<div class="store" ng-show="storageSupport">
<p>
<button class="btn btn-success" ng-click="save();"><i class="icon-hdd icon-white"></i> Save</button>
<button class="btn btn-danger" ng-click="clear();"><i class="icon-trash icon-white"></i> Erase</button>
</p>
<p>Important: You data is stored locally on this very device only.</p>
</div>
</div>
<div class="span5">
<table class="table table-striped">
<thead>
<tr>
<th colspan="2" class="number">Accumulated net income</th>
<th class="number">Balance</th>
</thead>
<tbody>
<tr ng-repeat="change in montlyProjection();">
<td>{{getMonthLabel($index+1)}}</td>
<td class="number">{{roundDown(change)}}</td>
<td class="number" ng-class="positiveNegative(convertToNumber(startBalance) + change)">{{roundDown(convertToNumber(startBalance) + change)}}</td>
</tr>
</tbody>
</table>
<table class="table table-striped">
<thead>
<tr>
<th></th>
<th class="number">Per month</th>
<th class="number">Per year</th>
</thead>
<tbody>
<tr>
<td>Income</td>
<td class="number">{{roundDown(monthlyIncome())}}</td>
<td class="number">{{roundDown(monthlyIncome()*12)}}</td>
</tr>
<tr>
<td>Expenses</td>
<td class="number">{{roundDown(monthlyExpense())}}</td>
<td class="number">{{roundDown(monthlyExpense()*12)}}</td>
</tr>
<tr>
<td>Non-Recurring</td>
<td class="number"></td>
<td class="number">{{tallyTransactions()}}</td>
</tr>
<tr>
<td><strong>Net income</strong></td>
<td class="number" ng-class="positiveNegative(monthlyNet())"><strong>{{roundDown(monthlyNet())}}</strong></td>
<td class="number" ng-class="positiveNegative((monthlyNet()*12)+tallyTransactions())"><strong>{{roundDown(monthlyNet()*12)+tallyTransactions()}}</strong></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="footer">
<div class="container">
<div class="row">
<div class="span4">
<p>© 2012 <a href="http://simplydo.com" target="new">Simply Do</a>, LLC.<br />All Rights Reserved.</p>
</div>
<div class="span4">
<ul class="unstyled">
<li>Follow <a href="http://twitter.com/#!/SimplyDoThat" target="new">@SimplyDoThat</a> on Twitter</li>
<li>Inspired by an iOS application by <a href="http://twitter.com/#!/thejohnny" target="new">@theJohnny</a></li>
</ul>
</div>
<div class="span4">
<ul class="unstyled">
<li>The source code is open and <a href="https://github.com/SimplyDo/projector" target="new">available on Github</a></li>
<li>Created with <a href="http://angularjs.org/" target="new">AngularJS</a> by Google</li>
<li>Social buttons by <a href="http://socialitejs.com/" target="new">Socialite.js</a></li>
<li>The UI is <a href="http://twitter.github.com/bootstrap/" target="new">Twitter Bootstrapped</a></li>
<li>Hosted with <a href="http://pages.github.com/" target="new">Github pages</a></li>
</ul>
</div>
</div>
</div>
</div>
<script src="lib/angular/angular.js"></script>
<script src="lib/socialite/socialite.min.js"></script>
<script src="js/app.js"></script>
<script src="js/services.js"></script>
<script src="js/controllers.js"></script>
<script src="js/filters.js"></script>
<script src="js/directives.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29523960-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>