diff --git a/gnucash/gnome/dialog-find-transactions2.c b/gnucash/gnome/dialog-find-transactions2.c index 93514bd637..15b02da60d 100644 --- a/gnucash/gnome/dialog-find-transactions2.c +++ b/gnucash/gnome/dialog-find-transactions2.c @@ -121,7 +121,7 @@ gnc_ui_find_transactions_dialog_create2 (GNCLedgerDisplay2 * orig_ledg) type, SPLIT_RECONCILE, NULL); params = gnc_search_param_prepend (params, N_("Share Price"), NULL, type, SPLIT_SHARE_PRICE, NULL); - params = gnc_search_param_prepend (params, N_("Shares"), NULL, + params = gnc_search_param_prepend (params, N_("Amount"), NULL, type, SPLIT_AMOUNT, NULL); params = gnc_search_param_prepend (params, N_("Value"), NULL, type, SPLIT_VALUE, NULL); diff --git a/gnucash/report/business-reports/job-report.scm b/gnucash/report/business-reports/job-report.scm index 40b2bbfd51..e58f5a33d8 100644 --- a/gnucash/report/business-reports/job-report.scm +++ b/gnucash/report/business-reports/job-report.scm @@ -541,7 +541,7 @@ (end-date (gnc:time64-end-day-time (gnc:date-option-absolute-time (opt-val gnc:pagename-general (N_ "To"))))) - (book (gnc-account-get-book account)) + (book (gnc-get-current-book)) (date-format (gnc:options-fancy-date book)) (type (opt-val "__reg" "owner-type")) (type-str "") diff --git a/gnucash/report/business-reports/test/test-invoice.scm b/gnucash/report/business-reports/test/test-invoice.scm index 3db7c4a864..52159d6c47 100644 --- a/gnucash/report/business-reports/test/test-invoice.scm +++ b/gnucash/report/business-reports/test/test-invoice.scm @@ -26,7 +26,9 @@ (run-test-proper))) (define (coverage-test tester) - (add-to-load-path "/home/chris/sources/gnucash/gnucash/report/business-reports") + (let* ((currfile (dirname (current-filename))) + (path (string-take currfile (string-rindex currfile #\/)))) + (add-to-load-path path)) (call-with-values (lambda() (with-code-coverage tester)) diff --git a/gnucash/report/report-system/commodity-utilities.scm b/gnucash/report/report-system/commodity-utilities.scm index 1328f1b310..a6b8bbdc90 100644 --- a/gnucash/report/report-system/commodity-utilities.scm +++ b/gnucash/report/report-system/commodity-utilities.scm @@ -48,8 +48,9 @@ (xaccQueryAddAccountMatch query currency-accounts QOF-GUID-MATCH-ANY QOF-QUERY-AND) - (xaccQueryAddDateMatchTT - query #f end-date #t end-date QOF-QUERY-AND) + (if end-date + (xaccQueryAddDateMatchTT + query #f end-date #t end-date QOF-QUERY-AND)) ;; Get the query result, i.e. all splits in currency ;; accounts. diff --git a/gnucash/report/standard-reports/test/test-transaction.scm b/gnucash/report/standard-reports/test/test-transaction.scm index 56f6ffc453..08be14d4e6 100644 --- a/gnucash/report/standard-reports/test/test-transaction.scm +++ b/gnucash/report/standard-reports/test/test-transaction.scm @@ -50,11 +50,12 @@ (run-test-proper))) (define (coverage-test) - (define %test-vm (make-vm)) - (add-to-load-path "/home/chris/sources/gnucash/gnucash/report/standard-reports") + (let* ((currfile (dirname (current-filename))) + (path (string-take currfile (string-rindex currfile #\/)))) + (add-to-load-path path)) (call-with-values (lambda() - (with-code-coverage %test-vm run-test-proper)) + (with-code-coverage run-test-proper)) (lambda (data result) (let ((port (open-output-file "/tmp/lcov.info"))) (coverage-data->lcov data port) diff --git a/libgnucash/engine/Account.cpp b/libgnucash/engine/Account.cpp index a1144562a6..7920660cd3 100644 --- a/libgnucash/engine/Account.cpp +++ b/libgnucash/engine/Account.cpp @@ -1015,6 +1015,7 @@ xaccInitAccount (Account * acc, QofBook *book) QofBook * gnc_account_get_book(const Account *account) { + if (!account) return NULL; return qof_instance_get_book(QOF_INSTANCE(account)); }