Changelog: Dedek - 2026-06-15
Daily Changelog - Waste Vantage Legacy
Overview
Today's changes by Dedek introduce a configurable Order Code Prefix option under General Settings. Instead of hardcoding the prefix as 'EBNZ', the application now reads from the active partner settings in the database, reverting to 'EBNZ' as a fallback. This required updating all controllers, commands, imports, repositories, and view templates to dynamically call the new order_code_prefix() helper.
Added
- Order Code Prefix Customization Migration
- Added schema migration
database/migrations/2026_06_15_105217_add_order_code_to_partners_table.phpto add theorder_codecolumn to thepartnersdatabase table.
- Added schema migration
- Order Code Prefix Helper (
app/helpers.php)- Introduced the global helper function
order_code_prefix()which dynamically retrieves theorder_codevalue of the default partner or falls back to'EBNZ'.
- Introduced the global helper function
- Order Code Prefix Helper Unit Tests (
tests/Unit/OrderCodePrefixHelperTest.php)- Created test suite class
OrderCodePrefixHelperTestusing theDatabaseTransactionstrait to test dynamic prefix retrieval and standard fallback behaviors.
- Created test suite class
Changed
- General Settings Input & Validation (
app/Http/Controllers/Admin/GeneralSettingController.php,resources/views/admin/general-setting/index.blade.php)- Added a new form field in General Settings to specify the required Order Code Prefix.
- Added backend validation and updates to store the input prefix inside the active partner record.
- Partner Model Mass Assignment (
app/Partner.php)- Added
order_codeto the fillable attributes list.
- Added
- Dynamic Code Prefixes replacement across modules
- Replaced hardcoded occurrences of
'EBNZ'prefix with calls toorder_code_prefix()across console commands, controllers, repositories, imports, and blade view files. These include:- Rental bin commands (
RentalBinCommand.php,RentalBinCommand2.php). - Runsheet billing & invoice processing (
RunsheetInvoiceCommand.php,OrderRepository.php,OrderRentalRepository.php). - Relocate and Skip Bin order creators/controllers.
- Vendor billing and API order endpoints (V2).
- Customer import tools (
CustomerFrontliftImport.php,CustomerRearLiftImport.php, etc.).
- Rental bin commands (
- Replaced hardcoded occurrences of
Fixed
- None.
Removed
- Scratch test file cleanup
- Deleted obsolete temporary script
brain_scratch_test.php.
- Deleted obsolete temporary script