Commit Graph

651 Commits

Author SHA1 Message Date
Christopher Lam
2a6a4e34d6 [price-quotes] compact commodity-tz-quote-triple->price 2019-08-13 18:50:59 +08:00
Christopher Lam
e15f2610ba [price-quotes] compact gnc:book-add-quotes 2019-08-13 18:50:57 +08:00
Christopher Lam
4a4f81b320 [price-quotes] compact book->commodity->fq-call-data
make function more readable.
2019-08-13 18:50:55 +08:00
Christopher Lam
5e8663772a [price-quotes] compact gnc:fq-get-quotes 2019-08-13 18:50:53 +08:00
Christopher Lam
d5122c97ea [price-quotes] compact gnc:fq-check-sources
improve locality of vars.
2019-08-13 18:50:51 +08:00
Christopher Lam
fab1c8db3e [price-quotes] show if F::Q not installed, remove dead code 2019-08-13 18:50:48 +08:00
Christopher Lam
fbb6a95600 [simple-obj] deprecate this module
* it's only a wrapper for make-record-type
* use record-types directly in modules
2019-07-30 18:17:52 +08:00
Christopher Lam
e8a41bbf54 [options] compact lookup-option 2019-07-28 12:16:58 +08:00
Christopher Lam
bd0cbbf931 [test-options] initial commit
* test lookup option changed section/name
2019-07-28 12:16:58 +08:00
Christopher Lam
66511f17bb [c-interface] compact functions
fix whitespace. this module has good coverage in test-c-interface.scm.
2019-07-28 12:16:58 +08:00
John Ralls
887f7fac32 Bug 746937 - Template transaction splits are loaded in reverse order...
and then not sorted before saving.

Actually not sorted after loading because the template accounts weren't
being committed.
2019-07-27 15:15:55 -07:00
John Ralls
456ab2241f Remove unused ifdefs for IMPLEMENT_BOOK_DOM_TREES_LATER.
Apparently stub code for a different way of generating the DOM tree, never implemented.
2019-07-26 16:17:09 -07:00
Frank H. Ellenberger
a0a0ffbb77 Bug 797319 - Mauritanian ouguiya MRO shows too few decimals
Add info about cash vs. banking
2019-07-25 23:51:50 +02:00
Frank H. Ellenberger
c77607c8c0 Bug 797316 - New Mauritanian ouguiya MRU not supported
Add info, which Mauritanian ouguiya is recent
2019-07-25 23:33:42 +02:00
Christopher Lam
681e023cd5 [date-utilities][API] deprecate unused exports, add comments
* deprecated:
  gnc:make-reldate-hash
  gnc:reldate-string-db
  gnc:relative-date-values
  gnc:get-relative-date-strings

* remove gnc:reldate-list, unused

* comment sections
2019-07-25 20:22:12 +08:00
Christopher Lam
7e9ec00906 [date-utilities] tidy up gnc:make-date-interval-list 2019-07-24 23:44:56 +08:00
Christopher Lam
a4811b3b46 [test-extras] add (create-test-invoice-data) for tests
this function creates some business data. moved from test-invoice.scm
without the invoice-specific tests. verified all invoices/bills are
created correctly.

it returns a vector-list of the 8 invoices generated.
2019-07-24 20:01:02 +08:00
John Ralls
ca87572a2c Bug 797319 - Mauritanian ouguiya MRO shows too few decimals
Changed MRO smallest-fraction to 100 based on information provided
by the reporter. ISO4217 has moved the MRO to the "Historical Currencies"
list that doesn't include CcyMnrUnits.
2019-07-23 09:42:43 -07:00
John Ralls
b02f7ac409 Bug 797316 - New Mauritanian ouguiya MRU not supported
Add new MRU with info from
https://www.currency-iso.org/dam/downloads/lists/list_one.xml
2019-07-23 09:42:28 -07:00
Christopher Lam
273ae720cc [scm-utilities][API] add sort-and-delete-duplicates
this can be used instead of delete-duplicates when the list must also
be sorted.

the main reason for this function will be for the upcoming aging.scm
report which will use it heavily to slice APAR splits into owner list.
2019-07-20 21:10:08 +08:00
Christopher Lam
fdeff65f06 [business-core] refactor & document gnc:owner-from-split
This function helps to establish UI link from register split to an
owner's split. It should not be used anywhere else. Its use in reports
will be removed.

It is also unnecessarily complex -- it is called from an AP/AR account
register split, it should have all necessary information via split
metadata. e.g. this function *can* return a split owner if originating
from an Asset/Liability account which settles an invoice, but this
functionality is not used because there is no asset/liability register
hook to call it.
2019-07-20 21:10:08 +08:00
Christopher Lam
d0bf4ad8ae [test-business-core] add to dist_list 2019-07-20 21:10:08 +08:00
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
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
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
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
John Ralls
a3871d9ca1 Warn if can't lock for any reason other than that the file is locked already.
And include the error string in the message.
2019-06-28 11:48:01 -07:00
Christopher Lam
039b84871e [utilities] warn against using guile's strftime
strftime has been banished from code; warning for custom-reports

https://www.mail-archive.com/bug-guile@gnu.org/msg09778.html
2019-06-19 22:10:23 +08:00
Geert Janssens
15a35e6a3b Housekeeping - replace plenty of http links with https
There are more, but these are most common ones.
There are also a number of urls that don't behave well when https, so those are skipped
At some point I have also started marking non-working URLs as [DEAD LINK], though
that's not a full coverage.
2019-06-06 15:52:30 +02:00
Christopher Lam
885689b42d [options] bugfix don't override inbuilt list keyword
fixing a 17 year old bug.

previous version had defined (save-acc list count) and (save-item list
count) thereby overwriting the inbuilt 'list' keyword, and tried to use
the it later on with (list key)... best rewrite with neater code.
2019-05-31 23:31:54 +08:00
Geert Janssens
4ffc4d046f GncEntry - Fix inverted comparison 2019-05-28 17:19:29 +02:00
John Ralls
957df9a32b Add a +0000 offset to ISO8601 timestamps in the XML backend.
Apparently GnuCash for Android hard-coded the offset spec into their
parser, so it can't import XML files without it.
2019-05-27 14:51:06 -07:00
Christopher Lam
ed42f8acb6 Bug 797197 - Transaction report: Error message when sorting on month
guile's strftime is/was buggy; cannot handle non-UTF8 locales. Use
gnc_print_time64 instead. see the following

http://lists.gnu.org/archive/html/bug-guile/2019-05/msg00003.html
2019-05-27 21:20:29 +08:00
Geert Janssens
b7479e8fb0 Bump minimum cmake version to 3.5
This version is available for all supported platforms and distros
(CentOS can have a version via EPEL, which is required anyway)

Advantages:
- one cmake version for all platforms
- we can drop all conditions based on cmake version
2019-05-25 12:04:51 +02:00
John Ralls
2d4f771bed Merge Adrién Panella's 'budget' into maint. 2019-05-23 09:50:20 -07:00
Adrian Panella
5bb54d073c [budget] Fix error in qof_book property path
The "Default budget" property had an erroneus path
and was not returning any value.
2019-05-17 23:12:19 -05:00
Robert Fewell
416b79d304 Reformat source files gnc-accounting-period.*
Change tabs to white space and some other white space changes.
2019-05-17 11:01:24 +01:00
Robert Fewell
037f5ed5be Bug 797089 - Wrong time for accounting period end date
In the Preferences/Accounting Period, there is an option to specify
absolute dates but the end date was being set to start of day instead
of end of day, changed this.
2019-05-17 11:01:24 +01:00
John Ralls
fc567208f3 Bug 797233 - Balance Sheet, Chart of Accounts, and other reports...
crash when involving foreign currency stocks.

Scheme's inexact->exact function just converts the floating-point
representation of a number into an exact rational (documented in the
API Reference, Simple Generic Data Types, Numerical data types, Exact
and Inexact Numbers), which isn't what we want.

We want the number converted to exact directly from the string and to do
that we have gnc-fq-helper preface it with #e.
2019-05-14 13:34:07 -07:00
John Ralls
217418bb8c Merge Adrián Panella's 'numeric' into maint. 2019-05-14 10:09:16 -07:00
Adrian Panella
f905467a44 [numeric] Fix constructor from strings in range (0 ,1)
Fix error that caused strings in the form 0.nnn to be
converted to negative numerics.
2019-05-13 23:05:11 -05:00
John Ralls
e6c50357bb Fix test error string to match actual error. 2019-05-13 15:19:19 -07:00
John Ralls
8738644af0 Merge David Palma's fix-division into maint. 2019-05-13 15:15:36 -07:00
Geert Janssens
d4c524a9ef Fix test dependency issue 2019-05-13 20:14:58 +02:00