invoice payment: automatic liability account from invoice as default

2008-02-19 Thread Jannick Asmus
Hi,

in the invoice payment dialogue the displayed liability account could be 
the account already associated to the invoice. In my version I have to 
choose it. It might be a good to amend that in my opinion.

-- 
Best wishes,
J.

GC v2.2.3/WinXP
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: cannot find -lgnc-backend-file-utils

2008-02-19 Thread Derek Atkins
Hi,

Please remember to cc gnucash-devel on all your replies using
your mailer's Reply-To-List or Reply-All features..

"Martin Meyer" <[EMAIL PROTECTED]> writes:

> No, this ebuild forces -j1. I actually asked about that in IRC and was
> told that gnucash is known not to play will with paralell building.
> Also, I did an ls and that .la file definitely *does* exist in the
> build tree.

What happens if you run "make" a second time?
(Note:  I said "make", not "rebuild the package")

-derek

> Martin
>
> On Feb 18, 2008 11:09 PM, Derek Atkins <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> By any chance are you running "make -j 2"  (or make -j with any
>> number > 1)?  I only ask because it's possible that there's a
>> race condition and it's trying to build the second library
>> before the first.
>>
>> -derek
>>
>>
>> Quoting Martin Meyer <[EMAIL PROTECTED]>:
>>
>> > Hi all!
>> >
>> > I'm working on a Gentoo box and I'm having issues getting gnucash
>> > 2.2.3 to build. The arch is amd64 (i.e. x86_64), and the processor is
>> > a core 2 quad. I spoke with jsled on IRC for a while and I seem to
>> > have stumped him on this issue. You can find the IRC log here:
>> >
>> > http://lists.gnucash.org/logs/2008/02/2008-02-18.html#T21:50:18
>> >
>> > Here's my build log from right before the failure:
>> >
>> > libtool: install: warning: relinking `libgncmod-backend-file.la'
>> > (cd
>> > /var/tmp/portage/app-office/gnucash-2.2.3-r1/work/gnucash-2.2.3/src/backend/file;
>> > /bin/sh ../../../libtool  --tag=CC --mode=relink
>> > x86_64-pc-linux-gnu-gcc -I.. -I../.. -DLOCALE_DIR="/usr/share/locale"
>> > -I../../../src/backend -I../../../src/engine -I../../../src/core-utils
>> > -I../../../lib/libc -I/usr/include/libxml2 -I../../../lib/libqof/qof
>> > -I../../../lib/libqof/qof -pthread -I/usr/include/glib-2.0
>> > -I/usr/lib64/glib-2.0/include -DORBIT2=1 -pthread
>> > -I/usr/include/gconf/2 -I/usr/include/orbit-2.0
>> > -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
>> > -Wdeclaration-after-statement -Wno-pointer-sign -D_FORTIFY_SOURCE=2
>> > -march=nocona -pipe -g -O2 -Wall -Wunused -Wmissing-prototypes
>> > -Wmissing-declarations -Wno-unused -module -avoid-version -g -o
>> > libgncmod-backend-file.la -rpath /usr/lib64/gnucash
>> > gnc-backend-file.lo -pthread -Wl,--export-dynamic -lgthread-2.0 -lrt
>> > -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lgconf-2 -lglib-2.0
>> > -lxml2 ../../../src/engine/libgncmod-engine.la
>> > ../../../src/core-utils/libgnc-core-utils.la
>> > ../../../src/backend/file/libgnc-backend-file-utils.la
>> > ../../../lib/libqof/qof/libgnc-qof.la -lpopt -lm -lm -inst-prefix-dir
>> > /var/tmp/portage/app-office/gnucash-2.2.3-r1/image/)
>> > x86_64-pc-linux-gnu-gcc -shared  .libs/gnc-backend-file.o  -Wl,--rpath
>> > -Wl,/usr/lib64/gnucash
>> > -L/var/tmp/portage/app-office/gnucash-2.2.3-r1/image//usr/lib64
>> > -L/usr/lib64 -lgthread-2.0 -lrt -lgobject-2.0 -lgmodule-2.0 -ldl
>> > -lgconf-2 -lglib-2.0 -lxml2
>> > -L/var/tmp/portage/app-office/gnucash-2.2.3-r1/image//usr/lib64/gnucash
>> > -L/usr/lib64/gnucash -lgncmod-engine -lgnc-core-utils
>> > -lgnc-backend-file-utils -lgnc-qof -lpopt -lm  -pthread -pthread
>> > -march=nocona -pthread -Wl,--export-dynamic -Wl,-soname
>> > -Wl,libgncmod-backend-file.so -o .libs/libgncmod-backend-file.so
>> > /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/../../../../x86_64-pc-linux-gnu/bin/ld:
>> > cannot find -lgnc-backend-file-utils
>> > collect2: ld returned 1 exit status
>> > libtool: install: error: relink `libgncmod-backend-file.la' with the
>> > above command before installing it
>> > make[6]: *** [install-pkglibLTLIBRARIES] Error 1
>> > make[6]: *** Waiting for unfinished jobs
>> > x86_64-pc-linux-gnu-gcc -shared  .libs/gnc-account-xml-v2.o
>> > .libs/gnc-book-xml-v2.o .libs/gnc-budget-xml-v2.o
>> > .libs/gnc-commodity-xml-v2.o .libs/gnc-freqspec-xml-v2.o
>> > .libs/gnc-lot-xml-v2.o .libs/gnc-pricedb-xml-v2.o
>> > .libs/gnc-recurrence-xml-v2.o .libs/gnc-schedxaction-xml-v2.o
>> > .libs/gnc-transaction-xml-v2.o .libs/io-example-account.o
>> > .libs/io-gncxml-gen.o .libs/io-gncxml-v1.o .libs/io-gncxml-v2.o
>> > .libs/io-utils.o .libs/sixtp-dom-generators.o
>> > .libs/sixtp-dom-parsers.o .libs/sixtp-stack.o
>> > .libs/sixtp-to-dom-parser.o .libs/sixtp-utils.o .libs/sixtp.o
>> > -Wl,--rpath -Wl,/usr/lib64/gnucash
>> > -L/var/tmp/portage/app-office/gnucash-2.2.3-r1/image//usr/lib64
>> > -L/usr/lib64 -lgthread-2.0 -lrt -lgobject-2.0 -lgmodule-2.0 -ldl
>> > -lgconf-2 -lglib-2.0 -lxml2
>> > -L/var/tmp/portage/app-office/gnucash-2.2.3-r1/image//usr/lib64/gnucash
>> > -L/usr/lib64/gnucash -lgncmod-engine -lgnc-core-utils -lgnc-qof -lpopt
>> > -lm  -pthread -pthread -march=nocona -pthread -Wl,--export-dynamic
>> > -Wl,-soname -Wl,libgnc-backend-file-utils.so.0 -o
>> > .libs/libgnc-backend-file-utils.so.0.0.0
>> > /usr/bin/install -c .libs/libgnc-backend-file-utils.so.0.0.0T
>> > /var/tmp/portage/app-office/gnucash-2.2.3-r1/image//usr/lib64/libgnc-backend-file-utils.so.0.

Re: cannot find -lgnc-backend-file-utils

2008-02-19 Thread Josh Sled
Derek Atkins <[EMAIL PROTECTED]> writes:
> By any chance are you running "make -j 2"  (or make -j with any
> number > 1)?  I only ask because it's possible that there's a
> race condition and it's trying to build the second library
> before the first.

No, the gentoo ebuild forces make -j1 to prevent this, and I confirmed that
Martin did not override that.  (There's a bit in the logs to that effect,
with a bit more embellishment if anyone cares.)

-- 
...jsled
http://asynchronous.org/ - a=jsled; b=asynchronous.org; echo [EMAIL PROTECTED]


pgptJfrIotCho.pgp
Description: PGP signature
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: GDA: PostgreSQL empty slots table

2008-02-19 Thread Daniel Espinosa
Please see at attachment for a patch to add AUTOINC (set type to
serial) on Postgresql.

Hops this helps to Phil in the problem to autoincrement Pkey at
Postgresql GDA provider,

This will close Bugs: #515306 and #515528


Just wait for gnome-db developers to review it.

2008/2/7, Mark Johnson <[EMAIL PROTECTED]>:
> The slots table includes an id field which is "auto_increment".
> PostgreSQL does not implement that keyword.  Instead, it appears to
> accept it, but ignore it when creating the table.  (This may actually be
> libgda's PostgreSQL provider doing that.)  Gnucash-gda relies upon that
> field auto-incrementing when inserts are done to the slots table.  The
> result is similar to this for every insert to the slots table:
> ERROR:  null value in column "slot_id" violates not-null constraint
> STATEMENT:  INSERT INTO slots (obj_guid, name, slot_type, int64_val,
> string_val, double_val, timespec_val, guid_val, numeric_val_num,
> numeric_val_denom) VALUES ('77889f8da5fb434ae68891da19bef5ad',
> 'reconcile-info/last-date', 1, 1199170799, NULL, NULL, '1969-12-31',
> NULL, 0, 1)
>
> When saving to the gda backend, both MySql and sqlite have many records
> in the slots table.  PostgreSQL ends up with none.
>
> Mark
>
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>


-- 
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (entrámite, pero para los
cuates: LIBRE)
Index: doc/C/libgda-3.0-docs.sgml
===
--- doc/C/libgda-3.0-docs.sgml	(revisión: 3056)
+++ doc/C/libgda-3.0-docs.sgml	(copia de trabajo)
@@ -207,6 +207,16 @@
 	libgda, gda-postgres, gda-mysql
 
   
+  
+Daniel
+Espinosa Ortiz
+
+  
+  [EMAIL PROTECTED]
+
+	libgda, gda-postgres, gda-mysql
+
+  
 
 1999 February
 
Index: doc/C/tmpl/gda-data-model-bdb.sgml
===
--- doc/C/tmpl/gda-data-model-bdb.sgml	(revisión: 3056)
+++ doc/C/tmpl/gda-data-model-bdb.sgml	(copia de trabajo)
@@ -29,17 +29,9 @@
 
 
 
[EMAIL PROTECTED]: 
[EMAIL PROTECTED]: 
 
-
-
-
-
-
-
-
-
-
-
 
 
 
Index: providers/postgres/gda-postgres-ddl.c
===
--- providers/postgres/gda-postgres-ddl.c	(revisión: 3056)
+++ providers/postgres/gda-postgres-ddl.c	(copia de trabajo)
@@ -155,8 +155,14 @@
 			g_string_append_c (string, '\"');
 			g_string_append_c (string, ' ');
 
-			value = gda_server_operation_get_value_at (op, "/FIELDS_A/@COLUMN_TYPE/%d", i);
-			g_string_append (string, g_value_get_string (value));
+			value = gda_server_operation_get_value_at (op, "/FIELDS_A/@COLUMN_AUTOINC/%d", i);
+			if (value)
+g_string_append (string, "serial");
+			else
+			{
+value = gda_server_operation_get_value_at (op, "/FIELDS_A/@COLUMN_TYPE/%d", i);
+g_string_append (string, g_value_get_string (value));
+			}
 
 			value = gda_server_operation_get_value_at (op, "/FIELDS_A/@COLUMN_SIZE/%d", i);
 			if (value && G_VALUE_HOLDS (value, G_TYPE_UINT)) {
Index: providers/postgres/postgres_specs_create_table.xml.in
===
--- providers/postgres/postgres_specs_create_table.xml.in	(revisión: 3056)
+++ providers/postgres/postgres_specs_create_table.xml.in	(copia de trabajo)
@@ -33,6 +33,7 @@
 
 
 
+
 
 
 
@@ -44,6 +45,7 @@
 
 
 FALSE
+TRUE
 FALSE
 TRUE
 
Index: providers/postgres/gda-postgres-provider.c
===
--- providers/postgres/gda-postgres-provider.c	(revisión: 3056)
+++ providers/postgres/gda-postgres-provider.c	(copia de trabajo)
@@ -1569,6 +1569,74 @@
 	return retval;
 }
 
+static GdaParameter *
+gda_postgres_provider_get_last_inserted_id (GdaServerProvider *provider,
+	  GdaConnection *cnc,
+	  GdaDataModel *recset)
+{
+	Oid oid;
+	PGresult *pgres;
+	GdaPostgresConnectionData *priv_data;
+	GdaPostgresProvider *pg_prv = (GdaPostgresProvider *) provider;
+
+	g_return_val_if_fail (GDA_IS_POSTGRES_PROVIDER (pg_prv), NULL);
+	g_return_val_if_fail (GDA_IS_CONNECTION (cnc), NULL);
+
+	priv_data = g_object_get_data (G_OBJECT (cnc), OBJECT_DATA_POSTGRES_HANDLE);
+	if (!priv_data) {
+		gda_connection_add_event_string (cnc, _("Invalid PostgreSQL handle"));
+		return NULL;
+	}
+
+	if (recset) {
+		g_return_val_if_fail (GDA_IS_POSTGRES_RECORDSET (recset), NULL);
+		/* get the PQresult from the recordset */
+		pgres = gda_postgres_recordset_get_pgresult (GDA_POSTGRES_RECORDSET (recset));
+		if (pgres) {
+			oid = PQoidValue (pgres);
+			if (oid != InvalidOid)
+			{
+GdaParameter *param;
+GValue *value;
+
+g_value_init (v

Re: GDA: Tables for things which are not objects

2008-02-19 Thread Derek Atkins
Phil Longstaff <[EMAIL PROTECTED]> writes:

> There are currently 3 tables which handle things which are not objects:
>
> 1) slots
> 2) recurrences
> 3) tax table entries
>
> One thing that the slot_id field provided was an ordering of the slots 
> for a specific object.  For slots, the order isn't important.  Is there 
> a reason that that recurrences or tax table entries need to be kept in a 
> specific order?  If so, I can still remove the id auto-increment field 
> but will need to add an ordering field so that obj_guid won't be unique 
> (but will be indexed), but the pair (obj_guid,order) will be unique.

Tax Table Entries are not ordered.  I DOUBT Recurrences are
ordered, either.  So, no, I don't think there needs to be any
particular order.

> Phil

-derek

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: invoice payment: automatic liability account from invoice as default

2008-02-19 Thread Derek Atkins
Jannick Asmus <[EMAIL PROTECTED]> writes:

> Hi,
>
> in the invoice payment dialogue the displayed liability account could be 
> the account already associated to the invoice. In my version I have to 
> choose it. It might be a good to amend that in my opinion.

Well, an invoice would be an Asset (A/R)..  But sure, send in a patch
to do this.  Sounds like a simple addition and would be a good feature
to add.  The problem, of course, is that you don't necessarily have an
Invoice when making a payment; you're processing the payment for a
Customer..  So you might not have anything with which to pull an Account.

-derek

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Plot details - barchart reports

2008-02-19 Thread Davide Imbeni
Hi Emmanuel,

On Feb 17, 2008 10:45 AM, Emmanuel Pacaud <[EMAIL PROTECTED]> wrote:
(...)
> It's probably incomplete for your use, but that can be improved. Just
> create a new goffice bug report, and tell us what you exactly want.

http://bugzilla.gnome.org/show_bug.cgi?id=517488

I hope what I wrote will be a useful indication. Please let me know if
I should add something (I don't regard myself as a developer,
unfortunately, and this was my first bug report...)

> > One additional question: I found hardly any documentation on the goffice
> > library, and got the impression it is only used by gnucash and gnumeric.
>
> "Only" used by gnumeric is already a significant use...
>
> > Have other alternatives been considered? Which could they be, and why
> > have they been discarded (apart from backwards compatibility / least
> > effort )?
>
> There's plenty of others plotting libraries around, but if you're looking
> for a plotting library that supports a significant number of chart types,
> has PDF, SVG, PS, EPS and image export facility, has a user interface for
> the configuration of the chart layout/appearence, a XML persistence and
> is actively developped, I think goffice is not a bad choice.

I can hardly judge on this, but it was not my intention to suggest
goffice is a bad choice. On the contrary.
Especially if it is actively developed, and it's possible to get a few
(possibly) small additional features.

Thanks for your suggestions.

Davide
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: GDA save missing records

2008-02-19 Thread Mark Johnson
Graham Leggett wrote:
> Keith Bellairs wrote:
>
>> Speaking as a user and not someone busting his butt on this, I hate 
>> the idea of "unlimited" everything when we go to a DB. Most of our 
>> databases have a mechanism (BLOB/CLOB) to store really big things, 
>> usually at the cost of indexing or searching (other than with special 
>> hacks -- Oracle Text, for example).
>>
>> gnc is not, and should not be, a doc mgmt system. I want fast, fast 
>> retrieval and summarization. Having a place to store a reference to a 
>> doc is a great idea; plugging up the data with the docs, not so much.
>>
>> Of course, it is unforgiveable to just drop rows. Even silently 
>> truncating data is pretty dubious. Don't know Postgres and Mysql; 
>> can't we throw an exception so we have a chance to do the right thing 
>> (what the user needs)?
>>
>> I'd ask the developers to pick some reasonable size for each column. 
>> Then publish the schema. Granted this is a big change from the 
>> unlimited everything, but it seems necessary. If I don't like your 
>> column size, I should be able to ALTER TABLE and set my own 
>> favorites, so please do not hard-code the column sizes into the code.
>
> The problem with this is that it introduces inconsistency into the 
> code. The XML backend has no concept of line lengths, and is so 
> "unlimited". The problem was originally found when an attempt was made 
> to import this "unlimited" data into a "limited" system, such as the 
> current DB system.
>
> Suddenly we have introduced the possibility that perfectly valid data 
> in one backend is no longer valid in another. Add to that a user 
> ability to change the line lengths and suddenly all bets are off.
>
> Fixed length string widths are an optimisation that helps if you are 
> manipulating fixed length strings, but if you aren't - such as with a 
> description in a register - the fixed length serves no purpose at all.
Technically, varchar(n) is not a fixed string length.  That would be 
char(n).  The varchar is a variable-length string with a maximum length. 

Each of MySql, PostgreSQL, and SQLite treat them differently on insert - 
truncation, rejection, and ignoring the maximum, respectively.
>
> As someone who spends a lot of time tracking down nasty problems in 
> software, I can tell you that this is exactly one of those seemingly 
> harmless issues that can cause some very difficult to find, and 
> therefore very expensive bugs in systems. In this case, it was only 
> found because mysql and postgresql have different behaviour when 
> string lengths are too long, and that was found by a very lucky accident.
Ahem, it was not an "accident"; it was a test.
>
> Regards,
> Graham
> -- 
Mark

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Installing QT

2008-02-19 Thread Stephen Grant Brown
Dear Sir/Madam,
I am attempting to build gnucash under in Microsoft XP running vmware on a 
Microsoft Vista machine.

In the "Instructions for an (almost) automated lbuild" file I think I printed 
from the Packaging dir,
it says to install QT.

Can someone please specify exactly for me all the responses I need for the 
various questions asked?

PS I am sorry if this info is contailed elsewhere on the gnucash site but I 
have yet to see it.

Yours Sincerely Stephen Grant Brown
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: cannot find -lgnc-backend-file-utils

2008-02-19 Thread Martin Meyer
> Please remember to cc gnucash-devel on all your replies using
> your mailer's Reply-To-List or Reply-All features..
Sorry about that, hit the wrong reply button :-/

> > No, this ebuild forces -j1. I actually asked about that in IRC and was
> > told that gnucash is known not to play will with paralell building.
> > Also, I did an ls and that .la file definitely *does* exist in the
> > build tree.
>
> What happens if you run "make" a second time?
> (Note:  I said "make", not "rebuild the package")
Running 'make' from working copy my ebuild failed off of seems to
complete successfully. After that worked, I did yet another emerge on
the package, and this time it works! Nothing seems to have changed
since it was failing yesterday. I went to sleep shortly after my post
last night and left the system idle until just now. I've got it to
build twice now! WTF!

I have no idea what's going on here. This failed more than a dozen
times yesterday. Well, thanks everyone for the help! If I can
re-produce this in the future I'll start a new thread and link to this
current one.

Cheers!
Martin
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


GDA Missing records in SQLite

2008-02-19 Thread Mark Johnson
By examining which transactions, accounts, and splits were missing from 
SQLite (as compared to MySQL), I was able to determine that anything 
which had a single quote in a string (description, name, & memo fields) 
failed to be inserted into SQLite.  This is a one-to-one 
correspondence.  i.e. anything that had a single quote failed.  These 
were the only records missing as compared to MySql.

At the moment, I am guessing that the SQLite provider does not properly 
escape such strings passed to it.  If so, the SQL INSERT statements 
would be illegal and fail.  (I've built just such a bug myself once 
using MySql.)

More study of the SQLite provider is required.  I did not find any 
existing bug reports regarding single quotes and the SQLite provider.  
If  I can confirm my guess, I'll file the bug report.

Mark

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel