/
home
/
sjslayjy
/
public_html
/
mosaram
/
storage
/
framework
/
views
/
Upload File
HOME
<?php $__env->startSection('title','Direct-Labour-Payment'); ?> <?php $__env->startSection('content'); ?> <?php $__env->startSection('style'); ?> <?php echo e(Html::style("assets/css/bootstrap-datepicker3.min.css")); ?> <style> /* Voice Command Section Styles */ .voice-command-container { text-align: center; background: #EFF3F8; color: #18634b; padding: 30px; border-radius: 10px; box-shadow: 12px 12px 6px #b8b9be, -12px -12px 6px #fff !important; margin: 20px auto; max-width: 500px; } .voice-command-title { font-size: 20px; font-weight: bold; margin:10px 0px 20px 0px; color: #7e7e7e!important; } /* Pulse Effect for Microphone */ .voice-command-microphone { position: relative; width: 120px; height: 120px; margin: 0 auto 20px; cursor: pointer; display: flex; justify-content: center; align-items: center; border-color: #d1d9e6; box-shadow: 3px 3px 6px #b8b9be, -3px -3px 6px #fff; transition: all .2s ease; border-radius:50%; background-image: radial-gradient(#7e7e7e 1px, transparent 0); background-size: 10px 10px; } .voice-command-microphone::before { content: ''; position: absolute; width: 100%; height: 100%; background: #FFF; border-radius: 50%; animation: pulse 1.8s infinite; } @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } } .voice-command-icon { font-size: 50px; color: #007bff; position: relative; z-index: 1; } .voice-command-input-group { margin-top: 20px; display: flex; justify-content: center; align-items: center; gap: 10px; } .voice-command-input { flex: 1; max-width: 300px; padding: 10px; box-shadow: inset 2px 2px 5px #b8b9be, inset -3px -3px 7px #fff !important; border-radius: 5px; font-size: 16px; } .voice-command-button { background-color: #044FAB!important; color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 16px; transition: background-color 0.3s; } .voice-command-button:hover { background-color: rgba(0, 191, 255, 0.3); } .voice-command-status { margin-top: 20px; color: #18634b; font-weight: bold; font-size: 1.2em; } .voice-command-display { margin-top: 10px; color: #555; } .shadow-soft { box-shadow: 12px 12px 6px #b8b9be, -12px -12px 6px #fff !important; } .alert-success { background: #EFF3F8; color: #18634b; text-align:center; font-size:15px; } .status-listening { margin-top: 20px; color: green; font-weight: bold; font-size: 1.2em; font-family: 'Arial, Helvetica, sans-serif'; } .status-error { margin-top: 20px; color: red; font-weight: bold; font-size: 1.2em; font-family: 'Arial, Helvetica, sans-serif'; } .status-not-listening { margin-top: 20px; color: red; font-weight: bold; font-size: 1.2em; font-family: 'Arial, Helvetica, sans-serif'; } @keyframes blinking-dot { 0% { content: '.'; opacity: 1; } 50% { content: '.'; opacity: 0; } 100% { content: '.'; opacity: 1; } } </style> <?php $__env->stopSection(); ?> <div class="main-content"> <div class="main-content-inner"> <div class="breadcrumbs ace-save-state" id="breadcrumbs"> <ul class="breadcrumb"> <lui> <i class="ace-icon fa fa-home home-icon"></i> <a href="#"></a> </lui> <li class="active"> Voice Command Based Reports </li> </ul> </div> <div class="page-content"> <div class="row"> <div class="col-xs-12"> <h3 class="header smaller lighter blue"> Voice Command Based Reports </h3> </div> </div> <div class="voice-command-container"> <h1 class="voice-command-title">Click on the microphone to give a command!</h1> <div id="startVoice" class="voice-command-microphone"> <span class="voice-command-icon"><i class="fa fa-microphone" aria-hidden="true"></i></span> </div> <div class="voice-command-input-group"> <input type="text" id="commandInput" class="voice-command-input" placeholder="Type your command here"> <button id="submitCommand" class="voice-command-button">Submit</button> </div> <p id="status" class="voice-command-status">Status: Not Listening!</p> <p id="displayCommand" class="voice-command-display">Command: None!</p> </div> </div> <!--Exclude File Start Here------------------> <div class="page-content"> <div class="row"> <div class="col-xs-12"> <div class="clearfix"> <div class="pull-right tableTools-container"></div> </div> <?php if(session('success')): ?> <div class="alert alert-success"> <?php echo e(session('success')); ?> </div> <?php endif; ?> <?php if(session('error')): ?> <div class="alert alert-danger"> <?php echo e(session('error')); ?> </div> <?php endif; ?> <div class="table-responsive"> <div class="dataTables_borderWrap"> <?php if(Request::is('voice/total-master-rake-summary')): ?> <table id="" class="table table-striped table-bordered table-hover"> <?php else: ?> <table id="dynamic-table" class="table table-striped table-bordered table-hover"> <?php endif; ?> <!-- Check if a command is passed --> <?php if(Request::is('voice/direct-labour-payment-report')): ?> <!-- tbody to show when direct labour payment report command is passed --> <div class="alert alert-success shadow-soft">Latest Results:</div> <thead> <tr> <th>#</th> <th>Master Rake</th> <th>WareHouse</th> <th>Labour Name</th> <th>Amount</th> <th>Description</th> </tr> </thead> <tbody> <?php $__currentLoopData = $direct_labour_payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $labour_payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $masterRake = getModelById('MasterRake', $labour_payment->master_rake_id); $warehouse = getModelById('Warehouse', $labour_payment->warehouse_id); ?> <tr id="tr_<?php echo e($labour_payment->id); ?>"> <td><?php echo e($labour_payment->id); ?></td> <td><?php echo e($masterRake ? $masterRake->name : 'No Data'); ?></td> <td><?php echo e($warehouse ? $warehouse->name : 'No Data'); ?></td> <td><?php echo e($labour_payment->labour_name); ?></td> <td><?php echo e($labour_payment->amount); ?></td> <td><?php echo e($labour_payment->description); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> <?php elseif(Request::is('voice/total-user-report')): ?> <div class="alert alert-success shadow-soft"><span><strong>Total Users : </strong> <?php echo e($totalUserCount); ?></span></div> <thead> <tr> <th>#</th> <th>Name</th> <th>Email</th> <th>Role</th> </tr> </thead> <tbody> <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr id="tr_<?php echo e($user->id); ?>"> <td><?php echo e($user->id); ?></td> <td><?php echo e($user->name); ?></td> <td><?php echo e($user->email); ?></td> <td><?php echo e($user->role->role); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> <?php elseif(Request::has('rake_name')): ?> <div class="alert alert-success shadow-soft"> <span><strong>Total Labour Count:</strong> <?php echo e($unique_labour_names_count); ?> | <strong>Unique Product Name(s):</strong> <?php echo e($unique_product_names); ?> | <strong>Total Quantity:</strong> <?php echo e(number_format($total_quantity, 0)); ?> | <strong>Total Paid Amount:</strong> <?php echo e(number_format($total_paid_amount, 2)); ?></span> </div> <thead> <tr> <th><?php echo e(__('messages.Token')); ?></th> <th><?php echo e(__('messages.LoadingSlip')); ?>#</th> <th><?php echo e(__('messages.Rake')); ?></th> <th><?php echo e(__('messages.Labour')); ?> </th> <th><?php echo e(__('messages.Product')); ?> </th> <th><?php echo e(__('messages.Quantity')); ?></th> <th><?php echo e(__('messages.Rate')); ?></th> <th><?php echo e(__('messages.TruckNumber')); ?> </th> <th><?php echo e(__('messages.PaymentStatus')); ?></th> <th><?php echo e(__('messages.PaidBy')); ?></th> <th><?php echo e(__('messages.PaidAmount')); ?></th> <th><?php echo e(__('messages.Payment')); ?><br><?php echo e(__('messages.Date')); ?></th> </tr> </thead> <tbody> <?php $total_to_pay = 0; $total_paid = 0; ?> <?php $__currentLoopData = $labour_payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $labour_payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr id="tr_<?php echo e($labour_payment->id); ?>"> <td> <?php if(!is_null($labour_payment->token_id)): ?> <?php echo e(getModelById('Token',$labour_payment->token_id)->unique_id); ?> <?php else: ?> <?php endif; ?> </td> <td><?php echo e($labour_payment->product_loading_id); ?></td> <td> <?php if(!is_null(getModelById('MasterRake',$labour_payment->master_rake_id))): ?> <?php echo e(getModelById('MasterRake',$labour_payment->master_rake_id)->name); ?> <?php else: ?> <?php endif; ?> </td> <td><?php echo e($labour_payment->labour_name); ?></td> <td><?php echo e($labour_payment->product_name); ?></td> <td><?php echo e($labour_payment->quantity); ?> <?php echo e($labour_payment->unit_name); ?></td> <td><?php echo e($labour_payment->rate); ?></td> <td><?php echo e($labour_payment->truck_number); ?></td> <td> <?php if($labour_payment->is_paid == 0): ?> <span class="label label-warning">Not Paid</span> <?php else: ?> <span class="label label-success">Paid</span> <?php endif; ?> </td> <td> <?php if($labour_payment->is_paid == 1): ?> <?php echo e(getModelById('User',$labour_payment->paid_by)->name); ?> <?php else: ?> -- <?php endif; ?> </td> <td> <?php if($labour_payment->is_paid == 1): ?> <?php echo e($labour_payment->paid_amount); ?> <?php else: ?> -- <?php endif; ?> </td> <td> <?php if($labour_payment->is_paid == 1): ?> <?php echo e(date('d/m/Y',strtotime($labour_payment->payment_date))); ?> <?php else: ?> -- <?php endif; ?> </td> <?php if($labour_payment->is_paid == 1){ $total_paid = $total_paid + ($labour_payment->paid_amount); } $total_to_pay = $total_to_pay + ($labour_payment->quantity * $labour_payment->rate); ?> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td><?php echo e($total_paid); ?>/<?php echo e($total_to_pay); ?></td> <td></td> </tr> </tbody> <?php elseif(Request::is('voice/total-stock-report')): ?> <div class="alert alert-success shadow-soft"> <strong>Total Available Stock:</strong> <?php echo e(number_format($total_stock_quantity, 0)); ?> </div> <thead> <tr> <th>Dealer</th> <th>Product</th> <th>Warehouse</th> <th>Quantity</th> </tr> </thead> <tbody> <?php if(!empty($stock) && count($stock) > 0): ?> <?php $__currentLoopData = $stock; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($item['dealer']); ?></td> <td><?php echo e($item['product']); ?></td> <td><?php echo e($item['warehouse']); ?></td> <td><?php echo e($item['quantity']); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php else: ?> <tr> <td colspan="4" class="text-center">No data available! Please provide a valid product name to view stock records.</td> </tr> <?php endif; ?> </tbody> <?php elseif(Request::is('voice/total-sale-report')): ?> <div class="alert alert-success shadow-soft"><strong>Total Sale Qty of Product :</strong> <?php echo e(number_format($total_amount, 2)); ?> | <strong>Total Sale of Amount of Product :</strong> <?php echo e(number_format($total_sale_quantity, 2)); ?> </div> <thead> <tr> <th>Dealer</th> <th>Product</th> <th>Invoice Type</th> <th>Invoice Number</th> <th>Quantity</th> <th>Rate</th> <th>Freight Discount</th> <th>Total</th> </tr> </thead> <tbody> <?php if(!empty($saleData) && count($saleData) > 0): ?> <?php $__currentLoopData = $saleData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($item['dealer']); ?></td> <td><?php echo e($item['product']); ?></td> <td><?php echo e($item['invoice_type']); ?></td> <td><?php echo e($item['invoice_number']); ?></td> <td><?php echo e($item['quantity']); ?></td> <td><?php echo e($item['rate']); ?></td> <td><?php echo e($item['rate'] * $item['quantity']); ?></td> <td><?php echo e($item['freight_discount']); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php else: ?> <tr> <td colspan="7" class="text-center">No sales data available! Please provide a valid products to view sale records.</td> </tr> <?php endif; ?> </tbody> <?php elseif(Request::is('voice/total-purchase-report')): ?> <div class="alert alert-success shadow-soft"><strong>Total Purchase Data : </strong></div> <thead> <tr> <th>Product</th> <th>Quantity</th> <th>Amount</th> </tr> </thead> <tbody> <?php if(!empty($purchaseData) && count($purchaseData) > 0): ?> <?php $__currentLoopData = $purchaseData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $purchase): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($purchase['product']); ?></td> <td><?php echo e($purchase['quantity']); ?></td> <td><?php echo e($purchase['amount']); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php else: ?> <tr> <td colspan="7" class="text-center">No sales data available! Please provide a valid products to view purchase records.</td> </tr> <?php endif; ?> </tbody> <?php elseif(Request::is('voice/total-invoice-report')): ?> <div class="alert alert-success shadow-soft"> <strong>Total Generated Invoices:</strong> <?php echo e($total); ?> | <strong>Total Generated Invoice Amount:</strong> <?php echo e(number_format($total_amount, 2)); ?> </div> <thead> <tr> <th>Invoice</th> <th>Retailer Name</th> <th>Of Amount</th> </tr> </thead> <tbody> <?php if(!empty($invoices) && count($invoices) > 0): ?> <?php $__currentLoopData = $invoices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $invoice): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($invoice['invoice_number']); ?></td> <td><?php echo e($invoice['retailer_name']); ?></td> <td><?php echo e($invoice['amount']); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php else: ?> <tr> <td colspan="7" class="text-center">No sales data available! Please provide a valid products to view purchase records.</td> </tr> <?php endif; ?> </tbody> <?php elseif(Request::is('voice/product-wise-detailed-data')): ?> <div class="alert alert-success shadow-soft"><strong>Detailed Data of Product : </strong></div <thead> <tr> <th>Total Stock Count</th> <th>Total Stock Amount</th> <th>Total Sale Count</th> <th>Total Sale Amount</th> <th>Purchase Total Count</th> <th>Purchase Total Amount</th> <th>Token Total Count</th> <th>Token Amount</th> <th>Invoice Total Cont</th> <th>Invoice Total Amount</th> </tr> </thead> <tbody> <?php if(isset($response) && count($response) > 0): ?> <tr> <td><?php echo e($response['stockTotal'] ?? 0); ?></td> <td><?php echo e($response['totalStockAmount'] ?? 0); ?></td> <td><?php echo e($response['saleTotal'] ?? 0); ?></td> <td><?php echo e($response['totalSaleAmount'] ?? 0); ?></td> <td><?php echo e($response['purchaseTotal'] ?? 0); ?></td> <td><?php echo e($response['purchaseAmountTotal'] ?? 0); ?></td> <td><?php echo e($response['tokenTotal'] ?? 0); ?></td> <td><?php echo e($response['invoiceTokanAmount'] ?? 0); ?></td> <td><?php echo e($response['invoiceTotal'] ?? 0); ?></td> <td><?php echo e($response['invoiceTotalAmount'] ?? 0); ?></td> </tr> <?php else: ?> <tr> <td colspan="5" class="text-center">No data available! Please provide a valid product to view detailed records.</td> </tr> <?php endif; ?> </tbody> <?php elseif(Request::is('voice/log-details')): ?> <div class="alert alert-success shadow-soft">Latest Results:</div> <thead> <tr> <th>User</th> <th>Module</th> <th>Error</th> <th>Date</th> </tr> </thead> <tbody> <?php $__currentLoopData = $logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e(getModelById('User',$log->user_id)->name); ?></td> <td><?php echo e($log->module); ?></td> <td><?php echo e($log->error); ?></td> <td><?php echo e($log->created_at->format('Y-m-d H:i:s') ?? 'NA'); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> <?php elseif(Request::is('voice/user-log-details')): ?> <div class="alert alert-success shadow-soft"> <marquee><strong>Latest Results: </strong> <?php $__currentLoopData = $logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <span><?php echo e($log->error ?? 'NA'); ?></span><span>on date : <?php echo e($log->created_at->format('Y-m-d H:i:s') ?? 'NA'); ?></span> | <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </marquee> </div> <thead> <tr> <th>User</th> <th>Module</th> <th>Error</th> <th>Date</th> </tr> </thead> <tbody> <?php if(isset($logs) && count($logs) > 0): ?> <?php $__currentLoopData = $logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e(getModelById('User',$log->user_id)->name ?? 'NA'); ?></td> <td><?php echo e($log->module ?? 'NA'); ?></td> <td><?php echo e($log->error ?? 'NA'); ?></td> <td><?php echo e($log->created_at->format('Y-m-d H:i:s') ?? 'NA'); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php else: ?> <tr> <td colspan="4" class="text-center">No logs found for the specified User!</td> </tr> <?php endif; ?> </tbody> <?php elseif(Request::is('voice/user-status')): ?> <div class="alert alert-success shadow-soft"> <span><strong>Total User Count: </strong><?php echo e($total_users_count); ?></span> | <span><strong>User(s) Online: </strong> <?php if($online_users->isEmpty()): ?> <span>No users online found!</span> <?php else: ?> <?php $__currentLoopData = $online_users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <span><?php echo e($user); ?></span> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> </span> </div> <thead> <tr> <th>User Id</th> <th>User Name</th> <th>Status</th> <th>Battery Level</th> <th>Version</th> <th>Last GPS Time</th> </tr> </thead> <tbody> <?php $__currentLoopData = $user_status; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($value->user_id); ?></td> <td><?php echo e(getModelById('User',$value->user_id)->name); ?></td> <td> <?php date_default_timezone_set("Asia/Kolkata"); $updatedDate=date_create($value->updated_at); $currentDate=date_create(date('Y-m-d H:i:s')); $diff=date_diff($updatedDate,$currentDate); $diffDay = $diff->format("%a"); $diffHour = $diff->format("%h"); $diffMin = $diff->format("%i"); ?> <?php if(($diffDay == 0) && ($diffHour==0) &&($diffMin<=30) && ($value->status=='On')): ?> <span class="badge badge-success">Online</span> <?php elseif($value->status=='Off'): ?> <span class="badge badge-danger">Offline</span> <?php else: ?> <span class="badge badge-danger">Offline</span> <?php endif; ?></td> <td><?php echo e($value->batterylevel); ?>%</td> <td><?php echo e(getModelById('User',$value->user_id)->version); ?></td> <td><?php echo e(date('d-M-Y h:i:s A',strtotime($value->updated_at))); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> <?php elseif(Request::is('voice/attendance-chart')): ?> <div class="alert alert-success shadow-soft">Latest Results:</div> <thead> <tr> <th colspan="2"></th> <th colspan="31" style="background-color: gray; color: white; "><center>Days(<?php if(empty($month)){ echo $month = date('m'); }else{echo $month;}?>-<?php if(empty($year)){ echo $year = date('Y'); }else{echo $year;} ?>)</center></th> </tr> <th>#</th> <?php if(empty($month)){ $month = date('m'); }?> <?php if(empty($year)){ $year = date('Y'); }?> <th>Emp Name</th> <?php for($i=01;$i<=28;$i++){?> <th><?php echo $i ;?></th> <?php } ?> <?php if($month != '02'){ ?> <?php if($year % 4 == 0 && $month == '02') { ?> <th>29</th> <?php }elseif($year % 4 != 0 && $month != '02' || $year % 4 == 0 && $month != '02') { ?> <th>29</th> <th>30</th> <?php $month30days = array("04","11","06","09"); if(!in_array($month,$month30days)){ ?> <th>31</th> <?php $days=31; }else{ $days=30; } } }elseif($month == '02' && $year % 4 == 0){?> <th>29</th> <?php $days=29; }elseif($month == '02' && $year % 4 != 0){ $days=28; } ?> </thead> <tbody> <?php $i = 1; foreach($users as $val){ ?> <tr> <td><?php echo $i; ?></td> <td><?php echo e(getUserById($val['user_id'])->name); ?></td> <?php for($j=01; $j<=$days;$j++){ $date = $year.'-'.$month.'-'.$j; // dd($date); if(strtotime($date) > strtotime(date('Y-m-d'))){ echo "<td style='background-color:gray; color:black'></td>"; }else{ $getreport = getReport($val['user_id'],$date); if(!empty($getreport)){ // $status = $getreport['in_count']; echo"<td style='background-color:#4BB543; color:black'><b>P</b></br>(".date('H:i', strtotime($getreport['in_time'])).")</td>"; }else{ echo "<td style='background-color:#f46736; color:black'><b>A</b></td>"; } } }?> </tr> <?php $i++; }?> </tbody> <?php elseif(Request::is('voice/warehouse-transfer-product')): ?> <div class="alert alert-success shadow-soft">Latest Results:</div> <thead> <tr> <th>#</th> <th>From Warehouse</th> <th>To Warehouse</th> <th>Brand</th> <th>Product</th> <th>Quantity</th> <th>Transporter</th> <th>Truck #</th> <th>Freight</th> <th>Freight Payment <br>Status</th> <th>Freight <br>Paid <br>Amount</th> <th>Freight <br>Payment<br>Date</th> <th>Labour<br>Name</br></th> <th>Labour <br>Rate</th> <th>Labour <br>Payment<br>Date</th> <th>Labour Payment <br>Status</th> <th>Labour <br>Paid <br>Amount</th> <th>Transfer<br>Date</th> <th></th> </tr> </thead> <tbody> <?php $__currentLoopData = $warehouse_transfer_loadings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $warehouse_transfer_loading): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($warehouse_transfer_loading->id); ?></td> <td><?php echo e($warehouse_transfer_loading->from_warehouse->name); ?></td> <td><?php echo e($warehouse_transfer_loading->to_warehouse->name); ?></td> <td><?php echo e($warehouse_transfer_loading->product_brand->name); ?></td> <td><?php echo e($warehouse_transfer_loading->product->name); ?></td> <td><?php echo e($warehouse_transfer_loading->quantity); ?> <?php echo e($warehouse_transfer_loading->unit->unit_name); ?></td> <td> <?php if(!is_null($warehouse_transfer_loading->transporter)): ?> <?php echo e($warehouse_transfer_loading->transporter->name); ?> <?php else: ?> -- <?php endif; ?> </td> <td><?php echo e($warehouse_transfer_loading->truck_number); ?></td> <td><?php echo e($warehouse_transfer_loading->freight); ?></td> <td> <?php if($warehouse_transfer_loading->is_freight_paid): ?> <span class="label label-success">Paid</span> <?php else: ?> <span class="label label-warning">Not Paid</span> <?php endif; ?> </td> <td><?php echo e($warehouse_transfer_loading->freight_amount_paid); ?></td> <td><?php echo e($warehouse_transfer_loading->freight_payment_date); ?></td> <td><?php echo e($warehouse_transfer_loading->labour_name); ?></td> <td><?php echo e($warehouse_transfer_loading->labour_rate); ?></td> <td><?php echo e($warehouse_transfer_loading->labour_payment_date); ?></td> <td> <?php if($warehouse_transfer_loading->is_labour_paid): ?> <span class="label label-success">Paid</span> <?php else: ?> <span class="label label-warning">Not Paid</span> <?php endif; ?> </td> <td><?php echo e($warehouse_transfer_loading->labour_paid_amount); ?></td> <td><?php echo e(date('d/m/Y',strtotime($warehouse_transfer_loading->created_at))); ?></td> <td><a href="<?php echo e(URL('/user/print-warehouse-transfer-loading-slip/'.$warehouse_transfer_loading->id)); ?>"><i class="fa fa-print fa-2x"></i></a></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> <?php elseif(Request::is('voice/restore-product')): ?> <div class="alert alert-success shadow-soft">Latest Results:</div> <thead> <tr> <th>Return Date</th> <th>Retailer</th> <th>Receiving <br> Warehouse</th> <th>Brand</th> <th>Product</th> <th>Quantity</th> <th>Transporter</th> <th>Truck #</th> <th>Freight</th> <th>Freight Payment <br>Status</th> <th>Freight <br>Paid <br>Amount</th> <th>Freight <br>Paid <br>Date</th> <th>Labour</th> <th>Labour <br>Rate</th> <th>Labour Payment <br>Status</th> <th>Labour <br>Paid <br>Amount</th> <th>Labour <br>Paid <br>Date</th> <th></th> </tr> </thead> <tbody> <?php $__currentLoopData = $returned_products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $returned_product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e(date('d/m/Y',strtotime($returned_product->created_at))); ?></td> <td><?php echo e(getModelById('Retailer',$returned_product->retailer_id)->name); ?> <br> <b><?php echo e(getModelById('Dealer',$returned_product->dealer_id)->name); ?></b> </td> <td><?php echo e($returned_product->warehouse->name); ?></td> <td><?php echo e($returned_product->product_brand->name); ?></td> <td><?php echo e($returned_product->product->name); ?></td> <td><?php echo e($returned_product->returned_quantity); ?> <?php echo e($returned_product->unit->unit_name); ?></td> <td><?php if(!is_null($returned_product->transporter)): ?> <?php echo e($returned_product->transporter->name); ?> <?php endif; ?> </td> <td><?php echo e($returned_product->vehicle_number); ?></td> <td><?php echo e($returned_product->freight); ?></td> <td> <?php if($returned_product->is_freight_paid): ?> <span class="label label-success">Paid</span> <?php else: ?> <span class="label label-warning">Not Paid</span> <?php endif; ?> </td> <td><?php echo e($returned_product->freight * $returned_product->returned_quantity); ?></td> <td> <?php if($returned_product->is_freight_paid): ?> <?php echo e(date('d/m/Y',strtotime($returned_product->freight_payment_date))); ?> <?php endif; ?> </td> <td><?php echo e($returned_product->labour_name); ?></td> <td><?php echo e($returned_product->labour_rate); ?></td> <td> <?php if($returned_product->is_labour_paid): ?> <span class="label label-success">Paid</span> <?php else: ?> <span class="label label-warning">Not Paid</span> <?php endif; ?> </td> <td><?php echo e($returned_product->paid_labour_amount); ?></td> <td> <?php if($returned_product->is_labour_paid): ?> <?php echo e(date('d/m/Y',strtotime($returned_product->labour_payment_date))); ?> <?php endif; ?> </td> <td><a href="<?php echo e(URL('/user/print-returned-product-slip/'.$returned_product->id)); ?>"><i class="fa fa-print fa-2x"></i></a></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> <?php elseif(Request::is('voice/standard-labour-payments')): ?> <div class="alert alert-success shadow-soft">Latest Results:</div> <thead> <tr> <th>#</th> <th> <?php echo e(__('messages.Date')); ?></th> <th> <?php echo e(__('messages.Warehouse')); ?></th> <th> Party</th> <th>Open <?php echo e(__('messages.Product')); ?> Brand</th> <th>Closed <?php echo e(__('messages.Product')); ?> Brand</th> <th>Open <?php echo e(__('messages.Product')); ?></th> <th>Closed <?php echo e(__('messages.Product')); ?></th> <th> Open <br>Quantity</th> <th> Packed <br>Quantity</th> <th> Sweeping <br>Quantity</th> <th> Excess <br>Quantity</th> <th> Shortage <br>Quantity</th> <th> <?php echo e(__('messages.Labour')); ?> </th> <th> Labour <br>Rate </th> <th>Amount</th> <th><?php echo e(__('messages.PaymentStatus')); ?></th> <th><?php echo e(__('messages.PaidBy')); ?></th> <th><?php echo e(__('messages.PaidAmount')); ?></th> <th><?php echo e(__('messages.Payment')); ?><br><?php echo e(__('messages.Date')); ?></th> <th></th> </tr> </thead> <tbody> <?php $total_to_pay = 0; $total_paid = 0; ?> <?php $__currentLoopData = $standardizations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $standardization): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td><?php echo e($standardization->id); ?></td> <td><?php echo e(date('d/m/Y',strtotime($standardization->created_at))); ?></td> <td> <?php if(!is_null(getModelById('Warehouse',$standardization->warehouse_id))): ?> <?php echo e(getModelById('Warehouse',$standardization->warehouse_id)->name); ?> <?php endif; ?> </td> <td> <?php if(!is_null(getModelById('Dealer',$standardization->dealer_id))): ?> <?php echo e(getModelById('Dealer',$standardization->dealer_id)->name); ?> <br> ( <?php echo e(getModelById('Dealer',$standardization->dealer_id)->address1); ?>) <br> <b>Dealer</b> <?php else: ?> <?php echo e(getModelById('ProductCompany',$standardization->product_company_id)->name); ?> <br> <b>Product Company</b> <?php endif; ?> </td> <td> <?php if(!is_null(getModelById('ProductCompany',$standardization->open_product_brand_id))): ?> <?php echo e(getModelById('ProductCompany',$standardization->open_product_brand_id)->name); ?> <?php endif; ?> </td> <td> <?php if(!is_null(getModelById('ProductCompany',$standardization->closed_product_brand_id))): ?> <?php echo e(getModelById('ProductCompany',$standardization->closed_product_brand_id)->name); ?> <?php endif; ?> </td> <td> <?php if(!is_null(getModelById('Product',$standardization->open_product_id))): ?> <?php echo e(getModelById('Product',$standardization->open_product_id)->name); ?> <?php endif; ?> </td> <td> <?php if(!is_null(getModelById('Product',$standardization->closed_product_id))): ?> <?php echo e(getModelById('Product',$standardization->closed_product_id)->name); ?> <?php endif; ?> </td> <td><?php echo e($standardization->open_quantity); ?></td> <td><?php echo e($standardization->packed_quantity); ?></td> <td><?php echo e($standardization->shooping_quantity); ?></td> <?php $shortage = $standardization->open_quantity - $standardization->packed_quantity-$standardization->shooping_quantity; ?> <td> <?php echo e(abs($shortage)); ?> </td> <td> <?php if($shortage >= 0 ): ?> <?php echo e($shortage); ?> <?php endif; ?> </td> <td><?php echo e($standardization->labour_name); ?></td> <td><?php echo e($standardization->labour_rate); ?></td> <td><?php echo e($standardization->packed_quantity * $standardization->labour_rate); ?></td> <td> <?php if($standardization->is_paid == 0): ?> <span class="label label-warning">Not Paid</span> <?php else: ?> <span class="label label-success">Paid</span> <?php endif; ?> </td> <td> <?php if($standardization->is_paid == 1): ?> <?php echo e(getModelById('User',$standardization->paid_by)->name); ?> <?php else: ?> -- <?php endif; ?> </td> <td> <?php if($standardization->is_paid == 1): ?> <?php echo e($standardization->payment_amount); ?> <?php else: ?> -- <?php endif; ?> </td> <td> <?php if($standardization->is_paid == 1): ?> <?php echo e(date('d/m/Y',strtotime($standardization->payment_date))); ?> <?php else: ?> -- <?php endif; ?> </td> <td><a href="<?php echo e(URL('/user/print-standardization-slip/'.$standardization->id)); ?>"><i class="fa fa-print fa-2x"></i></a></td> </tr> <?php if($standardization->is_paid == 1){ $total_paid = $total_paid + ($standardization->payment_amount); } $total_to_pay = $total_to_pay + ($standardization->packed_quantity * $standardization->labour_rate); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td><?php echo e($total_paid); ?>/<?php echo e($total_to_pay); ?></td> <td></td> </tr> </tbody> <?php elseif(Request::is('voice/rake-payment')): ?> <div class="alert alert-success shadow-soft">Latest Results:</div> <thead> <tr> <th>Freight Payments</th> <th>Date</th> <th>Loading Labour <br>Payments</th> <th>Unloading Labour <br>Payments</th> <th>Direct Labour <br>Payments</th> <th>Wagon Unloading <br>Payments</th> <th>Total</th> </tr> </thead> <tbody> <tr> <td><?php echo e(isset($total_freight_payments) ? $total_freight_payments:"0"); ?></td> <td><?php echo e(isset($date) ? $date:"0"); ?></td> <td><?php echo e(isset($total_labour_payments) ? $total_labour_payments:"0"); ?></td> <td><?php echo e(isset($total_unloading_labour_payments) ? $total_unloading_labour_payments:"0"); ?></td> <td><?php echo e(isset($total_direct_labour_payments) ? $total_direct_labour_payments:"0"); ?></td> <td><?php echo e(isset($total_wagon_unloadings) ? $total_wagon_unloadings:"0"); ?></td> <td><?php echo e(isset($total) ? $total:"0"); ?></td> </tr> </tbody> <?php elseif(Request::is('voice/total-master-rakes')): ?> <div class="alert alert-success shadow-soft"><strong>Total Master Rakes</strong> : <?php echo e($master_rakes_count); ?></div> <thead> <tr> <th>Name</th> <th>Session</th> <th>Rake Point</th> <th>Product Company</th> <th>Placement Time</th> <th>Unloading Time</th> <th>Date</th> <th>RR Document</th> <th></th> </tr> </thead> <tbody> <?php $__currentLoopData = $master_rakes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $master_rake): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr id="tr_<?php echo e($master_rake->id); ?>"> <td><?php echo e($master_rake->name); ?></td> <td><?php echo e(getModelById('Session',$master_rake->session_id)->session); ?></td> <td><?php echo e(getModelById('RakePoint',$master_rake->rake_point_id)->rake_point); ?></td> <td><?php echo e(getModelById('ProductCompany',$master_rake->product_company_id)->name); ?></td> <td><?php echo e($master_rake->loading_time); ?></td> <td><?php echo e($master_rake->unloading_time); ?></td> <td><?php echo e(date('d-m-Y',strtotime($master_rake->date))); ?></td> <td><?php if(!is_null($master_rake->rr_document) || $master_rake->rr_document != ""): ?> <a href="<?php echo e(URL('/').$master_rake->rr_document); ?>" download="download"><i class="fa fa-download"></i></a> <?php endif; ?></td> <td> <?php if($master_rake->is_closed==0): ?> <div class="hidden-sm hidden-xs btn-group"> <a class="btn btn-xs btn-info" onclick="getEdit(<?php echo e($master_rake->id); ?>)" title="Edit"> <i class="ace-icon fa fa-pencil bigger-120"></i> </a> <button class="btn btn-xs btn-danger" onclick="deleteMasterRake(<?php echo e($master_rake->id); ?>)" title="Delete"> <i class="ace-icon fa fa-trash-o bigger-120"></i> </button> <button class="btn btn-xs btn-alert" onclick="lockMasterRake(<?php echo e($master_rake->id); ?>)" title="Lock"> <i class="ace-icon fa fa-ban bigger-120"></i> </button> </div> <?php endif; ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> <?php elseif(Request::is('voice/total-master-rake-summary')): ?> <div class="alert alert-success shadow-soft">Generated Results :</div> <thead> <tr> <th> <?php echo e(__('messages.Party')); ?> <?php echo e(__('messages.Name')); ?></th> <th> <?php echo e(__('messages.Product')); ?></th> <th> <?php echo e(__('messages.Allotment')); ?> <?php echo e(__('messages.From')); ?><br/> <?php echo e(__('messages.ProductCompany')); ?></th> <?php if(isset($allotments)): ?> <?php $__currentLoopData = $date_range; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$date): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $total_datewise_quantity[$date] = array(); ?> <th><?php echo e(date('d-m-y',strtotime($date))); ?></th> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <th> <?php echo e(__('messages.Total')); ?></th> <th> <?php echo e(__('messages.Pending')); ?> <?php echo e(__('messages.Quantity')); ?></th> </tr> </thead> <tbody> <?php if(isset($allotments)): ?> <?php $total_company_allotment = array(); $total_loading_allotment = array(); $pending_allotment = array(); ?> <?php $__currentLoopData = $allotments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $allotment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr id="tr_<?php echo e($allotment->id); ?>"> <td style="word-wrap: break-word; width:350px; padding: 10px;"><?php echo e(getModelById('Dealer',$allotment->dealer_id)->name); ?>(<?php echo e(getModelById('Dealer',$allotment->dealer_id)->address1); ?>)</td> <td> <?php echo e(getModelById('Product',$allotment->product_id)->name); ?> </td> <td><?php echo e($allotment->alloted_quantity); ?></td> <?php if(isset($allotments)): ?> <?php @array_push($total_company_allotment, $allotment->alloted_quantity); $total = 0; ?> <?php $__currentLoopData = $date_range; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$date): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <td> <?php $dates = $date; $date = date('Y-m-d',strtotime($date)); $product_loadings = \App\ProductLoading::where('dealer_id',$allotment->dealer_id) ->where('product_id',$allotment->product_id) ->where('master_rake_id',$allotment->master_rake_id) ->where('from_warehouse_id',null) ->whereRaw('DATE(created_at) = ?', [$date]) ->sum('quantity'); $total_amt = $product_loadings; $total = $total + $product_loadings; array_push($total_datewise_quantity[$dates], $total_amt); ?> <?php echo e($product_loadings); ?> </td> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <td><?php echo e($total); ?></td> <td><?php echo e($allotment->alloted_quantity-$total); ?></td> </tr> <?php @array_push($total_loading_allotment, $total); @array_push($pending_allotment, $allotment->alloted_quantity-$total); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <tr> <th> <?php echo e(__('messages.Total')); ?> (<?php echo e(__('messages.with')); ?> <?php echo e(__('messages.Allotment')); ?>)</th> <th></th> <th><?php echo e(array_sum($total_company_allotment)); ?></th> <?php if(isset($allotments)): ?> <?php $__currentLoopData = $date_range; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$date): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <th><?php echo e(array_sum($total_datewise_quantity[$date])); ?></th> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <th><?php echo e(array_sum($total_loading_allotment)); ?></th> <th><?php echo e(array_sum($pending_allotment)); ?></th> </tr> <?php $__currentLoopData = $warehouse_allotments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $warehouse_allotment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td style="word-wrap: break-word; width:350px; padding: 10px;"><?php echo e(getModelById('Warehouse',$warehouse_allotment->warehouse_id)->name); ?>(<?php echo e(getModelById('Warehouse',$warehouse_allotment->warehouse_id)->location); ?>)</td> <td></td> <td></td> <?php $warehouse_total = 0; ?> <?php $__currentLoopData = $date_range; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$date): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <td> <?php $dates = $date; $date = date('Y-m-d',strtotime($date)); if(isset($product_id) && $product_id != ""){ $product_loadings = \App\ProductLoading::where('warehouse_id',$warehouse_allotment->warehouse_id) ->where('product_id',$product_id) ->where('master_rake_id',$master_rake_id) ->whereRaw('DATE(created_at) = ?', [$date]) ->where('loading_slip_type',2) ->sum('quantity'); }else{ $product_loadings = \App\ProductLoading::where('warehouse_id',$warehouse_allotment->warehouse_id) ->whereRaw('DATE(created_at) = ?', [$date]) ->where('master_rake_id',$master_rake_id) ->where('loading_slip_type',2) ->sum('quantity'); } $total_amt = $product_loadings; $warehouse_total = $warehouse_total + $product_loadings; array_push($total_datewise_quantity[$dates], $total_amt); ?> <?php echo e($product_loadings); ?> </td> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <td><?php echo e($warehouse_total); ?></td> <td></td> </tr> <?php @array_push($total_loading_allotment, $warehouse_total); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <tr> <th><?php echo e(__('messages.Total')); ?> (<?php echo e(__('messages.Allotment')); ?> <?php echo e(__('messages.with')); ?>/<?php echo e(__('messages.without')); ?>)</th> <th></th> <th><?php echo e(array_sum($total_company_allotment)); ?></th> <?php if(isset($allotments)): ?> <?php $__currentLoopData = $date_range; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$date): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <th><?php echo e(array_sum($total_datewise_quantity[$date])); ?></th> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <th><?php echo e(array_sum($total_loading_allotment)); ?></th> <th><?php echo e(array_sum($pending_allotment)); ?></th> </tr> <tr> <td>RR <?php echo e(__('messages.Quantity')); ?></td> <td></td> <td></td> <td></td> <td></td> <td> <?php if(isset($product_id) && $product_id != ""): ?> <?php $master_rake_product = \App\MasterRakeProduct::where('master_rake_id',$master_rake_id)->where('product_id',$product_id)->first(); echo $master_rake_product->quantity; ?> <?php else: ?> <?php $total_rr = \App\MasterRakeProduct::where('master_rake_id',$master_rake_id)->sum('quantity'); echo $total_rr; ?> <?php endif; ?> </td> </tr> <tr> <td>Rake Shortage</td> <td></td> <td></td> <td></td> <td></td> <td> <?php if(isset($product_id) && $product_id != ""): ?> <?php $master_rake_product = \App\MasterRakeProduct::where('master_rake_id',$master_rake_id)->where('product_id',$product_id)->first(); echo $master_rake_product->shortage_from_company; ?> <?php endif; ?> </td> </tr> <tr> <td>Net Received RR</td> <td></td> <td></td> <td></td> <td></td> <td> <?php if(isset($product_id) && $product_id != ""): ?> <?php $master_rake_product = \App\MasterRakeProduct::where('master_rake_id',$master_rake_id)->where('product_id',$product_id)->first(); echo ($master_rake_product->quantity - $master_rake_product->shortage_from_company); ?> <?php else: ?> <?php $total_rr = \App\MasterRakeProduct::where('master_rake_id',$master_rake_id)->sum('quantity'); echo $total_rr; ?> <?php endif; ?> </td> </tr> <?php $returned = 0; ?> <tr> <td>Returned</td> <td></td> <td></td> <td></td> <td></td> <td> <?php if(isset($product_id) && $product_id != ""): ?> <?php $returned = \App\ProductLoading::where('master_rake_id',$master_rake_id)->where('product_id',$product_id)->where('loading_slip_type',1)->where('recieved_quantity','>',0)->sum('recieved_quantity'); echo $returned; ?> <?php else: ?> <?php $returned = \App\ProductLoading::where('master_rake_id',$master_rake_id)->where('loading_slip_type',1)->where('recieved_quantity','>',0)->sum('recieved_quantity'); echo $returned; ?> <?php endif; ?> </td> </tr> <tr> <?php if(isset($product_id) && $product_id != ""): ?> <?php $master_rake_product = \App\MasterRakeProduct::where('master_rake_id',$master_rake_id)->where('product_id',$product_id)->first(); $excess_shortage = array_sum($total_loading_allotment) - ($master_rake_product->quantity - $master_rake_product->shortage_from_company); ?> <?php else: ?> <?php $total_rr = \App\MasterRakeProduct::where('master_rake_id',$master_rake_id)->sum('quantity'); $excess_shortage = array_sum($total_loading_allotment) - $total_rr ?> <?php endif; ?> <td> <?php if($excess_shortage > 0): ?> <?php echo e(__('messages.Excess')); ?> <?php else: ?> Shortage <?php endif; ?> </td> <td></td> <td></td> <td></td> <td></td> <td> <?php echo e($excess_shortage); ?> </td> </tr> <?php endif; ?> </tbody> <?php elseif(Request::is('voice/total-warehouse-token')): ?> <div class="alert alert-success shadow-soft d-flex flex-wrap justify-content-start"> <span class="p-2 m-1 bg-light border rounded"> <strong>Total Number of Generated Tokens No:</strong> <?php echo e($tokens->count()); ?> </span> | <span class="p-2 m-1 bg-light border rounded"> <strong>Total Generated Tokens Qty:</strong> <?php echo e($total_quantity); ?> </span> | <span class="p-2 m-1 bg-light border rounded"> <strong>Total Remaining Tokens Qty:</strong> <?php echo e($total_remaining_quantity); ?> </span> | <span class="p-2 m-1 bg-light border rounded"> <strong>Total Products:</strong> <?php if($tokens->isEmpty()): ?> No products found. <?php else: ?> <?php $uniqueProducts = $tokens->pluck('product_id')->unique(); ?> <?php echo e($uniqueProducts->map(fn($id) => getModelById('Product', $id)->name)->implode(', ')); ?> <?php endif; ?> </span> </div> <thead> <tr> <th><?php echo e(__('messages.Date')); ?></th> <th><?php echo e(__('messages.TokenNumber')); ?></th> <th><?php echo e(__('messages.Rake')); ?> / <?php echo e(__('messages.Warehouses')); ?></th> <th><?php echo e(__('messages.company')); ?></th> <th><?php echo e(__('messages.ProductCompany')); ?></th> <th><?php echo e(__('messages.To')); ?></th> <th><?php echo e(__('messages.Product')); ?></th> <th><?php echo e(__('messages.Quantity')); ?></th> <th>Remaining <br>Loading <br> <?php echo e(__('messages.Quantity')); ?></th> <th><?php echo e(__('messages.Unit')); ?></th> <th><?php echo e(__('messages.Rate')); ?></th> <th>Freight <br>Payment <br>Mode</th> <th><?php echo e(__('messages.Transporter')); ?></th> <th><?php echo e(__('messages.WarehouseKeeper')); ?></th> <th></th> </tr> </thead> <tbody> <?php $__currentLoopData = $tokens; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $token): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr id="tr_<?php echo e($token->id); ?>"> <td><?php echo e(date('d/m/Y',strtotime($token->created_at))); ?></td> <td><?php echo e($token->unique_id); ?></td> <td> <b> <?php if(is_null($token->master_rake_id)): ?> <?php echo e(getModelById('Warehouse',$token->from_warehouse_id)->name); ?> <?php else: ?> <?php echo e(getModelById('MasterRake',$token->master_rake_id)->name); ?> <?php endif; ?> </b> </td> <td><?php echo e(getModelById('Company',$token->company_id)->name); ?></td> <td><?php echo e(getModelById('ProductCompany',$token->product_company_id)->name); ?></td> <td> <?php if($token->to_type == 1){ echo "<b>Warehouse </b><br>".getModelById('Warehouse',$token->warehouse_id)->name."(".getModelById('Warehouse',$token->warehouse_id)->location.")"; }else if($token->to_type == 2){ echo "<b>Retailer </b><br>".getModelById('Retailer',$token->retailer_id)->name."(".getModelById('Retailer',$token->retailer_id)->address.")"; echo "<br><b>"; echo getModelById('Dealer',$token->account_from_id)->name."(".getModelById('Dealer',$token->account_from_id)->address1.")"."</b>"; }else if($token->to_type == 3){ echo "<b>Dealer </b><br>".getModelById('Dealer',$token->dealer_id)->name."(".getModelById('Dealer',$token->dealer_id)->address1.")"; } ?> </td> <td><?php echo e(getModelById('Product',$token->product_id)->name); ?></td> <td><?php echo e($token->quantity); ?></td> <td><?php echo e($token->quantity - totalTokenLoading($token->id)); ?></td> <td><?php echo e(getModelById('Unit',$token->unit_id)->unit); ?></td> <td><?php echo e($token->rate); ?></td> <td><?php echo e($token->delivery_payment_mode); ?></td> <td><?php echo e(is_null(getModelById('Transporter',$token->transporter_id)) ? "":getModelById('Transporter',$token->transporter_id)->name); ?></td> <td><?php echo e(is_null(getModelById('User',$token->warehouse_keeper_id)) ? "":getModelById('User',$token->warehouse_keeper_id)->name); ?></td> <td> <a href="/user/edit-token/<?php echo e($token->id); ?>" class="btn btn-xs btn-info"> <i class="ace-icon fa fa-pencil bigger-120"></i> </a> <a href="/user/print-token/<?php echo e($token->id); ?>" class="btn btn-xs btn-info" > <i class="ace-icon fa fa-print bigger-120"></i> </a> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> <?php elseif(Request::is('voice/direct-labour-payment-warehouse')): ?> <div class="alert alert-success shadow-soft d-flex flex-column"> <?php $__currentLoopData = $unique_descriptions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $description): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <span><strong>Total Payment Type:</strong> <?php echo e($description->description); ?></span> <span>(Total Amount: ₹<?php echo e(number_format($description->total_amount, 2)); ?>)</span> | <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <thead> <tr> <th>#</th> <th>Master Rake</th> <th>WareHouse</th> <th>Labour Name</th> <th>Amount</th> <th>Description</th> </tr> </thead> <tbody> <?php $__currentLoopData = $direct_labour_payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $labour_payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $masterRake = getModelById('MasterRake', $labour_payment->master_rake_id); $warehouse = getModelById('Warehouse', $labour_payment->warehouse_id); ?> <tr id="tr_<?php echo e($labour_payment->id); ?>"> <td><?php echo e($labour_payment->id); ?></td> <td><?php echo e($masterRake ? $masterRake->name : 'No Data'); ?></td> <td><?php echo e($warehouse ? $warehouse->name : 'No Data'); ?></td> <td><?php echo e($labour_payment->labour_name); ?></td> <td><?php echo e($labour_payment->amount); ?></td> <td><?php echo e($labour_payment->description); ?></td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> <?php else: ?> <div class="alert alert-success shadow-soft">Latest Results:</div> <thead> <tr> <th></th> <th></th> <th></th> <th></th> <th></th> <th></th> </tr> </thead> <tbody> <tr> <td colspan="6" class="text-center">No data available! Please provide a valid command to view records.</td> </tr> </tbody> <?php endif; ?> </table> </div> </div> </div> </div> </div> </div> </div><!-- /.main-content --> <?php $__env->startSection('script'); ?> <?php echo e(Html::script("assets/js/jquery.dataTables.min.js")); ?> <?php echo e(Html::script("assets/js/jquery.dataTables.bootstrap.min.js")); ?> <?php echo e(Html::script("assets/js/dataTables.buttons.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.flash.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.html5.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.print.min.js")); ?> <?php echo e(Html::script("assets/js/buttons.colVis.min.js")); ?> <?php echo e(Html::script("assets/js/dataTables.select.min.js")); ?> <?php echo e(Html::script("assets/js/ace-elements.min.js")); ?> <?php echo e(Html::script("assets/js/ace.min.js")); ?> <script type="text/javascript"> jQuery(function($) { //initiate dataTables plugin var myTable = $('#dynamic-table').DataTable( { bAutoWidth: false, "aaSorting": [], } ); $.fn.dataTable.Buttons.defaults.dom.container.className = 'dt-buttons btn-overlap btn-group btn-overlap'; new $.fn.dataTable.Buttons( myTable, { buttons: [ { "extend": "colvis", "text": "<i class='fa fa-search bigger-110 blue'></i> <span class='hidden'>Show/hide columns</span>", "className": "btn btn-white btn-primary btn-bold", columns: ':not(:first):not(:last)' }, { "extend": "copy", "text": "<i class='fa fa-copy bigger-110 pink'></i> <span class='hidden'>Copy to clipboard</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "csv", "text": "<i class='fa fa-database bigger-110 orange'></i> <span class='hidden'>Export to CSV</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "excel", "text": "<i class='fa fa-file-excel-o bigger-110 green'></i> <span class='hidden'>Export to Excel</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "pdf", "text": "<i class='fa fa-file-pdf-o bigger-110 red'></i> <span class='hidden'>Export to PDF</span>", "className": "btn btn-white btn-primary btn-bold" }, { "extend": "print", "text": "<i class='fa fa-print bigger-110 grey'></i> <span class='hidden'>Print</span>", "className": "btn btn-white btn-primary btn-bold", autoPrint: true, message: 'IManager', exportOptions: { columns: ':visible' } } ] } ); myTable.buttons().container().appendTo( $('.tableTools-container') ); //style the message box var defaultCopyAction = myTable.button(1).action(); myTable.button(1).action(function (e, dt, button, config) { defaultCopyAction(e, dt, button, config); $('.dt-button-info').addClass('gritter-item-wrapper gritter-info gritter-center white'); }); var defaultColvisAction = myTable.button(0).action(); myTable.button(0).action(function (e, dt, button, config) { defaultColvisAction(e, dt, button, config); if($('.dt-button-collection > .dropdown-menu').length == 0) { $('.dt-button-collection') .wrapInner('<ul class="dropdown-menu dropdown-light dropdown-caret dropdown-caret" />') .find('a').attr('href', '#').wrap("<li />") } $('.dt-button-collection').appendTo('.tableTools-container .dt-buttons') }); }) </script> <script type="text/javascript"> const commands = { "show me total master rakes": "/voice/total-master-rakes", "show me rake summary of": "/voice/total-master-rake-summary", "show me total generated token for the warehouse of": "/voice/total-warehouse-token", "direct labour payment report": "/voice/direct-labour-payment-report", "show me direct labour payment of warehouse": "/voice/direct-labour-payment-warehouse", "total user report": "/voice/total-user-report", "show me log details": "/voice/log-details", "show me log details of": "/voice/user-log-details", "labour payment report of master rake": "/voice/labour-payment-report", "show me total stock of report of": "/voice/total-stock-report", "show me total sale of": "/voice/total-sale-report", "show me total purchase of": "/voice/total-purchase-report", "show me total invoice of": "/voice/total-invoice-report", "show me detailed data of": "/voice/product-wise-detailed-data", "show me user status": "/voice/user-status", "show me attendence chart": "/voice/attendance-chart", "show me warehouse transfer of": "/voice/warehouse-transfer-product", "show me restore of": "/voice/restore-product", "show me standard labour payments of": "/voice/standard-labour-payments", "show me rake payment of": "/voice/rake-payment", }; // Function to handle command submission (both text and voice) function handleCommand(spokenCommand) { const command = spokenCommand.toLowerCase(); document.getElementById('displayCommand').innerText = `Command: ${command}`; const baseCommand = "labour payment report of master rake"; const stockCommandBase = "show me total stock of report of"; const saleCommandBase = "show me total sale of"; const purchaseCommandBase = "show me total purchase of"; const invoiceCommandBase = "show me total invoice of"; const detailedDataCommandBase = "show me detailed data of"; const logStatusCommandBase = "show me log details of"; const warehouseTransferCommandBase = "show me warehouse transfer of"; const restoreProductCommandBase = "show me restore of"; const satndardPaymentCommandBase = "show me standard labour payments of"; const rakePaymentCommandBase = "show me rake payment of"; const masterRakeSummaryCommandBase = "show me rake summary of"; const warehouseTokenCommandBase = "show me total generated token for the warehouse of"; const labourPaymentWarehouseCommandBase = "show me direct labour payment of warehouse"; if (command.startsWith(baseCommand)) { // Existing logic for "labour payment report of master rake" const rakeName = command.replace(baseCommand, "").trim(); if (rakeName) { const url = `${commands[baseCommand]}?rake_name=${encodeURIComponent(rakeName)}`; window.location.href = url; // Redirect to the URL for rake report } else { alert("Please specify the master rake name."); } } else if (command.startsWith(stockCommandBase)) { // New logic for "show me total stock of report of" const productName = command.replace(stockCommandBase, "").trim(); if (productName) { const url = `${commands[stockCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; // Redirect to the stock report URL } else { alert("Please specify the product name."); } }else if (command.startsWith(saleCommandBase)) { const saleProductName = command.replace(saleCommandBase, "").trim(); if (saleProductName) { const url = `${commands[saleCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the product name to get sale data."); } }else if (command.startsWith(purchaseCommandBase)) { const purchaseProductName = command.replace(purchaseCommandBase, "").trim(); if (purchaseProductName) { const url = `${commands[purchaseCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the product name to get product data."); } }else if (command.startsWith(invoiceCommandBase)) { const invoiceProductName = command.replace(invoiceCommandBase, "").trim(); if (invoiceProductName) { const url = `${commands[invoiceCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the product name to get product invoice data."); } }else if (command.startsWith(detailedDataCommandBase)) { const detailedProductName = command.replace(detailedDataCommandBase, "").trim(); if (detailedProductName) { const url = `${commands[detailedDataCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the product name to get product detailed data."); } }else if (command.startsWith(logStatusCommandBase)) { const logUserName = command.replace(logStatusCommandBase, "").trim(); if (logUserName) { const url = `${commands[logStatusCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the user name to get user log detailed data."); } }else if (command.startsWith(warehouseTransferCommandBase)) { const warehouseTransferProductName = command.replace(warehouseTransferCommandBase, "").trim(); if (warehouseTransferProductName) { const url = `${commands[warehouseTransferCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the product name to get warehouse transfer data."); } }else if (command.startsWith(restoreProductCommandBase)) { const restoreProductName = command.replace(restoreProductCommandBase, "").trim(); if (restoreProductName) { const url = `${commands[restoreProductCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the product name to get restore data."); } }else if (command.startsWith(satndardPaymentCommandBase)) { const standardWarehouseName = command.replace(satndardPaymentCommandBase, "").trim(); if (standardWarehouseName) { const url = `${commands[satndardPaymentCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the warehouse name to get standerdization payment data."); } }else if (command.startsWith(rakePaymentCommandBase)) { const rakeName = command.replace(rakePaymentCommandBase, "").trim(); if (rakeName) { const url = `${commands[rakePaymentCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the warehouse name to get rake payment data."); } }else if (command.startsWith(masterRakeSummaryCommandBase)) { const rakeSummaryName = command.replace(masterRakeSummaryCommandBase, "").trim(); if (rakeSummaryName) { const url = `${commands[masterRakeSummaryCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the rake name to get rake summary data."); } }else if (command.startsWith(warehouseTokenCommandBase)) { const warehouseName = command.replace(warehouseTokenCommandBase, "").trim(); if (warehouseTokenCommandBase) { const url = `${commands[warehouseTokenCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the warehouse name to get warehouse token data."); } }else if (command.startsWith(labourPaymentWarehouseCommandBase)) { const warehouseNamePayment = command.replace(labourPaymentWarehouseCommandBase, "").trim(); if (warehouseNamePayment) { const url = `${commands[labourPaymentWarehouseCommandBase]}?command=${encodeURIComponent(command)}`; window.location.href = url; } else { alert("Please specify the warehouse name to get direct payment data."); } }else if (commands[command]) { // Logic for fixed commands in the commands object window.location.href = commands[command]; // Handle other fixed commands } else { document.getElementById('status').innerText = 'Command not recognized!'; } } // Voice Command Handling document.getElementById('startVoice').addEventListener('click', () => { const recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)(); recognition.lang = 'en-US'; recognition.start(); const statusElement = document.getElementById('status'); // Listening Status statusElement.innerText = 'Status: Listening...'; statusElement.className = 'status-listening'; // Apply listening class recognition.onresult = (event) => { const spokenCommand = event.results[0][0].transcript; handleCommand(spokenCommand); }; recognition.onerror = (event) => { // Error Status statusElement.innerText = 'An error occurred while processing your command!'; statusElement.className = 'status-error'; // Apply error class console.error('Error occurred:', event.error); }; recognition.onend = () => { // Not Listening Status statusElement.innerText = 'Status: Not Listening!'; statusElement.className = 'status-not-listening'; // Apply not listening class }; }); // Text Command Handling document.getElementById('submitCommand').addEventListener('click', () => { const typedCommand = document.getElementById('commandInput').value; if (typedCommand.trim() !== "") { handleCommand(typedCommand); } else { alert("Please enter a valid command."); } }); </script> <?php $__env->stopSection(); ?> <?php $__env->stopSection(); ?> <?php echo $__env->make('dashboard.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home3/pmmsanvp/public_html/sarojMain/resources/views/voice/index.blade.php ENDPATH**/ ?>