Budgets in the current build are attached to a location.
Each budget record stores:
The application prevents duplicate budget years for the same location.
Budgets are managed from the Budgets relation manager inside a location record.
The table currently shows:
Available actions can include:
The budget section is embedded inside the location record rather than exposed as its own top-level resource.
The budget form currently has two sections.
The yearly amount is required and must be zero or greater.
The current rules are:
This validation is enforced in the relation manager form.
Budget checks are performed on draft orders against the location budget for the order year.
The app:
The app:
Budget checks rely on budget transactions, not on every draft order in every state.
That means the remaining budget calculation is based on recorded spending transactions rather than every pending order in the list.
A budget transaction is created when an order is sent successfully to Shopify and completed.
The transaction stores:
This is why completed purchasing activity affects future budget availability calculations.
The current code uses more than one policy check around location budgets.
LocationPolicy::manageLocationBudgets() allows the budget relation manager to become writable for:
CompanyAdminBudgetAdmin when the user is attached to that locationThe create, edit, delete, restore, and force-delete actions also call updateLocationBudget.
That means practical button visibility depends on both:
For documentation purposes, the safest user-facing description is:
CompanyAdmin is the primary budget-management roleBudgetAdmin is intended to manage budgets for assigned locations