Skip to content

Commit

Permalink
Merge pull request #2 from gknauth/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
gknauth authored May 7, 2022
2 parents 4c5fbfb + d69c97a commit e571b61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions ledger.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@
(define jan0 (- jan01 1))

(define db-source
(mysql-data-source #:server db-host #:port db-port
#:user db-user #:password db-passwd
#:database db-schema))
((cond [(eq? db-engine 'mysql) mysql-data-source]
[(eq? db-engine 'postgres) postgresql-data-source]
[else (error "invalid db-engine")])
#:server db-host #:port db-port
#:user db-user #:password db-passwd
#:database db-schema))

(define (connect!)
(dsn-connect db-source))
Expand Down Expand Up @@ -682,6 +685,7 @@

(define (pr-min-acct-day-bal-forward acctid ndays)
(let ([b (min-acct-day-bal-forward acctid ndays)])
;(printf "~a ~a\n" acctid ndays)
(printf "~a ~a\n" (day-bal-date b) (format-exact (day-bal-balance b) 2))))

(define (min-acct-day-bal-forward acctid ndays)
Expand Down
4 changes: 2 additions & 2 deletions main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@
(when (not (string=? s-stmt-bal "n/a"))
(send (vector-ref summary-cells (summary-ij-s row "reconciliation")) set-value
(format-exact reconciliation 2))
(let ([unmatched (sum-ledger-items acct (filtered-stmt-unmatched-ledger-items acct stmt-ymd8))])
(let ([unmatched (sum-ledger-acct-items acct (filtered-stmt-unmatched-ledger-items acct stmt-ymd8))])
(send (vector-ref summary-cells (summary-ij-s row "unmatched")) set-value
(format-exact unmatched 2))
(send (vector-ref summary-cells (summary-ij-s row "should-match")) set-value
Expand All @@ -455,7 +455,7 @@
(set-text-field-string! (detail-cell-named "new-cr") (format-exact new-cr 2))
(when (not (or (string=? s-stmt-bal "n/a") (string=? s-stmt-bal "")))
(set-text-field-string! (detail-cell-named "reconciliation") (format-exact reconciliation 2))
(let ([unmatched (sum-ledger-items acct (filtered-stmt-unmatched-ledger-items acct stmt-ymd8))])
(let ([unmatched (sum-ledger-acct-items acct (filtered-stmt-unmatched-ledger-items acct stmt-ymd8))])
(set-text-field-string! (detail-cell-named "unmatched")
(format-exact unmatched 2))
(set-text-field-string! (detail-cell-named "should-match")
Expand Down

0 comments on commit e571b61

Please sign in to comment.