zaviagodev/erpnext_quota ? reverse-engineered prompt

Reverse engineered prompt

Build me a Frappe app for SaaS quota control that lets me limit how many records a tenant can create. I want to be able to set quota rules per customer, including things like active users, total users, company count, storage usage, and limits for specific document types like Sales Invoice, Purchase Invoice, Journal Entry, and Payment Entry. Some of these limits should reset daily, weekly, or monthly, and I should also be able to set an expiry date for the tenant.

Make it easy to check whether a tenant is within quota and block or warn when they go over. I also want a simple way to define different limits for different user types, like employee self service users. If it helps, look up current Frappe docs online for the best way to hook into document creation and quota checks. Keep it clean and practical, with sensible defaults and a clear place to configure the rules.