- Fix _read_group override crash (dict_values not subscriptable) in sale_order.py
- Migrate _fc_tool_claims_stats from deprecated read_group() to _read_group() API
- Enrich client details tool with funding history, invoice status, prev-funded devices
- Add Client Status Lookup tool (search by name, returns orders/invoices/next steps)
- Add ADP Billing Period tool (invoiced amounts, paid/unpaid, submission deadlines)
- Update AI agent system prompt with all 5 tools and usage examples
When customers pay for ADP quotations through the portal, the system
was charging the full order amount (ADP + client portions combined).
Now correctly charges only the client portion (25% for REG clients).
Changes:
- Override _get_prepayment_required_amount() to return client portion
- Override _has_to_be_paid() to skip payment for 100% ADP-funded orders
- Add portal controller to cap payment amount at client portion
- Add portal template showing ADP funding breakdown to customer
Rental orders no longer show the "Authorizer Required?" question or
the Authorizer field. The sale type is automatically set to 'Rentals'
when creating or confirming a rental order. Validation logic also
skips authorizer checks for rental sale type.
Made-with: Cursor