2001-06-25 Dave Peticolas <dave@krondo.com>

* AUTHORS: credits

	* doc/sgml/C/xacc-about.sgml: credits

	* src/scm/report/balance-sheet.scm: Daniel Hagerty's patch
	to add an unrealized gain/loss line to the balance sheet.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4784 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-06-25 22:10:08 +00:00
parent 18f4957f04
commit 9ed6d4b5f6
4 changed files with 43 additions and 0 deletions

View File

@ -109,6 +109,7 @@ Dave Freese <DFreese@osc.uscg.mil> for leap-year fix
John Goerzen <jgoerzen@complete.org> file i/o fix for 64-bit architectures
Hans de Graaff <hans@degraaff.org> XML patches
Bill Gribble <grib@billgribble.com> qif importation code, and much much more
Daniel Hagerty <hag@linnaean.org> patch to balance sheet report
Mitsuo Hamada <mhamada@redhat.com> messages Japanese translations
Otto Hammersmith <otto@bug.redhat.com> for RedHat RPM version
David Hampton <hampton@employees.org> qif import patch

View File

@ -1,3 +1,12 @@
2001-06-25 Dave Peticolas <dave@krondo.com>
* AUTHORS: credits
* doc/sgml/C/xacc-about.sgml: credits
* src/scm/report/balance-sheet.scm: Daniel Hagerty's patch
to add an unrealized gain/loss line to the balance sheet.
2001-06-24 Dave Peticolas <dave@krondo.com>
* src/scm/report/account-piecharts.scm: fix sign bug

View File

@ -472,6 +472,13 @@ Christiansen</glossterm>
</glossdef>
</glossentry>
<glossentry>
<glossterm><email>hag@linnaean.org</email> Daniel Hagerty</glossterm>
<glossdef>
<para>patch to balance sheet report</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm><email>mhamada@redhat.com</email> Mitsuo
Hamada</glossterm>

View File

@ -229,6 +229,7 @@
(retained-profit-balance (gnc:make-commodity-collector))
(total-equity-balance (gnc:make-commodity-collector))
(equity-plus-liability (gnc:make-commodity-collector))
(unrealized-gain-collector (gnc:make-commodity-collector))
;; Create the account tables here.
(asset-table
@ -302,6 +303,31 @@
(add-subtotal-line
asset-table (_ "Liabilities") sign-reversed-liability-balance)
(let* ((weighted-fn
(gnc:case-exchange-fn 'weighted-average
report-currency to-date-tp))
(value
(gnc:gnc-monetary-amount
(gnc:sum-collector-commodity asset-balance
report-currency
exchange-fn)))
(cost
(gnc:gnc-monetary-amount
(gnc:sum-collector-commodity asset-balance
report-currency
weighted-fn)))
(unrealized-gain (gnc:numeric-sub-fixed value cost)))
(unrealized-gain-collector 'add report-currency unrealized-gain)
(equity-plus-liability 'add report-currency unrealized-gain)
(add-subtotal-line
asset-table (_ "Unrealized Gains(Losses)")
unrealized-gain-collector))
(gnc:html-table-append-ruler!
asset-table (* (if show-fcur? 3 2) tree-depth))
(add-subtotal-line