Commit Graph

17 Commits

Author SHA1 Message Date
Christopher Lam
17820ec261 Merge branch 'maint' 2023-01-26 18:40:44 +08:00
John Ralls
f4c6d65395 Merge Bob Fewell's 'nofree' into maint. 2023-01-24 13:25:02 -08:00
Richard Cohen
3360a6d13b Remove extra semicolons
Courtesy of gcc -pedantic
2023-01-24 13:22:18 +00:00
John Ralls
c1001e6641 Better wording for tax table changed info message. 2022-03-10 13:44:47 -08:00
John Ralls
ce2b89fd8c [business]Add diagnostic messages to GncEntry and GncInvoice. 2022-03-05 18:18:13 -08:00
Robert Fewell
6a9ff287cd Wrap BillTermDecRef and TaxTableDecRef in test for shutdown
When Gnucash is shutting down, the TaxTables and BillTerms will be
destroyed/freed and may already have been so there is no point trying
to decrement a reference that is used to stop them being destroyed if
in use.
2021-08-14 15:09:33 +01:00
Simon Arlott
320df7e409
Use const return values for string cache
This is a prerequisite for being able to return "" (which is const) and
none of the returned values should ever be modified.
2021-07-11 18:54:49 +01:00
luz paz
16b4976381 Fix typos in libgnucash/
Found via `codespell -q 3 -L ans,ba,parm,parms,numer`
2021-03-02 01:15:32 +01:00
John Ralls
c23f3f05e3 Fix deprecated G_TYPE_INSTANCE_GET_PRIVATE and G_INLINE_FUNC
with the function/declaration that they substituted.
Note that this doesn't use the recommended new GObject creation macros
because the class names in libgnucash/engine don't follow the gnome
naming convention.
2019-09-12 15:25:42 -07:00
Geert Janssens
4ffc4d046f GncEntry - Fix inverted comparison 2019-05-28 17:19:29 +02:00
John Ralls
e81bcf6e33 Fix the remaining static analysis warnings.
Except two incorrect leak warnings and one about mktemp
 being insecure in the XML backend. See the respective
comments about those.
2018-11-30 15:08:41 +09:00
John Ralls
92a8cf330a Timespec->time64 in business code. 2018-08-13 11:52:42 -07:00
Geert Janssens
fcabf6bb96 A more detailed revision of gncEntry and gncInvoice related rounding
First change is to ensure gncEntry rounding is consistent. Internally
calculated values in the entry are never rounded. Consumers of
gncEntry's calculated values can request them either rounded or not.

Next use a pragmatical approach for calculating values on invoices based on
the entry values: do the rounding such that we never
create an unbalanced transaction while posting
That means
- round each entry's net value before summing them in net total
- accumulate all tax totals on invoice level per tax account before rounding
  and round before before summing them in a global tax total

Hopefully this will catch a few more rounding issues in this area.

A complete solution can only offered if we allow users to manually correct
tax entries. This requires changes to user interface and data format
so that's not going to happen in gnucash 3.x.
2018-05-24 18:53:15 +02:00
Geert Janssens
2e8df1984a Improve rounding for invoice entry values
This will probably need more refinement because the multiplications
are still missing rounding methods, but the changes in this commit
will already allow guile code to correctly create entries.
2018-05-19 20:25:13 +02:00
lmat
598cb6d861 gncEntry members timespec->time64 2018-01-08 13:01:29 +11:00
lmat
0bf0989aa7 Add time64 functions for gncEntry 2018-01-08 13:01:29 +11:00
Geert Janssens
83d14e1c1c Restructure the src directory
It is split into
- /libgnucash (for the non-gui bits)
- /gnucash (for the gui)
- /common (misc source files used by both)
- /bindings (currently only holds python bindings)

This is the first step in restructuring the code. It will need much
more fine tuning later on.
2017-08-10 18:45:00 +02:00