Remove legacy booking completion forms and related logic

- Deleted `complete_booking_f` and `generate_booking_wash_certificate_f` classes.
- Updated tests to ensure legacy booking completion routes are disabled.
- Introduced tests for POST `/order-bookings/complete` to enforce POS-based booking completion management.
- Added `/collected-invoices/split-by-month` route with API and unit tests for splitting collections into monthly periods.
- Refactored impacted files to exclude legacy references and ensure continued compatibility with POS processes.
This commit is contained in:
Jeppe Bundgaard
2026-05-06 14:02:48 +02:00
parent 8bf957b273
commit a71bde3211
12 changed files with 859 additions and 262 deletions
+1 -16
View File
@@ -12,8 +12,6 @@ use Exception;
use forms\form_helper_c;
use forms\objects\book_interior_wash_f;
use forms\objects\book_wash_f;
use forms\objects\complete_booking_f;
use forms\objects\generate_booking_wash_certificate_f;
use objects\form_submissions_o;
use traits\form_t;
@@ -30,25 +28,12 @@ class form
* @var book_wash_f $book_wash The BOOK_WASH form
*/
public book_wash_f $book_wash;
/**
* The GENERATE_BOOKING_CERTIFICATE form
* @var generate_booking_wash_certificate_f $generate_booking_wash_certificate The GENERATE_BOOKING_CERTIFICATE form
*/
public generate_booking_wash_certificate_f $generate_booking_wash_certificate;
/**
* The COMPLETE_BOOKING_WITHOUT_WASH_CERTIFICATE form
* @var complete_booking_f $complete_booking_without_wash_certificate The COMPLETE_BOOKING_WITHOUT_WASH_CERTIFICATE form
*/
public complete_booking_f $complete_booking_without_wash_certificate;
public $last_submitted_form;
public form_submissions_o $form_submission;
public function __construct()
{
$this->book_wash = new book_wash_f();
$this->generate_booking_wash_certificate = new generate_booking_wash_certificate_f();
$this->complete_booking_without_wash_certificate = new complete_booking_f();
}
/**
@@ -109,4 +94,4 @@ class form
}
throw new Exception('The form was not found');
}
}
}