[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: 9a43017bc0dbdfca65e4006a43d1c435.php
<?php $subtotal = 0; $total_discount = 0; $medicine_discount_amount = 0; $invoice_descount_amount = 0; $total_quantity = 0; ?> <div class="table-responsive"> <table class="table purchase-product-table table-striped mb-2"> <thead> <tr> <th>#</th> <th><?php echo e(translate('common.medicine')); ?></th> <th><?php echo e(translate('common.batch')); ?></th> <th><?php echo e(translate('common.Expire Date')); ?></th> <th><?php echo e(translate('common.MRP Per Unit')); ?></th> <th><?php echo e(translate('common.Buy Price Per Unit')); ?></th> <th><?php echo e(translate('common.Quantity')); ?></th> <th><?php echo e(translate('common.Subtotal')); ?></th> <th><?php echo e(translate('common.Discount')); ?></th> <th><?php echo e(translate('common.Total')); ?></th> <th></th> </tr> </thead> <tbody> <?php $__empty_1 = true; $__currentLoopData = $purchase_cart; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $cart): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <td><?php echo e($loop->iteration); ?></td> <td class="d-flex gap-1 align-items-center"> <?php if(!empty($cart['image'])): ?> <img src="<?php echo e(@globalAsset($cart['image'])); ?>" height="35" width="35" alt=""> <?php else: ?> <img src="<?php echo e(asset('storage/images/medicine/default.png')); ?>" height="35" width="35" alt=""> <?php endif; ?> <strong><?php echo e(@$cart['name']); ?></strong> </td> <td> <input required class="text-uppercase" type="text" onchange="changeHandler(this.value,'<?php echo e($key); ?>','batch_name')" value="<?php echo e(@$cart['batch_name']); ?>"> </td> <td> <input required onchange="changeHandler(this.value,'<?php echo e($key); ?>','expire_date')" style="width: 115px;" type="date" value="<?php echo e(@$cart['expire_date']); ?>"> </td> <td> <input required step="any" onchange="changeHandler(this.value,'<?php echo e($key); ?>','price')" type="number" value="<?php echo e(@$cart['price']); ?>"> </td> <td> <input required step="any" onchange="changeHandler(this.value,'<?php echo e($key); ?>','buy_price')" type="number" value="<?php echo e(@$cart['buy_price']); ?>"> </td> <td> <input required onchange="changeHandler(this.value,'<?php echo e($key); ?>','quantity')" type="number" value="<?php echo e(@$cart['quantity']); ?>"> </td> <td> <?php echo e(priceFormat(@$cart['buy_price'] * @$cart['quantity'])); ?> </td> <td> <input onchange="changeHandler(this.value,'<?php echo e($key); ?>','discount')" type="number" value="<?php echo e(@$cart['discount']); ?>"> <select onchange="changeHandler(this.value,'<?php echo e($key); ?>','discount_value_type')"> <option value="percent" <?php if(@$cart['discount_value_type'] == 'percent'): ?> selected <?php endif; ?>>% </option> <option value="fixed" <?php if(@$cart['discount_value_type'] == 'fixed'): ?> selected <?php endif; ?>>Fixed </option> </select> </td> <td> <?php $productPrice = @$cart['buy_price'] * @$cart['quantity']; $productDiscountAmount = calculateDiscountedPrice($productPrice,@$cart['discount'],@$cart['discount_value_type']); $productTotalPrice = $productPrice - $productDiscountAmount; ?> <?php echo e(priceFormat($productTotalPrice)); ?> </td> <td> <a href="javascript:" onclick="removePurchaseItem('<?php echo e($key); ?>')" class="text-danger"><i class="fa fa-times"></i></a> </td> </tr> <?php $medicine_discount_amount += $productDiscountAmount; $total_discount += $productDiscountAmount; $subtotal += $productTotalPrice; $total_quantity += @$cart['quantity']; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <tr> <td colspan="11" class="text-center"> <h5 class="font-weight-bold py-2"><?php echo e(translate('common.Purchase cart empty')); ?></h5> </td> </tr> <?php endif; ?> </tbody> </table> </div> <div class="row justify-content-end"> <div class="col-lg-5"> <div class="float-end"> <table class="table estimate-acount-table text-right"> <tr> <th><?php echo e(translate('common.Subtotal')); ?></th> <td>:</td> <td><?php echo e(priceFormat($subtotal)); ?></td> <input type="hidden" id="invoiceSubtotal" name="invoice_subtotal_amount" value="<?php echo e($subtotal); ?>"> </tr> <tr> <th><?php echo e(translate('common.Medicines Discount')); ?></th> <td>:</td> <td> <?php echo e(priceFormat($medicine_discount_amount)); ?> </td> <input type="hidden" id="medicineDiscountAmount" name="medicine_discount" value="<?php echo e($medicine_discount_amount); ?>"> </tr> <tr> <th><?php echo e(translate('common.Invoice Discount')); ?></th> <td>:</td> <td> <input id="invoiceDiscountValue" onchange="calculateInvoiceDiscount()" name="invoice_discount_amount" type="number" value="<?php echo e(@$invoice_summary['invoice_discount_value']); ?>" step="any" min="0"> <select id="invoiceDiscountType" onchange="calculateInvoiceDiscount()" name="invoice_discount_type"> <option <?php echo e(@$invoice_summary['invoice_discount_type'] == 'percent' ? 'selected' :''); ?> value="percent">%</option> <option <?php echo e(@$invoice_summary['invoice_discount_type'] == 'fixed' ? 'selected' :''); ?> value="fixed"><?php echo e(translate('common.Fixed')); ?></option> </select> </td> </tr> <tr> <?php $invoice_discount = calculateDiscountedPrice($subtotal,@$invoice_summary['invoice_discount_value'],@$invoice_summary['invoice_discount_type']); $total_discount += $invoice_discount; ?> <th><?php echo e(translate('common.Invoice Discount Amount')); ?></th> <td>:</td> <td><span id="invoiceDiscountText"><?php echo e(priceFormat($invoice_discount)); ?></span></td> <input type="hidden" id="invoiceDiscountAmount" name="invoice_discount_amount" value="<?php echo e($invoice_discount); ?>"> </tr> <tr> <th><?php echo e(translate('common.Total Discount Amount')); ?></th> <td>:</td> <td><span id="totalDiscountText"><?php echo e(priceFormat($medicine_discount_amount + $invoice_discount)); ?></span></td> <input type="hidden" id="totalDiscountAmount" name="total_discount" value="<?php echo e($medicine_discount_amount + $invoice_discount); ?>"> </tr> <tr> <th><?php echo e(translate('common.Total')); ?></th> <td>:</td> <td><span id="totalText"><?php echo e(priceFormat($subtotal - $invoice_discount)); ?></span></td> <input type="hidden" id="totalAmount" name="total" value="<?php echo e($subtotal - $invoice_discount); ?>"> </tr> <tr> <th><?php echo e(translate('common.Paid Amount')); ?></th> <td>:</td> <td> <input step="any" onkeyup="calculateDueAmount()" id="paidAmount" type="number" name="paid" value="<?php echo e($subtotal - $invoice_discount); ?>"> </td> </tr> <tr> <th><?php echo e(translate('common.Payable Amount')); ?></th> <td>:</td> <td> <input id="dueAmount" readonly class="disabled" type="number" name="due_amount" value="0"> </td> </tr> <tr> <th><?php echo e(translate('common.Change Amount')); ?></th> <td>:</td> <td> <input id="changeAmount" readonly class="disabled" type="number" name="change_amount" value="0"> </td> </tr> <tr> <th><?php echo e(translate('common.Payment Method')); ?></th> <td>:</td> <td> <?php $payment_methods = \App\Models\Method::groupBy('name') ->select('id', 'name','balance')->get(); ?> <select style="width: 100%;" name="payment_method_id"> <option value=""><?php echo e(translate('common.Select One')); ?></option> <?php $__currentLoopData = $payment_methods; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment_method): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($payment_method->id); ?>" <?php echo e(old('payment_method_id') == $payment_method->id ? 'selected' : ''); ?>> <?php echo e($payment_method->name); ?> - <?php echo e(priceFormat($payment_method->balance)); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <span class="text-danger"> <?php $__errorArgs = ['payment_method_id']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <?php echo e($message); ?> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </span> </td> <input type="hidden" name="total_quantity" value="<?php echo e($total_quantity); ?>"> </tr> </table> </div> </div> </div> <?php /**PATH /home/eliosofonline/pham.eliosof.com/resources/views/npurchase/cart_table.blade.php ENDPATH**/ ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.82 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002