Commit Graph

21244 Commits

Author SHA1 Message Date
John Ralls
e88f31e05c Bug 784623 - GNUCash does not work with sql backend, I can open...
in read only mode

Upgrade the splits table as well, an oversight from the original fix.
2019-07-19 21:20:43 -07:00
Christopher Lam
0c433e02f7 [business-core] deprecate gnc:entry-type-percent-p
This function is only used once. deprecate it.
2019-07-19 22:22:28 +08:00
Christopher Lam
e654bd34af [business-core] simplify functions 2019-07-19 22:22:28 +08:00
Christopher Lam
57f291af86 [test-business-core] initial commit 2019-07-19 02:50:24 +08:00
Christopher Lam
75d5d8106b [report-utilities] fix gnc:strify
Try monetary-collector and value-collector printers earlier; output is
fixed and will be "coll<([$200.00])>" for commodity-collectors or
"coll<23>" for value-collectors
2019-07-19 01:12:38 +08:00
Christopher Lam
8adcacbdd2 [test-owner-report] basic tests for customer and job reports
create invoices, due dates at various points in the past
2019-07-14 11:55:40 +08:00
Christopher Lam
dae26da037 [owner-report] sanitize strings in preparation for tests 2019-07-14 11:35:19 +08:00
Christopher Lam
fee383e85e [job-report] sanitize strings in preparation for tests 2019-07-14 11:35:19 +08:00
Christopher Lam
74169114d5 [report-utilities] add gnc:dump-book and gnc:dump-invoices
(gnc:dump-book)
utility function for tests. dumps the whole book. sample output:

 Account: <Root> Comm<USD> Type<Asset>

 Account: <Root.Asset> Comm<USD> Type<Asset>

 Account: <Root.Asset.Bank> Comm<USD> Type<Asset>
   Split: 07/13/19 Amt<$17,479.18> Val<$17,479.18> Desc<cust-1-name>

 Account: <Root.VAT> Comm<USD> Type<Asset>

 Account: <Root.VAT.VAT-on-Sales> Comm<USD> Type<Liability>
   Split: 07/13/19 Amt<-$1,111.01> Val<-$1,111.01> Desc<cust-1-name>

 Account: <Root.A/Receivable> Comm<USD> Type<A/Receivable>
   Split: 07/13/19 Amt<-$17,479.18> Val<-$17,479.18> Desc<cust-1-name>
   Split: 07/13/19 Amt<$17,479.18> Val<$17,479.18> Desc<cust-1-name>

 Account: <Root.Income> Comm<USD> Type<Income>
   Split: 07/13/19 Amt<-$16,368.17> Val<-$16,368.17> Desc<cust-1-name>

(gnc:dump-invoices)

Invoice: ID<> Owner<cust-1-name>
   Date: Open<?> Post<07/13/19> Due<07/13/19>
  Entry: Date<07/13/19> Desc<taxable=N tax-inc...> Action<action> Notes<> Qty<11>
  Entry: Date<07/13/19> Desc<taxable=N tax-inc...> Action<action> Notes<> Qty<11>
  Entry: Date<07/13/19> Desc<taxable=N tax-inc...> Action<action> Notes<> Qty<11>
  Entry: Date<07/13/19> Desc<taxable=Y tax-inc...> Action<action> Notes<> Qty<11>
  Entry: Date<07/13/19> Desc<taxable=Y tax-inc...> Action<action> Notes<> Qty<11>
  Entry: Date<07/13/19> Desc<taxable=Y tax-inc...> Action<action> Notes<> Qty<11>
  Entry: Date<07/13/19> Desc<taxable=Y tax-inc...> Action<action> Notes<> Qty<11>
  Entry: Date<07/13/19> Desc<taxable=Y tax-inc...> Action<action> Notes<> Qty<11>
 Totals: Total<$17,479.18> TotalSubtotal<$16,368.17> TotalTax<$1,111.01>
2019-07-14 11:35:05 +08:00
Christopher Lam
105f5396fc Merge branch 'maint-budget-ytd-upgrade' into maint 2019-07-13 10:50:16 +08:00
Christopher Lam
89749a1b63 [test-budget] add tests for envelope budgeting 2019-07-13 10:48:44 +08:00
Christopher Lam
ec28835d78 [budget] upgrade to support envelope budgeting
merges ideas from Phil Longstaff's ytd-budget.scm report. differences
from non-envelope budget:

* envelope budgeting accumulates bgt/act/diff amounts from period=0
  e.g. selecting periods 2 to 4 means amounts must accumulate from
  period 0 to 1 (not shown) and accumulated amounts 2 to 4 (shown).
* total column must encompass all periods from 0 to maxperiod
2019-07-13 10:48:23 +08:00
Christopher Lam
c05ba6415f [budget] compact functions in options-generator 2019-07-13 10:44:34 +08:00
Christopher Lam
43c8b16ba5 [budget] remove unused options
these options are unused

* general/price-source
* general/show-full-names?
2019-07-13 10:44:34 +08:00
Christopher Lam
1ad4ae30be [owner-report] fix html to be parsable by sxml
in preparation for tests
2019-07-13 00:07:04 +08:00
Christopher Lam
6c4ae89012 [business-options] fix whitespace 2019-07-12 21:08:15 +08:00
Christopher Lam
560b313f85 [business-options] deprecate unused option-types 2019-07-12 20:50:18 +08:00
John Ralls
c9d001d550 Bug 797295 - problems with entering swedish åäö in company address
scm_c_string_length() returns the wrong answer when the C string is
UTF8: It returns the number of codepoints because the SCM string is in
UTF32, but we need the number of bytes for gtk_text_buffer_set_text.
Fortunately scm_to_utf8_string returns a null-terminated string so
we can just tell gtk_text_buffer_set_text to figure it out on its own.

Guile doesn't use g_malloc so don't use g_free, and gpointer* is a
void** so change the cast to void* for free.
2019-07-11 17:39:57 -07:00
Christopher Lam
22f22b0a28 Merge branch 'wrapqoflog' into maint 2019-07-12 08:16:46 +08:00
Christopher Lam
9f40cac254 [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.
2019-07-10 23:11:24 +08:00
Christopher Lam
5112210e42 [invoice] Payments should be shown in invoice by default
If an invoice has payments already applied, by default the
invoice-report should show payments.
2019-07-10 23:10:32 +08:00
Christopher Lam
06e3fd4d28 [customer-summary] fix no-owner sorting properly
this comparison now works for no-owner sorting. 3a927ce2a, second
attempt.
2019-07-10 23:10:32 +08:00
John Ralls
1a16ba704b Bug 797306 - "URL cannot be shown" when one clicks an account line link...
in report.

perform_navigation_policy hadn't been implemented for webkit2gtk-3.0.
2019-07-09 16:22:52 -07:00
John Ralls
f80e025b7b Bug 797297 - GNUCash is in English even though MacOS is set-up to French.
Thanks to a misplaced #endif.
Also allow info of selected locale, the comment about MacOS wasn't
correct.
2019-07-09 11:59:19 -07:00
Christian Stimming
39cfcb30f9 Online-banking: add value for fintsRegistrationKey with most recent aqbanking. 2019-07-07 22:39:09 +02:00
Pedro Albuquerque
adbf8afeae Updated pt.po 2019-07-07 10:59:11 -07:00
Christopher Lam
b3a4cd6277 completion redefine gnc:debug 2019-07-07 09:04:04 +08:00
Christopher Lam
429077ee8e completion wrap qoflog 2019-07-07 08:41:13 +08:00
Christian Stimming
629569b792 Update German translation 2019-07-06 22:17:34 +02:00
Christopher Lam
bb6d84e03d [html-utilities] [API] further deprecations
* gnc:html-build-acct-table -- unused for decades
* gnc:html-table-append-ruler/markup
* gnc:html-acct-table-row-helper!
* gnc:html-acct-table-comm-row-helper!
2019-07-06 23:13:24 +08:00
Christopher Lam
463c3124ef [commodity-utilities] [API] deprecate gnc:sum-collector-stocks
this function is never reachable in code
2019-07-06 23:13:24 +08:00
Christopher Lam
b9382d2cf2 [commodity-utilities] move gnc:debug to less CPU critical code
pricealist is a long list generated once, yet is dumped via gnc:debug
for every call to gnc:exchange-by-pricealist-nearest. This change
moves gnc:debug to the initial pricealist generation, ensuring that
gnc:exchange-by-pricealist-nearest is much faster.
2019-07-06 23:13:24 +08:00
Christopher Lam
e783335cf2 [commodity-utilities] compact gnc:sum-collector-commodity
This function converted to purely functional approach.

Note that commodity-collectors always round amounts to the currency
SCU therefore we replicate the behaviour here.
2019-07-06 23:13:24 +08:00
Christopher Lam
dd1873eb05 [test-cash-flow] fix test which was badly designed
this test had confused 2 functions:

(exchange-fn monetary currency) --> monetary
  and
(to-report-currency currency amount date) --> amount

this flaw surfaces with the shortened gnc:sum-collector-commodity definition.
2019-07-06 23:13:24 +08:00
Christopher Lam
4214f7eb76 [balsheet-pnl] bugfix prevent crash on missing accts
When asset/liability/income/expense accounts are either missing or
deselected, the report would crash. This commit will ensure the
date-specific balance calculators do not crash.

The reason for crash is the form (apply map gnc:monetaries-add lists)
where lists is usually a list-of-list-of-monetaries, e.g.
(list (list $1.00 $2.00 $3.00)
      (list $2.35 $3.44 $4.45))

and (apply map gnc:monetaries-add lists) will return a list of the
matched sums, i.e. commodity-collectors (list (list <$3.35> <$5.44>
<$7.45>)), whereby each commodity-collector is denoted by <...>

When there are missing account-types (or deselected) the lists are
empty-lists, therefore mapping will fail. This change ensures that
null-lists are handled by returning (list (list <> <> <>)), with null
commodity-collectors.
2019-07-06 23:12:36 +08:00
Christopher Lam
1e66d3b2f6 [balsheet-pnl] cosmetic: improve maxindent calc
75ab45ac3 without 1+ some alignment is incorrect
2019-07-06 14:42:09 +08:00
Christopher Lam
42b6fb993b call strify only if debugging enabled 2019-07-06 11:15:18 +08:00
Christopher Lam
898a9cdb8e wrap qoflog 2019-07-06 11:15:18 +08:00
Christopher Lam
bc1bcc718e [average-balance] show progress reports before chart generation
This change adds progress reports to be more responsive on large
datafiles. It is probably marginally slower.
2019-07-04 18:30:03 +08:00
Christopher Lam
75ab45ac3c [balsheet-pnl] change definition of maxindent
previous would find deepest account; it should really find deepest
selected account.
2019-07-04 18:30:02 +08:00
Christopher Lam
6f217165c4 [owner-report] fix code to set date to 'today'
code sets date-option to today. it fails to set the default-value. the
date will reset when user click 'reset options', and this commit
ensures the 'today' date remains the default date.
2019-07-04 18:30:02 +08:00
Christopher Lam
3a927ce2ac [customer-summary] fix no-owner sorting of entries
Previous 9ed0174cb would place any entry with customername == "No
Customer" last, including genuine customers with this particular
name. This commit modifies to test on presence of owner-report-url to
detect owner/no-owner entries. This is reliable for this report.
2019-07-04 18:30:02 +08:00
Robert Fewell
f82058e026 Merge David Cousens's 'Bug797275' branch into maint 2019-07-02 10:57:23 +01:00
Christian Stimming
a7bdd08291 Update German translation. 2019-07-01 18:20:58 +02:00
Christian Stimming
070e21fb0c aqb: Fix progress window scaling/filling
The widget with the log messages didn't fill the space
in the dialog anymore. Probably a side-effect of 58465432,
but fixed now anyway.

Also, one label whose "translatable" attribute was removed
had to get it again.
2019-07-01 18:17:10 +02:00
Christian Stimming
da7cc037e2 Fix remaining compiler errors in aqbanking5/aqbanking6 dependent code. 2019-06-30 16:43:54 +02:00
Christian Stimming
98959f86d9 Get aqbanking code to compile again with current aqbanking's git master version.
Not yet tested, though, only successfully compile and link.
2019-06-30 16:09:34 +02:00
John Ralls
d42695e75a Release GnuCash 3.6 2019-06-29 16:37:02 -07:00
John Ralls
b4fbec5b12 Use warnings instead of perl -w.
perl -w breaks env on Debian.
2019-06-29 14:25:21 -07:00
John Ralls
e148477c70 Remove build-osx.txt, build-solaris.txt, and misc-notes.txt.
The first two are utterly obsolete and the third copies a mailing
list conversation from 20 years ago about stock splits.
2019-06-29 14:10:23 -07:00