[taxinvoice] bugfix: remove option 'Report Currency'

this option is useless; it does not enforce currency conversion, it
was merely used for "Amount Due, XXX" currency-mnemonic. Remove this
option, and modify code to use invoice currency instead.
This commit is contained in:
Christopher Lam 2019-07-10 23:07:16 +08:00
parent 5112210e42
commit 9f40cac254
2 changed files with 3 additions and 9 deletions

View File

@ -423,8 +423,8 @@
<!-- total row -->
<tr valign="top">
<td align="left" class="total" colspan="<?scm:d (+ tbl_cols 1) ?>"><strong>
<?scm:d opt-amount-due-heading ?><?scm (if (not (string=? (gnc-commodity-get-mnemonic opt-report-currency) "")) (begin ?>,
<?scm:d (gnc-commodity-get-mnemonic opt-report-currency) ?><?scm )) ?></strong></td>
<?scm:d opt-amount-due-heading ?><?scm (if (not (string=? (gnc-commodity-get-mnemonic opt-invoice-currency) "")) (begin ?>,
<?scm:d (gnc-commodity-get-mnemonic opt-invoice-currency) ?><?scm )) ?></strong></td>
<td align="right" class="total"><strong><?scm (display-comm-coll-total total-col #f) ?></strong></td>
</tr>

View File

@ -91,7 +91,6 @@
(define optname-row-contact (N_ "row: Contact"))
(define optname-row-invoice-number (N_ "row: Invoice Number"))
(define optname-row-company-name (N_ "row: Company Name"))
(define optname-report-currency (N_ "Report Currency"))
(define optname-invoice-number-text (N_ "Invoice number text"))
(define optname-to-text (N_ "To text"))
(define optname-ref-text (N_ "Ref text"))
@ -152,11 +151,6 @@
"a" "" (lambda () '())
#f)) ;customers-only)) ;-- see above
(add-option
(gnc:make-currency-option
gnc:pagename-general optname-report-currency
"b" "" (gnc-default-report-currency)))
;; Elements page options
(add-option (gnc:make-simple-boolean-option elementspage optname-col-date "a" (N_ "Display the date?") #t))
(add-option (gnc:make-simple-boolean-option elementspage optname-col-taxrate "b" (N_ "Display the Tax Rate?") #t))
@ -282,7 +276,7 @@
(opt-jobname-show (opt-value elementspage optname-jobname-show))
(opt-jobnumber-show (opt-value elementspage optname-jobnumber-show))
(opt-netprice (opt-value elementspage optname-netprice))
(opt-report-currency (opt-value gnc:pagename-general optname-report-currency))
(opt-invoice-currency (gncInvoiceGetCurrency opt-invoice))
(opt-css-border-collapse (if (opt-value displaypage optname-border-collapse) "border-collapse:collapse;"))
(opt-css-border-color-th (opt-value displaypage optname-border-color-th))
(opt-css-border-color-td (opt-value displaypage optname-border-color-td))