@extends('layouts/pos_layout') @section('title', '| Product Pricing Add') @section('content') @include('successMsg')
{!! Form::open(['url' => 'pos/addProductPricing','method' => 'get']) !!} {{ csrf_field() }}
{!! Form::label('', 'Supplier:', ['class' => 'control-label pull-left']) !!}
{!! Form::label('', 'Group:', ['class' => 'control-label pull-left']) !!}
{!! Form::label('', 'Category:', ['class' => 'control-label pull-left']) !!}
{!! Form::label('', 'Sub Category:', ['class' => 'control-label pull-left']) !!}
{!! Form::label('', 'Brand:',['class' => 'control-label pull-left']) !!}
{!! Form::label('', 'Model:', ['class' => 'control-label pull-left']) !!}
{!! Form::label('', 'Product Name:', ['class' => 'control-label pull-left']) !!} {!! Form::text('name', $nameSelected, ['class' => 'form-control input-sm', 'id' => 'name', 'type' => 'text', 'placeholder' => 'Enter product name']) !!}
{!! Form::label('', 'Barcode:', ['class' => 'control-label pull-left']) !!} {!! Form::text('barcode', $barcodeSelected, ['class' => 'form-control input-sm', 'id' => 'barcode', 'type' => 'text', 'placeholder' => 'Enter product barcode']) !!}
{!! Form::submit('Search', ['id' => 'search', 'class' => 'btn btn-primary btn-xs', 'style' => 'font-size:15px;']) !!}
{!! Form::close() !!}
{!! Form::open(['url' => '']) !!}
   {!! Form::text('effected_date', $value = null, ['class' => 'form-control input-sm', 'id' => 'effected_date', 'type' => 'text','style' => 'width:150px;','required']) !!}

{{ csrf_field() }} @foreach($products as $product) @php $pricing = App\Models\pos\ProductConfig\PosProductPricing::where('product_id',$product->id)->select('effected_date','sales_price')->orderBy('effected_date','DESC')->first(); if(isset($pricing->sales_price)){ $sale_price = $pricing->sales_price; }else{ $sale_price = $product->sales_price; } @endphp @endforeach
SL# Supplier Catagory Brand Model Product Name Barcode Cost Price Sales Price New Sales Price
{{++$no}} {{$product->supplier->company_name}} {{$product->category->name}} {{$product->brand->name}} {{$product->model->name}} {{$product->name}} {{$product->barcode}} {{$product->cost_price}}{{$sale_price}} {!! Form::text('sales_price[]', $value=null, ['class' => 'form-control input-sm', 'id' => 'sales_price_'.$product->id, 'type' => 'text','style' => 'text-align:right;']) !!}
{!! Form::submit('Save', ['id' => 'savePricing', 'class' => 'btn btn-primary btn-xs', 'style' => 'font-size:15px;']) !!}
{!! Form::close() !!}
@endsection