|
|
@@ -159,9 +159,9 @@
|
|
|
for expense = (equal "Debit" (aget op "type"))
|
|
|
collect (format nil "~A ~A~@[ ; ~A~]~% ~38A ~A~,2F ~A~@[ @@ ~{~A~,2F ~A~}~]~% ~38A ~A~,2F ~A"
|
|
|
date payee (unless (equal payee description) description)
|
|
|
- account2 (if expense " " "-") account-amount account-currency
|
|
|
+ account2 (if expense " " "-") amount currency
|
|
|
(unless (equal currency account-currency)
|
|
|
- (list (if expense " " "-") amount currency))
|
|
|
+ (list (if expense "" "-") account-amount account-currency))
|
|
|
account1 (if expense "-" " ") account-amount account-currency)))
|
|
|
|
|
|
(defparameter +day+ (* 24 60 60) "Seconds in day")
|
|
|
@@ -179,6 +179,7 @@
|
|
|
(ops (api/operations :start (* start 1000) :end (* end 1000))))
|
|
|
(format t "~{~A~^~%~%~}~%" (ops->journal (nreverse ops))))
|
|
|
(loop for a in (api/accounts)
|
|
|
+ when (aget a "moneyAmount" "value")
|
|
|
do (format t "; balance ~A ~A = ~A~A ~A~%"
|
|
|
(short-date (aget a "lastPaymentDate" "milliseconds"))
|
|
|
(get-op-account1 (push (cons "account" (aget a "id")) a))
|