@extends('layouts/pos_layout') @section('title', '| Edit Installment Package') @section('content')
Edit Installment Package
{!! Form::open(['url' => '', 'role' => 'form', 'class' => 'form-horizontal form-groups']) !!} /home/shikkhaplus/public_html/demo_bk/resources/views/pos/productConfig/installmentPackageMethodDetails/edit.blade.php on line 23
" />
{!! Form::label( 'Package Method', 'Package Method:*', ['class' => 'col-sm-2 control-label'], false, ) !!}
{!! Form::select('method_id', $installmentPackageMethod, $datas->method_id, [ 'class' => 'form-control', 'id' => 'method_id', 'placeholder' => 'Select Type', ]) !!}

{!! Form::label( 'effected_date', 'Effect Date:*', ['class' => 'col-sm-2 control-label'], false, ) !!}
{!! Form::text('effected_date', $value = date('d-m-Y', strtotime($datas->effected_date)), [ 'class' => 'form-control', 'id' => 'effected_date', 'type' => 'text', 'placeholder' => 'Enter Effect From', 'readonly' => true, ]) !!}

{!! Form::label('brand_id', 'Brands:', ['class' => 'col-sm-2 control-label'], false) !!}

{!! Form::label('group_id', 'Groups:', ['class' => 'col-sm-2 control-label'], false) !!}

{!! Form::label('category_id', 'Categories:', ['class' => 'col-sm-2 control-label'], false) !!}

{!! Form::label('sub_category_id', 'Sub Categories:', ['class' => 'col-sm-2 control-label'], false) !!}

{!! Form::label('model_id', 'Models:', ['class' => 'col-sm-2 control-label'], false) !!}

{!! Form::label('product_id', 'Products:', ['class' => 'col-sm-2 control-label'], false) !!}

{!! Form::label('down_payment_percentage', 'Down Payment(%):', ['class' => 'col-sm-2 control-label'], false) !!}
{!! Form::text('down_payment_percentage', $value = $datas->down_payment_percentage, [ 'class' => 'form-control', 'id' => 'down_payment_percentage', 'type' => 'text', 'placeholder' => 'Enter Down Payment (%)', ]) !!}

{!! Form::label('security_money_percentage', 'Security Money(%):', ['class' => 'col-sm-2 control-label'], false) !!}
{!! Form::text('security_money_percentage', $value = $datas->security_money_percentage, [ 'class' => 'form-control', 'id' => 'security_money_percentage', 'type' => 'number', 'placeholder' => 'Enter Security Money (%)', ]) !!}

{!! Form::label( 'category_product_id', 'Config Item *', ['class' => 'col-sm-2 control-label config-item'], false, ) !!}
@php $i = 0; $installmentConfig = json_decode( $datas->month_profit_installment_type, ); @endphp @if ($installmentConfig) @foreach ($installmentConfig as $keyInstallment => $valueInstallment) @php $isDeletedOrEdited = App\Models\pos\Transaction\PosSale::where( 'sales_date', '>=', date('Y-m-d', strtotime($datas->effected_date)), )->count(); @endphp @php $i++; @endphp @endforeach @endif
Month Installment Type Profit Action
@if ($i == 1) @else {{-- {{ dd($isDeletedOrEdited) }} --}} @if ($isDeletedOrEdited < 0) @endif @endif
{!! Form::submit('Update', ['id' => 'add', 'class' => 'btn btn-info']) !!} Close
{!! Form::close() !!}
@endsection {{-- Filtering --}}