@extends('layouts.app') @section('title', 'Central Price Books') @section('content')

Centralized Multi-Branch Pricing

@if(!$business->centralizedPricingEnabled())
Central pricing is disabled. Published books are preserved but the POS will use its normal prices until this is enabled under New Features > Central branch pricing.
@endif
@component('components.widget', ['title' => 'Create draft price book']) {!! Form::open(['route' => 'central-price-books.store', 'method' => 'post']) !!}
{!! Form::label('name', 'Name:*') !!}{!! Form::text('name', null, ['class' => 'form-control', 'required']) !!}
{!! Form::label('description', 'Description:') !!}{!! Form::textarea('description', null, ['class' => 'form-control', 'rows' => 2]) !!}
{!! Form::label('priority', 'Priority:*') !!}{!! Form::number('priority', 0, ['class' => 'form-control', 'required']) !!}

Higher priority wins when two published books cover the same product and branch.

{!! Form::label('location_ids', 'Branches:*') !!}{!! Form::select('location_ids[]', $locations, null, ['class' => 'form-control select2', 'multiple', 'required']) !!}
{!! Form::label('starts_at', 'Effective from:') !!}
{!! Form::label('ends_at', 'Effective until:') !!}
{!! Form::close() !!} @endcomponent
@component('components.widget', ['title' => 'Price books'])
@forelse($books as $book) @empty @endforelse
NameVersionPriorityBranchesPricesStatus
{{ $book->name }} v{{ $book->version }} {{ $book->priority }} {{ $book->locations_count }} {{ $book->items_count }} {{ ucfirst($book->status) }} Open
No centralized price books yet.
{{ $books->links() }} @endcomponent
@endsection