mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
[new-owner-report] RHS partial amount/amount separated
RHS partial-amount and amount are shown in separate cells. also modify test-owner-report.scm to allow pass the $2.00 is strictly a RHS amount but I'm not sure how to exclude it using sxpath.
This commit is contained in:
parent
8e34a7999d
commit
a01bfa6843
@ -88,12 +88,13 @@
|
||||
(assv-ref owner-string-alist key))
|
||||
|
||||
(define-record-type :link-data
|
||||
(make-link-data date ref type desc amount)
|
||||
(make-link-data date ref type desc partial-amount amount)
|
||||
link-data?
|
||||
(date link-data-date)
|
||||
(ref link-data-ref)
|
||||
(type link-data-type)
|
||||
(desc link-data-desc)
|
||||
(partial-amount link-data-partial-amount)
|
||||
(amount link-data-amount))
|
||||
|
||||
(define-record-type :link-desc-amount
|
||||
@ -151,7 +152,7 @@
|
||||
(list 'lhs-cols date? due? ref? type? desc? sale? tax? credit? debit? bal?)
|
||||
(list 'ptt-span date? due? ref? type? desc?)
|
||||
(list 'mid-spac spacer?)
|
||||
(list 'rhs-cols date? ref? type? desc? amt?)
|
||||
(list 'rhs-cols date? ref? type? desc? amt? amt?)
|
||||
(list 'rhs-span date? ref? type? desc?)))
|
||||
(cols-list (assq-ref cols-alist section)))
|
||||
(count identity cols-list)))
|
||||
@ -220,6 +221,8 @@
|
||||
(if (ref-col column-vector) (addto! heading-list (_ "Reference")))
|
||||
(if (type-col column-vector) (addto! heading-list (_ "Type")))
|
||||
(if (desc-col column-vector) (addto! heading-list (_ "Description")))
|
||||
(if (or (debit-col column-vector) (credit-col column-vector))
|
||||
(addto! heading-list (_ "Partial Amount")))
|
||||
(if (or (debit-col column-vector) (credit-col column-vector))
|
||||
(addto! heading-list (_ "Amount")))))
|
||||
(reverse heading-list)))
|
||||
@ -352,6 +355,9 @@
|
||||
(addif (ref-col column-vector) (link-data-ref link-data))
|
||||
(addif (type-col column-vector) (link-data-type link-data))
|
||||
(addif (desc-col column-vector) (link-data-desc link-data))
|
||||
(addif (or (debit-col column-vector) (credit-col column-vector))
|
||||
(gnc:make-html-table-cell/markup
|
||||
"number-cell" (link-data-partial-amount link-data)))
|
||||
(addif (or (debit-col column-vector) (credit-col column-vector))
|
||||
(gnc:make-html-table-cell/markup
|
||||
"number-cell" (link-data-amount link-data)))))
|
||||
@ -362,8 +368,8 @@
|
||||
(addif (< 0 cols) (gnc:make-html-table-cell/size
|
||||
1 cols (link-desc-amount-desc link-data)))
|
||||
(addif (or (debit-col column-vector) (credit-col column-vector))
|
||||
(gnc:make-html-table-cell/markup
|
||||
"number-cell" (link-desc-amount-amount link-data))))))
|
||||
(gnc:make-html-table-cell/size/markup
|
||||
1 2 "number-cell" (link-desc-amount-amount link-data))))))
|
||||
|
||||
((link-blank? link-data)
|
||||
(make-list (num-cols column-vector 'rhs-cols) #f))
|
||||
@ -498,6 +504,7 @@
|
||||
(split->reference posting-split)
|
||||
(split->type-str posting-split)
|
||||
(splits->desc (list posting-split))
|
||||
#f
|
||||
(gnc:make-html-text
|
||||
(gnc:html-markup-anchor
|
||||
(gnc:split-anchor-text (txn->transfer-split posting-txn))
|
||||
@ -537,8 +544,8 @@
|
||||
(gnc:make-html-text
|
||||
(gnc:html-markup-anchor
|
||||
(gnc:split-anchor-text lot-split)
|
||||
(gnc:make-gnc-monetary currency lot-amt))
|
||||
" of "
|
||||
(gnc:make-gnc-monetary currency lot-amt)))
|
||||
(gnc:make-html-text
|
||||
(gnc:html-markup-anchor
|
||||
(gnc:split-anchor-text tfr-split)
|
||||
(gnc:make-gnc-monetary
|
||||
@ -641,8 +648,8 @@
|
||||
(gnc:html-markup-anchor
|
||||
(gnc:split-anchor-text APAR-split)
|
||||
(gnc:make-gnc-monetary
|
||||
currency (AP-negate (- (xaccSplitGetAmount APAR-split)))))
|
||||
" of "
|
||||
currency (AP-negate (- (xaccSplitGetAmount APAR-split))))))
|
||||
(gnc:make-html-text
|
||||
(gnc:html-markup-anchor
|
||||
(gnc:split-anchor-text tfr-split)
|
||||
(gnc:make-gnc-monetary
|
||||
|
@ -340,7 +340,7 @@
|
||||
((sxpath `(// (table 3) // tr (td 5) // *text*))
|
||||
sxml))
|
||||
(test-equal "credit-amounts"
|
||||
'("$11.50" "$7.50" "$8.50" "$4.00" "$200.00" "$6.75" "$8.00")
|
||||
'("$11.50" "$2.00" "$7.50" "$8.50" "$4.00" "$200.00" "$6.75" "$8.00")
|
||||
((sxpath `(// (table 3) // tr (td 6) // *text*))
|
||||
sxml))
|
||||
(test-equal "debit-amounts"
|
||||
|
Loading…
Reference in New Issue
Block a user