Transaction history maintains company name and address as a reference which can change
Addresses and company names can be changed after sales orders are created, posted, printed, and payment received giving an incorrect transaction history.
- Create a sales invoice
- Save sales invoice
- Post sales invoice
- Create sales order
- Print sales order
- Cash Receive against sales order
- Post cash receipt
- Go to balance sheet report and verify cash receipt appears in checking account
- Go back to contact and change company name
- Go to Addresses and change address
- Go to AR search and pull up the sales invoice noted above
- Verify that the data has changed to the new company name and address
I assume the same can happened with purchase orders, but did not test.
Branch master as of 459bebc15
I think if you are going to reorganize AP, AR, and GL this should be fixed or at least considered at the same time.
The shipping address immutablility is on https://github.com/ehuelsmann/LedgerSMB/tree/features/immutable-addresses.
The lack of immutability on the invoice stems (from what I inferred so far) from this query: https://github.com/ledgersmb/LedgerSMB/blob/d59ceb69444edbfe22d4443b0df9f8105e204ff5/old/lib/LedgerSMB/AA.pm#L630-L674 in AA.pm->get_name() which looks up all entity and address data as it is currently registered instead of how it used to be registered...