modules/phyto_tc_cost_calculator/
Direct path in the repo โ all PHP, SQL, templates, and assets
Overview
A back-office calculator for working out the true cost of producing tissue-culture plants. Enter your input costs and desired margin โ the module calculates your break-even price and suggested retail price. Admin-only, never visible to customers.
Calculator Inputs
| Input | Unit |
|---|---|
| Substrate cost | โน per litre |
| Electricity cost | โน per kWh |
| Labour hours per batch | Hours |
| Labour rate | โน per hour |
| Contamination loss rate | % |
| Overhead allocation | โน per batch |
| Units produced per batch | Count |
| Target margin | % |
Outputs
- Break-even price per unit (โน)
- Suggested retail price at target margin (โน)
- Cost breakdown chart โ pie chart of cost components
Features
- Save named batch cost records for historical comparison
- Link a cost record to a
phyto_tc_batch_trackerbatch entry - Export cost report as PDF
Source Layout
| Path | Purpose |
|---|---|
phyto_tc_cost_calculator.php | Module entry + admin menu |
classes/PhytoCostRecord.php | ORM for saved cost records |
controllers/admin/AdminPhytoTcCostController.php | Calculator + history |
sql/install.sql | Creates cost records table |
views/templates/admin/calculator.tpl | Calculator form and results |