-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO.taskpaper
63 lines (63 loc) · 3.21 KB
/
TODO.taskpaper
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
Goals:
- Card transactions into 'Square' merchant account
- Cash transactions into 'Market Till' cash account
- Sales Receipts credited to 'Sales' account(s) per Square Item Category
- Nightly journals from 'Square' merchant account to checking bank account
- Fees debited from 'Square' merchant account and credited to 'Square Fees' expense account
At time of nightly journal OR for every card transaction? Whichever is easier to implement.
File I/O:
Input:
- square-qb.cfg - provided by user
Sales tax enabled in QuickBooks
Category Name -> QB Class mapping (OPTIONAL)
Sales income account (default)
Category Name -> QB Sales income accounts mapping (OPTIONAL)
Item Name -> QB Non-inventory part item name (OPTIONAL)
Square merchant account (card sales & fees)
Market Till cash account (cash sales)
Bank account associated with square (nightly deposits)
Square Fees expense account
- transactions.csv - from squareup.com
Pertinent information = Date, Time, Payment Type, Transaction ID (PRIMARY KEY), Total, Fee
Mappings =
Payment Type -> QB Payment Type
Transaction ID -> QB Memo
Fee -> Transaction from 'Square' account to 'Square' vendor against 'Square Fees' expense account
- items.csv - from squareup.com
Pertinent information = Transaction ID (PRIMARY KEY), Category Name, Item Name, Price, Discount (per item???), Tax
Mappings =
Category Name -> QB Class (Group into multiple Sales Receipts)
Item Name -> QB Non-inventory part item
Discount -> QB Discount item
Tax -> QB Sales tax item
- deposits.csv - from squareup.com (OPTIONAL)
Pertinent information = Date, Time, Amount
Output:
- card-sales.iif
Sales Receipt transactions in 'Square' merchant account, credit to 'Sales' account(s) per Square Item Category
- cash-sales.iif
Sales Receipt transactions in 'Market Till' cash account, credit to 'Sales' account(s) per Square Item Category
- deposits.iif (OPTIONAL: depends on deposits.csv)
Nightly payments from 'Square' merchant account to checking bank account
- fees.iif
Transactions per Sales Receipt (or per Transfer?) from 'Square' account to 'Square' vendor against 'Square Fees' expense account
- Can these be consolidated into a single file?
Implementation:
Reading:
- Read configuration file using ConfigParser
- Read items.csv into dict of lists of dicts: use Transaction ID as key, list of items, tuple of item values using numeric constants to access (e.g. I_PRICE = 7)
- Read transactions.csv into list of tuples: tuple of transaction values using numeric constants to access (e.g. T_ID = 15)
- OPTIONAL: Read deposits.csv into list of tuples: tuple of deposit values using numeric constants to access
Assumptions:
- transactions.csv comes from squareup.com already sorted by date and time
- every transaction in transactions.csv has at least one item
Writing:
- Iterate over transactions list
- Load associated items from items dict using items[T_ID]; if no items, throw exception
- Card or cash?
Card:
- Write fee amount to fees.iif
- Write transaction and items to card-sales.iif
Cash:
- Write transaction and items to cash-sales.iif
- IF deposits exists, iterate over deposits list, and write to deposits.iif