...
Define a date range over which the financial statement should be generated (can be inherited from dashboard dates)
Export should include at least 3 sections and all matching revenues and expenses for those sections:
Revenues
Including both crop types sales and non-crop revenues
Expenses
Each category as a line item
Gross profit / loss (Revenues - Expenses)
Must export as xlsx
Nice-to-have:
Be able to export as pdf
Header for report including things like Farm name, date report was run, and active filters
Be able to define criteria for which revenues and expenses are included or excluded
Categories of revenues / expenses
Be able to optionally define a tax rate or static tax amount to be deducted from Gross profit
Net profit section
Persist metric around how often documents are exported by each farm
Simplest implementation could be just a count. More complicated might document type of document, applied filters, and base object attributes
User interaction and design
...