mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
invoice, easy-invoice.scm: %discount from html-table to string
Old code would nest a small single-row, 2-column html-table within the entry-list html-table to display discount percentage and '%'. This is an overkill and causes alignment issues. Display a string instead.
This commit is contained in:
parent
7cfb48fea3
commit
5922cbbc4b
@ -139,19 +139,7 @@
|
||||
|
||||
(define (monetary-or-percent numeric currency entry-type)
|
||||
(if (gnc:entry-type-percent-p entry-type)
|
||||
(let ((table (gnc:make-html-table)))
|
||||
(gnc:html-table-set-style!
|
||||
table "table"
|
||||
'attribute (list "border" 0)
|
||||
'attribute (list "cellspacing" 1)
|
||||
'attribute (list "cellpadding" 0))
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
(list numeric (_ "%")))
|
||||
(set-last-row-style!
|
||||
table "td"
|
||||
'attribute (list "valign" "top"))
|
||||
table)
|
||||
(string-append (gnc:default-html-gnc-numeric-renderer numeric #f) " " (_ "%"))
|
||||
(gnc:make-gnc-monetary currency numeric)))
|
||||
|
||||
(define (add-entry-row table currency entry column-vector row-style cust-doc? credit-note?)
|
||||
|
@ -134,19 +134,7 @@
|
||||
|
||||
(define (monetary-or-percent numeric currency entry-type)
|
||||
(if (gnc:entry-type-percent-p entry-type)
|
||||
(let ((table (gnc:make-html-table)))
|
||||
(gnc:html-table-set-style!
|
||||
table "table"
|
||||
'attribute (list "border" 0)
|
||||
'attribute (list "cellspacing" 1)
|
||||
'attribute (list "cellpadding" 0))
|
||||
(gnc:html-table-append-row!
|
||||
table
|
||||
(list numeric (_ "%")))
|
||||
(set-last-row-style!
|
||||
table "td"
|
||||
'attribute (list "valign" "top"))
|
||||
table)
|
||||
(string-append (gnc:default-html-gnc-numeric-renderer numeric #f) " " (_ "%"))
|
||||
(gnc:make-gnc-monetary currency numeric)))
|
||||
|
||||
(define (add-entry-row table currency entry column-vector row-style cust-doc? credit-note?)
|
||||
|
Loading…
Reference in New Issue
Block a user