Changelog: Dedek - 2026-06-05
Daily Changelog - Waste Vantage Legacy
Overview
Today's changes by Dedek focus on refining financial operations, calculations, tax handling, and customer balances. This includes updating SQL balance reporting subqueries to conditionally factor in GST for GST-exclusive configurations, rectifying invoice grand total and subtotal parameters during updates, and improving discount calculation logic to cover base prices plus extras.
Added
- None.
Changed
- Supplier Tax Logic in Balances (
app/Customer.php)- Updated Eloquent subqueries for unpaid, latest, refund, and ewallet balances to conditionally compute invoice grand totals by adding GST to the subtotal if the order/supplier setting is configured as GST-exclusive.
- Order Pricing Updates & Invoicing (
app/Http/Controllers/Admin/OrderController.php)- Updated total/subtotal calculations when updating invoices and applying discounts.
- Added direct updates to unpaid invoice attributes (prices, dates, extras, and totals) when an order detail is changed.
- Compacted the supplier variable into the admin edit order view to dynamically calculate GST based on supplier parameters.
- Dynamic Surcharges & Discounts (
resources/js/components/order-management/OrderManagement.vue,resources/js/components/order-management/OrderSiteDetails.vue)- Refactored frontend price watchers to recalculate discounts whenever extra items or quantities change.
- Modified the discount calculation to apply against the combined price (base bin + extras) instead of only the base price.
- Enabled discount resetting functionality on inputs of 0.
- Tax Conditional Display (
resources/js/components/AdminNewSkipBinOrder.vue,resources/js/components/AdminEditOrder.vue)- Updated skip bin pricing helpers to add GST to the total display only if the default supplier's pricing is not GST-inclusive.
- Implemented dynamic GST checks based on supplier settings for rental vs. ad-hoc orders when rendering the edit order layout.
Fixed
- None.
Removed
- Testing Scripts (
brain_scratch_test.php)- Removed and cleaned up temporary scratch execution files from root.