Merge origin/master and resolve invoice_period_flag_service conflict
This commit is contained in:
@@ -653,6 +653,25 @@ it('does not report a price mismatch when a product-specific discount makes the
|
||||
expect($flags)->toBe([]);
|
||||
});
|
||||
|
||||
it('does not treat subset primary vehicle product names as equivalent', function (): void {
|
||||
expect(invoice_period_flag_service_invoke('primaryVehicleProductsMatch', [5, 'Forvogn', 6, 'Forvogn med hænger']))
|
||||
->toBeFalse()
|
||||
->and(invoice_period_flag_service_invoke('primaryVehicleProductsMatch', [10, 'Indvendig vask Kassevogn', 11, 'Kassevogn']))
|
||||
->toBeTrue();
|
||||
});
|
||||
|
||||
it('rebuilds automatic invoice period data on cache misses instead of hiding warnings', function (): void {
|
||||
$content = file_get_contents(app_path('classes/invoice_period_flag_service.php'));
|
||||
|
||||
expect($content)->not->toBeFalse();
|
||||
$content = (string)$content;
|
||||
|
||||
expect($content)->toContain('$flags = $this->buildAutomaticFlagsForPeriod($dateFrom, $dateTo);');
|
||||
expect($content)->toContain('$rows = $this->fetchOrderItemRowsFromDb($dateFrom, $dateTo);');
|
||||
expect($content)->toContain('cache_invoice_period_order_item_rows($dateFrom, $dateTo, $rows)');
|
||||
expect($content)->not->toContain('enqueue_invoice_period_warming($dateFrom, $dateTo)');
|
||||
});
|
||||
|
||||
it('preloads and caches missing e-conomic discounts before price mismatch detection', function (): void {
|
||||
$content = file_get_contents(app_path('classes/invoice_period_flag_service.php'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user