-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How we can update custom field after entry is done #97
Comments
tldr; You dont Your question seems odd. In classical accounting the ledger is not mutable. You should never manipulate the entry in the ledger after it is written. Imagine you have a physical book for classical double accounting. There you can only write with permanent ink into the T-Tables. There is no erasing or manipulating of entries in the ledger. At the moment you start to manipulate the entries in the ledger, you can not trust it anymore. In accounting it is important that you can always determine the balance of any relevant accounts. There is no semi state of an entry. So if I ask you how much credit a customer has, than you can not say based on the entries, that it is 100 € and after 2 minutes, after you manipulated the entries, tell me it is 200 €. I repeat: If your entries show me at 12 oclock pm that the customer has 100€ then you can not say at 12:02 oclock pm that it is 200 €, because some pending transaction finalized, even though the amount of entries did not change. Imagine you want to file your taxes. You can not say, hey my fiscal year starts in january and I wrote the invoices for january on 31st December 2022 so all my income in january is part of my previous fiscal year, even though my customers transfer the money on 1st January 2023. At the moment you have the actual power of disposition of the money it is relevant for the ledger. So yeah, I can found a company and write invoices with a value of 1 billion Euro, but that doesnt mean, that I have 1 billion euro in my pocket and can do with the money as I please. Transactions are not Schroedingers Cat. So if you can not manipulate the ledger entry, this means that you have to use a different approach. And this means using of more T-Tables or using of more Entries. What does this mean? Incoming Money/Assets: Outgoing Money/Assets: If in any case a transaction fails, you can make a Storno which is basically the void method of an LedgerEntry in medici. And always keep in mind, that the ledger is YOUR single point of truth. Meaning: You first write the entry into the ledger and then you trigger the relevant process. E.g. You sell gold online. The process is: Customer orders x amount of gold, you check if the customer has enough credit in his account by atomically reducing the amount of money for the order and then if it is sucessfully written into the ledger, you trigger the following process which ends with you sending out the gold. This means, that if the ledger has an issue and/or you fail at writing into the ledger (e.g. not enough balance), you just throw an error and dont send the gold out. So e.g. customer sends money and it never shows in his account. That doesnt mean, that he lies or that he wants to defraud you. You will check the claim of the custome and validate if he really sent money to you. You see it is in the bank account. You check your ledger and see that you missed his money transfer. Then you add manually the transaction to your ledger as you determine that it is the truth. Again: It is YOUR single point of truth. So be always really conservative when doing accounting related operations. Looking foward for your feedback |
hey @Uzlopak , this exactly what I wanted to do. your suggestion really helped. thanks a lot!! |
👏 |
I want to add custom field as a status by default pending and want to update that to success or failed. is there any way i can achieve this?
The text was updated successfully, but these errors were encountered: