GDA: Status
Derek Atkins
warlord at MIT.EDU
Sat May 31 10:46:03 EDT 2008
Quoting Graham Leggett <minfrin at sharp.fm>:
> Derek Atkins wrote:
>
>> Unfortunately it's not that easy. That check is in there because the
>> underlying code uses the Value + AccountType to determine if this is an
>> "Invoice" or a "Payment". All the linkage logic is based on the invariant
>> that an Invoice is "positive" and a Payment is "negative" (obviously
>> the numeric positive/negative is different for A/R and A/P, but let's
>> not confuse the issue).
>
> Can you confirm in more detail exactly which part of the code makes
> this assumption?
gncInvoice.c
in particular the code that implements the invoice and payment processing
and the balancing code to make sure payment are split across invoices
properly.
I also believe (but I'm not 100% sure) that the code that looks
for an invoice from a transaction also makes that assumption.
> In the XML tree, a transaction that belongs to an invoice has slots
> attached with additional information saying a) that the transaction
> is an invoice or a payment (from "trans-txn-type"), and b) which
> invoice this transaction is associated with.
This has nothing to do with the data in the XML file. I honestly
forget why the txn-type was created, and I dont remember where
it's used.
> Changing the sign manually on an invoice and saving the file shows
> correct figures for that particular customer, both from within
> gnucash, and from within my web statements (which ignore the sign of
> the transactions completely).
Yes, but it'll screw up the lot balancing that's used for when an invoice
is paid and determining which lot to use for posting.
> Is the sign check shortcut being used in other reports?
AFAIK it's not used in the reports at all, at least not directly.
> Regards,
> Graham
-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
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list