@extends('layouts.app') @section('style') @endsection @section('content')

Add Products

{{--Customer info--}}

Name:

{{ $sale->name }}

Phone:

{{ preg_replace('~.*(\d{3})[^\d]{0,7}(\d{3})[^\d]{0,7}(\d{4}).*~', '($1) $2-$3',$sale->phone) }}

Cellphone:

{{ preg_replace('~.*(\d{3})[^\d]{0,7}(\d{3})[^\d]{0,7}(\d{4}).*~', '($1) $2-$3',$sale->cellphone) }}

Adress:

{{ $sale->address }}

Email:

{{ $sale->email }}

{{--End Customer info--}}

{{--Routes for ajax functions --}} {{--End Routes for ajax functions --}} {{--Id of the sale--}} {{--End Id of the sale--}} {{--Go back button menu--}}
{{--End Go back button menu--}} {{--Buttons for menu of products --}} @if($sale->status != 'cancel')
@endif {{--End Buttons for menu of products --}}
{{--Show Total price of the sale --}}
{{--End Show Total price of the sale --}} {{--Return money--}}
{{--End Return money--}} {{--Show payment option--}} @if($dispatch != 'saved')
@csrf @if(empty($payment_sale_info)) {{-- Para identificar si ya se pago o no. No esta pago permite agregar pago--}} {{--End Para identificar si ya se pago o no. No esta pago permite agregar pago--}}
@else {{-- Para identificar si ya se pago o no. Esta pago no permite agregar pago--}} {{--End Para identificar si ya se pago o no. Esta pago no permite agregar pago--}} @php($c = 0) @foreach($payment_sale_info as $payment)
@php($c++) @endforeach @endif {{--Add more input to simulate split payment--}}
{{--End Add more input to simulate split payment--}}
@endif {{--End Show payment option--}} {{--Pay Button--}}
{{--End Pay Button--}} {{--Show Buttons dispatch, Sale and Cancel --}} @if($sale->status != 'cancel' && $sale->status != 'close')
@if($products) @if($dispatch == 'saved') Despachar Orden @elseif($dispatch == 'preparing' || $dispatch == 'dispatched') Completar Orden @endif @endif
@endif {{--End Show Buttons dispatch, Sale and Cancel --}}
$sale->id]) }}"> @forelse($products as $product) @empty

There is no product

@endforelse
Product Price Amount Comment Dispatch Delete
{{ $product['category'] }} {{ $product['product'] }} @if($product->has('fillings'))
F( @foreach($product['fillings'] as $pf) {{ $pf['filling_name'] }} @endforeach

)

@endif
{{ preg_replace('/\B(?=(\d{3})+(?!\d))/',',',$product['sale_price']) }} {{ $product['amount'] }} @if($product->has('comment_id')) @else @endif {{ $product['dispatch'] }} @if($sale->status != 'cancel' && $sale->status != 'close') @endif
@endsection @push('scripts') @endpush