Smile Bank to Ledger

Check-in [cf683f4151]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Ensure all extraneous spaces are removed
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cf683f41512e4109c2b0773270b6b4ac1ee825fc
User & Date: atomicules 2015-10-19 21:33:44
Context
2016-01-06
13:27
Fix for negative balances

Sob. Sob. Not that I ever want to see them though.

I'd inadvertently assumed I'd only ever see a positive balance. Need to regexp
to get the negative that Smile put at the end of the balance and stick that in
the right balance, but only if a negative - it seems Ledger doesn't understand
a plus sign in front of numbers. check-in: e176864222 user: atomicules tags: trunk

2015-10-19
21:33
Ensure all extraneous spaces are removed check-in: cf683f4151 user: atomicules tags: trunk
2015-09-16
10:45
Fix logon for when bulletin board isn't there

Thought I had worked around this, but need to explicitly check for page.form
and then also explicitly return the initial page check-in: 786c2c8c74 user: atomicules tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to smile.rb.

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
		#Skip first row (table headers, ths)
		rows = rows[1..-1]
		transactions = []
		rows.each do |row|
			#Skip last row, maybe
			unless row.elements.length == 1
				#Might as well parse date here
				date = Date.parse(row.elements[0].text)
				name = row.elements[1].text
				credit = row.elements[2].text
				debit = row.elements[3].text
				unless name.include?("BROUGHT FORWARD")
					transactions << { :date => date, :name => name, :credit => credit, :debit => debit}
				end
			end
		end	
		#Sort in order of newest date first so can add on
		@transactions += transactions.sort { | t1, t2 | t2[:date] <=> t1[:date] }







|
|
|
|







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
		#Skip first row (table headers, ths)
		rows = rows[1..-1]
		transactions = []
		rows.each do |row|
			#Skip last row, maybe
			unless row.elements.length == 1
				#Might as well parse date here
				date = Date.parse(row.elements[0].text.strip)
				name = row.elements[1].text.strip
				credit = row.elements[2].text.strip
				debit = row.elements[3].text.strip
				unless name.include?("BROUGHT FORWARD")
					transactions << { :date => date, :name => name, :credit => credit, :debit => debit}
				end
			end
		end	
		#Sort in order of newest date first so can add on
		@transactions += transactions.sort { | t1, t2 | t2[:date] <=> t1[:date] }