stock module changes-2 vadivel J 17-12-2024
This commit is contained in:
parent
20f5fc9631
commit
2417e32e92
@ -201,6 +201,8 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
@ -227,6 +229,21 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
<div class="col-3">
|
||||
<input type="submit" value="Change Month" class="btn btn-success" style="margin-top:0px;">
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<div class="dropdown float-right">
|
||||
<a href="#" class="dropdown-toggle arrow-none" data-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="mdi mdi-dots-vertical m-0 text-muted h3"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a style="cursor:pointer"
|
||||
class="dropdown-item" data-toggle="modal" data-target="#filterModalId">Filter</a>
|
||||
<a style="cursor:pointer"
|
||||
class="dropdown-item" data-toggle="modal" data-target="#additionalEntriesModalId">Add Entry</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -273,8 +290,12 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
if ($date === $currentDate) { echo 'style="background: #cef0ad;"'; }
|
||||
?>
|
||||
>
|
||||
|
||||
|
||||
<!-- td:eq(0) date -->
|
||||
<td width="79" height="45" class="celda_normal"><?php echo DateTime::createFromFormat('Y-m-d', $a['date'])->format('d-m-Y'); ?></td>
|
||||
|
||||
|
||||
<!-- td:eq(1) drier on time -->
|
||||
<td class="celda_normal" >
|
||||
<select class="timeDropdown drier_on_time" style="width: 100px;" >
|
||||
<option value="">Select</option>
|
||||
@ -283,6 +304,8 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<!-- td:eq(2) drier off time -->
|
||||
<td class="celda_normal" >
|
||||
<select class="timeDropdown drier_off_time" style="width: 100px;">
|
||||
<option value="">Select</option>
|
||||
@ -291,9 +314,13 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<!-- td:eq(3) drier_running_hours-->
|
||||
<td class="celda_normal">
|
||||
<?php echo $a['drier_running_hours']; ?>
|
||||
</td>
|
||||
|
||||
<!-- td:eq(4) supplier_name -->
|
||||
<td class="celda_normal" contenteditable="true">
|
||||
<select class="timeDropdown supplier_name" style="width: 300px;">
|
||||
<option value="">Select</option>
|
||||
@ -302,30 +329,54 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<!-- td:eq(5) input_sand_moisture -->
|
||||
<td class="celda_normal" contenteditable="true" >
|
||||
<?php echo $a['input_sand_moisture']; ?>
|
||||
</td>
|
||||
<td class="celda_normal" onkeyup="gasPerTon(this.parentNode.id,this.textContent);" contenteditable="true" >
|
||||
|
||||
<!-- td:eq(6) total_gas_consumption -->
|
||||
<td class="celda_normal" oninput="gasPerTon(this);
|
||||
moistureLossQty(this);
|
||||
qtyPerHrs(this)" contenteditable="true" >
|
||||
<?php echo $a['total_gas_consumption']; ?>
|
||||
</td>
|
||||
|
||||
<!-- td:eq(7) gas_per_ton -->
|
||||
<td class="celda_normal">
|
||||
<?php echo $a['gas_per_ton']; ?>
|
||||
</td>
|
||||
<td class="celda_normal" onkeyup="moistureLossQty(this.parentNode.id,this.textContent);" contenteditable="true" >
|
||||
|
||||
<!-- td:eq(8) input_sand_qty -->
|
||||
<td class="celda_normal" oninput="gasPerTon(this);
|
||||
moistureLossQty(this);
|
||||
qtyPerHrs(this)" contenteditable="true" >
|
||||
<?php echo $a['input_sand_qty']; ?>
|
||||
</td>
|
||||
|
||||
<!-- td:eq(9) moisture_loss_qty -->
|
||||
<td class="celda_normal" >
|
||||
<?php echo $a['moisture_loss_qty']; ?>
|
||||
</td>
|
||||
<td class="celda_normal" onkeyup="gasPerTon(this.parentNode.id, this.textContent); moistureLossQty(this.parentNode.id, this.textContent); qtyPerHrs(this.parentNode.id, this.textContent)" contenteditable="true" >
|
||||
|
||||
<!-- td:eq(10) sand_dried_qty -->
|
||||
<td class="celda_normal" oninput="gasPerTon(this);
|
||||
moistureLossQty(this);
|
||||
qtyPerHrs(this)" contenteditable="true" >
|
||||
<?php echo $a['sand_dried_qty']; ?>
|
||||
</td>
|
||||
|
||||
<!-- td:eq(11) qty_per_hours -->
|
||||
<td class="celda_normal" >
|
||||
<?php echo $a['qty_per_hours']; ?>
|
||||
</td>
|
||||
|
||||
<!-- td:eq(12) dust_qty -->
|
||||
<td class="celda_normal" contenteditable="true" >
|
||||
<?php echo $a['dust_qty']; ?>
|
||||
</td>
|
||||
|
||||
<!-- td:eq(13) customer_name -->
|
||||
<td class="celda_normal" contenteditable="true">
|
||||
<?php echo $a['customer_name']; ?>
|
||||
</td>
|
||||
@ -360,8 +411,167 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
|
||||
|
||||
|
||||
<!-- modal section -->
|
||||
|
||||
|
||||
<div class="modal fade" id="filterModalId" tabindex="-1" role="dialog" aria-labelledby="filterModalLabelId" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="filterModalLabelId">Filter Options</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<!-- Date Dropdown -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="dateDropdown">Select Date</label>
|
||||
<select id="dateDropdown" class="form-control">
|
||||
<?php foreach ($drierDetails as $a) :
|
||||
$selectDate = DateTime::createFromFormat('Y-m-d', $a['date'])->format('d-m-Y');?>
|
||||
<option value ="<?=$selectDate?>"><?=$selectDate?></option>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Date Dropdown -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="dateDropdown">Select Date</label>
|
||||
<select id="dateDropdown" class="form-control">
|
||||
<?php foreach ($drierDetails as $a) :
|
||||
$selectDate = DateTime::createFromFormat('Y-m-d', $a['date'])->format('d-m-Y');?>
|
||||
<option value ="<?=$selectDate?>"><?=$selectDate?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary float-right" onclick="navigateToMachine()">Filter</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
|
||||
<!-- additional entries modal -->
|
||||
<div class="modal fade" id="additionalEntriesModalId" tabindex="-1" role="dialog" aria-labelledby="additionalEntriesIdModalLabelId" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="additionalEntriesIdModalLabelId">Additional Entries</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!--14 -->
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryDateId">Date</label>
|
||||
<input type="date" class="form-control" id="additionalEntryDateId" name="additionalEntryDate" value="">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryDrierOnTimeId">Drier On Time</label>
|
||||
|
||||
<select class="timeDropdown drier_on_time" style="width: 100px;"
|
||||
id="additionalEntryDrierOnTimeId" name="additionalEntryDrierOnTime" >
|
||||
<option value="">Select</option>
|
||||
<?php foreach ($timeDropdown as $key => $time) { ?>
|
||||
<option value="<?= $time; ?>"> <?= $time; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryDrierOffTimeId">Drier Off Time</label>
|
||||
|
||||
<select class="timeDropdown drier_on_time" style="width: 100px;"
|
||||
id="additionalEntryDrierOffTimeId" name="additionalEntryDrierOffTime" >
|
||||
<option value="">Select</option>
|
||||
<?php foreach ($timeDropdown as $key => $time) { ?>
|
||||
<option value="<?= $time; ?>"> <?= $time; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryRunningHrsId">Running hrs</label>
|
||||
<input type="text" class="form-control" id="additionalEntryRunningHrsId" name="additionalEntryRunningHrs" value=""
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryInputSandMoistureId">Input Sand Moisture (%)</label>
|
||||
<input type="text" class="form-control" id="additionalEntryInputSandMoistureId" name="additionalEntryInputSandMoisture" value="">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryTotalGasConsumptionId">Total Gas Consumption</label>
|
||||
<input type="text" class="form-control" id="additionalEntryTotalGasConsumptionId" name="additionalEntryTotalGasConsumption" value="">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntrySandDriedQtyId">Sand Dried Qty</label>
|
||||
<input type="text" class="form-control" id="additionalEntrySandDriedQtyId" name="additionalEntrySandDriedQty" value="">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryGasPerTonId">Gas per Ton</label>
|
||||
<input type="text" class="form-control" id="additionalEntryGasPerTonId" name="additionalEntryGasPerTon" value=""
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryDustQtyId">Dust Qty</label>
|
||||
<input type="text" class="form-control" id="additionalEntryDustQtyId" name="additionalEntryDustQty" value="">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryInputSandQtyId">Input sand Quantity</label>
|
||||
<input type="text" class="form-control" id="additionalEntryInputSandQtyId" name="additionalEntryInputSandQty" value="">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryMoistureLossQtyId">Moisture Loss Qty</label>
|
||||
<input type="text" class="form-control" id="additionalEntryMoistureLossQtyId" name="additionalEntryMoistureLossQty" value=""
|
||||
readonly>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryQtyPerHoursId">Qty per Hours</label>
|
||||
<input type="text" class="form-control" id="additionalEntryQtyPerHoursId" name="additionalEntryQtyPerHours" value=""
|
||||
readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntrySupplierNameId">Supplier Name</label>
|
||||
<select class="timeDropdown supplier_name" style="width: 300px;"
|
||||
id="additionalEntrySupplierNameId" name="additionalEntrySupplierName">
|
||||
<option value="">Select</option>
|
||||
<?php foreach ($supplierData as $key => $value) { ?>
|
||||
<option value="<?= $value->SupplierID; ?>"> <?= $value->SupplierName; ?> </option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="form" for="additionalEntryCustomerNameId">Customer Name</label>
|
||||
<input type="text" class="form-control" id="additionalEntryCustomerNameId" name="additionalEntryCustomerName" value="">
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary float-right" >Add</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- /.modal -->
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
@ -448,6 +658,11 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
|
||||
tr.find('td:eq(3)').text(totalHours);
|
||||
|
||||
gasPerTon(this);
|
||||
moistureLossQty(this);
|
||||
qtyPerHrs(this);
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
@ -480,9 +695,15 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
|
||||
tr.find('td:eq(3)').text(totalHours);
|
||||
|
||||
gasPerTon(this);
|
||||
moistureLossQty(this);
|
||||
qtyPerHrs(this);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
function convertTo24Hour(time)
|
||||
{
|
||||
const [timePart, modifier] = time.split(" ");
|
||||
@ -510,60 +731,65 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
|
||||
<script>
|
||||
|
||||
function gasPerTon(parentId , textContent) {
|
||||
var tr = $('#' + parentId);
|
||||
var totalGasConsumption = tr.find('td:eq(7)').text();
|
||||
var sandDriedQty = tr.find('td:eq(11)').text();
|
||||
if(totalGasConsumption != '' && sandDriedQty != '')
|
||||
|
||||
|
||||
function gasPerTon(value) {
|
||||
|
||||
let tr = $(value).closest('tr');
|
||||
var totalGasConsumption = tr.find('td:eq(6)').text();
|
||||
var sandDriedQty = tr.find('td:eq(10)').text();
|
||||
if( totalGasConsumption != '' && sandDriedQty != '')
|
||||
{
|
||||
var gasPerTon = totalGasConsumption / sandDriedQty;
|
||||
var gasPerTon = parseFloat(totalGasConsumption) / parseFloat(sandDriedQty) ;
|
||||
|
||||
if(gasPerTon != NaN && gasPerTon != Infinity)
|
||||
tr.find('td:eq(8)').text(gasPerTon.toFixed(1));
|
||||
if(gasPerTon && gasPerTon != NaN && gasPerTon != Infinity)
|
||||
tr.find('td:eq(7)').text(gasPerTon.toFixed(2));
|
||||
|
||||
}else{
|
||||
tr.find('td:eq(8)').text(0.0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function moistureLossQty(parentId , textContent) {
|
||||
var tr = $('#' + parentId);
|
||||
var inputSandQty = tr.find('td:eq(9)').text();
|
||||
var sandDriedQty = tr.find('td:eq(11)').text();
|
||||
function moistureLossQty(value) {
|
||||
|
||||
let tr = $(value).closest('tr');
|
||||
var inputSandQty = tr.find('td:eq(8)').text();
|
||||
var sandDriedQty = tr.find('td:eq(10)').text();
|
||||
|
||||
if(inputSandQty != '' && sandDriedQty != '')
|
||||
{
|
||||
var moistureLossQty = inputSandQty - sandDriedQty;
|
||||
|
||||
if(moistureLossQty != NaN && moistureLossQty != Infinity)
|
||||
tr.find('td:eq(10)').text(moistureLossQty.toFixed(1));
|
||||
var moistureLossQty = parseFloat(inputSandQty) - parseFloat(sandDriedQty);
|
||||
|
||||
if(moistureLossQty && moistureLossQty != NaN && moistureLossQty != Infinity)
|
||||
tr.find('td:eq(9)').text(moistureLossQty.toFixed(2));
|
||||
|
||||
}else{
|
||||
tr.find('td:eq(10)').text(0.0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function qtyPerHrs(parentId , textContent) {
|
||||
var tr = $('#' + parentId);
|
||||
var drierRunninhHrs = tr.find('td:eq(4)').text();
|
||||
var sandDriedQty = tr.find('td:eq(11)').text();
|
||||
function qtyPerHrs(value) {
|
||||
|
||||
let tr = $(value).closest('tr');
|
||||
var drierRunninhHrs = tr.find('td:eq(3)').text();
|
||||
var sandDriedQty = tr.find('td:eq(10)').text();
|
||||
|
||||
if(drierRunninhHrs != '' && sandDriedQty != '')
|
||||
{
|
||||
var qtyPerHrs = sandDriedQty / drierRunninhHrs;
|
||||
console.log(drierRunninhHrs);
|
||||
console.log(sandDriedQty);
|
||||
|
||||
if(qtyPerHrs != NaN && qtyPerHrs != Infinity)
|
||||
tr.find('td:eq(12)').text(qtyPerHrs.toFixed(3));
|
||||
var qtyPerHrs = parseFloat(sandDriedQty) / parseFloat(drierRunninhHrs) ;
|
||||
|
||||
console.log(qtyPerHrs);
|
||||
|
||||
if(qtyPerHrs && qtyPerHrs != NaN && qtyPerHrs != Infinity)
|
||||
tr.find('td:eq(11)').text(qtyPerHrs.toFixed(3));
|
||||
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
tr.find('td:eq(12)').text(0.000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@ -1012,6 +1012,8 @@
|
||||
};
|
||||
|
||||
html2pdf().from(element).set(opt).save();
|
||||
|
||||
$('#downloadLabReportModel').modal('hide');
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -169,14 +169,15 @@
|
||||
<td><?php echo $invoice['Vehicle No.']; ?></td>
|
||||
<td><?php echo $invoice['Product']; ?></td>
|
||||
<td><?php echo $invoice['Client']; ?></td>
|
||||
<td><?php echo $invoice['Quantity']; ?></td>
|
||||
<td><?php echo $invoice['Rate']; ?></td>
|
||||
<td><?php echo $invoice['Value']; ?></td>
|
||||
<td><?php echo $invoice['CGST']; ?></td>
|
||||
<td><?php echo $invoice['SGST']; ?></td>
|
||||
<td><?php echo $invoice['IGST']; ?></td>
|
||||
<td><?php echo $invoice['TCS']; ?></td>
|
||||
<td><?php echo $invoice['Total']; ?></td>
|
||||
|
||||
<td align="right"> <?php echo number_format($invoice['Quantity'], 2, '.', ',') ?></td>
|
||||
<td align="right"> <?php echo number_format($invoice['Rate'], 2, '.', ',') ?></td>
|
||||
<td align="right"> <?php echo number_format($invoice['Value'], 2, '.', ',') ?></td>
|
||||
<td align="right"> <?php echo number_format($invoice['CGST'], 2, '.', ',') ?></td>
|
||||
<td align="right"> <?php echo number_format($invoice['SGST'], 2, '.', ',') ?></td>
|
||||
<td align="right"> <?php echo number_format($invoice['IGST'], 2, '.', ',') ?></td>
|
||||
<td align="right"> <?php echo number_format($invoice['TCS'], 2, '.', ',') ?></td>
|
||||
<td align="right"> <?php echo number_format($invoice['Total'], 2, '.', ',') ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
|
||||
@ -205,11 +205,11 @@
|
||||
</td>
|
||||
<td><?php echo $invoice->client_name ?></td>
|
||||
<td><?php echo $invoice->item_name ?></td>
|
||||
<td><?php echo $invoice->item_price ?></td>
|
||||
<td><?php echo number_format($invoice->item_quantity, 2, '.', ',') ?></td>
|
||||
<td><?php echo number_format($subtotal, 2, '.', ',') ?></td>
|
||||
<td><?php echo number_format($cgst_amount + $sgst_amount, 2, '.', ',') ?></td>
|
||||
<td><?php echo number_format($total, 2, '.', ',') ?></td>
|
||||
<td align="right"><?php echo number_format($invoice->item_price, 2, '.', ',') ?></td>
|
||||
<td align="right"><?php echo number_format($invoice->item_quantity, 2, '.', ',') ?></td>
|
||||
<td align="right"><?php echo number_format($subtotal, 2, '.', ',') ?></td>
|
||||
<td align="right"><?php echo number_format($cgst_amount + $sgst_amount, 2, '.', ',') ?></td>
|
||||
<td align="right"><?php echo number_format($total, 2, '.', ',') ?></td>
|
||||
<td><?php echo $invoice->status ?></td>
|
||||
<td><?php echo $invoice->e_invoice_number; ?></td>
|
||||
<td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user