Comments (4)
This is something that I have been thinking about too. Incremented pre-numbered records have been used as an internal control in accounting for a long time. Take for example checks, each with their own number auto-incrementing along a sequence. All forms of documentation and record-keeping were sequentially prenumbered before the move to electronic record keeping. If a check is missing in the sequence, the question arises from the auditor, "what happened to it". Voided or misprinted checks need to be retained by the treasury department for a period of a year to substantiate these gaps. The logic behind this is in a well-designed accounting department, records of a certain class [checks, vouchers, receipts, deposits, credit card charges, journal entries] should not break the sequence regularly. This is an indicator of a poorly operating accounting department and elevates the risk of error. So as an auditor, if I see a lot of gaps or missing elements in a sequence, I know that something is not working as it should be, and I increase my professional skepticism and substantive testing.
Auto-increment answers the question "are there gaps?". It does not answer, who what when where why. I don't think that auto-increment is absolutely needed as long as the system can report these gaps and the reasons/players in some fashion. There is also the consideration that some organizations, individuals, or whoever will not buy into DjangoLedger if auto-increment isn't a part of the system. My wife was in auditing and could speak more to that, I'll ask her.
I envision that if a record is to be deleted, a reason must be submitted by one user and approved by a manager or another person. this would satisfy the needed segregation of duties for proper internal controls. My other idea would be that records of a certain type have a regex-like id. Journal entries would be JE1, JE2, .....JE101. Vendor Vouchers would be VV1......VV101, etc. This would allow the records to be discernable by class and incrimented.
from django-ledger.
A good article on the subject.
UUID or GUID as Primary Keys?
from django-ledger.
Good stuff.
Cheers
from django-ledger.
UUIDs guarantee that each record has a unique identifier regardless of the data store. This condition is particularly important and useful for GAAP compliance, accounting and auditing purposes. There are many benefits of having UUIDs for each record, especially if integrating with other technologies, in particular distributed systems which are important nowadays to develop applications that scale. Also, using plain auto_increment IDs may leak sensible information if using them in the URL.
The article you mention is 11 years old, so I'd like to think that modern databases have gotten a lot better at managing and using UUIDs for primary keys as they have implemented native UUID Data types. I don't think storage is an issue nowadays. A primary UUID key is also indexed for performance. However, I can see why they may not outperform AUTO_INCREMENT.
While I don't like the idea of delegating the task of ID generation to a single database, there may be a benefit for using both, AUTO_INCREMENT and UUIDs on each model. This is something I've been debating and I'm sure that a happy medium can be found.
Also, I believe there's opportunity to design better looking URLs with proper DB indexing, especially for POs, bills and invoices by using their respective numbers or slugs.
This may be a good topic to further discuss.
from django-ledger.
Related Issues (20)
- Audit Trail and Logging records
- Adding validations and Check for the User Inputs to the fields HOT 1
- Adding More Columns for capturing Other Important Details of the Vendor , Customer, Items HOT 3
- Assets Number : Assets Accounting should always be Unique across an entity for lifetime.
- Please create a requirements.txt file
- TypeError after Get request to '/ledger/entity/create/' with all the optional fields checked. HOT 3
- I can't install HOT 6
- Journals entries timestamps are all recorded as midnight regardless of the timezone
- A server error occurred. Please contact the administrator. HOT 1
- python manage.py runserver Not working. HOT 3
- The invite link for discord is invalid or expired HOT 3
- KeyError at /admin/django_ledger/entitymodel/<UUID>/change/ HOT 2
- import from ledger/hledger and similar plain text accounting formats HOT 1
- docker compose file HOT 4
- VAT (value added tax) HOT 2
- RuntimeError: A durable atomic block cannot be nested within another atomic block. HOT 1
- Discord-link not working / Chat-GPT writes nonsense HOT 1
- ValidationError HOT 1
- Support variations in OFX files provided by banks HOT 2
- AttributeError: 'RelatedManager' object has no attribute 'posted' on account detailed view HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-ledger.