Sync the g2 branch with the gnome2-merge-6 tag. (2004-01-16)

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gnucash-gnome2-dev@9791 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton
2004-01-17 02:18:41 +00:00
parent 9a2d62f345
commit bf47d8448c
44 changed files with 681 additions and 249 deletions

View File

@@ -10,14 +10,14 @@
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>).
</gnc-act:long-description>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">33a326fe16ae360f777a94b3f5bdfbdc</act:id>
<act:type>LIABILITY</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
@@ -42,14 +42,14 @@
<act:parent type="new">023e2343114b3d695feaeb96904e0da6</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">acacdcb998e45fb741766622e8542f0b</act:id>
<act:type>EXPENSE</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD></act:description>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD></act:name>

View File

@@ -7,9 +7,7 @@
<20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
</gnc-act:short-description>
<gnc-act:long-description>
<20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> , <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
<20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> , <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
</gnc-act:long-description>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
@@ -66,14 +64,14 @@
<act:parent type="new">a1dd5f225156f110689c204fefded0ab</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">19a911feed9b41b8b01be036a2aed9fe</act:id>
<act:type>LIABILITY</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
@@ -98,14 +96,14 @@
<act:parent type="new">a8186db64d71dc2ca5fdccb3234b531b</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">a7ab23dd2d41616042034d5a012a0850</act:id>
<act:type>INCOME</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD></act:description>
</gnc:account>
<gnc:account version="2.0.0">
<act:name>Bonus</act:name>
@@ -126,7 +124,7 @@
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">a7ab23dd2d41616042034d5a012a0850</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
@@ -137,29 +135,29 @@
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">a7ab23dd2d41616042034d5a012a0850</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">73481e2da7461fc34e7003b7ec560bdf</act:id>
<act:type>INCOME</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">c47361e40d9478ec11758097e64d693c</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">be17363347a8578c48cecd06bc8b7aa8</act:id>
<act:type>INCOME</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">c47361e40d9478ec11758097e64d693c</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
@@ -174,14 +172,14 @@
<act:parent type="new">c47361e40d9478ec11758097e64d693c</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">49525ad0fb4ced06b9874d365d53f505</act:id>
<act:type>INCOME</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">a7ab23dd2d41616042034d5a012a0850</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
@@ -196,14 +194,14 @@
<act:parent type="new">a7ab23dd2d41616042034d5a012a0850</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">1884bbd7394883ebafec8b9e2eb091a4</act:id>
<act:type>EXPENSE</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD></act:description>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
@@ -250,14 +248,14 @@
<act:parent type="new">56df186f1ce6114ddca7b9e5d03af390</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name>Parking</act:name>
<act:name><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">d72262c1c0e2c3388183ebb44a98b011</act:id>
<act:type>EXPENSE</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description>Parking</act:description>
<act:description><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">56df186f1ce6114ddca7b9e5d03af390</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
@@ -294,25 +292,25 @@
<act:parent type="new">1884bbd7394883ebafec8b9e2eb091a4</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">a1393344fb199f08f751ac3154694e87</act:id>
<act:type>EXPENSE</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">1884bbd7394883ebafec8b9e2eb091a4</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">ec8eec3d46c69aa861fda836e11346c0</act:id>
<act:type>EXPENSE</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">1884bbd7394883ebafec8b9e2eb091a4</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
@@ -338,14 +336,14 @@
<act:parent type="new">1884bbd7394883ebafec8b9e2eb091a4</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">0a59a3347e4ff02b862de41ef59d7351</act:id>
<act:type>EXPENSE</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">1884bbd7394883ebafec8b9e2eb091a4</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
@@ -389,7 +387,7 @@
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">0ebd1d5f40d9e9e8bb1a4bf539650dd1</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
@@ -558,14 +556,14 @@
<act:parent type="new">1884bbd7394883ebafec8b9e2eb091a4</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name>Supplies</act:name>
<act:name><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">e2b34f49d4cf916cf4d45525e1e7319d</act:id>
<act:type>EXPENSE</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description>Supplies</act:description>
<act:description><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">1884bbd7394883ebafec8b9e2eb091a4</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
@@ -580,14 +578,14 @@
<act:parent type="new">1884bbd7394883ebafec8b9e2eb091a4</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name>Federal</act:name>
<act:name><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">090a786357463ec7fbee8066cb999097</act:id>
<act:type>EXPENSE</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description>Federal</act:description>
<act:description><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">2c53a8a0c8b36f7de3f4052653886c2b</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
@@ -657,14 +655,14 @@
<act:parent type="new">57635fa5f71dee8ffc207c277250e773</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:name><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">2d0315d7b2f8f11a8a8b32d805bca6eb</act:id>
<act:type>EXPENSE</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:description><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">57635fa5f71dee8ffc207c277250e773</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
@@ -690,24 +688,24 @@
<act:parent type="new">57635fa5f71dee8ffc207c277250e773</act:parent>
</gnc:account>
<gnc:account version="2.0.0">
<act:name>Equity</act:name>
<act:name><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></act:name>
<act:id type="new">3ab6a6d97b216c11333e48aa2b749a91</act:id>
<act:type>EQUITY</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description>Equity</act:description>
<act:description><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></act:description>
</gnc:account>
<gnc:account version="2.0.0">
<act:name>Opening Balances</act:name>
<act:name><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:name>
<act:id type="new">a0a622a30410f75eba35d2875a843da8</act:id>
<act:type>EQUITY</act:type>
<act:commodity>
<cmdty:space>ISO4217</cmdty:space>
<cmdty:id>USD</cmdty:id>
</act:commodity>
<act:description>Opening Balances</act:description>
<act:description><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></act:description>
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
</gnc:account>
</gnc-account-example>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<gnc-account-example>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<gnc-account-example>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- $Id$
<!--
Italian translation for GnuCash
Copyright (C) 1998-2003 Free Software Foundation, Inc.
Lorenzo Cappelletti <lorenzo.cappelletti@email.com>, 2003.

View File

@@ -70,6 +70,8 @@
(export gnc:make-radiobutton-option)
(export gnc:make-radiobutton-callback-option)
(export gnc:make-list-option)
(export gnc:options-make-end-date!)
(export gnc:options-make-date-interval!)
(export gnc:make-number-range-option)
(export gnc:make-internal-option)

View File

@@ -128,4 +128,45 @@ gncReadFile (const char * file, char ** data)
return size;
}
/**
* gnc_getline -- read a line from the input file, up to and including
* the newline.
*
* Args: line - pointer to hold the buffer for the whole line (allocated by
* this function)
* file - the file from which to read
* Return: the number of bytes read
*
* The caller MUST g_free() the line returned from this call in all
* cases where it is non-NULL!
*/
gint64
gnc_getline (gchar **line, FILE *file)
{
char str[BUFSIZ];
gint64 len;
GString *gs;
g_return_val_if_fail(line, -1);
*line = NULL;
g_return_val_if_fail(file, -1);
gs = g_string_new("");
while (fgets(str, sizeof(str), file) != NULL) {
g_string_append(gs, str);
len = strlen(str);
if (str[len-1] == '\n')
break;
}
len = gs->len;
*line = gs->str;
g_string_free(gs, FALSE);
return len;
}
/* ----------------------- END OF FILE --------------------- */

View File

@@ -1,8 +1,9 @@
/********************************************************************\
* file-utils.h -- simple file utilities *
* file-utils.h -- simple file utilities *
* Copyright (C) 1997 Robin D. Clark *
* Copyright (C) 1998 Linas Vepstas *
* Copyright (C) 1998 Rob Browning *
* Copyright (C) 2004 Derek Atkins <derek@ihtfp.com> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
@@ -28,6 +29,8 @@
#ifndef GNC_FILE_UTILS_H
#define GNC_FILE_UTILS_H
#include <stdio.h> /* for FILE* */
char * gncFindFile (const char * filename);
/********************************************************************\
@@ -41,4 +44,19 @@ char * gncFindFile (const char * filename);
int gncReadFile (const char * file, char ** data);
/**
* gnc_getline -- read a line from the input file, up to and including
* the newline.
*
* Args: line - pointer to hold the buffer for the whole line (allocated by
* this function)
* file - the file from which to read
* Return: the number of bytes read
*
* The caller MUST g_free() the line returned from this call in all
* cases where it is non-NULL!
*/
gint64 gnc_getline (gchar **line, FILE *file);
#endif /* GNC_FILE_UTILS_H */

View File

@@ -241,6 +241,40 @@ gnc_lookup_multichoice_option(const char *section, const char *name,
name, default_value);
}
/********************************************************************\
* gnc_lookup_date_option *
* looks up a date option. If present, returns the absolute date *
* represented in the set_ab_value argument provided, otherwise *
* copies the default_value argument (if non-NULL) to the *
* set_value argument. If the default_value argument is NULL, *
* copies the current date to set_ab_value. Whatever value is *
* stored in set_value is return as an approximate (no *
* nanoseconds) time_t value. set_value may be NULL, in which *
* case only the return value can be used. If is_relative is *
* non-NULL, it is set to whether the date option is currently *
* storing a relative date. If it is, and set_rel_value *
* is non-NULL, it returns a newly allocated string *
* representing the scheme symbol for that relative date *
* *
* Args: section - section name of option *
* name - name of option *
* set_ab_value - location to store absolute option value *
* set_rel_value - location to store relative option value *
* default - default value if not found *
* Return: time_t approximation of set_value *
\********************************************************************/
time_t
gnc_lookup_date_option(const char *section,
const char *name,
gboolean *is_relative,
Timespec *set_ab_value,
char **set_rel_value,
Timespec *default_value)
{
return gnc_option_db_lookup_date_option(global_options, section, name,
is_relative, set_ab_value,
set_rel_value, default_value);
}
/********************************************************************\
* gnc_lookup_number_option *

View File

@@ -56,6 +56,10 @@ char * gnc_lookup_font_option(const char *section, const char *name,
char * gnc_lookup_multichoice_option(const char *section, const char *name,
const char *default_value);
time_t gnc_lookup_date_option(const char *section, const char *name,
gboolean *is_relative, Timespec *set_ab_value,
char **set_rel_value, Timespec *default_value);
gdouble gnc_lookup_number_option(const char *section, const char *name,
gdouble default_value);

View File

@@ -299,6 +299,19 @@ gnc_ui_account_get_balance (Account *account, gboolean recurse)
account, recurse, NULL, NULL);
}
/*
* This routine retrives the total balance in an account converted to
* a given currency, possibly including all sub-accounts under the
* specified account.
*/
gnc_numeric
gnc_ui_account_get_balance_in_currency (Account *account, gnc_commodity *currency,
gboolean recurse)
{
return gnc_ui_account_get_balance_full (xaccAccountGetBalanceInCurrency,
account, recurse, NULL, currency);
}
/*
* This routine retrives the reconciled balance in an account,
* possibly including all sub-accounts under the specified account.

View File

@@ -151,6 +151,9 @@ gnc_ui_account_get_balance_full (xaccGetBalanceInCurrencyFn fn,
gnc_numeric gnc_ui_account_get_balance (Account *account,
gboolean include_children);
gnc_numeric gnc_ui_account_get_balance_in_currency (Account *account,
gnc_commodity *currency,
gboolean recurse);
/**
* This routine retrives the reconciled balance in an account,
* possibly including all sub-accounts under the specified account.

View File

@@ -1465,3 +1465,47 @@
(display header port)
(display code port)
(close port)))))
(define (gnc:options-make-end-date! options pagename optname sort-tag info)
(gnc:register-option
options
(gnc:make-date-option
pagename optname
sort-tag info
(lambda ()
(cons 'relative 'today))
#f 'both
'(
today
end-this-month
end-prev-month
end-current-quarter
end-prev-quarter
end-cal-year
end-prev-year
end-cur-fin-year
end-prev-fin-year
))))
(define (gnc:options-make-date-interval! options pagename name-from info-from
name-to info-to sort-tag)
(gnc:register-option
options
(gnc:make-date-option
pagename name-from
(string-append sort-tag "a") info-from
(lambda () (cons 'relative 'start-cal-year))
#f 'both
'(
today
start-this-month
start-prev-month
start-current-quarter
start-prev-quarter
start-cal-year
start-prev-year
start-cur-fin-year
start-prev-fin-year
)))
(gnc:options-make-end-date! options pagename name-to
(string-append sort-tag "b") info-to))

View File

@@ -307,6 +307,26 @@ not each row")
#f))
;;; Summarybar Options
(gnc:register-configuration-option
(gnc:make-simple-boolean-option
(N_ "Summarybar") (N_ "Show grand total")
"a" (N_ "Show a grand total of all accounts converted to the default report currency")
#t))
(gnc:register-configuration-option
(gnc:make-simple-boolean-option
(N_ "Summarybar") (N_ "Show non currency commodities")
"b" (N_ "Show non currency commodities")
#t))
(gnc:options-make-date-interval!
gnc:*options-entries* (N_ "Summarybar")
(N_ "Start date") (N_ "Start date for profit/loss calculation")
(N_ "End date") (N_ "End date for profit/loss and date for net assets calculation")
"c")
;;; Reconcile Options
(gnc:register-configuration-option

View File

@@ -64,7 +64,7 @@ run_tests (void)
val2str = scm_c_eval_string ("gnc:value->string");
g_return_if_fail (SCM_PROCEDUREP (val2str));
for (i = 0; i < 244; i++) {
for (i = 0; i < 1000; i++) {
q = get_random_query ();
test_query (q, val2str);
xaccFreeQuery (q);

View File

@@ -751,6 +751,7 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
gnc_numeric total;
gboolean reverse;
const char *name, *type;
char *lot_title;
Account *ccard_acct = NULL;
GncOwner *owner;
@@ -791,12 +792,18 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
if (!lot)
lot = gnc_lot_new (invoice->inst.book);
type = gncInvoiceGetType (invoice);
/* Set the lot title */
lot_title = g_strdup_printf ("%s %s", type, gncInvoiceGetID (invoice));
gnc_lot_set_title (lot, lot_title);
g_free (lot_title);
/* Create a new transaction */
txn = xaccMallocTransaction (invoice->inst.book);
xaccTransBeginEdit (txn);
name = gncOwnerGetName (gncOwnerGetEndOwner (gncInvoiceGetOwner (invoice)));
type = gncInvoiceGetType (invoice);
/* Set Transaction Description (Owner Name) , Num (invoice ID), Currency */
xaccTransSetDescription (txn, name ? name : "");

View File

@@ -176,52 +176,66 @@
(define (update-company-hash hash split bucket-intervals
reverse?)
(let* ((transaction (gnc:split-get-parent split))
(temp-owner (gnc:owner-create))
(owner (gnc:owner-from-split split temp-owner)))
(if
owner
(let* ((guid (gnc:owner-get-guid owner))
(this-currency (gnc:transaction-get-currency transaction))
(value (gnc:split-get-value split))
(this-date (gnc:transaction-get-date-posted transaction))
(company-info (hash-ref hash guid)))
(define (do-update value)
(let* ((transaction (gnc:split-get-parent split))
(temp-owner (gnc:owner-create))
(owner (gnc:owner-from-split split temp-owner)))
(gnc:debug "update-company-hash called")
(gnc:debug "owner: " owner ", guid: " guid)
(gnc:debug "split-value: " value)
(if reverse? (set! value (gnc:numeric-neg value)))
(if company-info
;; if it's an existing company, destroy the temp owner and
;; then make sure the currencies match
(begin
(gnc:owner-destroy temp-owner)
(if (not (gnc:commodity-equiv? this-currency
(company-get-currency company-info)))
(cons #f (sprintf (_ "Transactions relating to company %d contain \
(if
owner
(let* ((guid (gnc:owner-get-guid owner))
(this-currency (gnc:transaction-get-currency transaction))
(this-date (gnc:transaction-get-date-posted transaction))
(company-info (hash-ref hash guid)))
(gnc:debug "update-company-hash called")
(gnc:debug "owner: " owner ", guid: " guid)
(gnc:debug "split-value: " value)
(if reverse? (set! value (gnc:numeric-neg value)))
(if company-info
;; if it's an existing company, destroy the temp owner and
;; then make sure the currencies match
(begin
(gnc:owner-destroy temp-owner)
(if (not (gnc:commodity-equiv?
this-currency
(company-get-currency company-info)))
(cons #f (sprintf
(_ "Transactions relating to company %d contain \
more than one currency. This report is not designed to cope with this possibility.")))
(begin
(gnc:debug "it's an old company")
(if (gnc:numeric-negative-p value)
(process-invoice company-info (gnc:numeric-neg value) bucket-intervals this-date)
(process-payment company-info value))
(hash-set! hash guid company-info)
(cons #t guid))))
;; if it's a new company
(begin
(gnc:debug "value" value)
(let ((new-company (make-company this-currency owner)))
(if (gnc:numeric-negative-p value)
(process-invoice new-company (gnc:numeric-neg value) bucket-intervals this-date)
(process-payment new-company value))
(hash-set! hash guid new-company))
(cons #t guid))))
; else (no owner)
(gnc:owner-destroy temp-owner))))
(begin
(gnc:debug "it's an old company")
(if (gnc:numeric-negative-p value)
(process-invoice company-info (gnc:numeric-neg value) bucket-intervals this-date)
(process-payment company-info value))
(hash-set! hash guid company-info)
(cons #t guid))))
;; if it's a new company
(begin
(gnc:debug "value" value)
(let ((new-company (make-company this-currency owner)))
(if (gnc:numeric-negative-p value)
(process-invoice new-company (gnc:numeric-neg value) bucket-intervals this-date)
(process-payment new-company value))
(hash-set! hash guid new-company))
(cons #t guid))))
; else (no owner)
(gnc:owner-destroy temp-owner))))
;; figure out if this split is part of a closed lot
;; also save the split value...
(let* ((lot (gnc:split-get-lot split))
(value (gnc:split-get-value split))
(is-paid? (if (null? lot) #f (gnc:lot-closed? lot))))
;; if it's closed, then ignore it because it doesn't matter.
;; XXX: we _could_ just set the value to 0 in order to list
;; the company. I'm not sure what to do. Perhaps add an
;; option?
(if (not is-paid?)
(do-update value))))
;; get the total debt from the buckets
(define (buckets-get-total buckets)
@@ -277,10 +291,7 @@ more than one currency. This report is not designed to cope with this possibili
;; set up the query to get the splits in the chosen account
;; XXX: Need a better method to actually sort through the 'active'
;; transactions. Currently go back a year, but obviously we need
;; a way to tell that a transaction is 'paid'
;;; FIXME: begindate is a hack
;; XXX: FIXME: begindate is a hack -- we currently only go back a year
(define (setup-query query account date)
(define (date-copy date)
(cons (car date) (cdr date)))

View File

@@ -26,6 +26,9 @@ EXTRA_DIST = \
multicurrency-discussion.txt \
netlogin.txt \
query-api.txt \
guid.txt \
qif.txt \
generic-druid-framework.txt \
user-prefs-howto.txt

View File

@@ -18,3 +18,4 @@ gw-kvp.c
gw-kvp.h
gw-kvp.html
iso-4217-currencies.c
test-link

View File

@@ -1741,6 +1741,36 @@ xaccAccountConvertBalanceToCurrency(Account *account, /* for book */
return balance;
}
/*
* Convert a balance from one currency to another with price of
* a given date.
*/
gnc_numeric
xaccAccountConvertBalanceToCurrencyAsOfDate(Account *account, /* for book */
gnc_numeric balance,
gnc_commodity *balance_currency,
gnc_commodity *new_currency,
time_t date)
{
QofBook *book;
GNCPriceDB *pdb;
Timespec ts;
if (gnc_numeric_zero_p (balance) ||
gnc_commodity_equiv (balance_currency, new_currency))
return balance;
book = xaccGroupGetBook (xaccAccountGetRoot (account));
pdb = gnc_book_get_pricedb (book);
ts.tv_sec = date;
ts.tv_nsec = 0;
balance = gnc_pricedb_convert_balance_nearest_price(pdb, balance, balance_currency, new_currency, ts);
return balance;
}
/*
* Given an account and a GetBalanceFn pointer, extract the requested
* balance from the account and then convert it to the desired

View File

@@ -337,6 +337,12 @@ gnc_numeric xaccAccountConvertBalanceToCurrency(Account *account, /* for book */
gnc_numeric balance,
gnc_commodity *balance_currency,
gnc_commodity *new_currency);
gnc_numeric xaccAccountConvertBalanceToCurrencyAsOfDate(Account *account, /* for book */
gnc_numeric balance,
gnc_commodity *balance_currency,
gnc_commodity *new_currency,
time_t date);
gnc_numeric xaccAccountGetBalanceInCurrency (Account *account,
gnc_commodity *report_commodity,
gboolean include_children);

View File

@@ -280,10 +280,17 @@ gnc_numeric xaccTransGetAccountValue (const Transaction *trans,
/**
* The xaccTransOrder(ta,tb) method is useful for sorting.
* return a negative value if transaction ta is dated earlier than tb,
* return a positive value if transaction ta is dated later than tb,
* then compares num and description values, using the strcmp()
* c-library routine, returning what strcmp would return.
* Orders ta and tb
* return <0 if ta sorts before tb
* return >0 if ta sorts after tb
* return 0 if they are absolutely equal
*
* The comparrison uses the following fields, in order:
* date posted (compare as a date)
* num field (compare as an integer)
* date entered (compare as a date)
* description field (comcpare as a string using strcmp())
* GUID (compare as a guid)
* Finally, it returns zero if all of the above match.
* Note that it does *NOT* compare its member splits.
*/

View File

@@ -208,7 +208,8 @@ gnc_report_clock (int clockno, gncModuleType module, gncLogLevel log_level,
if (!fout) gnc_log_init();
fprintf (fout, "Clock %d Elapsed: %ld.%06lds %s: ",
clockno, now.tv_sec, now.tv_usec, gnc_log_prettify (function_name));
clockno, (long int) now.tv_sec, (long int) now.tv_usec,
gnc_log_prettify (function_name));
va_start (ap, format);
@@ -239,8 +240,8 @@ gnc_report_clock_total (int clockno,
fprintf (fout, "Clock %d Total Elapsed: %ld.%06lds %s: ",
clockno,
gnc_clock_total[clockno].tv_sec,
gnc_clock_total[clockno].tv_usec,
(long int) gnc_clock_total[clockno].tv_sec,
(long int) gnc_clock_total[clockno].tv_usec,
gnc_log_prettify (function_name));
va_start (ap, format);
@@ -252,5 +253,11 @@ gnc_report_clock_total (int clockno,
fprintf (fout, "\n");
}
gboolean
gnc_should_log(gncModuleType module, gncLogLevel log_level)
{
return (log_level <= gnc_log_modules[module]);
}
/************************* END OF FILE ******************************\
\********************************************************************/

View File

@@ -77,7 +77,7 @@ typedef enum
GNC_LOG_TRACE = 6,
} gncLogLevel;
extern gncLogLevel gnc_log_modules[MOD_LAST + 1];
//extern gncLogLevel gnc_log_modules[MOD_LAST + 1];
/** Initialize the error logging subsystem */
void gnc_log_init (void);
@@ -104,9 +104,17 @@ const char * gnc_log_prettify (const char *name);
* a CPU-cucking subroutine call. Thus, this is a #define, not a
* subroutine call. The prototype would have been:
* gboolean gnc_should_log (gncModuleType module, gncLogLevel log_level);
*
* Unfortunately this doesn't work due to circular dependencies and
* undefined symbols, so let's return it to a function call. The real
* problem appears to be that gnc_log_modules isn't being exported
* so engine-helpers.c has an undefined symbol when linked into libgw-engine
* -- Derek Atkins <derek@ihtfp.com> 2004-01-06
*
* #define gnc_should_log(module,log_level) \
* (log_level <= gnc_log_modules[module])
*/
#define gnc_should_log(module,log_level) \
(log_level <= gnc_log_modules[module])
gboolean gnc_should_log(gncModuleType module, gncLogLevel log_level);
#define FUNK gnc_log_prettify(__FUNCTION__)
@@ -124,55 +132,55 @@ const char * gnc_log_prettify (const char *name);
#define FATAL(format, args...) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, \
"Fatal Error: %s(): " format, FUNK, ## args); \
"Fatal Error: %s(): " format, FUNK , ## args); \
}
#define PERR(format, args...) { \
if (gnc_should_log (module, GNC_LOG_ERROR)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, \
"Error: %s(): " format, FUNK, ## args); \
"Error: %s(): " format, FUNK , ## args); \
} \
}
#define PWARN(format, args...) { \
if (gnc_should_log (module, GNC_LOG_WARNING)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, \
"Warning: %s(): " format, FUNK, ## args); \
"Warning: %s(): " format, FUNK , ## args); \
} \
}
#define PINFO(format, args...) { \
if (gnc_should_log (module, GNC_LOG_INFO)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, \
"Info: %s(): " format, FUNK, ## args); \
"Info: %s(): " format, FUNK , ## args); \
} \
}
#define DEBUG(format, args...) { \
if (gnc_should_log (module, GNC_LOG_DEBUG)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"Debug: %s(): " format, FUNK, ## args); \
"Debug: %s(): " format, FUNK , ## args); \
} \
}
#define ENTER(format, args...) { \
if (gnc_should_log (module, GNC_LOG_DEBUG)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"Enter: %s" format, FUNK, ## args); \
"Enter: %s" format, FUNK , ## args); \
} \
}
#define LEAVE(format, args...) { \
if (gnc_should_log (module, GNC_LOG_DEBUG)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"Leave: %s" format, FUNK, ## args); \
"Leave: %s" format, FUNK , ## args); \
} \
}
#define TRACE(format, args...) { \
if (gnc_should_log (module, GNC_LOG_TRACE)) { \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
"Trace: %s(): " format, FUNK, ## args); \
"Trace: %s(): " format, FUNK , ## args); \
} \
}
@@ -201,19 +209,19 @@ void gnc_report_clock_total (int clockno,
#define START_CLOCK(clockno,format, args...) { \
if (gnc_should_log (module, GNC_LOG_INFO)) \
gnc_start_clock (clockno, module, GNC_LOG_INFO, \
__FUNCTION__, format, ## args); \
__FUNCTION__, format , ## args); \
}
#define REPORT_CLOCK(clockno,format, args...) { \
if (gnc_should_log (module, GNC_LOG_INFO)) \
gnc_report_clock (clockno, module, GNC_LOG_INFO, \
__FUNCTION__, format, ## args); \
__FUNCTION__, format , ## args); \
}
#define REPORT_CLOCK_TOTAL(clockno,format, args...) { \
if (gnc_should_log (module, GNC_LOG_INFO)) \
gnc_report_clock_total (clockno, module, GNC_LOG_INFO, \
__FUNCTION__, format, ## args); \
__FUNCTION__, format , ## args); \
}
#endif /* GNC_TRACE_H */

View File

@@ -28,7 +28,6 @@
"#include <gnc-commodity.h>\n"
"#include <gnc-date.h>\n"
"#include <gnc-engine.h>\n"
"#include <gnc-engine-util.h>\n"
"#include <gnc-event.h>\n"
"#include <gnc-numeric.h>\n"
"#include <gnc-pricedb.h>\n"

View File

@@ -440,7 +440,7 @@ get_random_kvp_value_depth (int type, gint depth)
break;
case KVP_TYPE_DOUBLE:
return kvp_value_new_double(get_random_double());
return NULL;
break;
case KVP_TYPE_NUMERIC:
@@ -1355,7 +1355,7 @@ get_random_query(void)
Query *q;
int num_terms;
num_terms = get_random_int_in_range (1, 4);
num_terms = get_random_int_in_range (1, 3);
if (gnc_engine_debug_random) printf("num_terms = %d", num_terms);
q = xaccMallocQuery ();

View File

@@ -22,6 +22,7 @@ LDADD = \
# that they should be executed, with more basic tests coming first.
#
TESTS = \
test-link \
test-load-engine \
test-guid \
test-date \
@@ -54,6 +55,7 @@ TESTS_ENVIRONMENT := \
$(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
noinst_PROGRAMS = \
test-link \
test-commodities \
test-date \
test-freq-spec \
@@ -71,6 +73,9 @@ noinst_PROGRAMS = \
test-transaction-reversal \
test-transaction-voiding
test_link_SOURCES = test-link.c
test_link_LDADD = ../libgncmod-engine.la
EXTRA_DIST = \
test-create-account \
test-create-account.scm \

View File

@@ -243,9 +243,40 @@ pedit_dialog_response (GtkDialog *dialog, gint response, gpointer data)
static void
commodity_changed_cb (GNCGeneralSelect *gsl, gpointer data)
{
GNCBook *book;
GNCPriceDB *pdb;
gnc_commodity *commodity = NULL;
gnc_commodity *currency = NULL;
GList *price_list;
PriceEditDialog *pedit_dialog = data;
gnc_prices_set_changed (pedit_dialog, TRUE);
commodity = gnc_general_select_get_selected
(GNC_GENERAL_SELECT (pedit_dialog->commodity_edit));
if(commodity)
{
book = gnc_price_get_book (pedit_dialog->price);
pdb = gnc_book_get_pricedb (book);
price_list = gnc_pricedb_lookup_latest_any_currency (pdb, commodity);
if(price_list)
{
currency = gnc_price_get_currency((GNCPrice *)price_list->data);
if (currency)
gnc_currency_edit_set_currency
(GNC_CURRENCY_EDIT (pedit_dialog->currency_edit), currency);
gnc_price_list_destroy(price_list);
}
else
{
gnc_currency_edit_set_currency
(GNC_CURRENCY_EDIT (pedit_dialog->currency_edit), gnc_default_currency());
}
}
}
static void

View File

@@ -48,6 +48,7 @@ typedef struct {
GtkWidget * totals_combo;
GList * totals_list;
int component_id;
SCM callback_id;
} GNCMainSummary;
#define WINDOW_SUMMARYBAR_CM_CLASS "summary-bar"
@@ -63,6 +64,7 @@ typedef struct {
gnc_commodity * currency;
gnc_numeric assets;
gnc_numeric profits;
gint total_mode;
} GNCCurrencyAcc;
@@ -70,7 +72,8 @@ typedef struct {
*
* This is maintained for the duration, where there is one per
* currency, plus (eventually) one for the default currency
* accumulation (like the EURO). */
* accumulation (like the EURO) or grand total or non currency
* commodities total. */
typedef struct {
char *namespace;
@@ -79,9 +82,30 @@ typedef struct {
GtkWidget *assets_label;
GtkWidget *profits_label;
gint touched : 1;
gint total_mode;
} GNCCurrencyItem;
/* defines for total_mode in GNCCurrencyAcc and GNCCurrencyItem */
#define TOTAL_SINGLE 0
#define TOTAL_CURR_TOTAL 1
#define TOTAL_NON_CURR_TOTAL 2
#define TOTAL_GRAND_TOTAL 3
/* options for summarybar */
typedef struct {
gnc_commodity *default_currency;
gboolean euro;
gboolean grand_total;
gboolean non_currency;
time_t start_date;
time_t end_date;
} GNCSummarybarOptions;
/* Build a single currency item.
*
* This function handles the building of a single currency item for
@@ -89,7 +113,7 @@ typedef struct {
* but now only handles a single currency. */
static GNCCurrencyItem *
gnc_ui_build_currency_item(gnc_commodity * currency)
gnc_ui_build_currency_item(gnc_commodity * currency, gint total_mode)
{
GtkWidget *label;
GtkWidget *topbox;
@@ -107,6 +131,8 @@ gnc_ui_build_currency_item(gnc_commodity * currency)
item->namespace = g_strdup (gnc_commodity_get_namespace (currency));
item->mnemonic = g_strdup (gnc_commodity_get_mnemonic (currency));
item->total_mode = total_mode;
listitem = gtk_list_item_new();
item->listitem = listitem;
@@ -126,8 +152,26 @@ gnc_ui_build_currency_item(gnc_commodity * currency)
gtk_widget_show(hbox);
gtk_box_pack_start(GTK_BOX(topbox), hbox, FALSE, FALSE, 5);
label_str = g_strdup_printf ("%s (%s):", _("Net Assets"),
mnemonic ? mnemonic : "");
switch(total_mode)
{
case TOTAL_CURR_TOTAL:
label_str = g_strdup_printf ("%s (%s):", _("Net Assets total"),
mnemonic ? mnemonic : "");
break;
case TOTAL_NON_CURR_TOTAL:
label_str = g_strdup_printf ("%s (%s):", _("Net Assets non currency commodities total"),
mnemonic ? mnemonic : "");
break;
case TOTAL_GRAND_TOTAL:
label_str = g_strdup_printf ("%s (%s):", _("Net Assets grand total"),
mnemonic ? mnemonic : "");
break;
case TOTAL_SINGLE:
default:
label_str = g_strdup_printf ("%s (%s):", _("Net Assets"),
mnemonic ? mnemonic : "");
break;
}
label = gtk_label_new(label_str);
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
gtk_widget_show(label);
@@ -144,8 +188,26 @@ gnc_ui_build_currency_item(gnc_commodity * currency)
gtk_widget_show(hbox);
gtk_box_pack_start(GTK_BOX(topbox), hbox, FALSE, FALSE, 5);
label_str = g_strdup_printf ("%s (%s):", _("Profits"),
mnemonic ? mnemonic : "");
switch(total_mode)
{
case TOTAL_CURR_TOTAL:
label_str = g_strdup_printf ("%s (%s):", _("Profits total"),
mnemonic ? mnemonic : "");
break;
case TOTAL_NON_CURR_TOTAL:
label_str = g_strdup_printf ("%s (%s):", _("Profits non currency commodities total"),
mnemonic ? mnemonic : "");
break;
case TOTAL_GRAND_TOTAL:
label_str = g_strdup_printf ("%s (%s):", _("Profits grand total"),
mnemonic ? mnemonic : "");
break;
case TOTAL_SINGLE:
default:
label_str = g_strdup_printf ("%s (%s):", _("Profits"),
mnemonic ? mnemonic : "");
break;
}
label = gtk_label_new(label_str);
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
gtk_widget_show(label);
@@ -182,7 +244,8 @@ gnc_ui_currency_item_destroy (GNCCurrencyItem *item)
* This will search the given list, and if no accumulator is found,
* will allocate a fresh one. */
static GNCCurrencyAcc *
gnc_ui_get_currency_accumulator(GList **list, gnc_commodity * currency)
gnc_ui_get_currency_accumulator(GList **list, gnc_commodity * currency,
gint total_mode)
{
GList *current;
GNCCurrencyAcc *found;
@@ -190,7 +253,8 @@ gnc_ui_get_currency_accumulator(GList **list, gnc_commodity * currency)
for (current = g_list_first(*list); current;
current = g_list_next(current)) {
found = current->data;
if (gnc_commodity_equiv(currency, found->currency)) {
if ((gnc_commodity_equiv(currency, found->currency)) &&
(found->total_mode == total_mode)) {
return found;
}
}
@@ -199,6 +263,7 @@ gnc_ui_get_currency_accumulator(GList **list, gnc_commodity * currency)
found->currency = currency;
found->assets = gnc_numeric_zero ();
found->profits = gnc_numeric_zero ();
found->total_mode = total_mode;
*list = g_list_append (*list, found);
return found;
@@ -206,7 +271,8 @@ gnc_ui_get_currency_accumulator(GList **list, gnc_commodity * currency)
static gboolean
gnc_ui_currency_item_match (const GNCCurrencyItem *item,
const gnc_commodity *commodity)
const gnc_commodity *commodity,
gint total_mode)
{
if (!item || !commodity) return FALSE;
@@ -214,7 +280,8 @@ gnc_ui_currency_item_match (const GNCCurrencyItem *item,
(safe_strcmp (item->namespace,
gnc_commodity_get_namespace (commodity)) == 0) &&
(safe_strcmp (item->mnemonic,
gnc_commodity_get_mnemonic (commodity)) == 0);
gnc_commodity_get_mnemonic (commodity)) == 0) &&
(item->total_mode == total_mode);
}
@@ -229,6 +296,7 @@ gnc_ui_currency_item_match (const GNCCurrencyItem *item,
static GNCCurrencyItem *
gnc_ui_get_currency_item (GList **list,
gnc_commodity * currency,
gint total_mode,
GtkWidget *holder)
{
GList *current;
@@ -239,11 +307,11 @@ gnc_ui_get_currency_item (GList **list,
{
found = current->data;
if (gnc_ui_currency_item_match (found, currency))
if (gnc_ui_currency_item_match (found, currency, total_mode))
return found;
}
found = gnc_ui_build_currency_item(currency);
found = gnc_ui_build_currency_item(currency, total_mode);
*list = g_list_append(*list, found);
current = g_list_append(NULL, found->listitem);
@@ -254,29 +322,24 @@ gnc_ui_get_currency_item (GList **list,
static void
gnc_ui_accounts_recurse (AccountGroup *group, GList **currency_list,
gboolean euro)
GNCSummarybarOptions options)
{
gnc_numeric amount;
gnc_numeric start_amount;
gnc_numeric start_amount_default_currency;
gnc_numeric end_amount;
gnc_numeric end_amount_default_currency;
AccountGroup *children;
GNCAccountType account_type;
gnc_commodity * account_currency;
gnc_commodity * default_currency;
gnc_commodity * euro_commodity;
GNCCurrencyAcc *currency_accum;
GNCCurrencyAcc *currency_accum = NULL;
GNCCurrencyAcc *euro_accum = NULL;
GNCCurrencyAcc *grand_total_accum = NULL;
GNCCurrencyAcc *non_curr_accum = NULL;
GList *list;
GList *node;
gboolean non_currency = FALSE;
default_currency = gnc_default_currency ();
if (euro)
{
euro_commodity = gnc_get_euro ();
euro_accum = gnc_ui_get_currency_accumulator(currency_list,
euro_commodity);
}
else
euro_commodity = NULL;
list = xaccGroupGetAccountList (group);
for (node = list; node; node = node->next)
@@ -286,8 +349,35 @@ gnc_ui_accounts_recurse (AccountGroup *group, GList **currency_list,
account_type = xaccAccountGetType(account);
account_currency = xaccAccountGetCommodity(account);
children = xaccAccountGetChildren(account);
currency_accum = gnc_ui_get_currency_accumulator(currency_list,
account_currency);
if(options.grand_total)
grand_total_accum = gnc_ui_get_currency_accumulator(currency_list,
options.default_currency,
TOTAL_GRAND_TOTAL);
if (options.euro)
{
euro_commodity = gnc_get_euro ();
euro_accum = gnc_ui_get_currency_accumulator(currency_list,
euro_commodity,
TOTAL_CURR_TOTAL);
}
else
euro_commodity = NULL;
if(safe_strcmp(gnc_commodity_get_namespace(account_currency),
GNC_COMMODITY_NS_ISO) != 0) {
non_currency = TRUE;
non_curr_accum = gnc_ui_get_currency_accumulator(currency_list,
options.default_currency,
TOTAL_NON_CURR_TOTAL);
}
if(!non_currency || options.non_currency) {
currency_accum = gnc_ui_get_currency_accumulator(currency_list,
account_currency,
TOTAL_SINGLE);
}
switch (account_type)
{
@@ -300,47 +390,104 @@ gnc_ui_accounts_recurse (AccountGroup *group, GList **currency_list,
case LIABILITY:
case PAYABLE:
case RECEIVABLE:
amount = gnc_ui_account_get_balance (account, FALSE);
/* unreverse sign */
if (gnc_reverse_balance (account))
amount = gnc_numeric_neg (amount);
end_amount = xaccAccountGetBalanceAsOfDate(account, options.end_date);
end_amount_default_currency = xaccAccountConvertBalanceToCurrencyAsOfDate
(account, end_amount, account_currency, options.default_currency,
options.end_date);
currency_accum->assets =
gnc_numeric_add (currency_accum->assets, amount,
gnc_commodity_get_fraction (account_currency),
GNC_RND_ROUND);
if(!non_currency || options.non_currency) {
currency_accum->assets =
gnc_numeric_add (currency_accum->assets, end_amount,
gnc_commodity_get_fraction (account_currency),
GNC_RND_ROUND);
}
if (euro && (currency_accum != euro_accum))
if(non_currency) {
non_curr_accum->assets =
gnc_numeric_add (non_curr_accum->assets, end_amount_default_currency,
gnc_commodity_get_fraction (options.default_currency),
GNC_RND_ROUND);
}
if(options.grand_total) {
grand_total_accum->assets =
gnc_numeric_add (grand_total_accum->assets, end_amount_default_currency,
gnc_commodity_get_fraction (options.default_currency),
GNC_RND_ROUND);
}
if (options.euro && (currency_accum != euro_accum)) {
euro_accum->assets =
gnc_numeric_add (euro_accum->assets,
gnc_convert_to_euro(account_currency, amount),
gnc_convert_to_euro(account_currency, end_amount),
gnc_commodity_get_fraction (euro_commodity),
GNC_RND_ROUND);
}
if (children != NULL)
gnc_ui_accounts_recurse(children, currency_list, euro);
gnc_ui_accounts_recurse(children, currency_list, options);
break;
case INCOME:
case EXPENSE:
amount = gnc_ui_account_get_balance (account, FALSE);
/* unreverse sign */
if (gnc_reverse_balance (account))
amount = gnc_numeric_neg (amount);
start_amount = xaccAccountGetBalanceAsOfDate(account, options.start_date);
start_amount_default_currency = xaccAccountConvertBalanceToCurrencyAsOfDate
(account, start_amount, account_currency, options.default_currency,
options.start_date);
end_amount = xaccAccountGetBalanceAsOfDate(account, options.end_date);
end_amount_default_currency = xaccAccountConvertBalanceToCurrencyAsOfDate
(account, end_amount, account_currency, options.default_currency,
options.end_date);
currency_accum->profits =
gnc_numeric_sub (currency_accum->profits, amount,
gnc_commodity_get_fraction (account_currency),
GNC_RND_ROUND);
if(!non_currency || options.non_currency) {
currency_accum->profits =
gnc_numeric_add (currency_accum->profits, start_amount,
gnc_commodity_get_fraction (account_currency),
GNC_RND_ROUND);
currency_accum->profits =
gnc_numeric_sub (currency_accum->profits, end_amount,
gnc_commodity_get_fraction (account_currency),
GNC_RND_ROUND);
}
if (euro && (currency_accum != euro_accum))
euro_accum->profits =
gnc_numeric_sub (euro_accum->profits,
gnc_convert_to_euro(account_currency, amount),
if(non_currency) {
non_curr_accum->profits =
gnc_numeric_add (non_curr_accum->profits, start_amount_default_currency,
gnc_commodity_get_fraction (options.default_currency),
GNC_RND_ROUND);
non_curr_accum->profits =
gnc_numeric_sub (non_curr_accum->profits, end_amount_default_currency,
gnc_commodity_get_fraction (options.default_currency),
GNC_RND_ROUND);
}
if(options.grand_total) {
grand_total_accum->profits =
gnc_numeric_add (grand_total_accum->profits,
start_amount_default_currency,
gnc_commodity_get_fraction (options.default_currency),
GNC_RND_ROUND);
grand_total_accum->profits =
gnc_numeric_sub (grand_total_accum->profits,
end_amount_default_currency,
gnc_commodity_get_fraction (options.default_currency),
GNC_RND_ROUND);
}
if (options.euro && (currency_accum != euro_accum)) {
euro_accum->profits =
gnc_numeric_add (euro_accum->profits,
gnc_convert_to_euro(account_currency, start_amount),
gnc_commodity_get_fraction (euro_commodity),
GNC_RND_ROUND);
euro_accum->profits =
gnc_numeric_sub (euro_accum->profits,
gnc_convert_to_euro(account_currency, end_amount),
gnc_commodity_get_fraction (euro_commodity),
GNC_RND_ROUND);
}
if (children != NULL)
gnc_ui_accounts_recurse(children, currency_list, euro);
gnc_ui_accounts_recurse(children, currency_list, options);
break;
case EQUITY:
/* no-op, see comments at top about summing assets */
@@ -365,8 +512,9 @@ gnc_ui_accounts_recurse (AccountGroup *group, GList **currency_list,
* EUR amounts and a EUR (total) line which summs up all EURO
* member currencies.
*
* There should be a 'grand total', too, which sums up all accounts
* converted to one common currency. */
* There can be a 'grand total', too, which sums up all accounts
* converted to one common currency and a total of all non
* currency commodities (e.g. stock, funds). */
static void
gnc_main_window_summary_refresh (GNCMainSummary * summary)
@@ -374,26 +522,44 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
AccountGroup *group;
char asset_string[256];
char profit_string[256];
gnc_commodity * default_currency;
GNCCurrencyAcc *currency_accum;
GNCCurrencyItem *currency_item;
GList *currency_list;
GList *current;
gboolean euro;
GNCSummarybarOptions options;
default_currency = gnc_default_currency ();
euro = gnc_lookup_boolean_option("International",
"Enable EURO support",
FALSE);
options.default_currency = gnc_default_report_currency ();
options.euro = gnc_lookup_boolean_option("International",
"Enable EURO support",
FALSE);
options.grand_total = gnc_lookup_boolean_option("Summarybar",
"Show grand total",
TRUE);
options.non_currency = gnc_lookup_boolean_option("Summarybar",
"Show non currency commodities",
TRUE);
/* we will need the balance of the last transaction before the start
date, so subtract 1 from start date */
options.start_date = gnc_lookup_date_option("Summarybar", "Start date", NULL,
NULL, NULL, NULL) - 1;
options.end_date = gnc_lookup_date_option("Summarybar", "End date", NULL,
NULL, NULL, NULL);
currency_list = NULL;
/* grand total should be first in the list */
if(options.grand_total) {
gnc_ui_get_currency_accumulator (&currency_list, options.default_currency,
TOTAL_GRAND_TOTAL);
}
/* Make sure there's at least one accumulator in the list. */
gnc_ui_get_currency_accumulator (&currency_list, default_currency);
gnc_ui_get_currency_accumulator (&currency_list, options.default_currency,
TOTAL_SINGLE);
group = gnc_get_current_group ();
gnc_ui_accounts_recurse(group, &currency_list, euro);
gnc_ui_accounts_recurse(group, &currency_list, options);
for (current = g_list_first(summary->totals_list); current;
current = g_list_next(current)) {
@@ -406,6 +572,7 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
currency_accum = current->data;
currency_item = gnc_ui_get_currency_item(&summary->totals_list,
currency_accum->currency,
currency_accum->total_mode,
summary->totals_combo);
currency_item->touched = 1;
@@ -434,7 +601,8 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
currency_item = current->data;
if (currency_item->touched == 0 &&
!gnc_ui_currency_item_match(currency_item, default_currency)) {
!gnc_ui_currency_item_match(currency_item, options.default_currency,
TOTAL_SINGLE)) {
currency_list = g_list_prepend(currency_list, currency_item->listitem);
summary->totals_list = g_list_remove_link(summary->totals_list,
current);
@@ -456,6 +624,7 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
static void
gnc_main_window_summary_destroy_cb(GtkObject * obj, gpointer data) {
GNCMainSummary * summary = data;
gnc_unregister_option_change_callback_id(summary->callback_id);
gnc_unregister_gui_component(summary->component_id);
g_list_free(summary->totals_list);
g_free(summary);
@@ -467,11 +636,17 @@ summarybar_refresh_handler(GHashTable * changes, gpointer user_data) {
gnc_main_window_summary_refresh(summary);
}
static void
summarybar_option_change_handler(gpointer user_data) {
GNCMainSummary * summary = user_data;
gnc_main_window_summary_refresh(summary);
}
GtkWidget *
gnc_main_window_summary_new (void) {
GNCMainSummary * retval = g_new0(GNCMainSummary, 1);
GNCCurrencyItem * def_item;
gnc_commodity * default_currency = gnc_default_currency ();
gnc_commodity * default_currency = gnc_default_report_currency ();
retval->hbox = gtk_hbox_new (FALSE, 5);
retval->totals_combo = gtk_select_new ();
@@ -479,12 +654,17 @@ gnc_main_window_summary_new (void) {
retval->component_id = gnc_register_gui_component(WINDOW_SUMMARYBAR_CM_CLASS,
summarybar_refresh_handler,
NULL, retval);
retval->callback_id = gnc_register_option_change_callback(summarybar_option_change_handler,
retval,
"Summarybar",
NULL);
gnc_gui_component_watch_entity_type (retval->component_id,
GNC_ID_ACCOUNT,
GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
def_item = gnc_ui_get_currency_item (&retval->totals_list,
default_currency,
TOTAL_SINGLE,
retval->totals_combo);

View File

@@ -425,6 +425,7 @@ gnc_hbci_api_execute (GtkWidget *parent, HBCI_API *api,
return FALSE;
}
GNCInteractor_set_cache_valid (inter, TRUE);
if (resultcode <= 20) {
HBCI_Error_delete (err);
return TRUE;

View File

@@ -55,6 +55,7 @@ GNCInteractor *gnc_hbci_api_interactors (HBCI_API *api, GtkWidget *parent)
data = g_new0 (GNCInteractor, 1);
data->parent = parent;
data->keepAlive = TRUE;
data->cache_valid = FALSE;
data->cache_pin =
gnc_lookup_boolean_option(PREF_TAB_ONLINE_BANKING,
"HBCI Remember PIN in memory",
@@ -126,12 +127,19 @@ void GNCInteractor_delete(GNCInteractor *data)
data->dialog = NULL;
}
void GNCInteractor_set_cache_valid(GNCInteractor *i, gboolean value)
{
g_assert(i);
i->cache_valid = value;
}
void GNCInteractor_erasePIN(GNCInteractor *i)
{
g_assert(i);
if (i->pw != NULL)
g_free (memset (i->pw, 0, strlen (i->pw)));
i->pw = NULL;
i->cache_valid = FALSE;
i->user = NULL;
}
void GNCInteractor_reparent (GNCInteractor *i, GtkWidget *new_parent)
@@ -210,7 +218,7 @@ static int msgInputPin(const HBCI_User *user,
g_free (msgstr);
}
else {
if (user && (user == data->user)) {
if (data->cache_valid && user && (user == data->user)) {
/* Cached user matches, so use cached PIN. */
/*printf("Got the cached PIN for user %s.\n", HBCI_User_userId (user));*/
*pinbuf = g_strdup (data->pw);

View File

@@ -38,6 +38,7 @@ void GNCInteractor_hide(GNCInteractor *i);
void GNCInteractor_delete(GNCInteractor *i);
void GNCInteractor_erasePIN(GNCInteractor *i);
void GNCInteractor_reparent (GNCInteractor *i, GtkWidget *new_parent);
void GNCInteractor_set_cache_valid(GNCInteractor *i, gboolean value);
#endif

View File

@@ -77,6 +77,8 @@ struct _inter_data
/* The cached PIN and the HBCI_User it's cached for. */
char *pw;
const HBCI_User *user;
/* Whether this PIN is really valid or not. */
gboolean cache_valid;
};
void delete_GNCInteractor (GNCInteractor *data);

View File

@@ -28,68 +28,16 @@
;; This is one single end-date of a report.
(define (gnc:options-add-report-date!
options pagename optname sort-tag)
(gnc:register-option
options
(gnc:make-date-option
pagename optname
sort-tag (N_ "Select a date to report on")
(lambda ()
(cons 'relative 'today))
#f 'both
'(
today
end-this-month
end-prev-month
end-current-quarter
end-prev-quarter
end-cal-year
end-prev-year
end-cur-fin-year
end-prev-fin-year
))))
(gnc:options-make-end-date! options pagename optname sort-tag
(N_ "Select a date to report on")))
;; This is a date-interval for a report.
(define (gnc:options-add-date-interval!
options pagename name-from name-to sort-tag)
(gnc:register-option
options
(gnc:make-date-option
pagename name-from
(string-append sort-tag "a")
(N_ "Start of reporting period")
(lambda () (cons 'relative 'start-cal-year))
#f 'both
'(
today
start-this-month
start-prev-month
start-current-quarter
start-prev-quarter
start-cal-year
start-prev-year
start-cur-fin-year
start-prev-fin-year
)))
(gnc:register-option
options
(gnc:make-date-option
pagename name-to
(string-append sort-tag "b")
(N_ "End of reporting period")
(lambda () (cons 'relative 'today))
#f 'both
'(
today
end-this-month
end-prev-month
end-current-quarter
end-prev-quarter
end-cal-year
end-prev-year
end-cur-fin-year
end-prev-fin-year
))))
(gnc:options-make-date-interval! options pagename
name-from (N_ "Start of reporting period")
name-to (N_ "End of reporting period")
sort-tag))
;; A date interval multichoice option.
(define (gnc:options-add-interval-choice!