Path : /var/www/html/jewelry-pos/storage/framework/views/ |
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
Current File : /var/www/html/jewelry-pos/storage/framework/views/bed2173839c7985115879ca8f79382c6.php |
<?php $__env->startSection('content'); ?> <div class="" style="display: flex;justify-content: center;width: 100%;height: 100%;background-color: #eee;"> <div class="" style="height: 100%;width: 100%;"> <div class="text-center bg-white print" id="print" style="width: 100%;height: 100%;margin: auto;color: rebeccapurple"> <div class="row" style="display: flex;justify-content: center;align-items: center;color: rebeccapurple;"> <div class="col-sm-6 col-xl-6 p-2" style="border: 1px solid rebeccapurple;display: flex;justify-content: center;align-items: center;"> <h1 style="font-weight: bold;font-size: 24px"><?php echo e($settings_->shop_name); ?></h1> </div> </div> <div class="row m-2"> <div class="col-sm-6 col-xl-6 text-left mt-4" style="font-size: 14px;"> <?php echo e(__('message.cashier')); ?> : <b><?php echo e(Auth::user()->name); ?></b> </div> <div class="col-sm-6 col-xl-6 text-right mt-4" style="font-size: 14px;"> <?php echo e(__('message.invoice date')); ?> : <b><?php echo e(now()->format('d-m-Y H:i')); ?></b> </div> </div> <div class="row m-2"> <div class="col-sm-8 col-xl-8 text-left mt-4" style="font-size: 14px"> <?php echo e(__('message.location')); ?> : <b><?php echo e($settings_->address); ?></b> </div> <div class="col-sm-4 col-xl-4 text-right mt-4" style="font-size: 14px;"> <?php echo e(__('message.phone number')); ?> : <b><?php echo e($settings_->phone); ?></b> </div> </div> <div class="row m-2 text-left"> <?php if($number_of_days > 1): ?> <div class="col-sm-8 col-xl-8 mt-4"> <?php echo e(__('message.date')); ?> : <b><?php echo e(date('d/m/Y' , strtotime($start_date))); ?> - <?php echo e(date('d/m/Y' , strtotime($end_date))); ?></b> </div> <?php else: ?> <div class="col-sm-8 col-xl-8 mt-4"> <?php echo e(__('message.date')); ?> : <b><?php echo e(date('d-m-Y' , strtotime($start_date))); ?></b> </div> <?php endif; ?> <?php if($q): ?> <div class="col-sm-4 col-xl-4 mt-4 text-right"> <?php echo e(__('message.grn')); ?> : <b><?php echo e($q); ?></b> </div> <?php endif; ?> </div> <div class="row mt-4" style="display: flex;justify-content: center;align-items: center;color: rebeccapurple;"> <div class="col-sm-6 col-xl-12 p-2 text-center" style="display: flex;justify-content: center;align-items: center;"> <?php if($number_of_days > 1): ?> <h1 style="font-weight: bold;border-bottom: 2px solid rebeccapurple;font-size: 18px" class=""><?php echo e(__('message.grn monthly report')); ?></h1> <?php else: ?> <h1 style="font-weight: bold;border-bottom: 2px solid rebeccapurple;font-size: 18px" class=""><?php echo e(__('message.grn daily report')); ?></h1> <?php endif; ?> </div> </div> <div class="panel-container show"> <div class="d-flex flex-column h-100"> <div class="h-auto"> <table id="grn-print" class="table table-striped w-100"> <thead class="bg-fusion-400 text-center"> <tr> <th>#</th> <th><?php echo e(__('message.grn')); ?></th> <th><?php echo e(__('message.product category')); ?></th> <th><?php echo e(__('message.total qty')); ?></th> <th><?php echo e(__('message.total cost supplier')); ?></th> <th><?php echo e(__('message.date')); ?></th> </tr> </thead> <tbody class="text-center"> <?php $total_all_cost = 0; $total_all_qty = 0; ?> <?php $__currentLoopData = $productQtyHistories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $productQtyHistory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php // $all = \App\Models\QtyHistory::join('products', 'products.id', '=', 'qty_histories.product_id')->where('qty_histories.grn', '<>', '') // ->where('qty_histories.is_adjustment' , false) // ->whereNull('products.deleted_at') // ->whereBetween('qty_histories.created_at', [$start_date.' 00:00:00', $end_date.' 23:59:59']) // Filter by date range // ->groupBy('qty_histories.grn'); $for_clone = \App\Models\QtyHistory::where('grn' , $productQtyHistory->grn)->where('is_adjustment' , false); if($q){ $total_sum_clone = clone $for_clone; $total_sum_clone1 = clone $for_clone; $total_sum_clone2 = clone $for_clone; // $total_sum_costs = $total_sum_clone->join('products', 'products.id', '=', 'qty_histories.product_id') // ->where('qty_histories.grn', $q) // ->whereNull('products.deleted_at') // 👈 this fixes the ambiguity // ->whereNull('qty_histories.deleted_at') // 👈 if qty_histories also uses SoftDeletes // ->where('qty_histories.qty' , '<>' ,0) // ->sum(DB::raw('qty_histories.qty * products.cost')); $total_sum_costs = $total_sum_clone ->join('products', 'products.id', '=', 'qty_histories.product_id') ->where('qty_histories.grn', $q) ->whereNull('products.deleted_at') // 👈 this fixes the ambiguity ->whereNull('qty_histories.deleted_at') // 👈 if qty_histories also uses SoftDeletes ->where('qty_histories.qty', '<>', 0) ->get(['qty_histories.qty', 'qty_histories.weight as qty_weight', 'products.id']) // you may want to select more fields ->sum(function ($item) { $product = \App\Models\Product::find($item->id); // or preload this in advance return $item->qty * $product->cost($item->qty_weight); // if cost() is a method }); $total_sum_costss = $total_sum_clone1->where('qty_histories.grn', $q) ->where('qty_histories.qty' , '<>' ,0) ->sum(DB::raw('qty_histories.qty * qty_histories.product_cost')); // $total_sum_cost = $total_sum_costss + $total_sum_costs; $total_qty = $total_sum_clone->where('qty_histories.grn', $q) ->where('qty_histories.qty' , '<>' ,0) ->where('qty_histories.grn' , $productQtyHistory->grn) ->sum('qty_histories.qty'); }else{ $total_sum_clone = clone $for_clone; $total_sum_clone1 = clone $for_clone; // $total_sum_costs = $total_sum_clone->join('products', 'products.id', '=', 'qty_histories.product_id') // ->whereNull('products.deleted_at') // 👈 this fixes the ambiguity // ->whereNull('qty_histories.deleted_at') // 👈 if qty_histories also uses SoftDeletes // ->where('qty_histories.qty' , '<>' ,0) // ->sum(DB::raw('qty_histories.qty * products.cost')); $total_sum_costs = $total_sum_clone ->join('products', 'products.id', '=', 'qty_histories.product_id') ->whereNull('products.deleted_at') // 👈 this fixes the ambiguity ->whereNull('qty_histories.deleted_at') // 👈 if qty_histories also uses SoftDeletes ->where('qty_histories.qty', '<>', 0) ->get(['qty_histories.qty', 'qty_histories.weight as qty_weight', 'products.id']) // you may want to select more fields ->sum(function ($item) { $product = \App\Models\Product::find($item->id); // or preload this in advance return $item->qty * $product->cost($item->qty_weight); // if cost() is a method }); $total_sum_costss = $total_sum_clone1 ->where('qty_histories.qty' , '<>' ,0) ->sum(DB::raw('qty_histories.qty * qty_histories.product_cost')); $total_qty = $total_sum_clone ->where('qty_histories.grn' , $productQtyHistory->grn) ->where('qty_histories.qty' , '<>' ,0) ->sum('qty_histories.qty'); // if($productQtyHistory->grn == 'GRN202503012'){ // dd($total_sum_cost , $total_sum_costs , $total_sum_clone->get()); // } } ?> <tr class="text-center border-bottom"> <td> <?php echo e($index+1); ?> </td> <td> <a href="<?php echo e(route('grn-product-list' , $productQtyHistory->grn)); ?>"> <?php echo e($productQtyHistory->grn); ?> </a> </td> <td> <?php echo e($productQtyHistory->product->productCategory->name); ?> </td> <td> <?php echo e($total_qty); ?> </td> <td class="credit"> <?php if($total_sum_costss): ?> <?php echo e(number_format($total_sum_costss , 2)); ?> <?php echo e($currency_->currency_symbol); ?> <?php else: ?> <?php echo e(number_format($total_sum_costs , 2)); ?> <?php echo e($currency_->currency_symbol); ?> <?php endif; ?> </td> <td> <?php echo e($productQtyHistory->created_at->format('d-m-Y H:i')); ?> </td> </tr> <?php $total_sum_cost = $total_sum_costss + $total_sum_costs; if($productQtyHistory->for_sale == 0 && $productQtyHistory->product_cost){ $total_all_cost += $total_sum_costss; }else{ $total_all_cost += $total_sum_costs; } $total_all_qty += $total_qty; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <tr> <th class="credit" colspan="3"><?php echo e(__('message.total')); ?> : </th> <th class="credit"><?php echo e(number_format($total_all_qty , 2)); ?></th> <th class="credit"><?php echo e(number_format($total_all_cost , 2)); ?> <?php echo e($currency_->currency_symbol); ?></th> <th></th> </tr> </tbody> </table> <div class="row mt-10-rem" style="margin-top: 5rem !important;"> <div class="col-1"> </div> <div class="col-3 mt-10-rem" style="margin-top: 5rem !important;"> <h1 class="border-bottom"></h1> <span style="font-weight:bold;color: black"><?php echo e(__('message.prepare by')); ?> : </span> </div> <div class="col-4"> </div> <div class="col-3 mt-10-rem" style="margin-top: 5rem !important;"> <h1 class="border-bottom"></h1> <span style="font-weight:bold;color: black"><?php echo e(__('message.confirm by')); ?> : </span> </div> <div class="col-1"> </div> </div> <!-- datatable end --> </div> </div> </div> <div style="width: 100%;display: flex;justify-content: space-between;align-items: center"> <div class="text-center mt-4 ml-4 notPrint" style="width: 5%;; height: 50%;"> <a href="<?php echo e(route('grn-list')); ?>" id="back" name="back" class="btn-sm btn-danger mt-6 fw-bold notPrint" style="cursor: pointer;color: white;">Back</a> </div> <div class="text-center mt-4 mr-4 notPrint" style="width: 5%;; height: 50%;"> <a id="print" name="print" class="btn-sm btn-info mt-6 fw-bold notPrint" onclick="return print()" style="cursor: pointer;color: white;">Print</a> </div> </div> </div> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('scripts'); ?> <script> window.print(); setTimeout("closePrintView()", 1000); function closePrintView(){ window.location.href = "<?php echo e(route('grn-list')); ?>?start_date=<?php echo e($start_date); ?>&end_date=<?php echo e($end_date); ?>&q=<?php echo e($q); ?>&paginate=<?php echo e($paginate); ?>"; } </script> <script> $(document).ready(function() { $("#js-nav-menu").removeClass('active'); $("#js-nav-menu li ul li").removeClass('active'); // $("#menu_setup_list").addClass('active open'); // $("#collapse_setup").addClass('collapse in') // $("#menu_product").addClass('active') $("#menu_expense_grn").addClass('active') }) </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.admin-main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/jewelry-pos/resources/views/grn-reports/grn-print.blade.php ENDPATH**/ ?>