Add unit tests for InvoicingPeriodDraftOverlay and reference suggestion logic, including fake DB integration and aggregation methods
- Implemented `InvoicingPeriodDraftOverlayTest` with coverage for blocking and permitting invoicing actions based on draft states, transactions, and metadata. - Created `ReferenceSuggestionsApiTest` to validate ranked and filtered suggestions across bookings, orders, and vehicles with varied match relevance, context, and frequency. - Added `order_reference_suggestions_service` class, including query methods, normalization utilities, and aggregation logic for reference suggestions. - Enhanced query handling in `InvoicingPeriodDraftOverlayFakeDb` to validate SQL constraints and column cache resets in overlapping invoicing contexts.
This commit is contained in:
@@ -508,6 +508,7 @@ class collected_order_invoices_o extends db
|
||||
}
|
||||
// Set the processor to E-conomic, if it's not already set to Stripe.
|
||||
$this->processor->set(ECONOMIC_PROCESSOR);
|
||||
$this->error_message->nullify();
|
||||
// Object changed
|
||||
self::objectChanged();
|
||||
return $this;
|
||||
|
||||
Reference in New Issue
Block a user