Skip to main content

TC-001: Fuel Adjustment Factor (FAF) Test Cases

Feature: Fuel Adjustment Factor (FAF)
Reference: ADR-001-Fuel-Adjustment-Factor.md
Implementation: Commits 2f4ca69b through d0e482bb
Last Updated: April 10, 2026


Table of Contents

  1. Configuration Tests (Admin)
  2. Admin Order Creation Tests
  3. Web Order Tests (Customer)
  4. Change-Over Order Tests
  5. Order Edit Tests
  6. Invoice Tests
  7. Xero Integration Tests
  8. Edge Cases & Regression Tests
  9. Regression Checklist

1. Configuration Tests (Admin)

TC-001: Enable FAF - Percentage Type

Priority: High
Component: Admin Bin Hire Configuration

Preconditions:

  • Logged in as admin with bin-hires-update permission
  • Supplier has Partner record
  • Navigate to /admin/skip-bin/{type_id}/{supplier_id}/{area_id}

Test Steps:

  1. Locate FAF configuration card (right after "Bin Hire" title)
  2. Check "Enable FAF" toggle
  3. Select "Percentage (%)" from FAF Type dropdown
  4. Enter value 5.5 in FAF Value field
  5. Verify input shows % prefix
  6. Click "Save FAF Setting" button
  7. Wait for SweetAlert2 success notification
  8. Refresh page

Expected Results:

  • Toggle remains checked after refresh
  • Type dropdown shows "Percentage (%)"
  • Value field displays 5.5
  • Database: partners.has_faf = true, faf_type = 'percentage', faf_value = 5.5

TC-002: Enable FAF - Fixed Amount Type

Priority: High
Component: Admin Bin Hire Configuration

Test Steps:

  1. Check "Enable FAF" toggle
  2. Select "Fixed Amount ($)" from FAF Type dropdown
  3. Verify input switches to $ prefix
  4. Enter value 25.00 in FAF Value field
  5. Click "Save FAF Setting" button
  6. Wait for success notification
  7. Refresh page

Expected Results:

  • Input prefix shows $
  • Database: partners.faf_type = 'fixed', faf_value = 25.00

TC-003: Disable FAF

Priority: High
Component: Admin Bin Hire Configuration

Test Steps:

  1. Ensure FAF is currently enabled
  2. Uncheck "Enable FAF" toggle
  3. Click "Save FAF Setting" button
  4. Refresh page

Expected Results:

  • Toggle remains unchecked after refresh
  • Database: partners.has_faf = false
  • Type and value fields may be null/empty

TC-004: FAF Value Validation - Negative Number

Priority: Medium
Component: Admin Bin Hire Configuration

Test Steps:

  1. Enable FAF toggle
  2. Enter -10 in FAF Value field
  3. Click "Save FAF Setting"

Expected Results:

  • Validation error displayed: "FAF value cannot be negative"
  • Database not updated
  • Save button returns to enabled state

TC-005: FAF Value Validation - Non-Numeric Input

Priority: Medium
Component: Admin Bin Hire Configuration

Test Steps:

  1. Enable FAF toggle
  2. Enter "abc" in FAF Value field
  3. Click "Save FAF Setting"

Expected Results:

  • HTML5 number validation prevents submission OR
  • Server validation returns error: "FAF value must be a number"

TC-006: FAF Type Prefix Switching

Priority: Low
Component: Admin Bin Hire Configuration (JavaScript)

Test Steps:

  1. Select "Percentage (%)" type
  2. Verify prefix shows %
  3. Change type to "Fixed Amount ($)"
  4. Verify prefix switches to $
  5. Change back to "Percentage (%)"
  6. Verify prefix switches back to %

Expected Results:

  • Prefix updates immediately on type change (no page reload)
  • jQuery event handler working correctly

TC-007: AJAX Save Button State

Priority: Low
Component: Admin Bin Hire Configuration (JavaScript)

Test Steps:

  1. Click "Save FAF Setting"
  2. Immediately observe button state during request
  3. Wait for response

Expected Results:

  • Button disabled during request
  • Button shows spinner icon: <i class="fas fa-spinner fa-spin"></i>
  • Button text changes to "Saving..."
  • Button re-enables after response (success or error)
  • Button returns to original state with save icon

2. Admin Order Creation Tests

TC-008: Create Non-Rental Order with FAF (Percentage)

Priority: High
Component: Admin Order Creation

Preconditions:

  • FAF enabled on Partner: type=percentage, value=10%
  • Navigate to /admin/skip-bin-orders/create
  • Select waste type with base price $500

Test Steps:

  1. Fill order details (non-rental)
  2. Verify FAF section displays calculated amount: $50.00
  3. Verify FAF is shown as "Fuel Adjustment Factor (10%)"
  4. Verify FAF is read-only (no input fields)
  5. Complete order creation
  6. Check database order_details table

Expected Results:

  • FAF display shows: $50.00 (10% of $500)
  • No edit controls for FAF
  • Database: faf_applied_type='percentage', faf_applied_rate=10, faf_total_amount=50.00
  • Order total includes FAF

TC-009: Create Non-Rental Order with FAF (Fixed)

Priority: High
Component: Admin Order Creation

Preconditions:

  • FAF enabled on Partner: type=fixed, value=$30
  • Navigate to /admin/skip-bin-orders/create

Test Steps:

  1. Fill order details (non-rental)
  2. Verify FAF section displays calculated amount: $30.00
  3. Verify FAF is shown as "Fuel Adjustment Factor"
  4. Complete order creation
  5. Check database

Expected Results:

  • FAF display shows: $30.00 (fixed amount)
  • Database: faf_applied_type='fixed', faf_applied_rate=30, faf_total_amount=30.00
  • Order total includes $30 FAF regardless of base price

TC-010: Create Rental Order - FAF Should Not Apply

Priority: High
Component: Admin Order Creation

Preconditions:

  • FAF enabled on Partner (any type)
  • Navigate to /admin/skip-bin-orders/create

Test Steps:

  1. Fill order details
  2. Set "Is Rental" = true
  3. Verify FAF section behavior
  4. Complete order creation
  5. Check database

Expected Results:

  • FAF section hidden or shows $0.00
  • Database: faf_total_amount = 0.00 (or null)
  • No FAF snapshot fields populated
  • Order total does NOT include FAF

TC-011: Create Order with FAF Disabled

Priority: High
Component: Admin Order Creation

Preconditions:

  • FAF disabled on Partner (has_faf = false)

Test Steps:

  1. Create non-rental order
  2. Verify FAF section
  3. Check database after creation

Expected Results:

  • No FAF displayed in order creation UI
  • Database: faf_total_amount = 0.00 or null fields
  • Order total is base price only

TC-012: FAF Calculation Accuracy - Rounding

Priority: Medium
Component: Admin Order Creation

Preconditions:

  • FAF enabled: type=percentage, value=7.25%
  • Base price: $333.33

Test Steps:

  1. Create non-rental order with base price $333.33
  2. Calculate expected FAF: $333.33 × 0.0725 = $24.166425
  3. Verify displayed FAF amount
  4. Verify database stored value

Expected Results:

  • Displayed FAF: $24.17 (rounded to 2 decimal places)
  • Database: faf_total_amount = 24.17
  • round($value, 2) used consistently

3. Web Order Tests (Customer)

TC-013: Web Order Step 2 - Quote with FAF

Priority: High
Component: Web Order Flow - Waste Selection

Preconditions:

  • FAF enabled: percentage 10%
  • Navigate to /jr-trash/order/skipbin/quote

Test Steps:

  1. Select waste type with base price $400
  2. Select bin size
  3. Review price display

Expected Results:

  • Price displayed includes FAF: $440.00
  • Info message shown: "Includes Fuel Adjustment Factor (10%)"
  • FAF breakdown visible or accessible

TC-014: Web Order Step 3 - Quote Detail with FAF Breakdown

Priority: High
Component: Web Order Flow - Quote Detail

Preconditions:

  • FAF enabled: fixed $25
  • Navigate to /jr-trash/order/skipbin/quote-detail

Test Steps:

  1. Review quote detail page
  2. Locate price breakdown section

Expected Results:

  • Base price shown separately
  • FAF shown as line item: $25.00
  • Total includes FAF
  • Clear breakdown of all charges

TC-015: Web Order Step 4 - Customer Form FAF Display

Priority: High
Component: Web Order Flow - Customer Details

Preconditions:

  • FAF enabled: percentage 5%
  • Navigate to /jr-trash/order/customer-form-skipbin
  • Price with extra: $600

Test Steps:

  1. Review order summary on customer form
  2. Locate FAF line item

Expected Results:

  • FAF displayed as separate line item: $30.00 (5% of $600)
  • Display text: "Fuel Adjustment Factor (5%)"
  • Total includes FAF
  • Price excludes FAF on individual items (shown separately)

TC-016: Web Order Step 5 - FAF Persistence on Submission

Priority: High
Component: Web Order Flow - Order Submission

Preconditions:

  • FAF enabled: fixed $35
  • Customer form completed

Test Steps:

  1. Submit order
  2. Check database order_details for new order

Expected Results:

  • faf_applied_type = 'fixed'
  • faf_applied_rate = 35
  • faf_total_amount = 35.00
  • Order total in database includes FAF

TC-017: Web Order Step 6 - Payment Page FAF Display

Priority: High
Component: Web Order Flow - Payment

Preconditions:

  • FAF enabled
  • Order submitted, at payment step

Test Steps:

  1. View payment page
  2. Review invoice breakdown

Expected Results:

  • FAF shown as separate line item
  • Total payment amount includes FAF
  • Clear breakdown before payment confirmation

4. Change-Over Order Tests

TC-018: Create Change-Over (Non-Rental) with FAF

Priority: High
Component: Admin Change-Over Orders

Preconditions:

  • FAF enabled on Partner: percentage 8%
  • Existing non-rental order (original)
  • Navigate to /admin/change-over/edit/{order_id}

Test Steps:

  1. Verify FAF config loaded from Partner (not original order)
  2. Select new bin size with different price
  3. Verify FAF recalculates: 8% of new base price
  4. Complete change-over creation
  5. Check new order in database

Expected Results:

  • FAF calculated from current Partner config (not inherited)
  • FAF amount updated for new bin price
  • New order has fresh FAF snapshot
  • Admin cannot modify FAF (view-only)

TC-019: Create Change-Over (Rental) - FAF Excluded

Priority: High
Component: Admin Change-Over Orders

Preconditions:

  • FAF enabled on Partner
  • Existing order (original)

Test Steps:

  1. Create change-over order
  2. Set "Is Rental" = true
  3. Verify FAF behavior
  4. Complete creation

Expected Results:

  • FAF section hidden or disabled
  • No FAF calculated for rental change-over
  • Database shows no FAF snapshot

TC-020: Change-Over FAF Rate Change Scenario

Priority: Medium
Component: Admin Change-Over Orders

Preconditions:

  • Original order created with FAF 10% ($50)
  • Partner FAF config changed to 15%
  • Creating change-over from original order

Test Steps:

  1. Navigate to change-over page
  2. Verify FAF calculation uses new 15% rate
  3. Complete change-over

Expected Results:

  • FAF calculated at 15% (current config), not 10% (original order)
  • New order reflects updated FAF rate
  • Demonstrates FAF is NOT inherited from original order

5. Order Edit Tests

TC-021: Edit Order - FAF Snapshot View-Only

Priority: High
Component: Admin Order Edit

Preconditions:

  • Existing non-rental order with FAF applied
  • Navigate to /admin/skip-bin-orders/{id}/edit

Test Steps:

  1. View order edit page
  2. Locate FAF section in order summary
  3. Attempt to locate FAF edit controls

Expected Results:

  • FAF displayed as read-only text (e.g., "Fuel Adjustment Factor (10%): $50.00")
  • No input fields for FAF type, rate, or amount
  • No toggle/switch to enable/disable FAF
  • FAF snapshot from order creation shown
  • Modifying other order fields does not affect FAF

TC-022: Edit Order - Verify FAF Not Modifiable

Priority: Medium
Component: Admin Order Edit

Test Steps:

  1. Inspect HTML source for FAF section
  2. Search for <input> tags related to FAF
  3. Verify no form fields with names: faf_type, faf_rate, faf_amount

Expected Results:

  • No form inputs for FAF fields
  • Only display elements (spans, divs) present
  • FAF data not included in form submission

6. Invoice Tests

TC-023: First Invoice (v1) - FAF Line Item

Priority: High
Component: PDF Invoice Generation

Preconditions:

  • Order with FAF: $500 base + $50 FAF (10%)
  • Invoice version: v1 (document/invoice)

Test Steps:

  1. Generate first invoice
  2. Open PDF: resources/views/document/invoice/first-invoice.blade.php
  3. Review line items

Expected Results:

  • FAF appears as separate line item
  • Description: "Fuel Adjustment Factor (10%)"
  • Amount: $50.00
  • Quantity: 1
  • Line total: $50.00
  • Invoice total includes FAF

TC-024: First Invoice (v2) - FAF Line Item

Priority: High
Component: PDF Invoice Generation

Preconditions:

  • Order with FAF
  • Invoice version: v2 (document/new-invoice)

Test Steps:

  1. Generate first invoice (v2)
  2. Review PDF output

Expected Results:

  • FAF shown as separate line item
  • Layout consistent with v1
  • Totals include FAF

TC-025: Part/Subsequent Invoice - FAF Display

Priority: High
Component: PDF Invoice Generation

Preconditions:

  • Order with multiple invoices
  • First invoice already generated with FAF
  • Generating part invoice (invoice_number > 1)

Test Steps:

  1. Generate part invoice
  2. Review line items

Expected Results:

  • DECISION NEEDED: FAF should only appear on first invoice
  • Part invoice may or may not show FAF (depends on implementation)
  • Verify consistent with ADR-001-F

TC-026: Web Invoice View - FAF Display

Priority: High
Component: Frontend Invoice Display

Preconditions:

  • Order with FAF
  • Navigate to /invoice/{token}/show

Test Steps:

  1. View invoice on web page
  2. Review line items table

Expected Results:

  • FAF shown as separate line item
  • Clear description with percentage if applicable
  • Total includes FAF
  • Layout matches PDF invoice

TC-027: Email Invoice - First Invoice with FAF

Priority: High
Component: Email Templates

Preconditions:

  • Order with FAF
  • First invoice email triggered

Test Steps:

  1. Check email: resources/views/mails/invoice/first-invoice-to-customer.blade.php
  2. Review included details: resources/views/mails/invoice/details-skip-bin.blade.php

Expected Results:

  • FAF summary included in email body
  • Amount clearly stated
  • Description includes percentage if applicable

TC-028: Email Invoice - Part Invoice with FAF

Priority: Medium
Component: Email Templates

Preconditions:

  • Order with FAF
  • Part invoice email triggered

Test Steps:

  1. Check email: resources/views/mails/invoice/part-invoice-to-customer.blade.php
  2. Review FAF display

Expected Results:

  • FAF handling consistent with PDF part invoices

TC-029: Invoice Total Accuracy

Priority: High
Component: All Invoice Types

Preconditions:

  • Multiple test orders with different FAF configurations

Test Steps:

  1. Generate invoices for each order
  2. Calculate expected totals manually
  3. Compare with invoice totals

Expected Results:

  • Subtotal = Base Price + FAF + Other Charges
  • GST calculated correctly on total including FAF
  • Grand Total = Subtotal + GST (if applicable)
  • No rounding errors

TC-030: Invoice Regeneration - FAF Idempotency

Priority: Medium
Component: Invoice Management

Preconditions:

  • Order with FAF
  • Invoice already generated once

Test Steps:

  1. Regenerate same invoice (simulate correction/update)
  2. Check database order_invoice_extras table
  3. Count FAF line items for this invoice

Expected Results:

  • Only ONE FAF line item exists (idempotent)
  • No duplicate FAF entries
  • FuelAdjustmentRepository::addFAFToInvoice() uses updateOrCreate pattern

7. Xero Integration Tests

TC-031: Xero Sync - FAF Line Item Present

Priority: High
Component: Xero Integration

Preconditions:

  • Order with FAF: $500 base + $50 FAF
  • Xero integration enabled
  • Invoice ready to sync

Test Steps:

  1. Trigger Xero sync for invoice
  2. Review InvoiceManagement::xeroItemNonRental() output
  3. Check line items array

Expected Results:

  • Two line items in Xero payload:
    1. Main service: Description, UnitAmount=$500, AccountCode=$itemXero
    2. FAF: Description="Fuel Adjustment Factor (10%)", UnitAmount=$50.00, AccountCode=$itemXero

TC-032: Xero Sync - Same AccountCode for FAF

Priority: High
Component: Xero Integration

Test Steps:

  1. Sync invoice to Xero
  2. Verify AccountCode values

Expected Results:

  • FAF line uses SAME AccountCode as main service line
  • No separate xero_faf_account_code field used
  • Consistent with CEO requirement

TC-033: Xero Sync - Rental Order Exclusion

Priority: High
Component: Xero Integration

Preconditions:

  • Rental order with FAF enabled in Partner config
  • Xero sync triggered

Test Steps:

  1. Sync rental order invoice to Xero
  2. Review line items

Expected Results:

  • NO FAF line item in Xero payload
  • Only main service line present
  • Rental orders excluded from FAF in Xero sync

8. Edge Cases & Regression Tests

TC-034: Zero FAF Value

Priority: Medium
Component: All Order Types

Preconditions:

  • FAF enabled: fixed $0.00

Test Steps:

  1. Create non-rental order
  2. Check FAF display and database

Expected Results:

  • FAF may show $0.00 or be hidden
  • Database: faf_total_amount = 0.00
  • No FAF line item on invoice (if amount is 0)
  • Order total unchanged

TC-035: Very Large FAF Value

Priority: Low
Component: Calculation Logic

Preconditions:

  • FAF enabled: fixed $999,999.99

Test Steps:

  1. Create order
  2. Verify calculation and display

Expected Results:

  • Large FAF handled without overflow
  • Database DECIMAL(10,2) accommodates value
  • Display formatted correctly

TC-036: Decimal Precision - 2 Decimal Places

Priority: High
Component: Calculation & Storage

Preconditions:

  • Various FAF calculations that produce many decimal places

Test Steps:

  1. Test case 1: $100 × 3.333% = $3.333 → $3.33
  2. Test case 2: $199.99 × 7.5% = $14.99925 → $15.00
  3. Verify all stored and displayed values

Expected Results:

  • All values rounded to exactly 2 decimal places
  • round($value, 2) used consistently
  • No floating point precision issues visible to users

TC-037: FAF Rate Change After Order Creation

Priority: Medium
Component: Order Snapshot

Preconditions:

  1. Create order with FAF 10% (snapshot saved)
  2. Change Partner FAF config to 15%
  3. View original order and generate invoice

Test Steps:

  1. Verify original order unchanged
  2. Generate invoice for original order
  3. Create new order

Expected Results:

  • Original order: FAF still 10% (snapshot preserved)
  • Original invoice: FAF at 10%
  • New order: FAF at 15% (new config)
  • Demonstrates immutability of FAF snapshots

TC-038: Multi-Order Invoice with Mixed FAF

Priority: Medium
Component: Invoice Management

Preconditions:

  • Multiple orders in single invoice
  • Some orders with FAF, some without

Test Steps:

  1. Create invoice with multiple orders
  2. Review line items

Expected Results:

  • Each order's FAF shown separately (if applicable)
  • Correct totals for each order
  • FAF only on non-rental orders

TC-039: Coupon/Discount with FAF

Priority: Medium
Component: Order Calculation

Preconditions:

  • FAF enabled: 10%
  • Coupon available: $50 off
  • Base price: $500

Test Steps:

  1. Apply coupon during order
  2. Calculate expected totals

Expected Results:

  • FAF calculated on pre-discount or post-discount base? VERIFY
  • Document expected behavior:
    • If FAF on base: $500 × 10% = $50 FAF
    • If FAF after discount: ($500 - $50) × 10% = $45 FAF
  • Behavior should be consistent and documented

TC-040: Extra Services with FAF

Priority: Medium
Component: Order Calculation

Preconditions:

  • Order with extra services (e.g., lock, lights)
  • FAF enabled: 10%
  • Base bin price: $400
  • Extra services: $50

Test Steps:

  1. Create order with extra services
  2. Review FAF calculation

Expected Results:

  • FAF calculated on base bin price only: $400 × 10% = $40
  • OR FAF on total including extras? VERIFY
  • Document expected behavior

TC-041: Change FAF Type (Percentage → Fixed)

Priority: Low
Component: Configuration

Preconditions:

  • FAF enabled: percentage 10%
  • Existing orders with FAF snapshots

Test Steps:

  1. Change FAF type to fixed $25
  2. Create new order
  3. View existing orders

Expected Results:

  • New orders use fixed $25
  • Existing orders unchanged (snapshot preserved)
  • No retroactive changes to historical orders

TC-042: Database Migration Rollback

Priority: Low
Component: Database

Test Steps:

  1. Run rollback on FAF migrations:
    php artisan migrate:rollback --path=database/migrations/2026_04_09_041400_add_faf_columns_to_partners_table.php
    php artisan migrate:rollback --path=database/migrations/2026_04_09_041401_add_faf_columns_to_order_details_table.php
  2. Verify columns removed
  3. Re-run migrations
  4. Verify columns restored

Expected Results:

  • Rollback removes FAF columns cleanly
  • Re-migration restores columns
  • No data loss in other tables

TC-043: FAF with GST Calculation

Priority: High
Component: Tax Calculation

Preconditions:

  • GST enabled (e.g., 10%)
  • FAF enabled: fixed $50
  • Base price: $500

Test Steps:

  1. Create order
  2. Generate invoice
  3. Calculate expected GST

Expected Results:

  • Subtotal = $500 + $50 = $550
  • GST = $550 × 10% = $55 (if GST applies to FAF)
  • Grand Total = $605
  • OR GST may be calculated differently - VERIFY implementation

9. Regression Checklist

Core Functionality

  • TC-R01: Existing orders without FAF continue to work
  • TC-R02: Existing invoices generate correctly
  • TC-R03: Xero sync works for orders without FAF
  • TC-R04: Pricing calculations unaffected for orders without FAF
  • TC-R05: Rental orders continue to exclude FAF
  • TC-R06: Admin permissions (bin-hires-update) still enforced
  • TC-R07: Order totals calculate correctly in all scenarios
  • TC-R08: Invoice totals accurate before and after FAF feature

UI/UX

  • TC-R09: Bin Hire page loads without JavaScript errors
  • TC-R10: SweetAlert2 notifications display correctly
  • TC-R11: Vue components on order pages render properly
  • TC-R12: Invoice PDFs generate without layout issues
  • TC-R13: Email templates render correctly

Data Integrity

  • TC-R14: No NULL constraint violations on new columns
  • TC-R15: Default values applied correctly (faf_total_amount defaults to 0.00)
  • TC-R16: Foreign key relationships preserved
  • TC-R17: Existing data migration handled gracefully (if applicable)

Test Data Setup

Required Test Partners

Partnerhas_faffaf_typefaf_valuePurpose
Test-Partner-1falsenullnullNo FAF baseline
Test-Partner-2truepercentage10.00Percentage FAF
Test-Partner-3truefixed25.00Fixed FAF
Test-Partner-4truepercentage5.555Rounding test

Required Test Orders

Orderis_rentalPartnerExpected FAF
Test-Order-1falseTest-Partner-210% of base
Test-Order-2trueTest-Partner-2$0
Test-Order-3falseTest-Partner-3$25 fixed
Test-Order-4falseTest-Partner-1$0

Controllers

  • app/Http/Controllers/Admin/GeneralWasteBinHireController.php - FAF config
  • app/Http/Controllers/Admin/OrderSkipBinController.php - Admin order creation
  • app/Http/Controllers/OrderController.php - Web orders
  • app/Http/Controllers/Admin/ChangeOverController.php - Change-over orders

Repositories

  • app/Repositories/FuelAdjustmentRepository.php - FAF business logic
  • app/Repositories/InvoiceManagement.php - Invoice generation

Models

  • app/Partner.php - FAF configuration
  • app/OrderDetail.php - FAF snapshot
  • app/OrderInvoiceExtra.php - Invoice line items

Views

  • resources/views/admin/bin-hire/index.blade.php - FAF config UI
  • resources/views/orders/skipbin_quote.blade.php - Web order step 2
  • resources/views/orders/skipbin_quote_detail.blade.php - Web order step 3
  • resources/views/orders/customer-form-skipbin.blade.php - Web order step 4
  • resources/views/document/invoice/first-invoice.blade.php - PDF v1
  • resources/views/document/new-invoice/first-invoice.blade.php - PDF v2
  • resources/views/frontend/invoice/index.blade.php - Web invoice

Vue Components

  • resources/js/components/AdminNewSkipBinOrder.vue - Admin order creation
  • resources/js/components/AdminEditOrder.vue - Admin order edit
  • resources/js/components/AdminChangeOver.vue - Change-over orders
  • resources/js/store/NewSkipBinOrder.js - Order state management