1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
Last-Update: 2012-04-09
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
Bug-Debian: http://bugs.debian.org/655951
Bug-Gnucash: https://bugzilla.gnome.org/show_bug.cgi?id=670008
Applied-Upstream: trunk, 2.5.0
Description: improvements to taxinvoice presentation
* new dialog elements in [Report Options]:[Display]
with default values matching original report presentation
+ table-border-collapse (boolean)
+ table-header-border-color (string)
+ table-cell-border-color (string)
* new dialog element in [Report Options]:[Notes]
+ Embedded CSS (text); some hardcoded CSS is moved
as default value of this field.
* no text wrapping in date column
--- a/src/report/business-reports/taxinvoice.eguile.scm
+++ b/src/report/business-reports/taxinvoice.eguile.scm
@@ -120,12 +120,19 @@
}
table { /* table does not inherit font */
<?scm:d opt-text-font ?>
+ <?scm:d opt-css-border-collapse ?>
}
+ table[border="1"] th {
+ border-color:<?scm:d opt-css-border-color-th ?>;
+ }
+ table[border="1"] td {
+ border-color:<?scm:d opt-css-border-color-td ?>;
+ }
+
h1.coyname {
<?scm:d opt-heading-font ?>
- /* font-size: 141%; */
- text-align: left;
}
+ <?scm:d opt-extra-css ?>
</style>
<?scm )) ?>
@@ -300,7 +307,7 @@
(dsc-total 'add currency rdiscval)
?>
<tr valign="top">
- <td align="center"><?scm:d (gnc-print-date (gncEntryGetDate entry)) ?></td>
+ <td align="center"><?scm:d (nbsp (gnc-print-date (gncEntryGetDate entry))) ?></td>
<td align="left"><?scm:d (gncEntryGetDescription entry) ?></td>
<!-- td align="left">< ?scm:d (gncEntryGetNotes entry) ?></td -->
<?scm (if units? (begin ?>
--- a/src/report/business-reports/taxinvoice.scm
+++ b/src/report/business-reports/taxinvoice.scm
@@ -88,6 +88,10 @@
(define displaypage (N_ "Display"))
(define generalpage gnc:pagename-general)
; option names
+(define optname-border-collapse (N_ "table-border-collapse"))
+(define optname-border-color-th (N_ "table-header-border-color"))
+(define optname-border-color-td (N_ "table-cell-border-color"))
+(define optname-extra-css (N_ "Embedded CSS"))
(define optname-report-title (N_ "Report title"))
(define optname-invoice-number (N_ "Invoice number"))
(define optname-template-file (N_ "Template file"))
@@ -155,6 +159,9 @@
""))
(add-option (gnc:make-string-option
displaypage optname-logo-width "f" (N_ "Width of the logo in CSS format, e.g. 10% or 32px. Leave blank to display the logo at its natural width. The height of the logo will be scaled accordingly.") ""))
+(add-option (gnc:make-simple-boolean-option displaypage optname-border-collapse "g" (N_ "Border-collapse?") #f))
+(add-option (gnc:make-string-option displaypage optname-border-color-th "h" "CSS color" (N_ "black")))
+(add-option (gnc:make-string-option displaypage optname-border-color-td "i" "CSS color" (N_ "black")))
;; Heading options
(add-option (gnc:make-string-option
@@ -192,6 +199,8 @@
""))
;(N_ "(Development version -- don't rely on the numbers on this report without double-checking them.<br>Change the 'Extra Notes' option to get rid of this message)")))
+ (add-option (gnc:make-text-option notespage optname-extra-css "b"
+ (N_ "Embedded CSS") "h1.coyname { text-align: left; }"))
(gnc:options-set-default-section
report-options generalpage)
@@ -222,6 +231,9 @@
(opt-value displaypage optname-text-font)))
(opt-logofile (opt-value displaypage optname-logofile))
(opt-logo-width (opt-value displaypage optname-logo-width))
+ (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))
(opt-report-title (opt-value headingpage optname-report-title))
(opt-units-heading (opt-value headingpage optname-units))
(opt-qty-heading (opt-value headingpage optname-qty))
@@ -235,6 +247,7 @@
(opt-subtotal-heading (opt-value headingpage2 optname-subtotal))
(opt-amount-due-heading (opt-value headingpage2 optname-amount-due))
(opt-payment-recd-heading (opt-value headingpage2 optname-payment-recd))
+ (opt-extra-css (opt-value notespage optname-extra-css))
(opt-extra-notes (opt-value notespage optname-extra-notes))
(css? #t) ;(and (defined? 'gnc-html-engine-supports-css) (gnc-html-engine-supports-css)))
(html #f))
|