Skip to content

Commit

Permalink
Use new options-fancy-date to retrieve date format
Browse files Browse the repository at this point in the history
Use the new function so we do not need to test for valid format
  • Loading branch information
Bob-IT authored and gjanssens committed Dec 6, 2016
1 parent 354694b commit 7f4b656
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/report/business-reports/customer-summary.scm
Expand Up @@ -704,7 +704,7 @@
(income-accounts (opt-val pagename-incomeaccounts optname-incomeaccounts))
(all-accounts (append income-accounts expense-accounts))
(book (gnc-account-get-book (car all-accounts)))
(date-format (gnc:fancy-date-info book gnc:*fancy-date-format*))
(date-format (gnc:options-fancy-date book))
(type (opt-val "__reg" "owner-type"))
(reverse? (opt-val "__reg" "reverse?"))
(ownerlist (gncBusinessGetOwnerList
Expand Down
3 changes: 2 additions & 1 deletion src/report/business-reports/easy-invoice.scm
Expand Up @@ -728,7 +728,8 @@

(if (not (null? invoice))
(let* ((book (gncInvoiceGetBook invoice))
(date-format (gnc:fancy-date-info book gnc:*fancy-date-format*)))
(date-format (gnc:options-fancy-date book)))

; invoice number and ID String table
(add-html! document "<table width='100%'><tr>")
(add-html! document "<td align='left'>")
Expand Down
5 changes: 3 additions & 2 deletions src/report/business-reports/fancy-invoice.scm
Expand Up @@ -798,10 +798,11 @@
(if (not (null? invoice))
(let* ((book (gncInvoiceGetBook invoice))
(date-object #f)
(date-format (gnc:fancy-date-info book gnc:*fancy-date-format*))
(date-format (gnc:options-fancy-date book))
(helper-table (gnc:make-html-table))
(title (title-string default-title custom-title)))
(set! table (make-entry-table invoice

(set! table (make-entry-table invoice
(gnc:report-options report-obj)
add-order cust-doc? credit-note?))

Expand Down
3 changes: 2 additions & 1 deletion src/report/business-reports/invoice.scm
Expand Up @@ -692,7 +692,8 @@

(if (not (null? invoice))
(let* ((book (gncInvoiceGetBook invoice))
(date-format (gnc:fancy-date-info book gnc:*fancy-date-format*)))
(date-format (gnc:options-fancy-date book)))

(set! table (make-entry-table invoice
(gnc:report-options report-obj)
add-order cust-doc? credit-note?))
Expand Down
3 changes: 1 addition & 2 deletions src/report/business-reports/job-report.scm
Expand Up @@ -553,11 +553,10 @@
(gnc:date-option-absolute-time
(opt-val gnc:pagename-general (N_ "To")))))
(book (gnc-account-get-book account))
(date-format (gnc:fancy-date-info book gnc:*fancy-date-format*))
(date-format (gnc:options-fancy-date book))
(type (opt-val "__reg" "owner-type"))
(type-str "")
(report-title-str ""))

(cond
((eqv? type GNC-OWNER-CUSTOMER)
(set! type-str (N_ "Customer"))
Expand Down
4 changes: 2 additions & 2 deletions src/report/business-reports/owner-report.scm
Expand Up @@ -757,10 +757,10 @@
(gnc:date-option-absolute-time
(opt-val gnc:pagename-general optname-to-date))))
(book (gnc-account-get-book account))
(date-format (gnc:fancy-date-info book gnc:*fancy-date-format*))
(date-format (gnc:options-fancy-date book))
(type (opt-val "__reg" "owner-type"))
(owner-descr (owner-string type))
(date-type (opt-val gnc:pagename-general optname-date-driver))
(date-type (opt-val gnc:pagename-general optname-date-driver))
(owner (opt-val owner-page owner-descr))
(report-title (string-append (doctype-str type) " " (_ "Report"))))

Expand Down
2 changes: 1 addition & 1 deletion src/report/business-reports/taxinvoice.eguile.scm
Expand Up @@ -47,7 +47,7 @@
(currency (gncInvoiceGetCurrency opt-invoice))
(entries (gncInvoiceGetEntries opt-invoice))
(splits '());'
(dateformat (gnc:fancy-date-info book gnc:*fancy-date-format*))
(dateformat (gnc:options-fancy-date book))
(coyname (gnc:company-info book gnc:*company-name*))
(coycontact (gnc:company-info book gnc:*company-contact*))
(coyaddr (gnc:company-info book gnc:*company-addy*))
Expand Down

0 comments on commit 7f4b656

Please sign in to comment.