Overview of sample application
Let's develop the sales management application with Transactd PHP ORM. This example focuses on how to construct the application with complex transaction.
This application records increase and decrease in inventory, and total sales per day, every time sales is recorded. The daily summary table is not calculated by batch processing. It is recorded at the same time as saving sales record.
This sample shows how to create model, and basic usage of it. Interfaces such as View is omitted.
Points of features
Important things as samples
- Invoices include the receivable balance. If the invoice is inserted or deleted, the balance of subsequent Invoices of the same customer will also be updated.
- Increase or decrease stock quantity at the same time as saving the invoice.
- Increase or decrease sales, tax and payment at the same time as saving the invoice. Aggregate the daily summary in real time.
- Invoice ID is not a auto-increment number. Increment it from the last invoice.
Other specifications
- Round the consumption tax to the closest whole number.
- Invoices can include payments.
- Distinguish between sales and payments with
line_type
. - Omit unnecessary attributes for the theme.