Hi again,
Although I'm not 100% about Paolo's usage, I can imagine that a 32
byte "random" string is not quite what he had in mind.
For my own business accounting, every single transaction has to be
backed by a physical receipt. To easily search and identify the pile
of papers which quickly accumulate, each receipt is numbered, from 1
and up. The link between the papers and the accounting system is this
number. In other systems, this number is auto-incremented for each
new
transaction.
From my point of view, the requirements for this ID would be:
- Auto-increment for each new transaction.
- IDs of previously typed transactions should not be altered.
- +1 increment should continue even if a new transaction is
back-dated
to a date before a transaction with a lower ID.
- There should be a user defined starting ID.
- Padded zero's should be respected, e.g. 0001, or 09001.
- Based on what Paolo mentioned, there might also be a requirement to
define a more complex ID, i.e. based on country, department, etc:
UK-HR-2009-0001.
Regards,
Havard
Yawar Amin wrote:
Hi Paolo,
I can confirm that every transaction in Gnucash has a unique ID.
In fact
most entities inside a Gnucash file--accounts, transactions, splits,
currencies--have unique IDs. These are 32-character GUIDs, or
globally
unique identifiers, where each character is a digit in the
hexadecimal
radix. In short, you're pretty much guaranteed that every
transaction in
every Gnucash file in the world has a unique ID. However, I don't
think
these IDs are incremented one by one when new transactions are
added.
So you
can't do certain things, like calculate how many transactions
there are
between any two given transactions.
Having said that, I think the transaction GUID should satisfy
your admin
dept. Of course, these IDs aren't visible in the Gnucash user
interface.
You'll need to open up the XML file to examine them, or have a
program/script written which does that.
HTH,
Yawar
On Fri, May 22, 2009 at 3:00 AM, paolo palmerini
<[email protected]>wrote:
dear all,
i am a new gnucash user and i am trying to promote the wide scale
adoption of gnucash within my NGO, working in about 10 different
countries with different languages and currencies. gnucash seems
to be
the right software to manage our accounts but still there are a
couple
of issues that limit its unconditional adoption.
the first and most important requirement coming from my
organisation
admin department is the possibility of automatic numbering of
transactions across different accounts within the same gnucash
file.
from what i understand, at present gnucash provides a "num"
field for
each transaction that can be manually filled by the user and can
be automatically incremented within the same account typing the
"+" key on it. however, the system does not prevent from assigning
twice
the same number to different transactions within the same
account or
across different accounts.
my question is: is there a simple way to achieve this automatic
progressive numbering (with the possibility of resetting the
numbering
every year?). if not, where in the code would one have to put
his/her
hands to add this feature?
last question: am i the only one with such requirement? is there
another
way to get a unique transaction id?
thanks for any help,
p.