File: /var/www/html/fieldsblaze-heroku/resources/views/admin/price-book-entry.blade.php
@extends('admin.include.master')
@section('content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>All PriceBook Entry</h1>
</div>
<div class="col-sm-6 text-right">
<button type="button" class="btn btn-sm btn-outline-info mx-1" data-toggle="modal"
data-target="#addPriceBookEntry">Add New</button>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<form action="{{ url('delete-selected-book-entry') }}" method="post" id="deleteSelectedRecord">
@csrf
<div class="card">
<div class="card-header">
<a href="{{ ('price-book-entry') }}" class="btn btn-info btn-sm card-title px-2 mx-1">All <span
class="badge badge-light">{{ $PriceBookEntry->count() }}</span></a>
<a href="{{ ('active-price-book-entry') }}" class="btn btn-default btn-sm card-title px-2 mx-1">Active
<span class="badge badge-info">{{ $ActivePriceBookEntry->count() }}</span></a>
<a href="{{ ('inactive-price-book-entry') }}"
class="btn btn-default btn-sm card-title px-2 mx-1">Inactive <span class="badge badge-info">{{
$InactivePriceBookEntry->count() }}</span></a>
<a href="{{ ('trash-price-book-entry') }}" class="btn btn-default btn-sm card-title px-2 mx-1">Deleted
<span class="badge badge-info">{{ $TrashPriceBookEntry->count() }}</span></a>
<div class="text-right">
<button style="float:right; display:none" type="submit" class="btn btn-sm btn-outline-info mx-1" id="btn-submit"
value="Delete Selected">Delete Selected</button>
</div>
</div>
<!-- /.card-header -->
<div class="card-body">
<table id="accountTable" class="table table-bordered table-striped table-sm">
<thead>
<tr>
<th><input type="checkbox" id="checkAll" onchange="selectRecordDelete()"> All</th>
<th>S.N.</th>
<th>PriceBook</th>
<th>Product</th>
<th>List Price</th>
<th>Currency</th>
<th>Status</th>
<th>Created at</th>
<th>Updated at</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach ($PriceBookEntry as $BookEntry)
<tr>
<td align="middle"><input type="checkbox" id="checkItem" name="SelectedBookEntry[]"
value="{{ $BookEntry->PriceBookEntryId }}" onchange="selectRecordDelete()"></td>
<td>{{$loop->iteration}}</td>
<td>{{ $BookEntry->PriceBookName }}</td>
<td><a href="{{ url('/view-product',$BookEntry->ProductId) }}">{{ $BookEntry->ProductName}}</a>
</td>
<td>₹{{ $BookEntry->ListPrice }}</td>
<td>{{ $BookEntry->Currency }}</td>
<td>
@if ($BookEntry->Status=='1')
<a href="{{ url('/status-update-price-book-entry',$BookEntry->id) }}"
class="btn btn-success bg-success btn-xs" data-toggle="tooltip" data-placement="top"
title="Click to De-activate" data-id="{{ $BookEntry->id }}">Active</a>
@else
<a href="{{ url('/status-update-price-book-entry',$BookEntry->id) }}"
class="btn btn-danger btn-xs" data-toggle="tooltip" data-placement="top"
title="Click to Activate">InActive</a>
@endif
</td>
<td>{{ $BookEntry->Created_by }}, {{ date('d-M-y, h:i a', strtotime($BookEntry->Created_at))}}
</td>
<td>{{ $BookEntry->Updated_by }}, {{ date('d-M-y, h:i a', strtotime($BookEntry->Created_at))}}
</td>
<td>
<div class="btn-group">
<button type="button" class="btn btn-default btn-sm dropdown-toggle dropdown-icon"
data-toggle="dropdown" aria-expanded="false">
</button>
<div class="dropdown-menu dropdown-menu-right" role="menu">
<button type="button" class="dropdown-item btn btn-default" id="{{ $BookEntry->PriceBookEntryId }}"
onclick="editRecord('{{ $BookEntry->PriceBookEntryId }}')">Edit</button>
<button type="button" class="dropdown-item btn btn-default" data-id="{{ $BookEntry->PriceBookEntryId }}"
onclick="deleteBookEntry('{{ $BookEntry->PriceBookEntryId }}');">Delete</button>
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</form>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<x-PriceBookEntryModal />
<!-- /.content-wrapper -->
@endsection