Attachment of links to documents to bills, invoices, credit notes in addition to attachment to transactions
geert.gnucash at kobaltwit.be
Fri Apr 28 15:16:40 EDT 2017
I'm very happy you want to work on this! I believe it would make a good
addition to gnucash .
Using the kvp mechanism is a good approach. I also think the invoice dialog is
a good place to let the user add/alter the link to the attached document. As
you already suggest, in addition it can be added to the invoice window.
And yes, you can add fields that are editable regardless of the post state of
the invoice. The notes field is an example of such a field. The attachment
link can be treated similarly. It doesn't have to be a text field of course.
I'd have to ponder a bit to come up with the most elegant way to add this
feature. You could compare how similar options are handled in other
As to the relation between the invoice fields in the invoice dialog/window and
the transaction after posting: they are stored as two completely separate
objects in the data. There are a few kvp values linking them together. But to
create the transaction the relevant values are copied over from the invoice.
So the information you can still alter after the invoice is posted will not
affect the posted transaction.
You can also see this with the example you gave yourself: you can alter the
customer's name and that will reflect on the invoice. However already posted
transactions will not be updated. And payments won't be either.
So - by all means go for it! If you have questions, feel free to ask, either
here or on irc.
Good luck and enjoy!
 It's in the top 5 of most popular new feature requests on uservoice:
On vrijdag 28 april 2017 07:28:59 CEST DaveC49 wrote:
> Bug 780112 requested attachment of a link to a document to an invoice rather
> than the current link attachment
> s-td4665357.html) which is to the transaction created by the invoice.
> However that transaction doesn't exist before the invoice is posted so the
> link cannot be attached. Once the invoice is posted, the file link cannot
> be attached as the transaction cannot be edited while the invoice is posted
> and if it is unposted the associated transaction disappears again. This is
> not very useful for transactions from invoices (and presumably bills).
> My own use case is one in which I would normally want to associate an
> external (image or pdf) of an invoice ( sent to a customer) or bill (invoice
> received from a vendor) with the invoice or bill record internally in
> Gnucash. It makes more sense to me to associate the external file with an
> invoice or bill or credit note rather than with the transaction, at least
> for business users.
> For non business users where bills or invoices are not or may be rarely
> used, the current attachment to a transaction works fine ( at least under
> ubuntu16.04/Linux Mint).
> I would propose also including a link in the invoice/bill/credit note using
> the same KVP mechanism that John Ralls suggested to Patrick in the above
> thread and including a process for setting the link in the invoice dialog
> and displaying it on the View Invoice tab. I am not sure how the field
> locking works at present however the customer details appear to be editable
> and changes persist if a posted invoice is closed and then reopened. I am
> guessing from this that it should be possible to make non accounting fields
> which are not directly associated with the transaction editable in an
> invoice/bill/credit note and able to follow the link if it is clicked.
> I am interested in attempting to code this as a means of getting my feet wet
> in Gnucash's code. I would appreciate any feedback about whether this is
> desirable/redundant or whatever before spending too much time on it. Cheers
> David Cousens
> View this message in context:
> ml Sent from the GnuCash - Dev mailing list archive at Nabble.com.
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
More information about the gnucash-devel