53 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
# conversion rules for paypal CSV (pre-2018 format)
 | 
						|
# sample:
 | 
						|
#Date, Time, Time Zone, Name, Type, Status, Currency, Amount, Receipt ID, Balance, 
 | 
						|
#"7/20/2009","17:09:22","PDT","Skype","Preapproved Payment Sent","Completed","USD","-10.00","","0.00",
 | 
						|
 | 
						|
# skip the header line
 | 
						|
skip  1
 | 
						|
 | 
						|
# name the csv fields, and assign some of them as entry fields
 | 
						|
fields  date, time, timezone, description, type, status_, currency, grossamount, feeamount, netamount, fromemail, toemail, code, counterpartystatus, etc
 | 
						|
 | 
						|
amount %netamount
 | 
						|
 | 
						|
#if In Progress
 | 
						|
# skip
 | 
						|
 | 
						|
# date is in US format
 | 
						|
date-format  %-m/%-d/%Y
 | 
						|
 | 
						|
# save some other fields as tags
 | 
						|
comment  type:%5, status:%6
 | 
						|
 | 
						|
# set the base account for all txns
 | 
						|
account1  assets:personal:online:paypal
 | 
						|
 | 
						|
# conditional blocks
 | 
						|
 | 
						|
# "Update" txns are duplicates, mark them for manual cleanup
 | 
						|
if
 | 
						|
Update to 
 | 
						|
 account2     IGNORE
 | 
						|
 description  (DELETE) %4
 | 
						|
 amount       0
 | 
						|
 | 
						|
# replace USD currency symbol with $
 | 
						|
# matches against the whole record, good enough
 | 
						|
if
 | 
						|
,USD,
 | 
						|
 currency $
 | 
						|
 | 
						|
# set a more specific account2 for txns matching these patterns:
 | 
						|
 | 
						|
if
 | 
						|
INTEREST PAYMENT
 | 
						|
 account2  revenues:personal:interest
 | 
						|
 | 
						|
if
 | 
						|
AVAAZ FOUNDATION
 | 
						|
 account2  expenses:personal:gifts:charity
 | 
						|
 | 
						|
include .common.rules
 | 
						|
 |