@extends('layouts.app') @section('title', $featureLabel) @section('content')

{{ $featureLabel }}

This setting is managed independently from Business Settings under the New Features sidebar.

@component('components.widget', ['class' => 'box-primary', 'title' => $featureLabel.' settings']) {!! Form::open([ 'route' => ['business.updateNewFeatureSettings', $feature], 'method' => 'post', 'id' => 'new_feature_settings_form', ]) !!}
@if($feature === 'bir')

Philippines BIR Mode

Optional compliance support for BIR-labeled invoices, protected sequential invoice numbers, X/Z readings, and eSales journal exports. Enabling this does not itself constitute BIR accreditation or registration.

When enabled, set each branch's PTU, MIN, and POS serial number in Business Locations. Final sales are blocked only for a BIR-enabled branch whose machine identity is incomplete.
@if(!empty($business->enable_bir_compliance)) Open BIR reports @endif
@elseif($feature === 'integrated-payments') @php $integratedPaymentSettings = is_array($business->integrated_payment_settings) ? $business->integrated_payment_settings : []; @endphp

Integrated Payments

Optional automatic confirmation and reconciliation for Maya Checkout, GCash through QRPh, Visa/Mastercard through Maya, PayMongo, or Xendit, and supported card-terminal bridges.

{!! Form::label('integrated_payment_mode', 'Provider environment:') !!} {!! Form::select( 'integrated_payment_settings[mode]', ['sandbox' => 'Sandbox / Testing', 'production' => 'Production / Live'], $integratedPaymentSettings['mode'] ?? 'sandbox', ['class' => 'form-control', 'id' => 'integrated_payment_mode'] ) !!}

PayMongo Hosted Card Checkout

Card-only PayMongo checkout with HMAC-signed payment confirmation. Customers enter card details on PayMongo.

{!! Form::label('paymongo_secret_key', 'PayMongo secret API key:') !!} {!! Form::password('integrated_payment_settings[paymongo_secret_key]', [ 'class' => 'form-control', 'id' => 'paymongo_secret_key', 'placeholder' => !empty($integratedPaymentSettings['paymongo_secret_key']) ? 'Saved - leave blank to keep' : 'sk_test_... or sk_live_...', ]) !!}
{!! Form::label('paymongo_webhook_secret', 'PayMongo webhook secret:') !!} {!! Form::password('integrated_payment_settings[paymongo_webhook_secret]', [ 'class' => 'form-control', 'id' => 'paymongo_webhook_secret', 'placeholder' => !empty($integratedPaymentSettings['paymongo_webhook_secret']) ? 'Saved - leave blank to keep' : 'whsk_...', ]) !!}

Webhook: {{ url('/webhook/paymongo-payments') }}


Xendit Hosted Card Checkout

Xendit Payment Sessions restricted to cards. Completed sessions are rechecked against Xendit's payment API.

{!! Form::label('xendit_secret_key', 'Xendit secret API key:') !!} {!! Form::password('integrated_payment_settings[xendit_secret_key]', [ 'class' => 'form-control', 'id' => 'xendit_secret_key', 'placeholder' => !empty($integratedPaymentSettings['xendit_secret_key']) ? 'Saved - leave blank to keep' : 'xnd_development_... or xnd_production_...', ]) !!}
{!! Form::label('xendit_callback_token', 'Xendit callback verification token:') !!} {!! Form::password('integrated_payment_settings[xendit_callback_token]', [ 'class' => 'form-control', 'id' => 'xendit_callback_token', 'placeholder' => !empty($integratedPaymentSettings['xendit_callback_token']) ? 'Saved - leave blank to keep' : 'Token from Xendit webhook settings', ]) !!}

Webhook: {{ url('/webhook/xendit-payments') }}


Maya Hosted Checkout

Card details and 3-D Secure authentication stay on Maya's hosted page.

{!! Form::label('maya_public_key', 'Maya public API key:') !!} {!! Form::password('integrated_payment_settings[maya_public_key]', [ 'class' => 'form-control', 'id' => 'maya_public_key', 'placeholder' => !empty($integratedPaymentSettings['maya_public_key']) ? 'Saved - leave blank to keep' : 'pk-...', ]) !!}
{!! Form::label('maya_secret_key', 'Maya secret API key:') !!} {!! Form::password('integrated_payment_settings[maya_secret_key]', [ 'class' => 'form-control', 'id' => 'maya_secret_key', 'placeholder' => !empty($integratedPaymentSettings['maya_secret_key']) ? 'Saved - leave blank to keep' : 'sk-...', ]) !!}

Physical Card Terminal (optional)
{!! Form::label('terminal_bridge_url', 'Terminal bridge URL:') !!} {!! Form::url( 'integrated_payment_settings[terminal_bridge_url]', $integratedPaymentSettings['terminal_bridge_url'] ?? 'http://127.0.0.1:8765', ['class' => 'form-control', 'id' => 'terminal_bridge_url'] ) !!}
{!! Form::label('terminal_bridge_token', 'Terminal bridge token:') !!} {!! Form::password('integrated_payment_settings[terminal_bridge_token]', [ 'class' => 'form-control', 'id' => 'terminal_bridge_token', 'placeholder' => !empty($integratedPaymentSettings['terminal_bridge_token']) ? 'Saved - leave blank to keep' : 'Local bridge access token', ]) !!}
Payment methods appear only after the feature, provider, and credentials are configured. Online confirmations require publicly reachable HTTPS webhooks and activated provider channels. A physical terminal also requires the provider's approved ECR kit and a compatible local bridge.
@elseif($feature === 'offline-sales')

Offline Sales and Automatic Sync

Lets an already-open POS terminal safely queue eligible cash sales when the server connection is lost, then automatically submit them when the connection returns.

Offline checkout is limited to new walk-in cash sales. BIR mode, integrated payments, serial/IMEI and lot-tracked items, credit sales, rewards, exchanges, service/kitchen orders, and attachments still require a live connection.
@elseif($feature === 'stored-value')

Gift Cards, Store Credit, and Digital Vouchers

Includes code issuance, customer-linked store credit, branch restrictions, expiry, balance ledger, adjustments, split tender, and atomic redemption.

@elseif($feature === 'promotions')

Advanced Promotions and Coupon Rules

Supports percentage, fixed-cart, and buy-X-get-Y rules with product scopes, branches, customer groups, schedules, priority, stacking, and usage limits.

@elseif($feature === 'central-pricing')

Centralized Multi-Branch Pricing

Includes draft and published price books, selected branches, effective dates, priority, versioning, publication history, and server-enforced POS prices.

@elseif($feature === 'manager-approvals') @php $managerApprovalSettings = is_array($business->manager_approval_settings) ? $business->manager_approval_settings : []; @endphp

Manager Approvals

Sensitive POS sales are sent to the cross-branch Manager Approval Center and continue automatically after an authorized manager approves them.

{!! Form::label('manager_approval_discount_threshold', 'Large discount threshold:') !!}
{!! Form::number( 'manager_approval_discount_threshold', $managerApprovalSettings['discount_threshold_percent'] ?? 10, ['class' => 'form-control', 'min' => 0, 'max' => 100, 'step' => '0.01', 'required'] ) !!} %
{!! Form::label('manager_approval_price_override_threshold', 'Price-change threshold:') !!}
{!! Form::number( 'manager_approval_price_override_threshold', $managerApprovalSettings['price_override_threshold_percent'] ?? 0, ['class' => 'form-control', 'min' => 0, 'max' => 100, 'step' => '0.01', 'required'] ) !!} %

Use 0 to approve every manual price change.

{!! Form::label('manager_approval_queue_expiry_hours', 'Pending request expiry:') !!}
{!! Form::number( 'manager_approval_queue_expiry_hours', $managerApprovalSettings['queue_expiry_hours'] ?? 6, ['class' => 'form-control', 'min' => 6, 'max' => 24, 'step' => 1, 'required'] ) !!} hours

Pending POS requests can remain available from 6 to 24 hours.

@elseif($feature === 'operational-alerts') @php $operationalAlertSettings = is_array($business->operational_alert_settings) ? $business->operational_alert_settings : []; @endphp

Operational Alert Center

Consolidates low/out-of-stock items, payment mismatches, failed offline synchronization, expiring stored value, and manager-approved sensitive transactions.

{!! Form::label('operational_alert_voucher_expiry_days', 'Voucher expiry warning:') !!}
{!! Form::number( 'operational_alert_voucher_expiry_days', $operationalAlertSettings['voucher_expiry_days'] ?? 30, ['class' => 'form-control', 'min' => 1, 'max' => 365, 'step' => 1, 'required'] ) !!} days ahead
@elseif($feature === 'inventory-aging')

Inventory Aging and Dead-Stock Reporting

Measures days since each stocked variation last sold at each branch, identifies never-sold inventory, calculates tied-up cost, and supports CSV export.

{!! Form::label('inventory_aging_days', 'Dead-stock threshold:') !!}
{!! Form::number( 'inventory_aging_days', $business->inventory_aging_days ?: 90, ['class' => 'form-control', 'min' => 31, 'max' => 3650, 'step' => 1, 'required'] ) !!} days without a sale
@endif

{!! Form::close() !!} @endcomponent
@endsection @section('javascript') @endsection