fixed bugs from tracker date -12/09/2024 employee module - vadivel J

This commit is contained in:
vadivelJ96 2024-09-13 18:22:54 +05:30
commit fa34516cfd
35 changed files with 3338 additions and 3357 deletions

View File

@ -26,17 +26,15 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Add Material Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>rawmaterialListing"><span class="bold">Back</span></a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>rawmaterialListing"><span class="bold">Back</span></a>
</div>
</div>
<!-- end page title -->
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
@ -44,17 +42,17 @@
<div class="row">
<div class="col-12">
<div class="p-2">
<form role="form" id="addUser" action="<?php echo base_url() ?>addNewRawmaterial" method="post">
<div class="box-body">
<!-- Supplier Information -->
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class=" col-md-3">
<label class="col-form-label" for="MaterialName">Material Name<span class="badge">*</span></label>
<form role="form" id="addUser" action="<?php echo base_url() ?>addNewRawmaterial" method="post">
<div class="box-body">
<!-- Supplier Information -->
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class=" col-md-3">
<label class="col-form-label" for="MaterialName">Material Name<span class="badge">*</span></label>
<input type="text" class="form-control required " onkeypress="return BlockSpecial(event);" required id="MaterialName" name="MaterialName" maxlength="255">
</div>
<div class=" col-md-3">
<label class="col-form-label" for="MaterialType">Material Type<span class="badge">*</span></label>
<div class=" col-md-3">
<label class="col-form-label" for="MaterialType">Material Type<span class="badge">*</span></label>
<select class="form-control select2" required id="MaterialType" name="MaterialType">
<option value="" required>Select Material Type</option>
<?php
@ -66,14 +64,14 @@
}
}
?>
</select>
</select>
</div>
<div class="col-md-3">
<label class="col-form-label" for="MaterialCaterogy">Material Caterogy<span class="badge">*</span></label>
<div class="col-md-3">
<label class="col-form-label" for="MaterialCaterogy">Material Caterogy<span class="badge">*</span></label>
<input type="text" class="form-control required " required id="MatCate" name="MatCate" maxlength="255">
</div>
<div class="col-md-3">
<label class="col-form-label" for="UnitofMeasurement">Unit of Measurement<span class="badge">*</span></label>
<div class="col-md-3">
<label class="col-form-label" for="UnitofMeasurement">Unit of Measurement<span class="badge">*</span></label>
<select class="form-control required select2" id="UOM" name="UOM">
<option value="" required>Select UOM</option>
<?php
@ -85,95 +83,92 @@
}
}
?>
</select>
</select>
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3" >
<label for="HSNcode">HSN code</label>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<label for="HSNcode">HSN code</label>
<input type="text" class="form-control" id="HSNcode" onkeypress="return isNumberKey(event)" name="HSNcode" maxlength="8">
</div>
<div class="col-md-3">
<label for="OpeningStock">Opening Stock</label>
<input type="text" class="form-control" id="openstock" name="openstock" maxlength="255">
</div>
<div class="col-md-3">
<label for="OpenStockDate">Open Stock Date</label>
<?php
$data = array('name' => 'Date', 'value' => set_value('Date'), 'id' => 'Date', 'class' => 'form-control', 'onkeypress' => 'return false;');
echo form_input($data);
?>
</div>
<div class="col-md-3">
<label for="ReorderLevel">Reorder Level</label>
<div class="col-md-3">
<label for="OpeningStock">Opening Stock</label>
<input type="text" class="form-control" id="openstock" name="openstock" maxlength="255">
</div>
<div class="col-md-3">
<label for="OpenStockDate">Open Stock Date</label>
<?php
$data = array('name' => 'Date', 'value' => set_value('Date'), 'id' => 'Date', 'class' => 'form-control', 'onkeypress' => 'return false;');
echo form_input($data);
?>
</div>
<div class="col-md-3">
<label for="ReorderLevel">Reorder Level</label>
<input type="text" class="form-control" id="reorder" name="reorder" maxlength="255">
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<label for="Remarks">Remarks</label>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<label for="Remarks">Remarks</label>
<input type="text" class="form-control" id="remarks" name="remarks" maxlength="255">
</div>
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<div class="col-md-3">
<input type="checkbox" id="isactive" name="isactive">
<label for="IsActive">IsActive</label>
<label for="IsActive">IsActive</label>
</div>
</div>
</div>
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
</div>
</div>
</div>
</div>
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
</div>
</div>
</form>
</div>
</div>
<?php
$listErrors = session()->getFlashdata('listErrors');
if($listErrors)
{
?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('listErrors'); ?>
</div>
</div>
</div>
<?php } ?>
<?php
$listErrors = session()->getFlashdata('listErrors');
if ($listErrors) {
?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('listErrors'); ?>
</div>
</div>
</div>
<?php } ?>
</div>
<?php
helper('form');
$error = session()->getFlashdata('error');
if($error)
{
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if($success)
{
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<!-- end row -->
</div>
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row -->
<!-- end row -->
</div> <!-- container -->
</div> <!-- content -->
</div>
@ -236,13 +231,15 @@
$('#MaterialName').change(function() {
var materialname = $('#MaterialName').val();
//material = material.replace(/\s*$/,"");
var material = materialname.replace(/ /g, '');
//alert(m.length+" "+m+" "+s+" "+s.length);
$('#content').loader('show');
$.ajax({
data: { id: material },
data: {
id: material
},
type: "POST",
url: "<?php echo base_url(); ?>materialExist",
success: function(data) {
@ -252,7 +249,7 @@
if (count > 2) {
$('#content').loader('hide');
alert('Material name already existed ! ');
var related_name = "";
$.each(data, function(i, obj) {
@ -267,10 +264,11 @@
// alert("empty data");
}
},error: function() {
$('#content').loader('hide');
alert("Error Occur");
}
},
error: function() {
$('#content').loader('hide');
alert("Error Occur");
}
});
});

View File

@ -3,217 +3,215 @@
<!-- ============================================================== -->
<div class="content-page">
<div class="content">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<!-- Start Content-->
<div class="container-fluid">
<div class="box box-success">
<?php if (!empty($validation)) : ?>
<div class="alert alert-danger">
<ul>
<?php foreach ($validation as $error) : ?>
<div class="content">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<!-- Start Content-->
<div class="container-fluid">
<div class="box box-success">
<?php if (!empty($validation)) : ?>
<div class="alert alert-danger">
<ul>
<?php foreach ($validation as $error) : ?>
<li><?= esc($error) ?></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<!-- form start -->
<?php endforeach; ?>
</ul>
</div>
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title"> Add Supplier Details</h4>
<?php endif; ?>
<!-- form start -->
</div>
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title"> Add Supplier Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>supplierlisting"><span class="bold">Back</span></a>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<div class="row">
<div class="col-12">
<form class="form-horizontal" role="form" id="addsupplier" action="<?php echo base_url() ?>addNewsupplier" method="post" role="form" enctype="multipart/form-data">
<div class="box-body">
<!-- Supplier Information -->
<legend style="margin-left:-10px;color: #4f7c97;">Supplier Information</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row" style="margin-bottom:10px;">
<div class=" col-md-3">
<label class="col-form-label" for="SupplierName">Supplier Name<span class="badge">*</span></label>
<input type="text" name="SupplierName" maxlength="100" id="supplierName" class="form-control" required>
</div>
<div class=" col-md-3">
<label class="col-form-label" for="ContactNumber">Contact Number<span class="badge">*</span></label>
<input type="text" name="ContactNumber" onchange="return getContactNumberValidation();" id="ContactNumber" required maxlength="13" class="form-control" title="Please Enter Mobile Number (or) Telephone Number" onkeypress="return isNumberKey(event)">
</div>
<div class="col-md-3">
<label class="col-form-label" for="AlternateContactNumber">Alternate Contact Number</label>
<input type="text" name="AlternateContactNumber" onchange="return getValidAlternateNumber();" id="AlternateContactNumber" maxlength="13" class="form-control" title="Please Enter Mobile Number (or) Telephone Number" onkeypress="return isNumberKey(event)">
</div>
<div class="col-md-3">
<label class="col-form-label" for="EmailAddress">Email ID<span class="badge">*</span></label>
<input type="email" name="emailid" id="emailid" required maxlength="100" class="form-control">
</div>
</div>
<div class="form-row">
<div class="col-md-12" style="margin-top:5px">
<label for="SupplierType">Supplier Type</label><!--<span class="badge">*</span>-->
&ensp;
</div>
<div class="col-md-1" style="margin-top:5px">
<input type="checkbox" id="service" name="service" value="<?php echo $service = (isset($_POST['service'])) ? 0 : 1; ?>"> <b>SERVICE &ensp;</b>
</div>
<div class="col-md-1.5" style="margin-top:5px">
<input type="checkbox" id="rawmaterial" name="rawmaterial" value="<?php echo $rawmaterial = (isset($_POST['rawmaterial'])) ? 0 : 1; ?>"> <b>RAW MATERIALS &ensp;</b>
</div>
<div class="col-md-2" style="margin-top:5px">
<input type="checkbox" id="maintanance" name="maintanance" value="<?php echo $maintanance = (isset($_POST['maintanance'])) ? 0 : 1; ?>"> <b>MAINTENANCE &ensp;</b>
</div>
</div>
</div>
</div>
<!-- Address Section -->
<legend style="margin-left:-10px;color: #4f7c97;">Address Details</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class=" col-md-6">
<label class="col-form-label" for="Address2">Address<span class="badge">*</span></label>
<textarea type="text" class="form-control required" id="Address" name="Address" maxlength="500" required rows="3"></textarea>
</div>
</div>
</div>
<!-- Tax Related Data -->
<legend style="margin-left:-10px;color: #4f7c97;">Tax Related Data</legend>
<!-- Text input-->
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row" style="margin-bottom: 20px;">
<div class=" col-md-4">
<label class="col-form-label" for="GSTNo">GST Number</label>
<input type="text" id="GSTNo" name="GSTNo" class="form-control" maxlength="15" onchange="validateGST();" style="text-transform:uppercase;" pattern="([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}" title="Please Enter 2 Digit Number and 5 Character and 4 Digit Numbers and 1 Character and 1 Number and 'Z' and 1 Number or Character" onkeypress="return alphaNumberic(event)">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="PAN">PAN</label>
<input type="text" id="panno" maxlength="10" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}" name="panno" style="text-transform:uppercase;" onchange="validatePAN();" class="form-control" title="Please Enter 5 Character and 4 digit numbers and 1 Character format (Character should be in caps)" onkeypress="return alphaNumberic(event)">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="Cert_GST">Select GST Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
<input style="margin-top: 5px;" type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_GST" name="Cert_GST" />
</div>
</div>
<div class="form-row">
<div class=" col-md-8">
<label class="col-form-label" for="MSME">MSME</label>
<input type="text" id="MSMENo" name="MSME" class="form-control" maxlength="30">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="Cert_MSME">Select MSME Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
<input style="margin-top: 5px;" type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_MSME" name="Cert_MSME" />
</div>
</div>
</div>
<!-- Bank Details-->
<legend style="margin-left:-10px;color: #4f7c97;">Bank Details</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class=" col-md-4">
<label class="col-form-label" for="Account_number">Account Number<span class="badge">*</span></label>
<input type="text" id="accno" name="accno" maxlength="20" class="form-control" onkeypress="return isNumberKey(event)" required>
</div>
<div class=" col-md-4">
<label class="col-form-label" for="IFSC_Code">IFSC Code<span class="badge">*</span></label>
<input type="text" id="ifsc" name="ifsc" maxlength="12" class="form-control" onkeypress="return alpha(event)" style="text-transform: uppercase" required>
</div>
<div class=" col-md-4">
<label class="col-form-label" for="Bank_Branch_Name">Bank Branch Name</label>
<input type="text" id="branchname" name="branchname" maxlength="200" class="form-control">
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class=" col-md-4">
<label class="col-form-label" for="Bank_Address">Bank Address<span class="badge">*</span></label>
<input type="text" id="bankaddress" name="bankaddress" maxlength="200" class="form-control" required>
</div>
<div class=" col-md-4">
<label class="col-form-label" for="Cert_BANK">Select Bank Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
<input style="margin-top: 5px;" type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_BANK" name="Cert_BANK" />
</div>
</div>
</div>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="col-md-3">
</div>
</div>
<legend style="margin-left:-10px;color: #4f7c97;">Payment Details</legend>
<!-- Text input-->
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="col-md-3">
<span for="payablefrom">Payable Terms</span>
<select class="form-control required select2" id="Payment" name="Payment" onchange="payment_hidden();"> <!-- onchange="storeVal(this,'hiddenVal');"> -->
<option value="Date of invoice">Select Payment method</option>
<?php
if (!empty($payment)) {
foreach ($payment as $pmt) {
?>
<option value="<?php echo $pmt->PaymentID ?>"><?php echo $pmt->PaymentTerms ?></option>
<?php
}
}
?>
</select>
<input type="hidden" id="paymentid" name="paymentid" value="">
<!--<input type="hidden" id="paymentname" name="paymentname" value=""> -->
</div>
</div>
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>supplierlisting"><span class="bold">Back</span></a>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<div class="row">
<div class="col-12">
<form class="form-horizontal" role="form" id="addsupplier" action="<?php echo base_url() ?>addNewsupplier" method="post" role="form" enctype="multipart/form-data">
<div class="box-body">
<!-- Supplier Information -->
<legend style="margin-left:-10px;color: #4f7c97;">Supplier Information</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row" style="margin-bottom:10px;">
<div class=" col-md-3">
<label class="col-form-label" for="SupplierName">Supplier Name<span class="badge">*</span></label>
<input type="text" name="SupplierName" maxlength="100" id="supplierName" class="form-control" required>
</div>
<div class=" col-md-3">
<label class="col-form-label" for="ContactNumber">Contact Number<span class="badge">*</span></label>
<input type="text" name="ContactNumber" onchange="return getContactNumberValidation();" id="ContactNumber" required maxlength="13" class="form-control" title="Please Enter Mobile Number (or) Telephone Number" onkeypress="return isNumberKey(event)">
</div>
<div class="col-md-3">
<label class="col-form-label" for="AlternateContactNumber">Alternate Contact Number</label>
<input type="text" name="AlternateContactNumber" onchange="return getValidAlternateNumber();" id="AlternateContactNumber" maxlength="13" class="form-control" title="Please Enter Mobile Number (or) Telephone Number" onkeypress="return isNumberKey(event)">
</div>
<div class="col-md-3">
<label class="col-form-label" for="EmailAddress">Email ID<span class="badge">*</span></label>
<input type="email" name="emailid" id="emailid" required maxlength="100" class="form-control">
</div>
</div>
<div class="form-row" >
<div class="col-md-12" style="margin-top:5px">
<label for="SupplierType">Supplier Type</label><!--<span class="badge">*</span>-->
&ensp;
</div>
<div class="col-md-1" style="margin-top:5px">
<input type="checkbox" id="service" name="service" value="<?php echo $service = (isset($_POST['service'])) ? 0 : 1; ?>"> <b>SERVICE &ensp;</b>
</div>
<div class="col-md-1.5" style="margin-top:5px">
<input type="checkbox" id="rawmaterial" name="rawmaterial" value="<?php echo $rawmaterial = (isset($_POST['rawmaterial'])) ? 0 : 1; ?>"> <b>RAW MATERIALS &ensp;</b>
</div>
<div class="col-md-2" style="margin-top:5px">
<input type="checkbox" id="maintanance" name="maintanance" value="<?php echo $maintanance = (isset($_POST['maintanance'])) ? 0 : 1; ?>"> <b>MAINTENANCE &ensp;</b>
</div>
</div>
</div>
</div>
<!-- Address Section -->
<legend style="margin-left:-10px;color: #4f7c97;">Address Details</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class=" col-md-6">
<label class="col-form-label" for="Address2">Address<span class="badge">*</span></label>
<textarea type="text" class="form-control required" id="Address" name="Address" maxlength="500" required rows="3"></textarea>
</div>
</div>
</div>
<!-- Tax Related Data -->
<legend style="margin-left:-10px;color: #4f7c97;">Tax Related Data</legend>
<!-- Text input-->
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row" style="margin-bottom: 20px;">
<div class=" col-md-4">
<label class="col-form-label" for="GSTNo">GST Number</label>
<input type="text" id="GSTNo" name="GSTNo" class="form-control" maxlength="15" onchange="validateGST();" style="text-transform:uppercase;" pattern="([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}" title="Please Enter 2 Digit Number and 5 Character and 4 Digit Numbers and 1 Character and 1 Number and 'Z' and 1 Number or Character" onkeypress="return alphaNumberic(event)">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="PAN">PAN</label>
<input type="text" id="panno" maxlength="10" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}" name="panno" style="text-transform:uppercase;" onchange="validatePAN();" class="form-control" title="Please Enter 5 Character and 4 digit numbers and 1 Character format (Character should be in caps)" onkeypress="return alphaNumberic(event)">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="Cert_GST">Select GST Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
<input style="margin-top: 5px;" type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_GST" name="Cert_GST"/>
</div>
</div>
<div class="form-row">
<div class=" col-md-8">
<label class="col-form-label" for="MSME">MSME</label>
<input type="text" id="MSMENo" name="MSME" class="form-control" maxlength="30">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="Cert_MSME">Select MSME Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
<input style="margin-top: 5px;" type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_MSME" name="Cert_MSME"/>
</div>
</div>
</div>
<!-- Bank Details-->
<legend style="margin-left:-10px;color: #4f7c97;">Bank Details</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class=" col-md-4">
<label class="col-form-label" for="Account_number">Account Number<span class="badge">*</span></label>
<input type="text" id="accno" name="accno" maxlength="20" class="form-control" onkeypress="return isNumberKey(event)" required>
</div>
<div class=" col-md-4">
<label class="col-form-label" for="IFSC_Code">IFSC Code<span class="badge">*</span></label>
<input type="text" id="ifsc" name="ifsc" maxlength="12" class="form-control" onkeypress="return alpha(event)" style="text-transform: uppercase" required>
</div>
<div class=" col-md-4">
<label class="col-form-label" for="Bank_Branch_Name">Bank Branch Name</label>
<input type="text" id="branchname" name="branchname" maxlength="200" class="form-control">
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class=" col-md-4">
<label class="col-form-label" for="Bank_Address">Bank Address<span class="badge">*</span></label>
<input type="text" id="bankaddress" name="bankaddress" maxlength="200" class="form-control" required>
</div>
<div class=" col-md-4">
<label class="col-form-label" for="Cert_BANK">Select Bank Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
<input style="margin-top: 5px;" type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_BANK" name="Cert_BANK"/>
</div>
</div>
</div>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="col-md-3">
</div>
</div>
<legend style="margin-left:-10px;color: #4f7c97;">Payment Details</legend>
<!-- Text input-->
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="col-md-3">
<span for="payablefrom">Payable Terms</span>
<select class="form-control required select2" id="Payment" name="Payment" onchange="payment_hidden();"> <!-- onchange="storeVal(this,'hiddenVal');"> -->
<option value="Date of invoice">Select Payment method</option>
<?php
if (!empty($payment)) {
foreach ($payment as $pmt) {
?>
<option value="<?php echo $pmt->PaymentID ?>"><?php echo $pmt->PaymentTerms ?></option>
<?php
}
}
?>
</select>
<input type="hidden" id="paymentid" name="paymentid" value="">
<!--<input type="hidden" id="paymentname" name="paymentname" value=""> -->
</div>
</div>
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
</div>
</div>
</form>
</div>
</div>
<!-- end row -->
</div>
</div> <!-- end card -->
</div><!-- end col -->
</form>
</div>
</div>
<!-- end row -->
</div> <!-- container -->
</div> <!-- content -->
<!-- end row -->
</div>
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row -->
</div> <!-- container -->
</div> <!-- content -->
</div>
<!-- ============================================================== -->
@ -230,7 +228,7 @@
$("#paymentid").val(termid);
$("#paymentname").val(termname);
}
function Validate() {
if ($("#supplierName").val().length < 1) {
alert('Please Enter Supplier Name');
@ -258,38 +256,40 @@
}
}
$('#supplierName').change(function() {
var suppliername = $('#supplierName').val();
var supplier = suppliername.replace(/ /g, '');
$('#content').loader('show');
$.ajax({
type: "POST",
url: "<?= base_url() . 'supplierExist' ?>",
data: { id: supplier },
success: function(data) {
var count = data.length;
if (count > 2) {
$('#content').loader('hide');
alert('supplier already existed ! ');
var related_supplier = "";
$.each(data, function(i, obj) {
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
});
alert("'" + suppliername + "' - related supplier are , " + " \n \n" + related_supplier);
$("#supplierName").focus();
} else {
$('#content').loader('hide');
// alert('This is New Supplier! ');
}
console.log(data);
},
error: function() {
$('#content').loader('hide');
// alert("Error Occur");
}
});
});
type: "POST",
url: "<?= base_url() . 'supplierExist' ?>",
data: {
id: supplier
},
success: function(data) {
var count = data.length;
if (count > 2) {
$('#content').loader('hide');
alert('supplier already existed ! ');
var related_supplier = "";
$.each(data, function(i, obj) {
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
});
alert("'" + suppliername + "' - related supplier are , " + " \n \n" + related_supplier);
$("#supplierName").focus();
} else {
$('#content').loader('hide');
// alert('This is New Supplier! ');
}
console.log(data);
},
error: function() {
$('#content').loader('hide');
// alert("Error Occur");
}
});
});
//Email Validate
function validateEmail() {
@ -315,7 +315,7 @@
function blockKeyPress(evt) {
var charCode = (evt.which) ? evt.which : evt.keyCode;
alert(charCode);
if (charCode == 8 || charCode == 46){
if (charCode == 8 || charCode == 46) {
return false;
} else {
return false;
@ -355,7 +355,7 @@
function validateGST() {
// var reg = /(?=.*[0-9]).{2}(?=.*[A-Za-z]).{5}(?=.*[0-9]).{4}(?=.*[A-Za-z]).{1}(?=.*[0-9]).{1}(?=.*[Zz]).{1}(?=.*[A-Za-z0-9]).{1}$/;
var reg = /^([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}$/;
var reg = /^([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}$/;
var GST = $('#GSTNo').val();
var PAN = $('#panno').val();
(PAN != '') ?? $('#panno').val("");
@ -367,10 +367,10 @@
var panPattern = /[A-Z]{5}[0-9]{4}[A-Z]{1}/;
var panMatch = GST.match(panPattern);
if (panMatch) {
var extractedPAN = panMatch[0].toUpperCase();
if (panPattern.test(extractedPAN) == true) {
$('#panno').val(extractedPAN);//.prop('readonly', true);
}
var extractedPAN = panMatch[0].toUpperCase();
if (panPattern.test(extractedPAN) == true) {
$('#panno').val(extractedPAN); //.prop('readonly', true);
}
}
return true;
}
@ -465,9 +465,9 @@
}
}
$(document).ready(function() {
//$("#Payment").select2();
});
</script>
</script>

View File

@ -3,15 +3,13 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title ">Add User Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>userListing"><span class="bold">Back</span></a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>userListing"><span class="bold">Back</span></a>
</div>
</div>
<!-- end page title -->
<div class="row">

View File

@ -3,15 +3,13 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title"> Add Asset Details</h4>
<h4 class="page-title">Add Asset Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>assetListing"><span class="bold">Back</span></a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>assetListing"><span class="bold">Back</span></a>
</div>
</div>
<!-- end page title -->
<div class="row">
@ -19,151 +17,151 @@
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<div class="row">
<div class="col-12">
<form role="form" id="addAsset" action="<?php echo base_url() ?>addNewasset" method="post">
<div class="box-body">
<!-- Supplier Information -->
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class=" col-md-3">
<label class="col-form-label" for="AssetName">Asset Name<span class="badge">*</span></label>
<input type="text" class="form-control " required style="text-transform:uppercase;" id="AssetName" name="AssetName" value="<?php echo isset($_POST['AssetName']) ? $_POST['AssetName'] : '' ?>">
</div>
<div class=" col-md-3">
<label class="col-form-label" for="AssetDescription">Asset Description<span class="badge">*</span></label>
<input type="text" class="form-control required" id="Description" required name="Description" value="<?php echo isset($_POST['Description']) ? $_POST['Description'] : '' ?>">
</div>
<div class="col-md-3">
<label class="col-form-label" for="Asset User">Asset User<span class="badge">*</span></label>
<input type="text" class="form-control required" required id="User" name="User" value="<?php echo isset($_POST['User']) ? $_POST['User'] : '' ?>">
</div>
<div class="col-md-3">
<label class="col-form-label" for="AssetLocation">Asset Location<span class="badge">*</span></label>
<input type="text" class="form-control required" required id="Location" name="Location" value="<?php echo isset($_POST['Location']) ? $_POST['Location'] : '' ?>">
</div>
<div class="col-12">
<form role="form" id="addAsset" action="<?php echo base_url() ?>addNewasset" method="post">
<div class="box-body">
<!-- Supplier Information -->
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class=" col-md-3">
<label class="col-form-label" for="AssetName">Asset Name<span class="badge">*</span></label>
<input type="text" class="form-control " required style="text-transform:uppercase;" id="AssetName" name="AssetName" value="<?php echo isset($_POST['AssetName']) ? $_POST['AssetName'] : '' ?>">
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<label for="PONO">Purchase Order Number<span class="badge">*</span></label>
<select class="form-control required " required id="PONO" required name="PONO">
<option value="">Select PO Number</option>
<?php
echo "////***////";
print_r($po);
if (!empty($po)) {
foreach ($po as $po) {
$PONO = $po->PONO;
// if ($_POST['PONO'] == $PONO)
// {
// echo "<option value=\"".$PONO."\" selected=\"selected\">".$PONO.' - '. $SID->PONO."</option>";
// }
// else
// {
echo "<option value=\"" . $PONO . "\">" . $PONO . "</option>";
// }
}
}
?>
</select>
</div>
<input type="text" class="form-control required" id="lineitem" name="lineitem" value="-1" hidden>
<div class="col-md-3">
<label for="MaterialCode">Select Material Code</label>
<select class="form-control required select2" required="" id="MaterialCode" name="MaterialCode">
<option value="-1">Select Material Code</option>
</select>
</div>
<div class="col-md-3">
<label for="UOM">UOM</label>
<input type="text" class="form-control required" id="UOM" readonly name="UOM" value="">
</div>
<div class="col-md-3">
<label for="Quantity">Quantity</label>
<input type="text" class="form-control required" id="Quantity" name="Quantity" value="">
</div>
<div class=" col-md-3">
<label class="col-form-label" for="AssetDescription">Asset Description<span class="badge">*</span></label>
<input type="text" class="form-control required" id="Description" required name="Description" value="<?php echo isset($_POST['Description']) ? $_POST['Description'] : '' ?>">
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<label for="Quantity">Description</label>
<input style="height: 70px;" type="text" class="form-control required" id="PODescription" readonly name="PODescription" value="<?php echo isset($_POST['PODescription']) ? $_POST['PODescription'] : '' ?>">
</div>
<div class="col-md-3">
<label class="col-form-label" for="Asset User">Asset User<span class="badge">*</span></label>
<input type="text" class="form-control required" required id="User" name="User" value="<?php echo isset($_POST['User']) ? $_POST['User'] : '' ?>">
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<input type="hidden" name="AssetDept" id="depcode">
<label for="AssetDepartment">Asset Department</label>
<input type="text" class="form-control required" id="AssetDept" readonly name="" value="">
</div>
<div class="col-md-3">
<label for="Quantity">Purchase Date<span style="color:red">*</span></label>
<input id="DateOfPurchase" name="DateOfPurchase" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['DateOfPurchase']) ? $_POST['DateOfPurchase'] : '' ?>">
</div>
<div class="col-md-3">
<label for="SupplierName">Supplier Name</label>
<input type="hidden" name="SupplierName" id="SupID">
<input id="SupplierName" readonly name="" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['SupplierName']) ? $_POST['SupplierName'] : '' ?>">
</div>
<div class="col-md-3">
<label for="DeliveryDate">Delivery Date</label>
<input id="DeliveryDate" readonly name="DeliveryDate" maxlength="10" class="form-control">
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<label for="DateOfCommission">Date Of Commission<span style="color:red">*</span></label>
<input id="DateOfCommission" required name="DateOfCommission" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['DateOfCommission']) ? $_POST['DateOfCommission'] : '' ?>">
</div>
<div class="col-md-3">
<label for="AssetValue">Asset Value</label>
<input type="text" class="form-control" id="Assetvalue" name="Assetvalue" onkeypress="return isNumberKey(event)" title="Please Enter currency value" maxlength="255" value="<?php echo isset($_POST['Assetvalue']) ? $_POST['Assetvalue'] : '' ?>">
</div>
<div class="col-md-3">
<label for="Asset Status">Asset Status</label>
<select class="form-control required select2" required id="AssetStatus" name="AssetStatus">
<option value="">Select Asset Status</option>
<?php
if (!empty($AssetStatus)) {
foreach ($AssetStatus as $SID) {
$AssetValue = $SID->ConfigValue;
// if ($_POST['AssetStatus'] == $AssetValue)
// {
// echo "<option value=\"".$AssetValue."\" selected=\"selected\">".$AssetValue."</option>";
// }
// else
// {
echo "<option value=\"" . $AssetValue . "\">" . $AssetValue . "</option>";
// }
}
}
?>
</select>
</div>
<div class="col-md-3">
<label for="Remarks">Remarks</label>
<input type="text" class="form-control required" id="Remarks" name="Remarks" maxlength="500" value="<?php echo isset($_POST['Remarks']) ? $_POST['Remarks'] : '' ?>">
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<input type="checkbox" id="isactive" name="isactive" <?php echo (isset($_POST['isactive']) ? 'checked' : '') ?>> <label for="isactive">IsActive</label>
</div>
<div class="col-md-3">
<label class="col-form-label" for="AssetLocation">Asset Location<span class="badge">*</span></label>
<input type="text" class="form-control required" required id="Location" name="Location" value="<?php echo isset($_POST['Location']) ? $_POST['Location'] : '' ?>">
</div>
</div>
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<label for="PONO">Purchase Order Number<span class="badge">*</span></label>
<select class="form-control required " required id="PONO" required name="PONO">
<option value="">Select PO Number</option>
<?php
echo "////***////";
print_r($po);
if (!empty($po)) {
foreach ($po as $po) {
$PONO = $po->PONO;
// if ($_POST['PONO'] == $PONO)
// {
// echo "<option value=\"".$PONO."\" selected=\"selected\">".$PONO.' - '. $SID->PONO."</option>";
// }
// else
// {
echo "<option value=\"" . $PONO . "\">" . $PONO . "</option>";
// }
}
}
?>
</select>
</div>
<input type="text" class="form-control required" id="lineitem" name="lineitem" value="-1" hidden>
<div class="col-md-3">
<label for="MaterialCode">Select Material Code</label>
<select class="form-control required select2" required="" id="MaterialCode" name="MaterialCode">
<option value="-1">Select Material Code</option>
</select>
</div>
<div class="col-md-3">
<label for="UOM">UOM</label>
<input type="text" class="form-control required" id="UOM" readonly name="UOM" value="">
</div>
<div class="col-md-3">
<label for="Quantity">Quantity</label>
<input type="text" class="form-control required" id="Quantity" name="Quantity" value="">
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<label for="Quantity">Description</label>
<input style="height: 70px;" type="text" class="form-control required" id="PODescription" readonly name="PODescription" value="<?php echo isset($_POST['PODescription']) ? $_POST['PODescription'] : '' ?>">
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<input type="hidden" name="AssetDept" id="depcode">
<label for="AssetDepartment">Asset Department</label>
<input type="text" class="form-control required" id="AssetDept" readonly name="" value="">
</div>
<div class="col-md-3">
<label for="Quantity">Purchase Date<span style="color:red">*</span></label>
<input id="DateOfPurchase" name="DateOfPurchase" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['DateOfPurchase']) ? $_POST['DateOfPurchase'] : '' ?>">
</div>
<div class="col-md-3">
<label for="SupplierName">Supplier Name</label>
<input type="hidden" name="SupplierName" id="SupID">
<input id="SupplierName" readonly name="" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['SupplierName']) ? $_POST['SupplierName'] : '' ?>">
</div>
<div class="col-md-3">
<label for="DeliveryDate">Delivery Date</label>
<input id="DeliveryDate" readonly name="DeliveryDate" maxlength="10" class="form-control">
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<label for="DateOfCommission">Date Of Commission<span style="color:red">*</span></label>
<input id="DateOfCommission" required name="DateOfCommission" onkeypress="return false;" maxlength="10" class="form-control" value="<?php echo isset($_POST['DateOfCommission']) ? $_POST['DateOfCommission'] : '' ?>">
</div>
<div class="col-md-3">
<label for="AssetValue">Asset Value</label>
<input type="text" class="form-control" id="Assetvalue" name="Assetvalue" onkeypress="return isNumberKey(event)" title="Please Enter currency value" maxlength="255" value="<?php echo isset($_POST['Assetvalue']) ? $_POST['Assetvalue'] : '' ?>">
</div>
<div class="col-md-3">
<label for="Asset Status">Asset Status</label>
<select class="form-control required select2" required id="AssetStatus" name="AssetStatus">
<option value="">Select Asset Status</option>
<?php
if (!empty($AssetStatus)) {
foreach ($AssetStatus as $SID) {
$AssetValue = $SID->ConfigValue;
// if ($_POST['AssetStatus'] == $AssetValue)
// {
// echo "<option value=\"".$AssetValue."\" selected=\"selected\">".$AssetValue."</option>";
// }
// else
// {
echo "<option value=\"" . $AssetValue . "\">" . $AssetValue . "</option>";
// }
}
}
?>
</select>
</div>
<div class="col-md-3">
<label for="Remarks">Remarks</label>
<input type="text" class="form-control required" id="Remarks" name="Remarks" maxlength="500" value="<?php echo isset($_POST['Remarks']) ? $_POST['Remarks'] : '' ?>">
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<input type="checkbox" id="isactive" name="isactive" <?php echo (isset($_POST['isactive']) ? 'checked' : '') ?>> <label for="isactive">IsActive</label>
</div>
</div>
</div>
</form>
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
</div>
</div>
</form>
</div>
<?php
$listErrors = session()->getFlashdata('listErrors');
@ -235,7 +233,7 @@
data: 'PONO=' + PONO,
dataType: 'json',
success: function(data) {
console.log(data);
console.log(data);
var line = '';
$('#MaterialCode').empty();
@ -264,12 +262,12 @@
var selectedText = $('#MaterialCode option:selected').text();
var lineItemNo = selectedText.split('-')[0];
var lineItemNo = selectedText.split('-')[0];
var id = lineItemNo
var id = lineItemNo
var line = id;
//line +='<option>select Material Code</option>'
if (line) {
$.ajax({
@ -278,13 +276,13 @@
data: 'line=' + line,
success: function(data) {
$.each(JSON.parse(data), function(i, item) {
if (id == item.LineItemNo) {
alert(item.LineItemNo);
// alert(item.MaterialCode);
// alert(item.MaterialCode);
$('#DateOfPurchase').val(item.PODate);
if (item.DeliveryDate != null) {

View File

@ -11,15 +11,13 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title"> Add Config Details</h4>
<h4 class="page-title">Add Config Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>configlisting"><span class="bold">Back</span></a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>configlisting"><span class="bold">Back</span></a>
</div>
</div>
<?php
helper('form');

View File

@ -1,158 +1,152 @@
<style>
.pad{
padding-bottom:1%;
}
.badge
{
color:red; background-color:#fff;
}
.pad {
padding-bottom: 1%;
}
.badge {
color: red;
background-color: #fff;
}
</style>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Add Department Details</h4>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>departmentListing"><span class="bold">Back</span></a>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<div class="row">
<div class="col-12">
<form role="form" id="adddepartment" action="<?php echo base_url() ?>savedepartment" method="post">
<div class="box-body">
<!-- Supplier Information -->
<div class="col-md-12" style="margin-bottom: 27px;">
<legend style="margin-left:-10px;color: #4f7c97;">Department Information</legend>
<div class="form-row" style="margin-top:10px">
<div class="col-md-4">
<label class="col-form-label" for="DepartmentName">Department Name<span class="badge">*</span></label>
<input type="text" name="DepartmentName" id="DepartmentName" class="form-control" required>
</div>
<div class="col-md-4">
<label class="col-form-label" for="HeadDepartment">Head Department<span class="badge">*</span></label>
<select class="form-control required" id="HeadDept" name="HeadDept">
<option value="-1" required>Select Department Code</option>
<?php
if(!empty($depcode))
{
foreach ($depcode as $DC)
{
?>
<option value="<?php echo $DC->DEPCode?>"><?php echo $DC->DEPCode." - " .$DC->DepartmentName ?></option>
<?php
}
}
?>
</select>
</div>
<div class="col-md-4 d-flex align-items-center">
<input type="checkbox" id="IsActive" name="IsActive" style="margin-top: 16px;">
<span for="Active" style="margin-top: 16px;">&nbsp;&nbsp;&nbsp;Is Active</span>
</div>
</div>
</div>
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
</div>
</div>
</form>
<div class="col-md-4">
<?php
helper('form');
$error = session()->getFlashdata('error');
if($error)
{
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if($success)
{
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?> </div>
</div>
</div>
</div>
</div>
<!-- end row -->
</div>
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row -->
</div> <!-- container -->
</div> <!-- content -->
</div>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Add Department Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>departmentListing"><span class="bold">Back</span></a>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<div class="row">
<div class="col-12">
<form role="form" id="adddepartment" action="<?php echo base_url() ?>savedepartment" method="post">
<div class="box-body">
<!-- Supplier Information -->
<div class="col-md-12" style="margin-bottom: 27px;">
<legend style="margin-left:-10px;color: #4f7c97;">Department Information</legend>
<div class="form-row" style="margin-top:10px">
<div class="col-md-4">
<label class="col-form-label" for="DepartmentName">Department Name<span class="badge">*</span></label>
<input type="text" name="DepartmentName" id="DepartmentName" class="form-control" required>
</div>
<div class="col-md-4">
<label class="col-form-label" for="HeadDepartment">Head Department<span class="badge">*</span></label>
<select class="form-control required" id="HeadDept" name="HeadDept">
<option value="-1" required>Select Department Code</option>
<?php
if (!empty($depcode)) {
foreach ($depcode as $DC) {
?>
<option value="<?php echo $DC->DEPCode ?>"><?php echo $DC->DEPCode . " - " . $DC->DepartmentName ?></option>
<?php
}
}
?>
<script>
</select>
</div>
<div class="col-md-4 d-flex align-items-center">
<input type="checkbox" id="IsActive" name="IsActive" style="margin-top: 16px;">
<span for="Active" style="margin-top: 16px;">&nbsp;&nbsp;&nbsp;Is Active</span>
</div>
</div>
</div>
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
</div>
</div>
</form>
<div class="col-md-4">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
// function blockKeyPress(evt)
// {
// var charCode = (evt.which) ? evt.which : evt.keyCode;
// alert(charCode);
// if(charCode == 8 || charCode == 46 )
//
// {
// return false;
// }
// else
// {
// return false;
// }
// }
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?> </div>
</div>
</div>
</div>
</div>
<!-- end row -->
</div>
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row -->
</div> <!-- container -->
</div> <!-- content -->
</div>
// function isNumberKey(evt)
// {
// var charCode = (evt.which) ? evt.which : evt.keyCode;
// if (charCode != 46 && charCode > 31
// && (charCode < 48 || charCode > 57))
// return false;
//
// return true;
// }
<script>
// function blockKeyPress(evt)
// {
// var charCode = (evt.which) ? evt.which : evt.keyCode;
// alert(charCode);
// if(charCode == 8 || charCode == 46 )
//
// {
// return false;
// }
// else
// {
// return false;
// }
// }
// function onlyAlphabets(evt) {
// var charCode;
// if (window.event)
// charCode = window.event.keyCode; //for IE
// else
// charCode = evt.which; //for firefox
// if (charCode == 32) //for &lt;space&gt; symbol
// return true;
// if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
// return false;
// if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
// return false;
// if (charCode > 122) //for characters beyond 'z' in ASCII Table
// return false;
// return true;
// }
</script>
// function isNumberKey(evt)
// {
// var charCode = (evt.which) ? evt.which : evt.keyCode;
// if (charCode != 46 && charCode > 31
// && (charCode < 48 || charCode > 57))
// return false;
//
// return true;
// }
// function onlyAlphabets(evt) {
// var charCode;
// if (window.event)
// charCode = window.event.keyCode; //for IE
// else
// charCode = evt.which; //for firefox
// if (charCode == 32) //for &lt;space&gt; symbol
// return true;
// if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
// return false;
// if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
// return false;
// if (charCode > 122) //for characters beyond 'z' in ASCII Table
// return false;
// return true;
// }
</script>

View File

@ -34,16 +34,15 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Create Loan</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>emppayListings"><span class="bold">Back</span></a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>emppayListings"><span class="bold">Back</span></a>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
@ -270,7 +269,7 @@
$('#Loan_Amount').val("0.00");
$('#paid_due').val(0);
$('#Paid_Amount').val("0.00");
}

View File

@ -42,85 +42,84 @@
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-6">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title pt-2">Asset Details</h4>
<h4 class="page-title">Asset Details</h4>
<a class="btn btn-success" style="color:#fff" href="<?php echo base_url(); ?>addasset">Add New Asset</a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-success" href="<?php echo base_url(); ?>addasset">Add New Asset</a>
<!-- <a class="btn btn-success" href="<?php echo base_url(); ?>exportasset">Export Asset Details <i class="fa fa-download" aira-hidden="true"></i></a> -->
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table class="table dt-responsive nowrap w-100" id="asset_list_table" style="background-color:#fff;">
<thead >
<tr>
<th>Created Date</th>
<th>Asset Code</th>
<th>Asset Name</th>
<th>Asset Description</th>
<th>Department Name</th>
<th>Location</th>
<th>Asset User</th>
<th>Supplier Name</th>
<th>Received Date</th>
<th>Asset Value</th>
<th>Asset Status</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<thead>
<tr>
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedDt));
} ?>
<td ><?php echo $cdate; ?></td>
<td><u><a href="<?php echo base_url() . 'assetdetails/editOldasset/?AssetID=' . $record->AssetCode ?>" data-toggle="tooltip" title="<?php echo $record->AssetCode; ?> - Click here to view Asset details"><?php echo substr($record->AssetCode, 5) ?>
<td><?php echo $record->AssetName ?></td>
<td><?php echo $record->Description ?></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->Location ?></td>
<td><?php echo $record->UserName ?></td>
<td><?php echo $record->SupplierName ?></td>
<td><?php
$dtpurchase = new DateTime($record->DateOfPurchase);
$DOPurchase = $dtpurchase->format('d-m-Y');
echo $DOPurchase ?></td>
<td><?php echo number_format($record->AssetValue, 2); ?></td>
<td><?php echo $record->AssetStatus ?></td>
<th>Created Date</th>
<th>Asset Code</th>
<th>Asset Name</th>
<th>Asset Description</th>
<th>Department Name</th>
<th>Location</th>
<th>Asset User</th>
<th>Supplier Name</th>
<th>Received Date</th>
<th>Asset Value</th>
<th>Asset Status</th>
</tr>
<?php
}
}
?>
</tbody>
</table>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedDt));
} ?>
<td><?php echo $cdate; ?></td>
<td><u><a href="<?php echo base_url() . 'assetdetails/editOldasset/?AssetID=' . $record->AssetCode ?>" data-toggle="tooltip" title="<?php echo $record->AssetCode; ?> - Click here to view Asset details"><?php echo substr($record->AssetCode, 5) ?>
<td><?php echo $record->AssetName ?></td>
<td><?php echo $record->Description ?></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->Location ?></td>
<td><?php echo $record->UserName ?></td>
<td><?php echo $record->SupplierName ?></td>
<td><?php
$dtpurchase = new DateTime($record->DateOfPurchase);
$DOPurchase = $dtpurchase->format('d-m-Y');
echo $DOPurchase ?></td>
<td><?php echo number_format($record->AssetValue, 2); ?></td>
<td><?php echo $record->AssetStatus ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
@ -154,78 +153,81 @@
<script>
$(document).ready(function() {
// Initialize the DataTable
var table = $('#asset_list_table').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
responsive: true, // Responsive table
order: [], // Default ordering (column index 0, descending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
$(document).ready(function() {
// Initialize the DataTable
var table = $('#asset_list_table').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
order: [], // Default ordering (column index 0, descending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
}
});
});
// Date range filter function
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $('#fromDate').val();
var toDate = $('#toDate').val();
if (!fromDate || !toDate) {
return true; // If no dates selected, don't filter
// Date range filter function
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $('#fromDate').val();
var toDate = $('#toDate').val();
if (!fromDate || !toDate) {
return true; // If no dates selected, don't filter
}
var dateStr = data[0]; // Assuming the date is in the first column
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
var startDate = new Date(fromDate);
var endDate = new Date(toDate);
// Adjust startDate to include the day before the selected fromDate
startDate.setDate(startDate.getDate() - 1);
// Ensure endDate includes the entire end date by setting time to the end of the day
endDate.setHours(23, 59, 59, 999);
// Return true if the date is within the range
return date >= startDate && date <= endDate;
}
var dateStr = data[0]; // Assuming the date is in the first column
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
var startDate = new Date(fromDate);
var endDate = new Date(toDate);
// Adjust startDate to include the day before the selected fromDate
startDate.setDate(startDate.getDate() - 1);
// Ensure endDate includes the entire end date by setting time to the end of the day
endDate.setHours(23, 59, 59, 999);
);
// Return true if the date is within the range
return date >= startDate && date <= endDate;
}
);
// Handle form submission for the date range filter
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw(); // Redraw the table to apply the filter
});
// Handle form submission for the date range filter
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw(); // Redraw the table to apply the filter
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").val('');
$("#toDate").val('');
table.draw(); // Redraw the table to clear the filter
});
// Automatically focus and open the To Date picker when From Date is selected
document.getElementById('fromDate').addEventListener('change', function() {
var fromDate = this.value;
var toDateInput = document.getElementById('toDate');
// Set the min attribute of the To Date input to the selected From Date
toDateInput.min = fromDate;
// Optionally reset the To Date input if the current value is before the new min date
if (toDateInput.value < fromDate) {
toDateInput.value = fromDate;
}
});
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").val('');
$("#toDate").val('');
table.draw(); // Redraw the table to clear the filter
});
// Automatically focus and open the To Date picker when From Date is selected
document.getElementById('fromDate').addEventListener('change', function() {
var fromDate = this.value;
var toDateInput = document.getElementById('toDate');
// Set the min attribute of the To Date input to the selected From Date
toDateInput.min = fromDate;
// Optionally reset the To Date input if the current value is before the new min date
if (toDateInput.value < fromDate) {
toDateInput.value = fromDate;
}
});
});
</script>

View File

@ -210,7 +210,7 @@ $currentday = date('d');
</div>
<div class="col-3">
<input type="submit" value="Change Month" class="btn btn-success"
title='click here for load attendance for specified month'>
title='click here for load attendance for specified month' style="margin-top:0px;">
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -57,18 +57,18 @@ if (!empty($userRecords)) {
$PaymentTerms = $uf->PaymentTerms;
$PaymentId = $uf->paymentID;
$MSME = $uf->MSME;
$userId=$uf->userId;
//$PaymentDays = $uf->PaymentDays ;
//$PayableAT = $uf->PayableAT ;
$Createdby = $uf->Createdby;
//$CreatedDate = $uf->CreatedDate;
$UpdatedBy = $uf->UpdatedBy;
$Updatedon = $uf->Updatedon;
$ProfilePic = $uf->ProfilePic;
$companywebsite = $uf->companyWebsite;
//$companywebsite = $uf->companywebsite;
//$ceoname = $uf->ceoname;
//$mdname = $uf->mdname;
$userId = $uf->userId;
//$PaymentDays = $uf->PaymentDays ;
//$PayableAT = $uf->PayableAT ;
$Createdby = $uf->Createdby;
//$CreatedDate = $uf->CreatedDate;
$UpdatedBy = $uf->UpdatedBy;
$Updatedon = $uf->Updatedon;
$ProfilePic = $uf->ProfilePic;
$companywebsite = $uf->companyWebsite;
//$companywebsite = $uf->companywebsite;
//$ceoname = $uf->ceoname;
//$mdname = $uf->mdname;
//$companystartedon = $uf->companystartedon;
//$partnerdetails = $uf->partnerdetails;
$firstname = $uf->firstname;
@ -143,25 +143,23 @@ if (!empty($filenames)) {
reader.readAsDataURL(input.files[0]);
$('#ModifyImage').val(input.files[0]['name']);
}
}
} else {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function(e) {
$('#file')
.attr('src', e.target.result)
.width(166)
.height(166);
};
reader.readAsDataURL(input.files[0]);
}
}
}
else
{
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#file')
.attr('src', e.target.result)
.width(166)
.height(166);
};
reader.readAsDataURL(input.files[0]);
}
}
}
function isNumberKey(evt) {
@ -442,335 +440,334 @@ if (!empty($filenames)) {
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title ">Business Settings</h4>
<h4 class="page-title">Business Settings</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>supplierlisting"><span class="bold">Back</span></a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>supplierlisting"><span class="bold">Back</span></a>
</div>
</div>
<!-- end page title -->
<div class="row">
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<div class="row">
<div class="col-12">
<form class="form-horizontal" role="form" id="addemployee" action="<?php echo base_url() ?>Updatecompany" method="post" role="form" enctype="multipart/form-data">
<div class="box-body">
<!-- Supplier Information -->
<legend style="margin-left:-10px;color: #4f7c97;;color: #4f7c97;">Business Information</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<input type="hidden" name="ID" class="form-control" readonly value="<?php echo $userId ?>">
<?php if(empty($ProfilePic)){ ?>
<div class=" col-md-3">
<img id="profilepicture" src="<?= base_url().'public/uploads/images/avatar.png' ?>" alt="your image" style="width: 139px;"/><br/>
<br>
<?php }else{ ?>
<div class=" col-md-3">
<img id="profilepicture" src="<?= base_url().'public/uploads/images/'. $ProfilePic ?>" alt="your image" style="width: 139px;"/><br/>
<br>
<?php } ?>
<input type='file' class="mb-1" input accept=".JPG,.PNG" onchange="readURL(this,0);"
id="photo" value="<?php base_url().'public/uploads/images/'. $ProfilePic; ?>" name="photo"/>
<label for="photo">Select Company Logo<br/><small>(only .jpg or .png) </small> </label>
<input type="hidden" name="Image" id="Image" value="<?php echo $ProfilePic ; ?>" class="form-control" readonly>
<input type="hidden" name="ModifyImage" id="ModifyImage" class="form-control" readonly>
</div>
<div class=" col-md-3">
<label class="col-form-label" for="CompanyID">CompanyID<span class="badge">*</span></label>
<input type="text" name="CompanyID" maxlength="100" id="CompanyID" value="<?php echo $CompID;?>" class="form-control" readonly>
</div>
<div class="col-md-3">
<label class="col-form-label" for="CompanyName">CompanyName</label>
<input type="text" name="CompanyName" onkeypress="return onlyAlphabets(event);" maxlength="100" id="CompanyName" class="form-control" required value="<?php echo $CompanyName;?>">
</div>
<div class="col-md-3">
<label class="col-form-label" for="ContactNumber">Contact Number<span class="badge">*</span></label>
<input type="text" name="ContactNumber" onchange="getMobileValidation();" id="ContactNumber" maxlength="12" class="form-control" value="<?php echo $ContactNumber;?>" required onkeypress="return isNumberKey(event)">
</div>
</div>
<div class="form-row" >
<div class="col-md-3" style="margin-top:20px">
<label for="AlternateContactNumber">Alternate Contact Number</label><!--<span class="badge">*</span>-->
<input type="text" name="AlternateContactNumber" onchange="ValidateAlternateContact();" id="AlternateContactNumber" maxlength="12" class="form-control" value="<?php echo $AlternateContactNumber;?>" required>
</div>
<div class="col-md-3" style="margin-top:20px">
<label for="EmailAddress">Email Address</label><!--<span class="badge">*</span>-->
<input type="email" name="EmailAddress" onchange="validateEmail();"id="EmailAddress" class="form-control" value="<?php echo $EmailAddress;?>">
</div>
<div class="col-md-3" style="margin-top:20px">
<label for="ExciseRegistration">Excise Registration</label><!--<span class="badge">*</span>-->
<input type="text" name="Exiseregistration1" id="ExiseRegistration1" maxlength="15" class="form-control" value="<?php echo $Exiseregistration ;?>" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([A-Za-z]){2}([0-9]){3}" required onchange="ValidateExno();" style="text-transform: uppercase">
</div>
<div class="col-md-3" style="margin-top:20px">
<label for="AlternateContactNumber">Company Website</label><!--<span class="badge">*</span>-->
<input type="text" name="companywebsite" id="companywebsite" maxlength="100" class="form-control" value="<?php echo $companywebsite ;?>" required>
</div>
</div>
<?php
$financialstartFormatted = date('Y-m-d', strtotime($financialstart));
$financialendFormatted = date('Y-m-d', strtotime($financialend));
?>
<form class="form-horizontal" role="form" id="addemployee" action="<?php echo base_url() ?>Updatecompany" method="post" role="form" enctype="multipart/form-data">
<div class="box-body">
<!-- Supplier Information -->
<legend style="margin-left:-10px;color: #4f7c97;;color: #4f7c97;">Business Information</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class="col-md-3" style="margin-top:20px">
<label for="FinancialYearStartON">Financial Year StartON</label><!--<span class="badge">*</span>-->
<input type="date" name="financialstart" id="financialstart" class="form-control" value="<?php echo $financialstartFormatted; ?>" required>
<input type="hidden" name="ID" class="form-control" readonly value="<?php echo $userId ?>">
<?php if (empty($ProfilePic)) { ?>
<div class=" col-md-3">
<img id="profilepicture" src="<?= base_url() . 'public/uploads/images/avatar.png' ?>" alt="your image" style="width: 139px;" /><br />
<br>
<?php } else { ?>
<div class=" col-md-3">
<img id="profilepicture" src="<?= base_url() . 'public/uploads/images/' . $ProfilePic ?>" alt="your image" style="width: 139px;" /><br />
<br>
<?php } ?>
<input type='file' class="mb-1" input accept=".JPG,.PNG" onchange="readURL(this,0);"
id="photo" value="<?php base_url() . 'public/uploads/images/' . $ProfilePic; ?>" name="photo" />
<label for="photo">Select Company Logo<br /><small>(only .jpg or .png) </small> </label>
<input type="hidden" name="Image" id="Image" value="<?php echo $ProfilePic; ?>" class="form-control" readonly>
<input type="hidden" name="ModifyImage" id="ModifyImage" class="form-control" readonly>
</div>
<div class=" col-md-3">
<label class="col-form-label" for="CompanyID">CompanyID<span class="badge">*</span></label>
<input type="text" name="CompanyID" maxlength="100" id="CompanyID" value="<?php echo $CompID; ?>" class="form-control" readonly>
</div>
<div class="col-md-3">
<label class="col-form-label" for="CompanyName">CompanyName</label>
<input type="text" name="CompanyName" onkeypress="return onlyAlphabets(event);" maxlength="100" id="CompanyName" class="form-control" required value="<?php echo $CompanyName; ?>">
</div>
<div class="col-md-3">
<label class="col-form-label" for="ContactNumber">Contact Number<span class="badge">*</span></label>
<input type="text" name="ContactNumber" onchange="getMobileValidation();" id="ContactNumber" maxlength="12" class="form-control" value="<?php echo $ContactNumber; ?>" required onkeypress="return isNumberKey(event)">
</div>
</div>
<div class="form-row">
<div class="col-md-3" style="margin-top:20px">
<label for="AlternateContactNumber">Alternate Contact Number</label><!--<span class="badge">*</span>-->
<input type="text" name="AlternateContactNumber" onchange="ValidateAlternateContact();" id="AlternateContactNumber" maxlength="12" class="form-control" value="<?php echo $AlternateContactNumber; ?>" required>
</div>
<div class="col-md-3" style="margin-top:20px">
<label for="EmailAddress">Email Address</label><!--<span class="badge">*</span>-->
<input type="email" name="EmailAddress" onchange="validateEmail();" id="EmailAddress" class="form-control" value="<?php echo $EmailAddress; ?>">
</div>
<div class="col-md-3" style="margin-top:20px">
<label for="ExciseRegistration">Excise Registration</label><!--<span class="badge">*</span>-->
<input type="text" name="Exiseregistration1" id="ExiseRegistration1" maxlength="15" class="form-control" value="<?php echo $Exiseregistration; ?>" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([A-Za-z]){2}([0-9]){3}" required onchange="ValidateExno();" style="text-transform: uppercase">
</div>
<div class="col-md-3" style="margin-top:20px">
<label for="AlternateContactNumber">Company Website</label><!--<span class="badge">*</span>-->
<input type="text" name="companywebsite" id="companywebsite" maxlength="100" class="form-control" value="<?php echo $companywebsite; ?>" required>
</div>
</div>
<?php
$financialstartFormatted = date('Y-m-d', strtotime($financialstart));
$financialendFormatted = date('Y-m-d', strtotime($financialend));
?>
<div class="form-row">
<div class="col-md-3" style="margin-top:20px">
<label for="FinancialYearStartON">Financial Year StartON</label><!--<span class="badge">*</span>-->
<input type="date" name="financialstart" id="financialstart" class="form-control" value="<?php echo $financialstartFormatted; ?>" required>
</div>
<div class="col-md-3" style="margin-top:20px">
<label for="FinancialYearEndON">Financial Year EndON</label><!--<span class="badge">*</span>-->
<input type="date" name="financialend" id="financialend" maxlength="10" class="form-control" value="<?php echo $financialendFormatted; ?>" required>
</div>
</div>
</div>
</div>
<!-- Address Section -->
<legend style="margin-left:-10px;color: #4f7c97;">Address Details</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class=" col-md-6">
<label class="col-form-label" for="Address">Address<span class="badge">*</span></label>
<textarea id="Address" name="Address" maxlength="500" class="form-control" rows="3" required><?php echo $Address; ?></textarea>
</div>
<div class="col-md-3" style="margin-top:20px">
<label for="FinancialYearEndON">Financial Year EndON</label><!--<span class="badge">*</span>-->
<input type="date" name="financialend" id="financialend" maxlength="10" class="form-control" value="<?php echo $financialendFormatted; ?>" required>
</div>
</div>
<!-- Tax Related Data -->
<legend style="margin-left:-10px;color: #4f7c97;">Tax Related Data</legend>
<!-- Text input-->
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row" style="margin-bottom: 20px;">
<div class=" col-md-4">
<label class="col-form-label" for="GSTNo">Payable Terms</label>
<select class="form-control required" id="PaymentTerms" name="PaymentTerms" onchange="payment_hidden();">
<option value="<?php echo $PaymentTerms; ?>"><?php echo $PaymentTerms; ?></option>
<?php
if (!empty($payment)) {
foreach ($payment as $rl) {
?>
<option value="<?php echo $rl->PaymentID ?>"><?php echo $rl->PaymentTerms ?></option>
<?php
}
}
?>
</select>
<input type="hidden" id="paymentid" name="paymentid" value="<?php echo $PaymentId; ?>">
</div>
</div>
</div>
<!-- Bank Details-->
<legend style="margin-left:-10px;color: #4f7c97;">ID Proof</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row" style="margin-bottom: 20px;">
<div class=" col-md-4">
<label class="col-form-label" for="UANumber">UA Number<span class="badge">*</span></label>
<input type="text" id="UANumber" name="UANumber" onchange="ValidateUA();" maxlength="15" class="form-control" value="<?php echo $UANumber; ?>" pattern="([a-zA-Z]){5}([0-9]){10}" style="text-transform: uppercase">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="TINNumber">TIN Number<span class="badge">*</span></label>
<input type="text" id="TIN" name="TIN" maxlength="11" class="form-control" value="<?php echo $TIN; ?>" pattern="(.){11,11}" onkeypress="return isNumberKey(event)" title="Please Enter 11 digit Number">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="MSMENumber">MSME Number</label>
<input type="text" id="MSME" name="MSME" class="form-control" value="<?php echo $MSME; ?>" title="Please Enter MSME" style="text-transform: uppercase">
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class=" col-md-4">
<label class="col-form-label" for="GSTRange">GST Range<span class="badge">*</span></label>
<input type="text" id="GSTRange" name="GSTRange" maxlength="100" class="form-control" value="<?php echo $GSTRange; ?>">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="GSTNumber">GST Number<span class="badge">*</span></label>
<input type="text" id="GSTNO" maxlength="15" onchange="validateGST();" name="GSTNO" class="form-control" style="text-transform: uppercase" value="<?php echo $GSTNO; ?>" pattern="([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}" required title="Please Enter 2 Digit Number and 5 Character and 4 Digit Numbers and 1 Character and 1 Number and should be 'Z' only and 1 Number">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="PANNumber">PAN Number<span class="badge">*</span></label>
<input type="text" id="PAN" maxlength="10" name="PAN" onchange="validatePAN();" class="form-control" style="text-transform: uppercase" value="<?php echo $PAN; ?>" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}" required>
</div>
<div class=" col-md-4">
<label class="col-form-label" for="CollectrateAddress">Collectrate Address<span class="badge">*</span></label>
<input type="text" id="CollectrateAddress" required name="CollectrateAddress" maxlength="500" class="form-control" value="<?php echo $CollectrateAddress; ?>" required>
</div>
</div>
</div>
<legend style="margin-left:-10px;color: #4f7c97;">Bank Details</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<!-- Text input-->
<div class="form-row" style="margin-bottom: 27px;">
<div class="col-md-3">
<span for="BankName">Bank Name</span>
<input type="text" id="BankName" name="BankName" maxlength="500" class="form-control" value="<?php echo $bankname; ?>">
</div>
<div class="col-md-3">
<span for="IFSC">IFSC</span>
<input type="text" id="IFSC" name="IFSC" maxlength="500" class="form-control" value="<?php echo $bankifsc; ?>">
</div>
<div class="col-md-3">
<span for="BankAccountNumber">Bank Account Number</span>
<input type="text" id="BankAccno" name="BankAccno" maxlength="500" class="form-control" onkeypress="return isNumberKey(event)">
</div>
<div class="col-md-3">
<span for="BankName">Bank Address</span>
<input type="text" id="BankAddress" name="BankAddress" maxlength="500" class="form-control" value="<?php echo $bankaddress; ?>">
</div>
</div>
</div>
<input type="hidden" id="BankState" name="BankState" class="form-control" value="Yes">
<div class="form-row">
<div class="col-md-12 text-right">
<a class="btn btn-success font Add" ID="Add"> &nbsp;&nbsp;<span class="bold">Add/Update Bank Detail</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
</div>
</div>
<div class="form-row">
<div class="col-md-12">
<table id="banktable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
<thead>
<tr>
<th>BankName</th>
<th>IFSC</th>
<th>BankAccountNumber</th>
<th>BankAddress</th>
<th>IsActive</th>
<!-- <th>Action</th> -->
</tr>
</thead>
<tbody id="databaseAppend">
<?php if (!empty($bankdetails)) {
foreach ($bankdetails as $uf) { ?>
<tr>
<td style="width: 15%;"><?php echo $uf->Bank_name ?></td>
<td style="width: 18%;" contenteditable='true'><?php echo $uf->IFSC ?></td>
<td style="width: 18%;" contenteditable='true'><?php echo $uf->Bank_AccNo ?></td>
<td style="width: 40%;" contenteditable='true'><?php echo $uf->Address ?></a></td>
<td style="width: 10%;" contenteditable='true'>
<?php if ($uf->Is_Active == 1) {
echo 'Yes';
} else {
echo 'No';
}
?>
</td>
</tr>
<?php }
} ?>
</tbody>
</table>
</div>
</div>
</div>
<!-- Address Section -->
<legend style="margin-left:-10px;color: #4f7c97;">Address Details</legend>
<legend style="margin-left:0px;color: #4f7c97;">Upload File</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row">
<div class=" col-md-6">
<label class="col-form-label" for="Address">Address<span class="badge">*</span></label>
<textarea id="Address" name="Address" maxlength="500" class="form-control" rows="3" required><?php echo $Address; ?></textarea>
</div>
</div>
</div>
<!-- Tax Related Data -->
<legend style="margin-left:-10px;color: #4f7c97;">Tax Related Data</legend>
<!-- Text input-->
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row" style="margin-bottom: 20px;">
<div class=" col-md-4">
<label class="col-form-label" for="GSTNo">Payable Terms</label>
<select class="form-control required" id="PaymentTerms" name="PaymentTerms" onchange="payment_hidden();">
<option value="<?php echo $PaymentTerms; ?>"><?php echo $PaymentTerms; ?></option>
<div class="col-md-4">
<span for="FileDescription">File Description</span>
<select class="form-control required" id="filedescription" name="filedescription">
<option value="CERTIFICATION">Select File Type</option>
<?php
if (!empty($payment)) {
foreach ($payment as $rl) {
if (!empty($filetype)) {
foreach ($filetype as $rl) {
?>
<option value="<?php echo $rl->PaymentID ?>"><?php echo $rl->PaymentTerms ?></option>
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
<?php
}
}
?>
</select>
<input type="hidden" id="paymentid" name="paymentid" value="<?php echo $PaymentId; ?>">
</div>
<div class="col-md-4">
<label style="margin-bottom:0px !important;" for="files">Select file<small> (only .pdf,.excel,.doc,.png,.jpg)</small></label>
<input style="margin-top: 5px;" type="file" size="20" input accept=".docx,.pdf,.doc.JPG,.PNG" onchange="readURL(this,1);" id="files" name="files" />
</div>
</div>
</div>
<!-- Bank Details-->
<legend style="margin-left:-10px;color: #4f7c97;">ID Proof</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row" style="margin-bottom: 20px;">
<div class=" col-md-4">
<label class="col-form-label" for="UANumber">UA Number<span class="badge">*</span></label>
<input type="text" id="UANumber" name="UANumber" onchange="ValidateUA();" maxlength="15" class="form-control" value="<?php echo $UANumber;?>" pattern="([a-zA-Z]){5}([0-9]){10}" style="text-transform: uppercase"> </div>
<div class=" col-md-4">
<label class="col-form-label" for="TINNumber">TIN Number<span class="badge">*</span></label>
<input type="text" id="TIN" name="TIN" maxlength="11" class="form-control" value="<?php echo $TIN;?>" pattern="(.){11,11}" onkeypress="return isNumberKey(event)" title="Please Enter 11 digit Number"> </div>
<div class=" col-md-4">
<label class="col-form-label" for="MSMENumber">MSME Number</label>
<input type="text" id="MSME" name="MSME" class="form-control" value="<?php echo $MSME;?>" title="Please Enter MSME" style="text-transform: uppercase"> </div>
</div>
<div class="form-row" style="margin-top:20px">
<div class=" col-md-4">
<label class="col-form-label" for="GSTRange">GST Range<span class="badge">*</span></label>
<input type="text" id="GSTRange" name="GSTRange" maxlength="100" class="form-control" value="<?php echo $GSTRange;?>">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="GSTNumber">GST Number<span class="badge">*</span></label>
<input type="text" id="GSTNO" maxlength="15" onchange="validateGST();" name="GSTNO" class="form-control" style="text-transform: uppercase" value="<?php echo $GSTNO;?>" pattern="([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}" required title="Please Enter 2 Digit Number and 5 Character and 4 Digit Numbers and 1 Character and 1 Number and should be 'Z' only and 1 Number">
</div>
<div class=" col-md-4">
<label class="col-form-label" for="PANNumber">PAN Number<span class="badge">*</span></label>
<input type="text" id="PAN" maxlength="10" name="PAN" onchange="validatePAN();" class="form-control" style="text-transform: uppercase" value="<?php echo $PAN;?>" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}" required>
</div>
<div class=" col-md-4">
<label class="col-form-label" for="CollectrateAddress">Collectrate Address<span class="badge">*</span></label>
<input type="text" id="CollectrateAddress" required name="CollectrateAddress" maxlength="500" class="form-control" value="<?php echo $CollectrateAddress;?>" required >
</div>
</div>
</div>
<br>
<br>
<legend style="margin-left:-10px;color: #4f7c97;">Bank Details</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<!-- Text input-->
<div class="form-row" style="margin-bottom: 27px;">
<div class="col-md-3">
<span for="BankName">Bank Name</span>
<input type="text" id="BankName" name="BankName" maxlength="500" class="form-control" value="<?php echo $bankname;?>">
</div>
<div class="col-md-3">
<span for="IFSC">IFSC</span>
<input type="text" id="IFSC" name="IFSC" maxlength="500" class="form-control" value="<?php echo $bankifsc;?>"> </div>
<div class="col-md-3">
<span for="BankAccountNumber">Bank Account Number</span>
<input type="text" id="BankAccno" name="BankAccno" maxlength="500" class="form-control" onkeypress="return isNumberKey(event)"> </div>
<div class="col-md-3">
<span for="BankName">Bank Address</span>
<input type="text" id="BankAddress" name="BankAddress" maxlength="500" class="form-control" value="<?php echo $bankaddress;?>"> </div>
</div>
</div>
<input type="hidden" id="BankState" name="BankState" class="form-control" value="Yes">
<div class="form-row" >
<div class="col-md-12 text-right">
<a class="btn btn-success font Add" ID="Add"> &nbsp;&nbsp;<span class="bold">Add/Update Bank Detail</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
</div>
</div>
<div class="form-row" >
<div class="col-md-12">
<table id="banktable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
<thead >
<tr>
<th>BankName</th>
<th>IFSC</th>
<th>BankAccountNumber</th>
<th>BankAddress</th>
<th>IsActive</th>
<!-- <th>Action</th> -->
</tr>
</thead>
<tbody id="databaseAppend">
<?php if(!empty($bankdetails)){
foreach ($bankdetails as $uf) { ?>
<tr>
<td style="width: 15%;"><?php echo $uf->Bank_name ?></td>
<td style="width: 18%;" contenteditable='true'><?php echo $uf->IFSC ?></td>
<td style="width: 18%;" contenteditable='true'><?php echo $uf->Bank_AccNo ?></td>
<td style="width: 40%;" contenteditable='true'><?php echo $uf->Address ?></a></td>
<td style="width: 10%;" contenteditable='true'>
<?php if($uf->Is_Active == 1 )
{
echo 'Yes';
}
else
{
echo 'No';
}
?>
</td>
</tr>
<?php } } ?>
</tbody>
</table>
</div>
</div>
</div>
<legend style="margin-left:0px;color: #4f7c97;">Upload File</legend>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="form-row" >
<div class="col-md-4">
<span for="FileDescription">File Description</span>
<select class="form-control required" id="filedescription" name="filedescription">
<option value="CERTIFICATION" >Select File Type</option>
<?php
if(!empty($filetype))
{
foreach ($filetype as $rl)
{
?>
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
<?php
}
}
?>
</select>
</div>
<div class="col-md-4">
<label style="margin-bottom:0px !important;" for="files">Select file<small> (only .pdf,.excel,.doc,.png,.jpg)</small></label>
<input style="margin-top: 5px;" type = "file" size = "20" input accept=".docx,.pdf,.doc.JPG,.PNG" onchange="readURL(this,1);" id="files" name="files"/>
</div>
</div>
<br>
<br>
<!-- <div class="form-row" >
<!-- <div class="form-row" >
<div class="col-md-12 text-right">
<input type="submit" id="submit" onclick="valid();" class="btn btn-success" value="Submit" />
</div>
</div> -->
<div class="form-row">
<div class="col-md-12">
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
<thead >
<tr>
<th>filedescription</th>
<th>filename</th>
<th>uploadedby</th>
<th>uploadedon</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
<div class="form-row">
<div class="col-md-12">
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
<thead>
if (!empty($filenames)) {
foreach ($filenames as $uf) {
?>
<tr>
<td><?php echo $uf->filedescription ?></td>
<td><?php echo $uf->filename ?></a></td>
<td><?php echo $firstname; ?></td>
<td><?php echo $uf->createdDate ?></td>
<td>
<!--<a href="<?php echo base_url() . 'user/editOld?UID=' . $uf->filename; ?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a>-->
<a onclick="deletefile(<?php echo $uf->ID; ?>)"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
<a href="<?php echo base_url() . 'public/uploads/files/' ?><?php echo $uf->filename ?>"><i class="fa fa-download"></i></a>
</td>
<th>filedescription</th>
<th>filename</th>
<th>uploadedby</th>
<th>uploadedon</th>
<th>Actions</th>
</tr>
<?php
}
}
?>
</tbody>
</table>
</thead>
<tbody>
<?php
if (!empty($filenames)) {
foreach ($filenames as $uf) {
?>
<tr>
<td><?php echo $uf->filedescription ?></td>
<td><?php echo $uf->filename ?></a></td>
<td><?php echo $firstname; ?></td>
<td><?php echo $uf->createdDate ?></td>
<td>
<!--<a href="<?php echo base_url() . 'user/editOld?UID=' . $uf->filename; ?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a>-->
<a onclick="deletefile(<?php echo $uf->ID; ?>)"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
<a href="<?php echo base_url() . 'public/uploads/files/' ?><?php echo $uf->filename ?>"><i class="fa fa-download"></i></a>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<!-- <input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success"> -->
<input type="submit" value="Submit" class="btn btn-success">
</div>
</div>
</div>
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<!-- <input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success"> -->
<input type="submit" value="Submit" class="btn btn-success">
</div>
</form>
</div>
</form>
</div>
<!-- end row -->
</div>
<!-- end row -->
</div>
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row -->
</div> <!-- container -->
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row -->
</div> <!-- container -->
</div> <!-- content -->
</div>
@ -783,14 +780,12 @@ if (!empty($filenames)) {
<script>
function payment_hidden()
{
//alert("worked");
var term = document.getElementById("PaymentTerms");
var termid = term.options[term.selectedIndex].value;
$("#paymentid").val(termid);
}
function payment_hidden() {
//alert("worked");
var term = document.getElementById("PaymentTerms");
var termid = term.options[term.selectedIndex].value;
$("#paymentid").val(termid);
}
function deletefile(filename) {
var answer = confirm(" Do you want to delete the user from the List?")
@ -888,10 +883,8 @@ function payment_hidden()
return false;
}
}
}
</script>
@ -899,8 +892,8 @@ function payment_hidden()
</script>
</script>
@ -934,53 +927,48 @@ function payment_hidden()
<script>
var index = '1';
$('#Add').click(function(){
// alert("addonclick");
var temp = index;
var bankname = $('#BankName').val();
var ifsccode = $('#IFSC').val();
var bankaccno = $('#BankAccno').val();
var bankaddress = $('#BankAddress').val();
var isactive = $('#BankState').val();
// var isactive = <?php echo $bank_isactive ?>;
//alert(isactive);
if(bankname != '' || ifsccode != '' || bankaddress != '' )
{
//alert('both insert and update operation evaluated');
if(bankname == ''){
$("#BankName").focus();
return false;
var index = '1';
$('#Add').click(function() {
// alert("addonclick");
var temp = index;
var bankname = $('#BankName').val();
var ifsccode = $('#IFSC').val();
var bankaccno = $('#BankAccno').val();
var bankaddress = $('#BankAddress').val();
var isactive = $('#BankState').val();
// var isactive = <?php echo $bank_isactive ?>;
//alert(isactive);
}
else if (ifsccode == ''){
$('#IFSC').focus();
return false;
}
else if (bankaccno == ''){
$('#BankAccno').focus();
return false;
}
else if (bankaddress == ''){
$('#BankAddress').focus();
return false;
}
else{
//alert(isactive);
var template = jQuery("#addList").html();
index = parseInt(index)+1;
// $('#databaseAppend').append(_.(template,{index:temp,BankName:bankname,IFSC:ifsccode,BankAccountNumber:bankaccno,BankAddress:bankaddress,IsActive:isactive}));
var html = `
if (bankname != '' || ifsccode != '' || bankaddress != '') {
//alert('both insert and update operation evaluated');
if (bankname == '') {
$("#BankName").focus();
return false;
} else if (ifsccode == '') {
$('#IFSC').focus();
return false;
} else if (bankaccno == '') {
$('#BankAccno').focus();
return false;
} else if (bankaddress == '') {
$('#BankAddress').focus();
return false;
} else {
//alert(isactive);
var template = jQuery("#addList").html();
index = parseInt(index) + 1;
// $('#databaseAppend').append(_.(template,{index:temp,BankName:bankname,IFSC:ifsccode,BankAccountNumber:bankaccno,BankAddress:bankaddress,IsActive:isactive}));
var html = `
<tr>
<td>${bankname}</td>
<td>${ifsccode}</td>
@ -989,36 +977,38 @@ $('#Add').click(function(){
<td>${isactive}</td>
</tr>
`;
$('#databaseAppend').append(html);
$('#databaseAppend').append(html);
}//else closed
}//if closed
var tablevalue = $('#banktable').tableToJSON(); // Convert the table into a javascript object
var value = JSON.stringify(tablevalue);
//if(bankname != '' || ifsccode != '' || bankaddress != '' )
//{
// $('#content').loader('show');
$.ajax({
} //else closed
} //if closed
var tablevalue = $('#banktable').tableToJSON(); // Convert the table into a javascript object
var value = JSON.stringify(tablevalue);
data:{id:value},
type:"POST",
url:"<?php echo base_url() ?>companycontroller/bankdtl",
success:function(data){
// $('#content').loader('hide');
alert(data);
//if(bankname != '' || ifsccode != '' || bankaddress != '' )
//{
// $('#content').loader('show');
$.ajax({
}//success function closed
data: {
id: value
},
type: "POST",
url: "<?php echo base_url() ?>companycontroller/bankdtl",
});//ajax function closed
$('#BankName').val('');
$('#IFSC').val('');
$('#BankAccno').val('');
$('#BankAddress').val('');
success: function(data) {
// $('#content').loader('hide');
alert(data);
} //success function closed
}); //ajax function closed
$('#BankName').val('');
$('#IFSC').val('');
$('#BankAccno').val('');
$('#BankAddress').val('');
}); //add click function closed

View File

@ -38,24 +38,22 @@
td {
padding-left: 0;
padding-right: 0;
}
}
td {
td {
padding-left: 0;
padding-right: 0;
}
.configIdTh{
text-align:center !important;
width:15%;
}
.configIdTd{
text-align:center !important;
width:15%;
}
}
.configIdTh {
text-align: center !important;
width: 15%;
}
.configIdTd {
text-align: center !important;
width: 15%;
}
</style>
@ -67,14 +65,12 @@ td {
<!-- start page title -->
<div>
<div class="row">
<div class="col-6">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title pt-2">Configuration Details</h4>
<h4 class="page-title">Configuration Details</h4>
<a class="btn btn-success" href="<?php echo base_url(); ?>addconfig">Add New Configuration</a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-success" href="<?php echo base_url(); ?>addconfig">Add New Configuration</a>
</div>
</div>
<?php
helper('form');
@ -112,8 +108,6 @@ td {
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table class="table dt-responsive nowrap w-100" id="datatable" >
<table id="config_list_table" class="table dt-responsive nowrap w-100">
<thead>
<tr>
@ -135,7 +129,7 @@ td {
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedDate));
} ?>
<td ><?php echo $cdate; ?> </td>
<td><?php echo $cdate; ?> </td>
<td class="configIdTd"><?php echo $record->Config_ID ?></td>
<td><?php echo $record->ConfigName ?></td>
<td><?php echo $record->Comments ?> </td>
@ -147,7 +141,7 @@ td {
<td >
<td>
<a href="<?php echo base_url() . 'configurationctrl/editconfig?ConfigID=' . $record->Config_ID; ?>"><i class="fas fa-pencil-alt"></i>&nbsp;&nbsp;&nbsp;</a>
<!-- <a><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a> -->
</td>
@ -209,7 +203,7 @@ td {
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
order: [ ], // Default ordering (column index 0, descending)
order: [], // Default ordering (column index 0, descending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon

View File

@ -41,87 +41,84 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title pt-2">Cost Details</h4>
</div>
</div>
<div class="col-6 text-right">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Cost Details</h4>
<a data-toggle="modal" href="#ccwizard" data-id="0" data-name="" class="btn btn-success">Add New Cost List</a>
<!-- <a class="btn btn-success" href="<?php echo base_url(); ?>exportcost">Export Cost Details <i class="fa fa-download" aira-hidden="true"></i></a> -->
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="cost_listing" class="table dt-responsive nowrap w-100">
<thead >
<tr>
<th>Create Date</th>
<th>Create Time</th>
<th>Cost Center Code</th>
<th>Cost Center Name</th>
<th>Created By</th>
<th>Active</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
$createdat = new DateTime($record->CreatedDate);
$date = $createdat->format('d-m-Y');
$time = $createdat->format('h:i A');
?>
<tr>
<td><?php echo $date; ?></td>
<td><?php echo $time; ?></td>
<td><?php echo $record->code ?></td>
<td><?php echo $record->CostCenterName ?></td>
<!-- <td><?php echo $record->ApprovedBy ?></td> -->
<td><?php echo $record->FirstName ?></td>
<td><?php
$R = '';
$record->IsActive == 1 ? $R = 'ACTIVE' : $R = 'INACTIVE';
echo $R;
?></td>
<td>
<?php
if ($record->DeletedBy == '') {
?>
<a data-toggle="modal" href="#ccwizard" data-id="<?php echo $record->id; ?>" data-name="<?php echo $record->CostCenterName; ?>"><i class="fas fa-pencil-alt"></i></a>
<a href="<?php echo base_url() . 'deleteCostCenter?CostCode=' . $record->code; ?>"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
<?php } ?>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="cost_listing" class="table dt-responsive nowrap w-100">
<thead>
<tr>
<th>Create Date</th>
<th>Create Time</th>
<th>Cost Center Code</th>
<th>Cost Center Name</th>
<th>Created By</th>
<th>Active</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
$createdat = new DateTime($record->CreatedDate);
$date = $createdat->format('d-m-Y');
$time = $createdat->format('h:i A');
?>
<tr>
<td><?php echo $date; ?></td>
<td><?php echo $time; ?></td>
<td><?php echo $record->code ?></td>
<td><?php echo $record->CostCenterName ?></td>
<!-- <td><?php echo $record->ApprovedBy ?></td> -->
<td><?php echo $record->FirstName ?></td>
<td><?php
$R = '';
$record->IsActive == 1 ? $R = 'ACTIVE' : $R = 'INACTIVE';
echo $R;
?></td>
<td>
<?php
if ($record->DeletedBy == '') {
?>
<a data-toggle="modal" href="#ccwizard" data-id="<?php echo $record->id; ?>" data-name="<?php echo $record->CostCenterName; ?>"><i class="fas fa-pencil-alt"></i></a>
<a href="<?php echo base_url() . 'deleteCostCenter?CostCode=' . $record->code; ?>"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
<?php } ?>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div> <!-- container -->
</div> <!-- content -->
</div>

View File

@ -253,70 +253,19 @@
</div>
</div>
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Create Purchase Order from Requistion</h4>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="row">
<div class="col-md-12">
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
?>
</div>
</div>
</div>
<?php
$listErrors = session()->getFlashdata('listErrors');
if ($listErrors) { ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('listErrors'); ?>
</div>
</div>
</div>
<?php } ?>
<div class="col-md-12" style="margin-top: -79px;">
<!-- <div class="col-md-3 col-md-offset-9"> -->
<p>
<div align="right" style="padding-right:0px">
<!--<a href="<?php echo base_url(); ?>purchaseorderform/purchaseorder"> -->
<!--<button type="button" class="btn btn-success">Create PO</button></a> -->
<!--<input type="submit" class="btn btn-success" onclick="return Validate();" value="Create Purchase Order"> -->
<a class="btn btn-success" onclick="Validate();">Create Purchase Order</a>
<input type="hidden" name="txtReqNo" id="txtReqNo" />
<input type="hidden" name="txtReqType" id="txtReqType" />
</div>
</p>
<!-- </div> -->
</div>
</div>
<!-- start page title -->
<div class="row">
<div class="col-12">

View File

@ -44,106 +44,102 @@
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title pt-2">Department Details</h4>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-success" href="<?php echo base_url(); ?>adddepartment">Add New department</a>
<!-- <a class="btn btn-success" href="<?php echo base_url(); ?>exportdepartment">Export department details <i class="fa fa-download" aira-hidden="true"></i></a> -->
</div>
</div>
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Department Details</h4>
<a class="btn btn-success" href="<?php echo base_url(); ?>adddepartment">Add New department</a>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
</div>
</div>
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="department_list_table" class="table dt-responsive nowrap w-100">
<thead>
<tr>
<th>Create Date</th>
<th>Department Code</th>
<th>Department Name</th>
<th>Head Department</th>
<th>IsActive</th>
<!-- <th>Action</th> -->
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<!-- <td title=" - Click here to view department details"> </td> -->
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedDt));
} ?>
<td ><?php echo $cdate; ?> </td>
<td><u><a href="<?php echo base_url() . 'editOlddepartment/?SID=' . $record->DEPCode ?>" data-toggle="tooltip" title="<?php echo $record->DEPCode ?> - Click here to view Department details"><?php echo $record->DEPCode; ?></a></u></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->HeadDept ?></td>
<td><?php if ($record->IsActive == 1) {
echo "Active";
} else {
echo "In Active";
} ?></td>
<!-- <td><a data-toggle="tooltip" "><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the department details"></i>&nbsp;&nbsp;&nbsp;</a></td> -->
</tr>
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="department_list_table" class="table dt-responsive nowrap w-100">
<thead>
<tr>
<th>Create Date</th>
<th>Department Code</th>
<th>Department Name</th>
<th>Head Department</th>
<th>IsActive</th>
<!-- <th>Action</th> -->
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<!-- <td title=" - Click here to view department details"> </td> -->
<?php if (date('d-m-Y', strtotime($record->CreatedDt)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedDt));
} ?>
<td><?php echo $cdate; ?> </td>
<td><u><a href="<?php echo base_url() . 'editOlddepartment/?SID=' . $record->DEPCode ?>" data-toggle="tooltip" title="<?php echo $record->DEPCode ?> - Click here to view Department details"><?php echo $record->DEPCode; ?></a></u></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->HeadDept ?></td>
<td><?php if ($record->IsActive == 1) {
echo "Active";
} else {
echo "In Active";
} ?></td>
<!-- <td><a data-toggle="tooltip" "><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the department details"></i>&nbsp;&nbsp;&nbsp;</a></td> -->
</tr>
<?php
}
}
?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div>
</div> <!-- container -->
</div> <!-- content -->
<?php
}
}
?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div> <!-- container -->
</div> <!-- content -->
</div>
@ -158,75 +154,78 @@
// Initialize the DataTable
var table = $('#department_list_table').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
responsive: true, // Responsive table
order: [], // Default ordering (column index 0, descending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
order: [], // Default ordering (column index 0, descending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
// Date range filter function
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $('#fromDate').val();
var toDate = $('#toDate').val();
if (!fromDate || !toDate) {
return true; // If no dates selected, don't filter
}
var dateStr = data[0]; // Assuming the date is in the first column
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
var startDate = new Date(fromDate);
var endDate = new Date(toDate);
// Adjust startDate to include the day before the selected fromDate
startDate.setDate(startDate.getDate() - 1);
// Ensure endDate includes the entire end date by setting time to the end of the day
endDate.setHours(23, 59, 59, 999);
function(settings, data, dataIndex) {
var fromDate = $('#fromDate').val();
var toDate = $('#toDate').val();
// Return true if the date is within the range
return date >= startDate && date <= endDate;
if (!fromDate || !toDate) {
return true; // If no dates selected, don't filter
}
var dateStr = data[0]; // Assuming the date is in the first column
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
var startDate = new Date(fromDate);
var endDate = new Date(toDate);
// Adjust startDate to include the day before the selected fromDate
startDate.setDate(startDate.getDate() - 1);
// Ensure endDate includes the entire end date by setting time to the end of the day
endDate.setHours(23, 59, 59, 999);
// Return true if the date is within the range
return date >= startDate && date <= endDate;
}
);
// Handle form submission for the date range filter
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw(); // Redraw the table to apply the filter
e.preventDefault();
table.draw(); // Redraw the table to apply the filter
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").val('');
$("#toDate").val('');
table.draw(); // Redraw the table to clear the filter
$("#fromDate").val('');
$("#toDate").val('');
table.draw(); // Redraw the table to clear the filter
});
// Automatically focus and open the To Date picker when From Date is selected
document.getElementById('fromDate').addEventListener('change', function() {
var fromDate = this.value;
var toDateInput = document.getElementById('toDate');
// Set the min attribute of the To Date input to the selected From Date
toDateInput.min = fromDate;
var fromDate = this.value;
var toDateInput = document.getElementById('toDate');
// Optionally reset the To Date input if the current value is before the new min date
if (toDateInput.value < fromDate) {
toDateInput.value = fromDate;
}
// Set the min attribute of the To Date input to the selected From Date
toDateInput.min = fromDate;
// Optionally reset the To Date input if the current value is before the new min date
if (toDateInput.value < fromDate) {
toDateInput.value = fromDate;
}
});
});
});
</script>

View File

@ -31,17 +31,14 @@ if (!empty($EmpList)) {
<div class="content-page">
<div class="content">
<div class="container-fluid">
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Edit User <?= ' - ' . $EmpId; ?> Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>userListing"><span class="bold">Back</span></a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>userListing"><span class="bold">Back</span></a>
</div>
</div>
<!-- User Details Form -->
<div class="row">
<div class="col-12">

View File

@ -142,148 +142,146 @@ if (!empty($assetList)) {
</script>
<div class="content-page">
<div class="content">
<div class="container-fluid">
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Edit Asset Details - <?php echo $AssetCode; ?></h4>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>assetListing"><span class="bold">Back</span></a>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<form role="form" id="addAsset" action="<?php echo base_url() ?>editasset" method="post">
<div class="form-row">
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Edit Asset Details - <?php echo $AssetCode; ?></h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>assetListing"><span class="bold">Back</span></a>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<form role="form" id="addAsset" action="<?php echo base_url() ?>editasset" method="post">
<div class="form-row">
<input type="text" class="form-control" id="AssetCode" name="AssetCode" value="<?php echo $AssetCode; ?>" hidden>
<div class="col-md-3">
<label for="AssetName">Asset Name <span class="badge">*</span></label>
<input type="text" class="form-control" id="AssetName" name="AssetName" value="<?php echo $AssetName; ?>" style="text-transform:uppercase;" required>
</div>
<div class="col-md-3">
<label for="Description">Asset Description <span class="badge">*</span></label>
<input type="text" class="form-control" id="Description" name="Description" value="<?php echo $Description; ?>" required>
</div>
<div class="col-md-3">
<label for="User">Asset User <span class="badge">*</span></label>
<input type="text" class="form-control" id="User" name="User" value="<?php echo $User; ?>" required>
</div>
<div class="col-md-3">
<label for="Location">Asset Location <span class="badge">*</span></label>
<input type="text" class="form-control" id="Location" name="Location" value="<?php echo $Location; ?>" required>
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-3">
<label for="PONO">Purchase Order Number <span class="badge">*</span></label>
<select class="form-control select2" id="PONO" name="PONO" required>
<option value="<?php echo $PONO; ?>"><?php echo $PONO; ?></option>
<?php if (!empty($PO)) {
foreach ($PO as $po) {
$PONO1 = $po->PONO;
if (trim($PONO1) != trim($PONO)) {
echo "<option value=\"" . $PONO1 . "\">" . $PONO1 . "</option>";
}
}
} ?>
</select>
<div class="col-md-3">
<label for="AssetName">Asset Name <span class="badge">*</span></label>
<input type="text" class="form-control" id="AssetName" name="AssetName" value="<?php echo $AssetName; ?>" style="text-transform:uppercase;" required>
</div>
<div class="col-md-3">
<label for="Description">Asset Description <span class="badge">*</span></label>
<input type="text" class="form-control" id="Description" name="Description" value="<?php echo $Description; ?>" required>
</div>
<div class="col-md-3">
<label for="User">Asset User <span class="badge">*</span></label>
<input type="text" class="form-control" id="User" name="User" value="<?php echo $User; ?>" required>
</div>
<div class="col-md-3">
<label for="Location">Asset Location <span class="badge">*</span></label>
<input type="text" class="form-control" id="Location" name="Location" value="<?php echo $Location; ?>" required>
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-3">
<label for="PONO">Purchase Order Number <span class="badge">*</span></label>
<select class="form-control select2" id="PONO" name="PONO" required>
<option value="<?php echo $PONO; ?>"><?php echo $PONO; ?></option>
<?php if (!empty($PO)) {
foreach ($PO as $po) {
$PONO1 = $po->PONO;
if (trim($PONO1) != trim($PONO)) {
echo "<option value=\"" . $PONO1 . "\">" . $PONO1 . "</option>";
}
}
} ?>
</select>
<input type="text" class="form-control required" id="lineitem"
name="lineitem" value="<?php echo $POLineItem; ?>" hidden>
<input type="text" class="form-control required" id="lineitem"
name="lineitem" value="<?php echo $POLineItem; ?>" hidden>
</div>
<div class="col-md-3">
<label for="SelectMaterialCode">Select Material Code</label>
<select class="form-control select2" id="MaterialCode" name="MaterialCode">
<option value="<?php echo $MaterialCode; ?>"><?php echo $POLineItem."-".$MaterialCode; ?></option>
</select>
</div>
<div class="col-md-3">
<label for="UOM">UOM</label>
<input type="text" class="form-control" id="UOM" name="UOM" value="<?php echo $UOM; ?>" readonly>
</div>
<div class="col-md-3">
<label for="Quantity">Quantity</label>
<input type="text" class="form-control" id="Quantity" name="Quantity" value="<?php echo $Quantity; ?>">
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-3">
<label for="PODescription">Description</label>
<input type="text" class="form-control" id="PODescription" name="PODescription" value="<?php echo $MaterialName; ?>" readonly>
</div>
<div class="col-md-3">
<input type="hidden" name="AssetDept" id="depcode">
<label for="AssetDept">Asset Department</label>
<input type="text" class="form-control" id="AssetDept" name="" value="<?php echo $DepartmentName; ?>" readonly>
</div>
<div class="col-md-3">
<label for="DateOfPurchase">Purchase Date</label>
<input type="text" class="form-control" id="DateOfPurchase" name="DateOfPurchase" value="<?php echo $DateOfPurchase; ?>" required onkeypress="return false;">
</div>
<div class="col-md-3">
<input type="hidden" name="SupplierName" id="SupID">
<label for="SupplierName">Supplier Name</label>
<input type="text" class="form-control" id="SupplierName" name="" value="<?php echo $SupplierName; ?>" readonly>
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-3">
<label for="DeliveryDate">Delivery Date</label>
<input type="text" class="form-control" id="DeliveryDate" name="DeliveryDate" value="<?php echo $DeliveryDate; ?>" readonly>
</div>
<div class="col-md-3">
<label for="DateOfCommission">Date Of Commission <span class="badge">*</span></label>
<input type="text" class="form-control" id="DateOfCommission" name="DateOfCommission" value="<?php echo $DateOfCommison; ?>" required onkeypress="return false;">
</div>
<div class="col-md-3">
<label for="AssetValue">Asset Value</label>
<input type="text" class="form-control" id="Assetvalue" name="Assetvalue" value="<?php echo $AssetValue; ?>" onkeypress="return isNumberKey(event)" maxlength="255">
</div>
<div class="col-md-3">
<label for="AssetStatus">Asset Status</label>
<select class="form-control select2" id="AssetStatus" name="AssetStatus">
<option value="<?php echo $AssetStatus; ?>"><?php echo $AssetStatus; ?></option>
<?php if (!empty($AssetStatusList)) {
foreach ($AssetStatusList as $SID) {
echo "<option value=\"" . $SID->ConfigValue . "\">" . $SID->ConfigValue . "</option>";
}
} ?>
</select>
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-3">
<label for="Remarks">Remarks</label>
<input type="text" class="form-control" id="Remarks" name="Remarks" value="<?php echo $Remarks; ?>" maxlength="500">
</div>
<div class="col-md-3 d-flex align-items-center">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="isactive" name="isactive" <?php echo $IsActive ? 'checked' : ''; ?>>
<label class="form-check-label" for="isactive">Is Active</label>
</div>
</div>
</div>
<div class="form-row mt-4 text-right">
<div class="col-md-12">
<button type="submit" class="btn btn-success">Submit</button>
<a href="<?php echo base_url() ?>assetListing" class="btn btn-cancel">Cancel</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<label for="SelectMaterialCode">Select Material Code</label>
<select class="form-control select2" id="MaterialCode" name="MaterialCode">
<option value="<?php echo $MaterialCode; ?>"><?php echo $POLineItem . "-" . $MaterialCode; ?></option>
</select>
</div>
<div class="col-md-3">
<label for="UOM">UOM</label>
<input type="text" class="form-control" id="UOM" name="UOM" value="<?php echo $UOM; ?>" readonly>
</div>
<div class="col-md-3">
<label for="Quantity">Quantity</label>
<input type="text" class="form-control" id="Quantity" name="Quantity" value="<?php echo $Quantity; ?>">
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-3">
<label for="PODescription">Description</label>
<input type="text" class="form-control" id="PODescription" name="PODescription" value="<?php echo $MaterialName; ?>" readonly>
</div>
<div class="col-md-3">
<input type="hidden" name="AssetDept" id="depcode">
<label for="AssetDept">Asset Department</label>
<input type="text" class="form-control" id="AssetDept" name="" value="<?php echo $DepartmentName; ?>" readonly>
</div>
<div class="col-md-3">
<label for="DateOfPurchase">Purchase Date</label>
<input type="text" class="form-control" id="DateOfPurchase" name="DateOfPurchase" value="<?php echo $DateOfPurchase; ?>" required onkeypress="return false;">
</div>
<div class="col-md-3">
<input type="hidden" name="SupplierName" id="SupID">
<label for="SupplierName">Supplier Name</label>
<input type="text" class="form-control" id="SupplierName" name="" value="<?php echo $SupplierName; ?>" readonly>
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-3">
<label for="DeliveryDate">Delivery Date</label>
<input type="text" class="form-control" id="DeliveryDate" name="DeliveryDate" value="<?php echo $DeliveryDate; ?>" readonly>
</div>
<div class="col-md-3">
<label for="DateOfCommission">Date Of Commission <span class="badge">*</span></label>
<input type="text" class="form-control" id="DateOfCommission" name="DateOfCommission" value="<?php echo $DateOfCommison; ?>" required onkeypress="return false;">
</div>
<div class="col-md-3">
<label for="AssetValue">Asset Value</label>
<input type="text" class="form-control" id="Assetvalue" name="Assetvalue" value="<?php echo $AssetValue; ?>" onkeypress="return isNumberKey(event)" maxlength="255">
</div>
<div class="col-md-3">
<label for="AssetStatus">Asset Status</label>
<select class="form-control select2" id="AssetStatus" name="AssetStatus">
<option value="<?php echo $AssetStatus; ?>"><?php echo $AssetStatus; ?></option>
<?php if (!empty($AssetStatusList)) {
foreach ($AssetStatusList as $SID) {
echo "<option value=\"" . $SID->ConfigValue . "\">" . $SID->ConfigValue . "</option>";
}
} ?>
</select>
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-3">
<label for="Remarks">Remarks</label>
<input type="text" class="form-control" id="Remarks" name="Remarks" value="<?php echo $Remarks; ?>" maxlength="500">
</div>
<div class="col-md-3 d-flex align-items-center">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="isactive" name="isactive" <?php echo $IsActive ? 'checked' : ''; ?>>
<label class="form-check-label" for="isactive">Is Active</label>
</div>
</div>
</div>
<div class="form-row mt-4 text-right">
<div class="col-md-12">
<a href="<?php echo base_url() ?>assetListing" class="btn btn-secondary">Cancel</a>
<button type="submit" class="btn btn-success">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
@ -347,9 +345,9 @@ if (!empty($assetList)) {
var selectedText = $('#MaterialCode option:selected').text();
var lineItemNo = selectedText.split('-')[0];
var lineItemNo = selectedText.split('-')[0];
var id = lineItemNo
var id = lineItemNo
var line = id;
@ -386,7 +384,7 @@ if (!empty($assetList)) {
}
$('#SupplierName').val(item.SupplierName);
$('#SupID').val(item.SupplierID);
$('#lineitem').val(item.LineItemNo);
$('#lineitem').val(item.LineItemNo);
//$('#MaterialCode').val(item.MaterialCode);
$('#UOM').val(item.UOM);
$('#Quantity').val(item.Quantity);
@ -411,7 +409,7 @@ if (!empty($assetList)) {
var date = new Date(item.PODate);
var date3 = (date.getDate() + '-' + (date.getMonth() + 1) + '-' + date.getFullYear());
$("#DateOfPurchase").val(date3);
$("#DateOfPurchase").val(date3);
}

View File

@ -163,15 +163,13 @@ if (!empty($emppay)) {
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Edit Loan Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>emppayListings"><span class="bold">Back</span></a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>emppayListings"><span class="bold">Back</span></a>
</div>
</div>
<!-- end page title -->
<div class="row">
@ -253,189 +251,191 @@ if (!empty($emppay)) {
</div>
</div>
</div>
<input type="hidden" id="remaining_due" name="remaining_due" value="<?php echo $Remaining_Due; ?>">
<input type="hidden" id="paid_due" name="paid_due" value="<?php echo $Paid_Due; ?>">
</div>
</div>
<div class="col-md-12 text-right">
<input type="button" class="btn btn-success" value="Delete" id="deleteemp" style="background-color:red ;color: white; margin-right: 15px;width: 80px;" />
<input type="submit" onmouseover="finalCheck();" value="Submit" class="btn btn-success">
<input type="hidden" id="remaining_due" name="remaining_due" value="<?php echo $Remaining_Due; ?>">
<input type="hidden" id="paid_due" name="paid_due" value="<?php echo $Paid_Due; ?>">
</div>
</div>
</form>
<div class="col-md-12 text-right">
<input type="button" class="btn btn-success" value="Delete" id="deleteemp" style="background-color:red ;color: white; margin-right: 15px;width: 80px;border:none;" />
<input type="submit" onmouseover="finalCheck();" value="Submit" class="btn btn-success">
</div>
</div>
</form>
</div>
<?php
$listErrors = session()->getFlashdata('listErrors');
if ($listErrors) {
?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('listErrors'); ?>
</div>
</div>
</div>
<?php } ?>
</div>
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
$listErrors = session()->getFlashdata('listErrors');
if ($listErrors) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('listErrors'); ?>
</div>
</div>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<!-- end row -->
</div>
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row -->
</div> <!-- container -->
</div> <!-- content -->
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<script>
function calculateBasic()
{
var Totalsalary = document.getElementById('Total_Salary').value;;
var HRA = document.getElementById('HRA_Rate').value;
if (HRA == '') {
alert("Please Enter HRA RATE..");
document.getElementById('HRA_Rate').focus();
} else if (Totalsalary == '') {
alert("Please Enter Total Salary..");
document.getElementById('Total_Salary').focus();
} else {
var temp = (Totalsalary * (HRA / 100));
var basic = Totalsalary - temp;
document.getElementById('Basic_Pay').value = basic;
document.getElementById('HRA_Amount').value = temp;
}
//alert(basic);
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<!-- end row -->
</div>
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row -->
</div> <!-- container -->
</div> <!-- content -->
<script>
function calculateBasic()
{
var Totalsalary = document.getElementById('Total_Salary').value;;
var HRA = document.getElementById('HRA_Rate').value;
if (HRA == '') {
alert("Please Enter HRA RATE..");
document.getElementById('HRA_Rate').focus();
} else if (Totalsalary == '') {
alert("Please Enter Total Salary..");
document.getElementById('Total_Salary').focus();
} else {
var temp = (Totalsalary * (HRA / 100));
var basic = Totalsalary - temp;
document.getElementById('Basic_Pay').value = basic;
document.getElementById('HRA_Amount').value = temp;
}
//alert(basic);
}
function duecalculation() {
var totaldue = 0;
var loan = document.getElementById('Loan_Amount').value;
var due = document.getElementById('monthly_due').value;
function duecalculation() {
var totaldue = 0;
var loan = document.getElementById('Loan_Amount').value;
var due = document.getElementById('monthly_due').value;
if (loan != 0) {
if (due == 0) {
alert("Enter Monthly Due Amount....!");
if (loan != 0) {
if (due == 0) {
alert("Enter Monthly Due Amount....!");
$('#monthly_due').focus();
} else {
totaldue = loan / due;
if (totaldue < 1) {
alert("Please Enter Correct Due Amount..!");
$('#monthly_due').focus();
} else {
totaldue = loan / due;
if (totaldue < 1) {
alert("Please Enter Correct Due Amount..!");
$('#monthly_due').focus();
} else {
document.getElementById('no_of_due').value = Math.ceil(totaldue);
var noofdues = document.getElementById('no_of_due').value;
$('#remaining_due').val(noofdues);
$('#Paid_Amount').val("0.00");
$('#paid_due').val(0);
}
document.getElementById('no_of_due').value = Math.ceil(totaldue);
var noofdues = document.getElementById('no_of_due').value;
$('#remaining_due').val(noofdues);
$('#Paid_Amount').val("0.00");
$('#paid_due').val(0);
}
} //else if(loan == "" || loan == 0)
//alert(totaldue);
dateCalulation();
}
} //else if(loan == "" || loan == 0)
//alert(totaldue);
dateCalulation();
}
function dateCalulation() {
//alert('j');
var loanamount = document.getElementById('Loan_Amount').value;
if (loanamount == 0.00 || loanamount == "") {
$('#loan_issued_date').val("");
$('#due_started').val("");
$('#monthly_due').val("0.00");
$('#remaining_due').val(0);
$('#no_of_due').val(0);
$('#Loan_Amount').val("0.00");
$('#paid_due').val(0);
$('#Paid_Amount').val("0.00");
}
function dateCalulation() {
//alert('j');
var loanamount = document.getElementById('Loan_Amount').value;
if (loanamount == 0.00 || loanamount == "") {
$('#loan_issued_date').val("");
$('#due_started').val("");
$('#monthly_due').val("0.00");
$('#remaining_due').val(0);
$('#no_of_due').val(0);
$('#Loan_Amount').val("0.00");
$('#paid_due').val(0);
$('#Paid_Amount').val("0.00");
}
}
}
function finalCheck() {
//alert("final check");
function finalCheck() {
//alert("final check");
var loanamount = document.getElementById('Loan_Amount').value;
if (loanamount != "" && loanamount != 0.00) {
var idate = document.getElementById('loan_issued_date').value;
var due = document.getElementById('monthly_due').value;
var dsdate = document.getElementById('due_started').value;
if (idate == "" || due == "" || due == 0.00 || dsdate == "") {
alert("Enter All Loan Information Correctly...!");
return false;
}
}
if ($('#Total_Salary').val() == '' || $('#HRA_Rate').val() == '' || $('#Allowances').val() == '' || $('#PF_Rate').val() == '' || $('#ESI_Rate').val() == '' || $('#Food_Allowances').val() == '' || $('#Incentives').val() == '') {
alert("Please Enter All Information Correctly..!");
var loanamount = document.getElementById('Loan_Amount').value;
if (loanamount != "" && loanamount != 0.00) {
var idate = document.getElementById('loan_issued_date').value;
var due = document.getElementById('monthly_due').value;
var dsdate = document.getElementById('due_started').value;
if (idate == "" || due == "" || due == 0.00 || dsdate == "") {
alert("Enter All Loan Information Correctly...!");
return false;
}
}
$("#deleteemp").click(function() {
var loanid = "<?php if(isset($Loan_ID)){ echo $Loan_ID; }else{
echo $emppay[0]->Loan_ID;
} ?>";
var i = confirm("Do You want to delete " + loanid + " from Loan Master?");
// alert(i);s
if (i) {
// $('#content').loader('show');
$.ajax({
data: {
id: loanid
},
type: "POST",
url: "<?php echo base_url(); ?>emppaydate/deleteEmpPay",
success: function(result) {
if (result) {
if ($('#Total_Salary').val() == '' || $('#HRA_Rate').val() == '' || $('#Allowances').val() == '' || $('#PF_Rate').val() == '' || $('#ESI_Rate').val() == '' || $('#Food_Allowances').val() == '' || $('#Incentives').val() == '') {
alert(result);
// $('#content').loader('hide');
window.location.href = "<?php echo base_url(); ?>emppayListings";
alert("Please Enter All Information Correctly..!");
return false;
}
}
}
$("#deleteemp").click(function() {
var loanid = "<?php if (isset($Loan_ID)) {
echo $Loan_ID;
} else {
echo $emppay[0]->Loan_ID;
} ?>";
var i = confirm("Do You want to delete " + loanid + " from Loan Master?");
// alert(i);s
if (i) {
// $('#content').loader('show');
$.ajax({
data: {
id: loanid
},
type: "POST",
url: "<?php echo base_url(); ?>emppaydate/deleteEmpPay",
success: function(result) {
if (result) {
alert(result);
// $('#content').loader('hide');
window.location.href = "<?php echo base_url(); ?>emppayListings";
}
});
}
});
</script>
<script>
</script>
}
});
}
});
</script>
<script>
</script>

View File

@ -107,16 +107,15 @@ if ($total <= $reorder) {
<!-- Start Content-->
<div class="container-fluid">
<!-- Start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Edit Material - <?php echo $MaterialCode; ?> Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>rawmaterialListing"><span class="bold">Back</span></a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>rawmaterialListing"><span class="bold">Back</span></a>
</div>
</div>
<!-- End page title -->
<div class="row">
@ -150,9 +149,9 @@ if ($total <= $reorder) {
if (!empty($material)) {
foreach ($material as $SID) {
?>
<option value="<?= $SID->ConfigValue ?>" <?php if ($MaterialType === $SID->ConfigValue) echo "selected"; ?>>
<?php echo $SID->ConfigValue ?>
</option>
<option value="<?= $SID->ConfigValue ?>" <?php if ($MaterialType === $SID->ConfigValue) echo "selected"; ?>>
<?php echo $SID->ConfigValue ?>
</option>
<?php
}
}
@ -177,7 +176,7 @@ if ($total <= $reorder) {
if (!empty($UOMList)) {
foreach ($UOMList as $UM) {
?>
<option value="<?php echo $UM->ConfigValue; ?>"><?php echo $UM->ConfigValue ?></option>
<option value="<?php echo $UM->ConfigValue; ?>"><?php echo $UM->ConfigValue ?></option>
<?php
}
}
@ -265,7 +264,7 @@ if ($total <= $reorder) {
</div>
</div>
<div class="box-footer text-right">
<a href="<?php echo base_url() ?>rawmaterialListing" class="btn btn-cancel">Cancel</a>
<a href="<?php echo base_url() ?>rawmaterialListing" class="btn btn-secondary">Cancel</a>
<input type="submit" class="btn btn-success" value="Submit" />
</div>
</form>
@ -370,7 +369,7 @@ if ($total <= $reorder) {
if (count > 2) {
$('#content').loader('hide');
alert('Material name already existed ! ');
var related_name = "";
$.each(data, function(i, obj) {
@ -385,11 +384,12 @@ if ($total <= $reorder) {
// alert("empty data");
}
},error: function() {
$('#content').loader('hide');
alert("Error Occur");
}
},
error: function() {
$('#content').loader('hide');
alert("Error Occur");
}
});
});
</script>

View File

@ -1863,7 +1863,7 @@ if (!empty($getlogpodtl)) {
<?php } else { ?>
<h4><?= "Amended Revenue Purchase Order - $PONO "; ?></h4>
<?php } ?>
<a href="<?php echo base_url() ?>purchaseorderListing" class="btn btn-success" id="back" value="Back">Back</a>
<a href="<?php echo base_url() ?>purchaseorderListing" class="btn btn-secondary" id="back" value="Back">Back</a>
</div>
</div>
</div>

View File

@ -1,5 +1,4 @@
<?php
$SupplierID = '';
$SupplierName = '';
$Address = '';
@ -280,16 +279,13 @@ if (!empty($supplier)) {
<!-- form start -->
</div>
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Edit Supplier Details</h4>
<h4 class="page-title">Edit Supplier Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>supplierlisting"><span class="bold">Back</span></a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>supplierlisting"><span class="bold">Back</span></a>
</div>
</div>
<!-- end page title -->
<div class="row">

View File

@ -24,17 +24,14 @@ if (!empty($master)) {
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Edit Config <?= ' - ' . $ConfigName; ?> Details</h4>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Edit Config <?= ' - ' . $ConfigName; ?> Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>configlisting"><span class="bold">Back</span></a>
</div>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>configlisting"><span class="bold">Back</span></a>
</div>
</div>
<?php
helper('form');
$error = session()->getFlashdata('error');
@ -133,7 +130,7 @@ if (!empty($master)) {
<div class="form-row text-right" style="margin-top:10px; text-align:right">
<div class="col-md-12 text-right">
<a href="<?php echo base_url() ?>configlisting" class="btn btn-cancel">Cancel</a>
<a href="<?php echo base_url() ?>configlisting" class="btn btn-secondary">Cancel</a>
<input type="submit" class="btn btn-success" value="Update" />
</div>
</div>

View File

@ -1,181 +1,171 @@
<?php
$DEPCode = '';
$DepartmentName = '';
$HeadDept = '';
$IsActive ='';
$chk ='';
if(!empty($department))
{
foreach ($department as $uf)
{
$DEPCode = $uf->DEPCode;
$DepartmentName = $uf->DepartmentName;
$HeadDept = $uf->HeadDept;
//$IsActive = $uf->IsActive;
//echo 'CST date:'. $CSTDt ;
$chk = $uf->IsActive;
if($chk == 1)
{
$IsActive = 'checked';
}
else
{
$IsActive = '';
}
$DEPCode = '';
$DepartmentName = '';
$HeadDept = '';
$IsActive = '';
$chk = '';
if (!empty($department)) {
foreach ($department as $uf) {
$DEPCode = $uf->DEPCode;
$DepartmentName = $uf->DepartmentName;
$HeadDept = $uf->HeadDept;
//$IsActive = $uf->IsActive;
//echo 'CST date:'. $CSTDt ;
$chk = $uf->IsActive;
if ($chk == 1) {
$IsActive = 'checked';
} else {
$IsActive = '';
}
}
}
}
?>
?>
<script>
// function blockKeyPress(evt)
// {
// var charCode = (evt.which) ? evt.which : evt.keyCode;
// alert(charCode);
// if(charCode == 8 || charCode == 46 )
//
// {
// return false;
// }
// else
// {
// return false;
// }
// }
// function blockKeyPress(evt)
// {
// var charCode = (evt.which) ? evt.which : evt.keyCode;
// alert(charCode);
// if(charCode == 8 || charCode == 46 )
//
// {
// return false;
// }
// else
// {
// return false;
// }
// }
// function isNumberKey(evt)
// {
// var charCode = (evt.which) ? evt.which : evt.keyCode;
// if (charCode != 46 && charCode > 31
// && (charCode < 48 || charCode > 57))
// return false;
//
// return true;
// }
// function onlyAlphabets(evt) {
// var charCode;
// if (window.event)
// charCode = window.event.keyCode; //for IE
// else
// charCode = evt.which; //for firefox
// if (charCode == 32) //for &lt;space&gt; symbol
// return true;
// if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
// return false;
// if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
// return false;
// if (charCode > 122) //for characters beyond 'z' in ASCII Table
// return false;
// return true;
// }
</script>
// function isNumberKey(evt)
// {
// var charCode = (evt.which) ? evt.which : evt.keyCode;
// if (charCode != 46 && charCode > 31
// && (charCode < 48 || charCode > 57))
// return false;
//
// return true;
// }
// function onlyAlphabets(evt) {
// var charCode;
// if (window.event)
// charCode = window.event.keyCode; //for IE
// else
// charCode = evt.which; //for firefox
// if (charCode == 32) //for &lt;space&gt; symbol
// return true;
// if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
// return false;
// if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
// return false;
// if (charCode > 122) //for characters beyond 'z' in ASCII Table
// return false;
// return true;
// }
</script>
<style>
/* legend{
/* legend{
color:#00c0ef ! important;
} */
legend {
margin-left: 0% !important;
}
.pad{
padding-bottom:1%;
}
.badge
{
color:red; background-color:#fff;
}
legend {
margin-left: 0% !important;
}
.pad {
padding-bottom: 1%;
}
.badge {
color: red;
background-color: #fff;
}
</style>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div class="row" style="margin-bottom: 10px;">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Edit Department - <?php echo $DepartmentName; ?> Details</h4>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-dark waves-effect waves-light" href="<?php echo base_url(); ?>departmentListing"><span class="bold">Back</span></a>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<form role="form" id="Updatedepartment" action="<?php echo base_url() ?>editdepartment" method="post">
<div class="box-body">
<!-- Department Information -->
<legend>Department Information</legend>
<div class="form-row" style="margin-top:10px">
<div class="col-md-3">
<label class="col-form-label" for="DEPCode">Department Code</label>
<input type="text" name="DEPCode" id="DEPCode" class="form-control" readonly value="<?php echo $DEPCode; ?>">
</div>
<div class="col-md-3">
<label class="col-form-label" for="DepartmentName">Department Name<span class="badge">*</span></label>
<input type="text" name="DepartmentName" id="DepartmentName" class="form-control" required value="<?php echo $DepartmentName; ?>">
</div>
<div class="col-md-3">
<label class="col-form-label" for="HeadDept">Head Department</label>
<select class="form-control required" id="HeadDept" name="HeadDept">
<option value="<?php echo $HeadDept; ?>"><?php echo $HeadDept; ?></option>
<?php if (!empty($depcode)) {
foreach ($depcode as $DC) { ?>
<option value="<?php echo $DC->DEPCode; ?>"><?php echo $DC->DEPCode . " - " . $DC->DepartmentName; ?></option>
<?php }
} ?>
</select>
</div>
<div class="col-md-2">
<label class="col-form-label" for="IsActive">Is Active</label><br>
<input type="checkbox" id="IsActive" name="IsActive" <?php echo $IsActive; ?>>
</div>
</div>
<div class="form-row" style="margin-top:10px">
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red; color: white; margin-right: 15px; width: 80px;" value="Reset" />
<input type="submit" value="Update" class="btn btn-success">
</div>
</div>
</div>
</form>
<div class="row">
<div class="col-md-12">
<?php
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Edit Department - <?php echo $DepartmentName; ?> Details</h4>
<a class="btn btn-secondary" href="<?php echo base_url(); ?>departmentListing"><span class="bold">Back</span></a>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<form role="form" id="Updatedepartment" action="<?php echo base_url() ?>editdepartment" method="post">
<div class="box-body">
<!-- Department Information -->
<legend>Department Information</legend>
<div class="form-row" style="margin-top:10px">
<div class="col-md-3">
<label class="col-form-label" for="DEPCode">Department Code</label>
<input type="text" name="DEPCode" id="DEPCode" class="form-control" readonly value="<?php echo $DEPCode; ?>">
</div>
<div class="col-md-3">
<label class="col-form-label" for="DepartmentName">Department Name<span class="badge">*</span></label>
<input type="text" name="DepartmentName" id="DepartmentName" class="form-control" required value="<?php echo $DepartmentName; ?>">
</div>
<div class="col-md-3">
<label class="col-form-label" for="HeadDept">Head Department</label>
<select class="form-control required" id="HeadDept" name="HeadDept">
<option value="<?php echo $HeadDept; ?>"><?php echo $HeadDept; ?></option>
<?php if (!empty($depcode)) {
foreach ($depcode as $DC) { ?>
<option value="<?php echo $DC->DEPCode; ?>"><?php echo $DC->DEPCode . " - " . $DC->DepartmentName; ?></option>
<?php }
} ?>
</select>
</div>
<div class="col-md-2">
<label class="col-form-label" for="IsActive">Is Active</label><br>
<input type="checkbox" id="IsActive" name="IsActive" <?php echo $IsActive; ?>>
</div>
</div>
<div class="form-row" style="margin-top:10px">
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red; color: white; margin-right: 15px; width: 80px;" value="Reset" />
<input type="submit" value="Update" class="btn btn-success">
</div>
</div>
</div>
</form>
<div class="row">
<div class="col-md-12">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) { ?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php }
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php }
$success = session()->getFlashdata('success');
if ($success) { ?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
</div>
</div>
</div>
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row -->
</div> <!-- container -->
</div> <!-- content -->
</div>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
</div>
</div>
</div>
</div> <!-- end card -->
</div><!-- end col -->
</div>
<!-- end row -->
</div> <!-- container -->
</div> <!-- content -->
</div>

View File

@ -88,16 +88,13 @@
}
?>
<div class="row">
<div class="col-6">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Employee Details</h4>
<a class="btn btn-success" href="<?php echo base_url(); ?>addemployee">Add New Employee</a>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-success" href="<?php echo base_url(); ?>addemployee">Add New Employee</a>
<!-- <a class="btn btn-success" href="<?php echo base_url(); ?>exportemployee">Export Employee Details <i class="fa fa-download" aira-hidden="true"></i></a> -->
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">

View File

@ -3,62 +3,58 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Employee Loan Details</h4>
</div>
</div>
<div class="col-6 text-right">
<a class="btn btn-success" href="<?php echo base_url(); ?>emppaydate/addemppaydate">Create New Loan</a>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Employee Loan Details</h4>
<a class="btn btn-success" href="<?php echo base_url(); ?>emppaydate/addemppaydate">Create New Loan</a>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<table id="datatable" class="table dt-responsive nowrap w-100 ria_data_table">
<thead>
<tr>
<th width="15%">Employee</th>
<th width="7%"> Total Sal in </th>
<th width="7%"> Loan Amt in </th>
<th width="7%"> Loan Issued Date</th>
<th width="7%"> Monthly Due Amt in </th>
<th width="7%"> No Of Dues</th>
<th width="7%"> Paid Dues</th>
<th width="7%"> Remaining Dues</th>
<th width="7%"> Paid Amt in </th>
<th width="7%">Action</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) { ?>
<tr>
<td style="text-align: left;"><?php echo $record->EmpID ?>-<?php echo $record->FirstName; ?></td>
<td><?php echo $record->TotalSalary; ?></td>
<td><?php echo $record->Loan_Amount; ?></td>
<td><?php echo $record->Loan_Issued_Date; ?></td>
<td><?php echo $record->Monthly_Due; ?></td>
<td><?php echo $record->No_of_Dues; ?></td>
<td><?php echo $record->Paid_Due; ?></td>
<td><?php echo $record->Remaining_Due; ?></td>
<td><?php echo $record->Paid_Amount; ?></td>
<td>
<a href="<?php echo base_url() . 'emppaydate/editOldemppay/' . $record->Pay_Data_ID; ?>"><i class="fas fa-pencil-alt"></i></a>
</td>
</tr>
<?php }
} ?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<table id="datatable" class="table dt-responsive nowrap w-100 ria_data_table">
<thead>
<tr>
<th width="15%">Employee</th>
<th width="7%"> Total Sal in </th>
<th width="7%"> Loan Amt in </th>
<th width="7%"> Loan Issued Date</th>
<th width="7%"> Monthly Due Amt in </th>
<th width="7%"> No Of Dues</th>
<th width="7%"> Paid Dues</th>
<th width="7%"> Remaining Dues</th>
<th width="7%"> Paid Amt in </th>
<th width="7%">Action</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) { ?>
<tr>
<td style="text-align: left;"><?php echo $record->EmpID ?>-<?php echo $record->FirstName; ?></td>
<td><?php echo $record->TotalSalary; ?></td>
<td><?php echo $record->Loan_Amount; ?></td>
<td><?php echo $record->Loan_Issued_Date; ?></td>
<td><?php echo $record->Monthly_Due; ?></td>
<td><?php echo $record->No_of_Dues; ?></td>
<td><?php echo $record->Paid_Due; ?></td>
<td><?php echo $record->Remaining_Due; ?></td>
<td><?php echo $record->Paid_Amount; ?></td>
<td>
<a href="<?php echo base_url() . 'emppaydate/editOldemppay/' . $record->Pay_Data_ID; ?>"><i class="fas fa-pencil-alt"></i></a>
</td>
</tr>
<?php }
} ?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div> <!-- container -->
</div> <!-- content -->

View File

@ -63,14 +63,12 @@
<!-- start page title -->
<div>
<div class="row">
<div class="col-6">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Expense List</h4>
<a id="addExpense" class="btn btn-success" data-toggle="modal" href="#expenseModal">Add New Expense</a>
</div>
</div>
<div class="col-6 text-right">
<a id="addExpense" class="btn btn-success" data-toggle="modal" href="#expenseModal">Add New Expense</a>
</div>
</div>
<div class="row">
<div class="col-12">
@ -409,31 +407,31 @@
// Native HTML5 form validation
if ($('#expenseForm')[0].checkValidity()) {
var formData = new FormData($('#expenseForm')[0]); // Use FormData to handle file upload
console.log(formActionUrl);
var formData = new FormData($('#expenseForm')[0]); // Use FormData to handle file upload
console.log(formActionUrl);
$.ajax({
url: formActionUrl,
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function(response) {
$.ajax({
url: formActionUrl,
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function(response) {
console.log(response);
if (response) {
$('#expenseModal').modal('hide');
$('#expenseForm')[0].reset();
$('#file-name-display').text(''); // Clear the file name display
window.location.reload();
} else {
console.log(response);
if (response) {
$('#expenseModal').modal('hide');
$('#expenseForm')[0].reset();
$('#file-name-display').text(''); // Clear the file name display
window.location.reload();
} else {
console.log(response);
}
},
error: function(xhr, status, error) {
alert('An error occurred: ' + error);
}
});
},
error: function(xhr, status, error) {
alert('An error occurred: ' + error);
}
});
} else {
// If form is invalid, show native validation messages
$('#expenseForm')[0].reportValidity();

View File

@ -91,9 +91,8 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
toolbar: false,
setup: function(ed) {
ed.on('init', function(evt) {
console.log(evt);
console.log('<?php echo $t; ?>')
ed.setContent('<?php echo $t; ?>');
});
}

View File

@ -137,76 +137,82 @@ $monthsoptions = array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr
<div class="content-page">
<!-- Content Header (Page header) -->
<div class="page-title-box page-title-box-alt">
<h4 class="page-title"> Add Config Details</h4>
</div>
<section class="content">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<form id="PayslipGenerator" action="<?php echo base_url() ?>PrintPdf" method="post" role="form" style="border:2px dotted; padding:5%">
<div class="row">
<div class="col-md-4">
<span for="selectmonth">Select Month</span>
<select id="PayOn" name="PayOn" class="form-control select2" style="width: 100%;">
<option value="-1">Select Payon Month</option>
<?php
if (!empty($Payon)) {
foreach ($Payon as $rl) {
$m = substr($rl->Month_Year, 0, 2);
$y = substr($rl->Month_Year, 3);
$tot = $monthsoptions[$m] . "-" . $y;
echo "<option value=\"" . $rl->Month_Year . "\">" . $tot . "</option>";
}
}
?>
</select>
</div>
<div id="content"></div>
<div class="col-md-2">
</div>
<div class="col-md-4 col-md-offset-2">
<span>Employee</span>
<select id="Employee" name="Employee" class="form-control select2" type="text" class="form-control">
<option value="-1">Select Employee</option>
</select>
<br />
<input type="checkbox" name="All" id="All"> Select All<br>
</div>
<div class="col-md-6" align="right">
</div>
<div class="col-md-4 col-md-offset-6" align="right">
<input type="button" class="btn btn-info" id="Calculate" value="Calculate Pay" />
</div>
<div class="container-fluid">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title"> Add Config Details</h4>
</div>
<div class="content">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<form id="PayslipGenerator" action="<?php echo base_url() ?>PrintPdf" method="post" role="form" style="border:2px dotted; padding:5%">
<div class="row">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="row">
<div class="col-md-4">
<?php // echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true"><3E></button></div>');
<div class="col-md-4">
<span for="selectmonth">Select Month</span>
<select id="PayOn" name="PayOn" class="form-control select2" style="width: 100%;">
<option value="-1">Select Payon Month</option>
<?php
if (!empty($Payon)) {
foreach ($Payon as $rl) {
$m = substr($rl->Month_Year, 0, 2);
$y = substr($rl->Month_Year, 3);
$tot = $monthsoptions[$m] . "-" . $y;
echo "<option value=\"" . $rl->Month_Year . "\">" . $tot . "</option>";
}
}
?>
</select>
</div>
<div id="content"></div>
<div class="col-md-2">
</div>
<div class="col-md-4 col-md-offset-2">
<span>Employee</span>
<select id="Employee" name="Employee" class="form-control select2" type="text" class="form-control">
<option value="-1">Select Employee</option>
</select>
<br />
<input type="checkbox" name="All" id="All"> Select All<br>
</div>
<div class="col-md-6" align="right">
</div>
<div class="col-md-4 col-md-offset-6" align="right">
<input type="button" class="btn btn-info" id="Calculate" value="Calculate Pay" />
</div>
<div class="row">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="row">
<div class="col-md-4">
<?php // echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true"><3E></button></div>');
?>
</div>
</div>
</div>
</div>
</div>
</section>
</form>
</div>
</div>
</div>
</div>
</div>

View File

@ -458,7 +458,7 @@ if (!empty($INRSYMBOL)) {
}
Editchange();
});
var edit = '';
$('#PackagingType').change(function() {
if ($('#Rate').val() != '' && $('#MaterialCode').val() != "0") {
@ -467,6 +467,8 @@ if (!empty($INRSYMBOL)) {
selValue = $("#PackagingType").val();
if (selValue == PercentageType) {
var PackagingCalculation = '';
$('#REVENUE').modal('hide');
edit = 'PackingCalculationOn';
$('#packagingcalmodel').modal('show');
$('#txtPackaging').removeAttr('readonly', 'true');
} else {
@ -488,6 +490,14 @@ if (!empty($INRSYMBOL)) {
}
calculatePackaging(0);
});
$('#packagingcalmodel').on('hidden.bs.modal', function() {
// Reopen the first modal when the second modal is closed
if(edit == 'PackingCalculationOn'){
$('#REVENUE').modal('show');
}else if(edit == 'EditPackingCalculationOn'){
$('#EDITREVENUE').modal('show');
}
});
$('#EditPackagingType').change(function() {
$('#txtEditPackaging').val('');
@ -495,6 +505,8 @@ if (!empty($INRSYMBOL)) {
selValue = $("#EditPackagingType").val();
if (selValue == PercentageType) {
var PackagingCalculation = '';
$('#EDITREVENUE').modal('hide');
edit = 'EditPackingCalculationOn';
$('#packagingcalmodel').modal('show');
$('#txtEditPackaging').removeAttr('readonly', 'true');
} else {
@ -604,6 +616,7 @@ if (!empty($INRSYMBOL)) {
//$('#CSTCalModel').modal('show');
}
});
var freight = '';
$('#drpFreight').change(function() {
var FreightType = $("#drpFreight").val();
if (FreightType == "PER TRIP") {
@ -617,6 +630,8 @@ if (!empty($INRSYMBOL)) {
$('#txtAfterFreight').val('');
if (selValue == PercentageType) {
var freightCalculation = '';
$('#REVENUE').modal('hide');
edit = 'FreightCalculationOn';
$('#freightcalmodel').modal('show');
//$('#freightcalmodel').modal('blur');
$('#txtFreight').removeAttr('readonly', 'true');
@ -636,6 +651,16 @@ if (!empty($INRSYMBOL)) {
calculateFreight(0);
});
$('#freightcalmodel').on('hidden.bs.modal', function() {
// Reopen the first modal when the second modal is closed
if(edit == 'FreightCalculationOn'){
$('#REVENUE').modal('show');
}else if(edit == 'EditFreightCalculationOn'){
$('#EDITREVENUE').modal('show');
}
});
$('#drpEditFreight').change(function() {
var FreightType = $("#drpEditFreight").val();
if (FreightType == "PER TRIP") {
@ -650,6 +675,8 @@ if (!empty($INRSYMBOL)) {
if (selValue == PercentageType) {
var FreightCalculation = '';
// $('#freight').modal('show');
edit = 'EditFreightCalculationOn';
$('#EDITREVENUE').modal('hide');
$('#freightcalmodel').modal('show');
$('#txtEditFreight').removeAttr('readonly', 'true');
//Editchange();
@ -1768,7 +1795,7 @@ if (!empty($INRSYMBOL)) {
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4><?= "Revenue Purchase Order"; ?></h4>
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-success" id="back" value="Back">Back</a>
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-secondary" id="back" value="Back">Back</a>
</div>
</div>
</div>
@ -2158,21 +2185,21 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<div align="right" style="padding-right:10px">
<input type="file" name="POFile" id="POFile"><br>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="Budget" id="Budget" />
<div class="btn-container" style="text-align: right;">
<a class="btn btn-success Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as Draft</span></a>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
</div>
</div>
<div class="form-group col-md-12">
<div align="right" style="padding-right:10px">
<input type="file" name="POFile" id="POFile"><br>
<input type="hidden" name="txtPoRange" id="txtPoRange" />
<input type="hidden" name="isEdit" id="isEdit" value="0" />
<input type="hidden" name="txtStatus" id="txtStatus" />
<input type="hidden" name="txtRowCount" id="txtRowCount" />
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
<input type="hidden" name="Budget" id="Budget" />
<div class="btn-container" style="text-align: right;">
<a class="btn btn-success Save" ID="Cancel" onclick="Reset();">&nbsp;&nbsp;<span class="bold">Reset</span></a>
<a class="btn btn-success Save" ID="Save" onclick="Save(0)">&nbsp;&nbsp;<span class="bold">Save as Draft</span></a>
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)">&nbsp;&nbsp;<span class="bold">Submit</span></a>
</div>
</div>
</div><br />
</div>
</div> <!-- end card body-->
@ -2183,7 +2210,7 @@ if (!empty($INRSYMBOL)) {
</div> <!-- content -->
</div>
<!-- Modal for Packing Calculation -->
<div id="packagingcalmodel" class="modal fade" role="dialog"
<div id="packagingcalmodel" class="modal fade" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-lg">
<div class="modal-content">
@ -2194,15 +2221,19 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="modal-body p-4">
<form>
<div class="radio">
<label><input type="radio" name="optPackaging" checked="checked" value='0' id="optPackaging"> Basic Amount</label>
<div>
<label>
<input type="radio" name="optPackaging" checked="checked" value='0' id="optPackaging"> Basic Amount
</label>
</div>
<div class="radio">
<label><input type="radio" name="optPackaging" id="optPackaging" value='1'> After Discount Amount</label>
<div>
<label>
<input type="radio" name="optPackaging" id="optPackaging" value='1'> After Discount Amount
</label>
</div>
</form>
</div>
<div class="modal-footer">
<div class="modal-footer" style="border:none;">
<a class="btn btn-secondary waves-effect" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-info waves-effect waves-light" ID="PackagingOption" onclick="SetPackagingOption();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
</div>
@ -2212,7 +2243,7 @@ if (!empty($INRSYMBOL)) {
<!-- Modal for freight Calculation-->
<div id="freightcalmodel" class="modal fade" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-full-width">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Freight Calculation On</h4>
@ -2222,15 +2253,15 @@ if (!empty($INRSYMBOL)) {
<div class="modal-body p-4">
<form>
<div class="radio">
<div>
<label><input type="radio" name="optFreight" checked="checked" value='0' id="optFreight"> Basic Amount</label>
</div>
<div class="radio">
<div>
<label><input type="radio" name="optFreight" id="optFreight" value='1'> After Discount Amount</label>
</div>
</form>
</div>
<div class="modal-footer">
<div class="modal-footer" style="border:none;">
<a class="btn btn-secondary waves-effect" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<a class="btn btn-info waves-effect waves-light" ID="FreightOption" onclick="SetfreightOption();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
@ -2366,29 +2397,29 @@ if (!empty($INRSYMBOL)) {
<div class="form-group col-md-3">
<label>Department Name</label>
<?php
$data = array('name' => 'deptName', 'value' => set_value('deptName'), 'id' => 'deptName', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<?php
$data = array('name' => 'deptName', 'value' => set_value('deptName'), 'id' => 'deptName', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-3">
<label>Cost Center Code</label>
<?php
$data = array('name' => 'CostCenter', 'value' => set_value('CostCenter'), 'id' => 'CostCenter', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<?php
$data = array('name' => 'CostCenter', 'value' => set_value('CostCenter'), 'id' => 'CostCenter', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-3">
<label>Avl Bud Amt <?php echo "($INRSYM)" ?></label>
<?php
$data = array('name' => 'AvlBudAmt', 'value' => set_value('AvlBudAmt'), 'id' => 'AvlBudAmt', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
<?php
$data = array('name' => 'AvlBudAmt', 'value' => set_value('AvlBudAmt'), 'id' => 'AvlBudAmt', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-row">
@ -2406,51 +2437,51 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="form-group col-md-2">
<label>Item Name</label>
<?php
$data = array('name' => 'ItemName', 'value' => set_value('ItemName'), 'id' => 'ItemName', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<?php
$data = array('name' => 'ItemName', 'value' => set_value('ItemName'), 'id' => 'ItemName', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-1">
<label>UOM</label>
<?php
$data = array('name' => 'UOM', 'value' => set_value('UOM'), 'id' => 'UOM', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
<?php
$data = array('name' => 'UOM', 'value' => set_value('UOM'), 'id' => 'UOM', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>Qty<span class="text-danger">*</span></label>
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change()');
echo form_input($data);
?>
</div>
<div class="form-group col-md-1">
<label><?php echo "Rate ($INRSYM)"; ?><span class="text-danger">*</span></label>
<!-- <label>Rate</label> -->
<?php
$data = array('name' => 'Rate', 'value' => set_value('Rate'), 'id' => 'Rate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change()');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>Per</label> <?php
$data = array('name' => 'AddPer', 'value' => set_value('AddPer'), 'id' => 'AddPer', 'class' => 'form-control');
echo form_input($data); ?>
</div>
<div class="form-group col-md-2">
<label><?php echo "Basic Amt ($INRSYM)"; ?></label>
<!-- <label>Basic Amount</label> -->
<?php
$data = array('name' => 'txtBasicValue', 'value' => set_value('txtBasicValue'), 'id' => 'txtBasicValue', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>Qty<span class="text-danger">*</span></label>
<?php
$data = array('name' => 'Quantity', 'value' => set_value('Quantity'), 'id' => 'Quantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change()');
echo form_input($data);
?>
</div>
<div class="form-group col-md-1">
<label><?php echo "Rate ($INRSYM)"; ?><span class="text-danger">*</span></label>
<!-- <label>Rate</label> -->
<?php
$data = array('name' => 'Rate', 'value' => set_value('Rate'), 'id' => 'Rate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change()');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>Per</label> <?php
$data = array('name' => 'AddPer', 'value' => set_value('AddPer'), 'id' => 'AddPer', 'class' => 'form-control');
echo form_input($data); ?>
</div>
<div class="form-group col-md-2">
<label><?php echo "Basic Amt ($INRSYM)"; ?></label>
<!-- <label>Basic Amount</label> -->
<?php
$data = array('name' => 'txtBasicValue', 'value' => set_value('txtBasicValue'), 'id' => 'txtBasicValue', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-row" style="padding:0px;">
<div class="form-group col-md-4"></div>
@ -2605,38 +2636,38 @@ if (!empty($INRSYMBOL)) {
<!-- sgst -->
<div class="form-row" id="SGSTAddModel">
<div class="form-group col-md-8"></div>
<div class="form-group col-md-2" >
<label>SGST In %</label>
<?php
$data = array('name' => 'Sgst', 'value' => set_value('Sgst', 0), 'id' => 'Sgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<?php
$data = array('name' => 'AfterSgst', 'value' => set_value('AfterSgst', 0.00), 'id' => 'AfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-8"></div>
<div class="form-group col-md-2">
<label>SGST In %</label>
<?php
$data = array('name' => 'Sgst', 'value' => set_value('Sgst', 0), 'id' => 'Sgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<?php
$data = array('name' => 'AfterSgst', 'value' => set_value('AfterSgst', 0.00), 'id' => 'AfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-row" id="IGSTAddModel" style="display:none;">
<div class="form-group col-md-8"></div>
<div class="form-group col-md-2">
<label>IGST In %</label>
<?php
$data = array('name' => 'Igst', 'value' => set_value('Igst', 0), 'id' => 'Igst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<?php
$data = array('name' => 'AfterIgst', 'value' => set_value('AfterIgst', 0.00), 'id' => 'AfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
<div class="form-group col-md-8"></div>
<div class="form-group col-md-2">
<label>IGST In %</label>
<?php
$data = array('name' => 'Igst', 'value' => set_value('Igst', 0), 'id' => 'Igst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'change();');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>IGST Amt <?php echo "($INRSYM)" ?></label>
<?php
$data = array('name' => 'AfterIgst', 'value' => set_value('AfterIgst', 0.00), 'id' => 'AfterIgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-row">
@ -2672,16 +2703,16 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="modal-footer">
<div class="modal-footer">
<a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel">Cancel</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a class="btn btn-info waves-effect waves-light font AddRevenue" ID="AddRevenue"> &nbsp;&nbsp;<span class="bold">Add Revenue</span></a>
<a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel">Cancel</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a class="btn btn-info waves-effect waves-light font AddRevenue" ID="AddRevenue"> &nbsp;&nbsp;<span class="bold">Add Revenue</span></a>
</div>
</form>
</div>
</form>
</div>
</div>
</div><!-- /.modal -->
<!-- Edit Model for revenue po -->
<div id="EDITREVENUE" class="modal fade" tabindex="-1" role="dialog"
@ -2767,39 +2798,39 @@ if (!empty($INRSYMBOL)) {
?>
</div>
</div>
<div class="form-group col-md-2">
<label>Quantity<span class="text-danger">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange()', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>Quantity<span class="text-danger">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'EditQuantity', 'value' => set_value('EditQuantity'), 'id' => 'EditQuantity', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange()', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label><?php echo "Rate ($INRSYM)" ?><span class="text-danger">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'EditRate', 'value' => set_value('EditRate'), 'id' => 'EditRate', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange()', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-2">
<label><?php echo "Rate ($INRSYM)" ?><span class="text-danger">*</span></label>
<div class="form-group">
<?php
$data = array('name' => 'EditRate', 'value' => set_value('EditRate'), 'id' => 'EditRate', 'class' => 'form-control', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange()', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
<div class="form-group col-md-1">
<label>Per</label> <?php
$data = array('name' => 'EditPer', 'value' => set_value('EditPer'), 'id' => 'EditPer', 'class' => 'form-control');
echo form_input($data); ?>
</div>
<div class="form-group col-md-1">
<label>Per</label> <?php
$data = array('name' => 'EditPer', 'value' => set_value('EditPer'), 'id' => 'EditPer', 'class' => 'form-control');
echo form_input($data); ?>
</div>
<div class="form-group col-md-2">
<label><?php echo "Basic Amt ($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditBasicValue', 'value' => set_value('txtEditBasicValue'), 'id' => 'txtEditBasicValue', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label><?php echo "Basic Amt ($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'txtEditBasicValue', 'value' => set_value('txtEditBasicValue'), 'id' => 'txtEditBasicValue', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;');
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="form-row">
@ -2961,27 +2992,27 @@ if (!empty($INRSYMBOL)) {
</div>
<div class="form-row" id="SGSTEditModel">
<div class="form-group col-md-8"></div>
<div class="form-group col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst', 0), 'id' => 'EditSgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
<div class="form-group col-md-8"></div>
<div class="form-group col-md-2">
<label>SGST In %</label>
<div class="form-group">
<?php
$data = array('name' => 'EditSgst', 'value' => set_value('EditSgst', 0), 'id' => 'EditSgst', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => ' Editchange();');
echo form_input($data);
?>
</div>
<div class="form-group col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst', 0.00), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="form-group col-md-2">
<label>SGST Amt <?php echo "($INRSYM)" ?></label>
<div class="form-group">
<?php
$data = array('name' => 'EditAfterSgst', 'value' => set_value('EditAfterSgst', 0.00), 'id' => 'EditAfterSgst', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="form-row" style="text-align:left;">
<div id="IGSTEditModel" style="display:none;">
@ -3044,7 +3075,7 @@ if (!empty($INRSYMBOL)) {
</div>
</div>
</div>
<div class="modal-footer">
<div class="modal-footer" style="border:none;>
<a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel">Cancel</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a class="btn btn-info waves-effect waves-light EditRevenue" ID="EditRevenue"> &nbsp;&nbsp;<span class="bold">Edit Revenue</span></a>
</div>
@ -3107,113 +3138,114 @@ if (!empty($INRSYMBOL)) {
$(document).ready(function() {
$("#EDITREVENUE").on("shown.bs.modal", function(e) {
$("#EDITREVENUE").on("shown.bs.modal", function(e) {
userid = $(e.relatedTarget).data('userid');
// alert("**");
$('#isEdit').val(1);
//alert(userid);
var tr = document.getElementById(userid);
var cellval = tr.cells;
var id = $('#Reqnumber' + userid).val();
userid = $(e.relatedTarget).data('userid');
// alert("**");
$('#isEdit').val(1);
//alert(userid);
var tr = document.getElementById(userid);
var cellval = tr.cells;
var id = $('#Reqnumber' + userid).val();
$('#EditReqNo').val($('#Reqnumber' + userid).val());
$('#EditdeptName').val($('#departmentName' + userid).val());
$("#EditCostCenter").val($('#costCode' + userid).val());
$('#EditAvlBudAmt').val($('#AvilBudget' + userid).val());
$('#EditReqNo').val($('#Reqnumber' + userid).val());
$('#EditdeptName').val($('#departmentName' + userid).val());
$("#EditCostCenter").val($('#costCode' + userid).val());
$('#EditAvlBudAmt').val($('#AvilBudget' + userid).val());
$('#EditItemName').val($('#materialName' + userid).val());
$('#EditUOM').val($('#uom' + userid).val());
$('#EditQuantity').val($('#quantity' + userid).val());
$('#EditRate').val($('#itemRate' + userid).val());
var p = $('#per' + userid).val()
if (p != "") {
$('#EditPer').val($('#per' + userid).val());
} else {
$('#EditPer').val($('#uom' + userid).val());
}
$('#txtEditBasicValue').val(cellval[7].innerHTML);
RequistQuantity = $('#quantity' + userid).val();
$('#txtEditDiscount').val($('#DisVal' + userid).val());
$('#txtEditAfterDiscount').val($('#AfterDisVal' + userid).val());
$('#EditItemName').val($('#materialName' + userid).val());
$('#EditUOM').val($('#uom' + userid).val());
$('#EditQuantity').val($('#quantity' + userid).val());
$('#EditRate').val($('#itemRate' + userid).val());
var p = $('#per' + userid).val()
if (p != "") {
$('#EditPer').val($('#per' + userid).val());
} else {
$('#EditPer').val($('#uom' + userid).val());
}
$('#txtEditBasicValue').val(cellval[7].innerHTML);
RequistQuantity = $('#quantity' + userid).val();
$('#txtEditDiscount').val($('#DisVal' + userid).val());
$('#txtEditAfterDiscount').val($('#AfterDisVal' + userid).val());
$('#txtEditPackaging').val($('#PackVal' + userid).val());
$('#txtEditAfterPackaging').val($('#AfterPackVal' + userid).val());
$('#txtEditPackaging').val($('#PackVal' + userid).val());
$('#txtEditAfterPackaging').val($('#AfterPackVal' + userid).val());
$('#txtEditFreight').val($('#FreightVal' + userid).val());
$('#txtEditAfterFreight').val($('#AfterFreightVal' + userid).val());
$('#EditNOOfTrips').val($('#NoOfTrip' + userid).val());
$('#txtEditInsurance').val($('#Insval' + userid).val());
$('#txtEditFreight').val($('#FreightVal' + userid).val());
$('#txtEditAfterFreight').val($('#AfterFreightVal' + userid).val());
$('#EditNOOfTrips').val($('#NoOfTrip' + userid).val());
$('#txtEditInsurance').val($('#Insval' + userid).val());
var FreightType = $('#FreightType' + userid).val();
var FreightType = $('#FreightType' + userid).val();
if (FreightType == "PER TRIP") {
$('#EditTripsValue').show();
} else {
$('#EditTripsValue').hide();
}
$('#txtEditTotalOrderValue').val($('#TotalOrderValue' + userid).val());
tinyMCE.get('Edit_Service_Description').setContent($('#Service_Description' + userid).val());
//$('#Edit_Service_Description').val($('#Service_Description'+userid).val());
$('#EditAfterCgst').val($('#RevenueAfterCgst' + userid).val());
$('#EditAfterSgst').val($('#RevenueAfterSgst' + userid).val());
$('#EditAfterIgst').val($('#RevenueAfterIgst' + userid).val());
$('#EditCgst').val($('#RevenueCgst' + userid).val());
$('#EditSgst').val($('#RevenueSgst' + userid).val());
$('#EditIgst').val($('#RevenueIgst' + userid).val());
if (FreightType == "PER TRIP") {
$('#EditTripsValue').show();
} else {
$('#EditTripsValue').hide();
}
$('#txtEditTotalOrderValue').val($('#TotalOrderValue' + userid).val());
tinyMCE.get('Edit_Service_Description').setContent($('#Service_Description' + userid).val());
//$('#Edit_Service_Description').val($('#Service_Description'+userid).val());
$('#EditAfterCgst').val($('#RevenueAfterCgst' + userid).val());
$('#EditAfterSgst').val($('#RevenueAfterSgst' + userid).val());
$('#EditAfterIgst').val($('#RevenueAfterIgst' + userid).val());
$('#EditCgst').val($('#RevenueCgst' + userid).val());
$('#EditSgst').val($('#RevenueSgst' + userid).val());
$('#EditIgst').val($('#RevenueIgst' + userid).val());
$("#EditMaterialCode").empty();
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
// For Binding Material list center for the selected Requistion Number
$("#EditMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val()));
$("#EditMaterialCode").empty();
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
// For Binding Material list center for the selected Requistion Number
$("#EditMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val()));
var isAdded = "0";
for (i = 0; i < Material.length; i++) {
$.each(Material[i], function(idx, obj) {
var isAdded = "0";
for (i = 0; i < Material.length; i++) {
$.each(Material[i], function(idx, obj) {
if (obj.ReqNo === id) {
if (obj.ReqNo === id) {
$.each(SelectedMaterialList.Mat, function(idx1, el) {
if (id == el.ReqNo) {
$.each(SelectedMaterialList.Mat, function(idx1, el) {
if (id == el.ReqNo) {
if (el.materialCode == obj.MaterialCode) {
if (el.materialCode == obj.MaterialCode) {
isAdded = "1";
return false;
} else {
isAdded = "0";
}
isAdded = "1";
return false;
} else {
isAdded = "0";
}
});
if (isAdded == "0") {
$("#EditMaterialCode").append($('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
}
});
if (isAdded == "0") {
$("#EditMaterialCode").append($('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
}
}
});
}
$("#EditDiscountType").val($('#DisType' + userid).val());
$("#drpEditFreight").val($('#FreightType' + userid).val());
$("#EditPackagingType").val($('#PackType' + userid).val())
$("input:radio[name='optPackaging'][value='" + $('#PackOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optExcise'][value='" + $('#ExciseOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optVat'][value='" + $('#VatOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optCST'][value='" + $('#CSTOption' + userid).val() + "']").prop('checked', 'checked');
});
}
$("#EditDiscountType").val($('#DisType' + userid).val());
$("#drpEditFreight").val($('#FreightType' + userid).val());
$("#EditPackagingType").val($('#PackType' + userid).val())
$("input:radio[name='optPackaging'][value='" + $('#PackOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optExcise'][value='" + $('#ExciseOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optVat'][value='" + $('#VatOption' + userid).val() + "']").prop('checked', 'checked');
$("input:radio[name='optCST'][value='" + $('#CSTOption' + userid).val() + "']").prop('checked', 'checked');
});});
});
});
$('.AddRevenue').click(function() {
tinyMCE.triggerSave();
if (validateRevenueTax() && ExceedQuantityCheck()) {
@ -3298,7 +3330,7 @@ if (!empty($INRSYMBOL)) {
// }));
// Define your template using ES6 template literals
var rowHtml = `
var rowHtml = `
<tr id="${temp}">
<td align="left">${temp}</td>
<td align="left">${Reqnumber}</td>
@ -3322,8 +3354,8 @@ var rowHtml = `
</tr>
`;
// Append the generated HTML to the target container
$('#RevenueAppend').append(rowHtml);
// Append the generated HTML to the target container
$('#RevenueAppend').append(rowHtml);
@ -3364,7 +3396,7 @@ $('#RevenueAppend').append(rowHtml);
addHidden(theForm, "Service_Description" + temp, Service_Description);
addHidden(theForm, "LineItemNo" + temp, 0);
$('#txtRowCount').val(temp);
// $('#REVENUE').modal('hide');
$('#REVENUE').modal('hide');
clearRevenueModalFields();
}
@ -3372,7 +3404,7 @@ $('#RevenueAppend').append(rowHtml);
$('.EditRevenue').click(function() {
tinyMCE.triggerSave();
if (validateEditRevenueTax() && validateEditExceedLimit() && ExceedEditQuantityCheck()) {
//alert('inside Add');
// alert('inside Add');
var CostCode = $("#EditCostCenter").val();
var AvilBudget = $('#EditAvlBudAmt').val();
var editMaterialCode = $("#EditMaterialCode").val();
@ -3776,7 +3808,7 @@ $('#RevenueAppend').append(rowHtml);
var formData = new FormData($('.CreatePO')[0]);
$.ajax({
type: "POST",
url: "<?php echo base_url() ?>purchaseorder/addNewPurchaseOrder",
@ -3785,7 +3817,7 @@ $('#RevenueAppend').append(rowHtml);
contentType: false,
success: function(data) {
if (data) {
alert(data);
$('#txtRowCount').val('');
$('#txtDeletedRow').val('');

View File

@ -43,100 +43,95 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Material Master Details</h4>
</div>
</div>
<div class="col-6 text-right">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Material Master Details</h4>
<a class="btn btn-success" href="<?php echo base_url(); ?>addRawmaterial">Add New Material</a>
<!-- <a class="btn btn-success" href="<?php echo base_url(); ?>exportmaterial">Export Material Master <i class="fa fa-download" aira-hidden="true"></i></a> -->
</div>
</div>
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if ($success) {
$type = "success";
echo show_alert($type, $success);
}
?>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
</div>
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if ($success) {
$type = "success";
echo show_alert($type, $success);
}
?>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="raw_material_list_table" class="table dt-responsive nowrap w-100">
<thead>
<tr>
<th>Created Date</th>
<th>Material Code</th>
<th>Material Description</th>
<th>Type of Material</th>
<th>UOM</th>
<th>Opening Stock</th>
<th>Material Category</th>
<th>HSN Code</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
$date = date("Y-m-d");
?>
<tr>
<?php if (date('d-m-Y', strtotime($record->CreatedDate)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedDate));
} ?>
<td style="width:8%;" ><?php echo $cdate; ?></td>
<td style="width:9%;"><u><a class="a_tag_link" href="<?php echo base_url() . 'viewRawmaterial?RID=' . $record->MaterialCode . '&MType=' . $record->MaterialType . '&UOM=' . $record->UOM . '&date1=' . $date ?>" data-toggle="tooltip" title="<?php echo $record->MaterialCode; ?> - Click here to view Material details"><?php echo $record->MaterialCode ?> </a></u></td>
<td style="width:12%;"><?php echo $record->MaterialName ?></td>
<td style="width:10%;"><?php echo $record->MaterialType ?></td>
<td style="width:7%;"><?php echo $record->UOM ?></td>
<?php if ($record->stock != null || '') { ?>
<td style="width:7%;"><?php echo $record->stock ?></td>
<?php } else { ?>
<td style="width:7%;">0</td>
<?php } ?>
<td style="width:11%;"><?php echo $record->Category ?></td>
<td style="width:8%;"><?php echo $record->HSNCODE ?></td>
</tr>
<?php
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="raw_material_list_table" class="table dt-responsive nowrap w-100">
<thead>
<tr>
<th>Created Date</th>
<th>Material Code</th>
<th>Material Description</th>
<th>Type of Material</th>
<th>UOM</th>
<th>Opening Stock</th>
<th>Material Category</th>
<th>HSN Code</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
$date = date("Y-m-d");
?>
<tr>
<?php if (date('d-m-Y', strtotime($record->CreatedDate)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedDate));
} ?>
<td style="width:8%;"><?php echo $cdate; ?></td>
<td style="width:9%;"><u><a class="a_tag_link" href="<?php echo base_url() . 'viewRawmaterial?RID=' . $record->MaterialCode . '&MType=' . $record->MaterialType . '&UOM=' . $record->UOM . '&date1=' . $date ?>" data-toggle="tooltip" title="<?php echo $record->MaterialCode; ?> - Click here to view Material details"><?php echo $record->MaterialCode ?> </a></u></td>
<td style="width:12%;"><?php echo $record->MaterialName ?></td>
<td style="width:10%;"><?php echo $record->MaterialType ?></td>
<td style="width:7%;"><?php echo $record->UOM ?></td>
<?php if ($record->stock != null || '') { ?>
<td style="width:7%;"><?php echo $record->stock ?></td>
<?php } else { ?>
<td style="width:7%;">0</td>
<?php } ?>
<td style="width:11%;"><?php echo $record->Category ?></td>
<td style="width:8%;"><?php echo $record->HSNCODE ?></td>
</tr>
<?php
}
}
}
?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div>
</div> <!-- container -->
</div> <!-- content -->
?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div> <!-- container -->
</div> <!-- content -->
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>

View File

@ -1,92 +1,115 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
</style>
<div class="content-page">
<div class="content">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
</div>
</div>
</div>
<div class="row">
<div class="col-xl-4 col-md-4">
<div class="card">
<div class="card-body" style="height: 150px;">
<h4 class="header-title" style="margin-bottom: 22px;">Today Sales</h4>
<div class="d-flex justify-content-between align-items-center">
<div class="knob-chart" dir="ltr">
<div class="text-left">
<p class="text-muted mb-0">Invoices</p>
<h4 class="mb-1 mt-0"> <span data-plugin="counterup" class="card_font_colorset_green"><?php echo $today_sales->Invoices ?></span> </h4>
</div>
</div>
<div class="text-left">
<p class="text-muted mb-0">Qty in Kgs</p>
<h4 class="mb-1 mt-0"> <span data-plugin="counterup" class="card_font_colorset_green"><?php echo $today_sales->Qty ?></span> </h4>
</div>
<div class="text-left">
<p class="text-muted mb-0">Sales in Rs.</p>
<h4 class="mb-1 mt-0"> <span data-plugin="counterup" class="card_font_colorset_green"><?php echo number_format($today_sales->Sales, 2); ?></span> </h4>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-4 col-md-4">
<div class="card">
<div class="card-body" style="height: 150px;">
<h4 class="header-title" style="margin-bottom: 22px;">This Month Sales</h4>
<div class="d-flex justify-content-between align-items-center">
<div class="knob-chart" dir="ltr">
<div class="text-left">
<p class="text-muted mb-0">Invoices</p>
<h4 class="mb-1 mt-0"> <span data-plugin="counterup" class="card_font_colorset_bule"><?php echo $this_month_sales->Invoices ?></span> </h4>
</div>
</div>
<div class="text-left">
<p class="text-muted mb-0">Qty in Kgs</p>
<h4 class="mb-1 mt-0"> <span data-plugin="counterup" class="card_font_colorset_bule"><?php echo $this_month_sales->Qty ?></span> </h4>
</div>
<div class="text-left">
<p class="text-muted mb-0">Sales in Rs.</p>
<h class="mb-1 mt-0"> <span data-plugin="counterup" class="card_font_colorset_bule"><?php echo number_format($this_month_sales->Sales, 2); ?></span> </h4>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-4 col-md-4">
<div class="card">
<div class="card-body" style="height: 150px;">
<h4 class="header-title" style="margin-bottom: 22px;">This year Sales</h4>
<div class="d-flex justify-content-between align-items-center">
<div class="knob-chart" dir="ltr">
<div class="text-left">
<p class="text-muted mb-0">Invoices</p>
<h4 class="mb-1 mt-0"> <span data-plugin="counterup" class="card_font_colorset_red"><?php echo $this_year_sales->Invoices ?></span> </h4>
</div>
</div>
<div class="text-left">
<p class="text-muted mb-0">Qty in Kgs</p>
<h4 class="mb-1 mt-0"> <span data-plugin="counterup" class="card_font_colorset_red"><?php echo $this_year_sales->Qty ?></span> </h4>
</div>
<div class="text-left">
<p class="text-muted mb-0">Sales in Rs.</p>
<h4 class="mb-1 mt-0"> <span data-plugin="counterup" class="card_font_colorset_red"><?php echo number_format($this_year_sales->Sales, 2); ?></span> </h4>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<!-- Today Sales -->
<div class="col-xl-4">
<div class="card">
<div class="card-body" style="height: 150px;">
<div class="d-flex justify-content-between align-items-center">
<h3 class="mb-0">Today Sales</h3>
<h4 class="mb-0 mt-0">
<span data-plugin="counterup" class="card_font_colorset_green" style="font-size: 20.7215px;">
<?php echo $today_sales->Invoices ?>
</span> Invoices
</h4>
</div>
<div class="d-flex justify-content-between align-items-center mt-3">
<div class="text-left">
<p class="text-muted mb-0">Qty in Kgs</p>
<h4 class="mb-1 mt-0">
<span data-plugin="counterup" class="card_font_colorset_green"><?php echo $today_sales->Qty ?></span>
</h4>
</div>
<div class="text-left">
<p class="text-muted mb-0">Sales in Rs.</p>
<h4 class="mb-1 mt-0">
<span data-plugin="counterup" class="card_font_colorset_green"><?php echo number_format($today_sales->Sales, 2); ?></span>
</h4>
</div>
</div>
</div>
</div>
</div>
<!-- This Month Sales -->
<div class="col-xl-4">
<div class="card">
<div class="card-body" style="height: 150px;">
<div class="d-flex justify-content-between align-items-center">
<h3 class="mb-0">This Month Sales</h3>
<h4 class="mb-0 mt-0">
<span data-plugin="counterup" class="card_font_colorset_bule" style="font-size: 20.7215px;">
<?php echo $this_month_sales->Invoices ?>
</span> Invoices
</h4>
</div>
<div class="d-flex justify-content-between align-items-center mt-3">
<div class="text-left">
<p class="text-muted mb-0">Qty in Kgs</p>
<h4 class="mb-1 mt-0">
<span data-plugin="counterup" class="card_font_colorset_bule"><?php echo $this_month_sales->Qty ?></span>
</h4>
</div>
<div class="text-left">
<p class="text-muted mb-0">Sales in Rs.</p>
<h4 class="mb-1 mt-0">
<span data-plugin="counterup" class="card_font_colorset_bule"><?php echo number_format($this_month_sales->Sales, 2); ?></span>
</h4>
</div>
</div>
</div>
</div>
</div>
<!-- This Year Sales -->
<div class="col-xl-4">
<div class="card">
<div class="card-body" style="height: 150px;">
<div class="d-flex justify-content-between align-items-center">
<h3 class="mb-0">This Year Sales</h3>
<h4 class="mb-0 mt-0">
<span data-plugin="counterup" class="card_font_colorset_red" style="font-size: 20.7215px;">
<?php echo $this_year_sales->Invoices ?>
</span> Invoices
</h4>
</div>
<div class="d-flex justify-content-between align-items-center mt-3">
<div class="text-left">
<p class="text-muted mb-0">Qty in Kgs</p>
<h4 class="mb-1 mt-0">
<span data-plugin="counterup" class="card_font_colorset_red"><?php echo $this_year_sales->Qty ?></span>
</h4>
</div>
<div class="text-left">
<p class="text-muted mb-0">Sales in Rs.</p>
<h4 class="mb-1 mt-0">
<span data-plugin="counterup" class="card_font_colorset_red"><?php echo number_format($this_year_sales->Sales, 2); ?></span>
</h4>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xl-12 col-md-12">
<div class="card">
@ -163,30 +186,35 @@
</div>
</div>
<!-- end row -->
<!-- end page title -->
<!-- end page title -->
</div> <!-- container -->
</div> <!-- content -->
</div>
<script>$(document).ready(function() {
$('#datatable-buttonss').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
responsive: true, // Responsive table
order: [[0, 'desc']], // Default ordering (column index 0, ascending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
<script>
$(document).ready(function() {
$('#datatable-buttonss').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
order: [
[0, 'desc']
], // Default ordering (column index 0, ascending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
}
});
});
});
</script>
</script>
<script>
@ -198,8 +226,7 @@
type: 'bar', // Bar chart
data: {
labels: ['April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March'], // Months of the year
datasets: [
{
datasets: [{
label: 'Current Year Sales',
data: currentYearSales,
backgroundColor: 'rgba(86, 166, 75, 0.6)', // Green color with opacity
@ -239,9 +266,4 @@
}
}
});
</script>
</script>

View File

@ -38,119 +38,114 @@
<div class="content-page">
<div class="content">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if ($success) {
$type = "success";
echo show_alert($type, $success);
}
?>
<div class="content">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if ($success) {
$type = "success";
echo show_alert($type, $success);
}
?>
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Supplier Listing</h4>
</div>
</div>
<div class="col-6 text-right">
<div class="form-group" style="margin-bottom:0px !important;">
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Supplier Listing</h4>
<a class="btn btn-success" href="<?php echo base_url(); ?>addsupplier">Add New Supplier</a>
<!-- <a class="btn btn-success" href="<?php echo base_url(); ?>exportsupplier">Export Supplier Details <i class="fa fa-download" aira-hidden="true"></i></a> -->
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
</div>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table class="table dt-responsive nowrap w-100" id="datatable" >
<thead >
<tr>
<th style="width:75px">Created Date</th>
<th>Supplier ID</th>
<th>Supplier Name</th>
<th>Address</th>
<th>Contact Number</th>
<th>Email Address</th>
<th>PAN</th>
<th>GST Number</th>
<th>Payment Terms</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<?php if (date('d-m-Y', strtotime($record->CreatedOn)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedOn));
} ?>
<td style="width:75px" align="right"><?php echo $cdate; ?></td>
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table class="table dt-responsive nowrap w-100" id="datatable">
<thead>
<tr>
<th style="width:75px">Created Date</th>
<th>Supplier ID</th>
<th>Supplier Name</th>
<th>Address</th>
<th>Contact Number</th>
<th>Email Address</th>
<th>PAN</th>
<th>GST Number</th>
<th>Payment Terms</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<?php if (date('d-m-Y', strtotime($record->CreatedOn)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->CreatedOn));
} ?>
<td style="width:75px" align="right"><?php echo $cdate; ?></td>
<td>
<u>
<a class="a-tag-link"
href="<?= base_url() ?>viewsupplier?SID=<?= $record->SupplierID ?>&Payment=<?= $record->PaymentTerms ?>"
data-toggle="tooltip"
title="<?= $record->SupplierID ?> - Click here to view Supplier details"><?= $record->SupplierID ?>
</a>
</u>
</td>
<td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->Address ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->EmailAddress ?></td>
<td><?php echo $record->PAN ?></td>
<td><?php echo $record->GSTNO ?></td>
<td><?php echo $record->PaymentTerms ?></td>
<td><?php if ($record->IsActive == 0) {
echo "Deactived";
} else { ?>
<a onclick="deletesupplier('<?php echo $record->SupplierID; ?>')"><i class="fa fa-trash" style="color:#02a8b5;"></i>&nbsp;&nbsp;&nbsp;</a>
<?php } ?>
</td>
</tr>
<?php
<td>
<u>
<a class="a-tag-link"
href="<?= base_url() ?>viewsupplier?SID=<?= $record->SupplierID ?>&Payment=<?= $record->PaymentTerms ?>"
data-toggle="tooltip"
title="<?= $record->SupplierID ?> - Click here to view Supplier details"><?= $record->SupplierID ?>
</a>
</u>
</td>
<td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->Address ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->EmailAddress ?></td>
<td><?php echo $record->PAN ?></td>
<td><?php echo $record->GSTNO ?></td>
<td><?php echo $record->PaymentTerms ?></td>
<td><?php if ($record->IsActive == 0) {
echo "Deactived";
} else { ?>
<a onclick="deletesupplier('<?php echo $record->SupplierID; ?>')"><i class="fa fa-trash" style="color:#02a8b5;"></i>&nbsp;&nbsp;&nbsp;</a>
<?php } ?>
</td>
</tr>
<?php
}
}
}
?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div>
</div> <!-- container -->
</div> <!-- content -->
</div>
?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div>
</div> <!-- container -->
</div> <!-- content -->
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
@ -178,7 +173,7 @@
url: "<?php echo base_url() ?>deletesupplier",
success: function(data) {
if (data) {
// $('#content').loader('hide');
// $('#content').loader('hide');
alert(data);
location.reload();
}
@ -194,77 +189,80 @@
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
};
// Initialize the DataTable
var table = $('#datatable').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
responsive: true, // Responsive table
order: [], // Default ordering (column index 0, descending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
// Initialize the DataTable
var table = $('#datatable').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
order: [], // Default ordering (column index 0, descending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
// Date range filter function
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $('#fromDate').val();
var toDate = $('#toDate').val();
if (!fromDate || !toDate) {
return true; // If no dates selected, don't filter
}
var dateStr = data[0]; // Assuming the date is in the first column
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
var startDate = new Date(fromDate);
var endDate = new Date(toDate);
// Adjust startDate to include the day before the selected fromDate
startDate.setDate(startDate.getDate() - 1);
// Ensure endDate includes the entire end date by setting time to the end of the day
endDate.setHours(23, 59, 59, 999);
// Date range filter function
$.fn.dataTable.ext.search.push(
function(settings, data, dataIndex) {
var fromDate = $('#fromDate').val();
var toDate = $('#toDate').val();
// Return true if the date is within the range
return date >= startDate && date <= endDate;
}
);
if (!fromDate || !toDate) {
return true; // If no dates selected, don't filter
}
// Handle form submission for the date range filter
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw(); // Redraw the table to apply the filter
});
var dateStr = data[0]; // Assuming the date is in the first column
var dateParts = dateStr.split("-");
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").val('');
$("#toDate").val('');
table.draw(); // Redraw the table to clear the filter
});
var startDate = new Date(fromDate);
var endDate = new Date(toDate);
// Automatically focus and open the To Date picker when From Date is selected
document.getElementById('fromDate').addEventListener('change', function() {
var fromDate = this.value;
var toDateInput = document.getElementById('toDate');
// Set the min attribute of the To Date input to the selected From Date
toDateInput.min = fromDate;
// Adjust startDate to include the day before the selected fromDate
startDate.setDate(startDate.getDate() - 1);
// Optionally reset the To Date input if the current value is before the new min date
if (toDateInput.value < fromDate) {
toDateInput.value = fromDate;
}
});
});
</script>
// Ensure endDate includes the entire end date by setting time to the end of the day
endDate.setHours(23, 59, 59, 999);
// Return true if the date is within the range
return date >= startDate && date <= endDate;
}
);
// Handle form submission for the date range filter
$("#DateRangeFilter").submit(function(e) {
e.preventDefault();
table.draw(); // Redraw the table to apply the filter
});
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").val('');
$("#toDate").val('');
table.draw(); // Redraw the table to clear the filter
});
// Automatically focus and open the To Date picker when From Date is selected
document.getElementById('fromDate').addEventListener('change', function() {
var fromDate = this.value;
var toDateInput = document.getElementById('toDate');
// Set the min attribute of the To Date input to the selected From Date
toDateInput.min = fromDate;
// Optionally reset the To Date input if the current value is before the new min date
if (toDateInput.value < fromDate) {
toDateInput.value = fromDate;
}
});
});
</script>

View File

@ -80,18 +80,13 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title pt-2">Transporter Details</h4>
</div>
</div>
<div class="col-6 text-right">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title">Transporter Details</h4>
<a data-toggle="modal" href="#transporterwizard" data-id="0" data-name="" class="btn btn-success">Add New Transporter</a>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
@ -109,7 +104,7 @@
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="transporter_list" class="table dt-responsive nowrap w-100">
<thead>
<tr>
@ -261,7 +256,7 @@
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
order: [ ], // Default ordering (column index 0, descending)
order: [], // Default ordering (column index 0, descending)
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon

View File

@ -42,100 +42,93 @@
<!-- Start Content-->
<div class="container-fluid">
<!-- start page title -->
<div>
<div class="row">
<div class="col-6">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title pt-2 ">User Listing</h4>
</div>
</div>
<div class="col-6 text-right ">
<div class="row">
<div class="col-12">
<div class="page-title-box page-title-box-alt">
<h4 class="page-title pt-2 ">User Listing</h4>
<a class="btn btn-success " href="<?php echo base_url(); ?>addNew">Add New User</a>
</div>
</div>
</div>
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if ($success) {
$type = "success";
echo show_alert($type, $success);
}
?>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="user_list_table" class="table dt-responsive nowrap w-100">
<thead>
<tr>
<th>Created Date</th>
<!-- <th>User Id</th> -->
<th>User Name</th>
<th>Email</th>
<th>Contact Number</th>
<th>Designation</th>
<th>Department</th>
<th>Role Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<?php if (date('d-m-Y', strtotime($record->createdDtm)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->createdDtm));
} ?>
<td><?php echo $cdate; ?> </td>
<!-- <td><?php echo $record->userId ?></td> -->
<td><?php echo $record->FirstName ?></td>
<td><?php echo $record->EmailId ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->Designation ?></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->role ?></td>
<td>
<a href="<?php echo base_url() . 'user/editOld?UID=' . $record->userId . '&EMPID=' . $record->EmpID; ?>"><i class="fas fa-pencil-alt"></i>&nbsp;&nbsp;&nbsp;</a>
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
$type = "error";
echo show_alert($type, $error);
}
$success = session()->getFlashdata('success');
if ($success) {
$type = "success";
echo show_alert($type, $success);
}
?>
<div class="row">
<div class="col-12">
<div class="card">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range" type="date" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
<label for="toDate">To:</label>
<input class="form-control date_range" type="date" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
<button type="submit" class="range_search_button"><i class="fe-search" aria-hidden="true" class="icon-button" title="Search"></i></button>
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div>
</form>
<div class="card-body">
<table id="user_list_table" class="table dt-responsive nowrap w-100">
<thead>
<tr> <th>Created Date</th>
<!-- <th>User Id</th> -->
<th>User Name</th>
<th>Email</th>
<th>Contact Number</th>
<th>Designation</th>
<th>Department</th>
<th>Role Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($userRecords)) {
foreach ($userRecords as $record) {
?>
<tr>
<?php if (date('d-m-Y', strtotime($record->createdDtm)) == "30-11--0001") {
$cdate = '00-00-0000';
} else {
$cdate = date('d-m-Y', strtotime($record->createdDtm));
} ?>
<td ><?php echo $cdate; ?> </td>
<!-- <td><?php echo $record->userId ?></td> -->
<td><?php echo $record->FirstName ?></td>
<td><?php echo $record->EmailId ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->Designation ?></td>
<td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->role ?></td>
<td>
<a href="<?php echo base_url() . 'user/editOld?UID=' . $record->userId . '&EMPID=' . $record->EmpID; ?>"><i class="fas fa-pencil-alt"></i>&nbsp;&nbsp;&nbsp;</a>
<a onclick="deleteUser(<?php echo $record->userId; ?>)"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
</td>
</tr>
<?php
}
<a onclick="deleteUser(<?php echo $record->userId; ?>)"><i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;</a>
</td>
</tr>
<?php
}
?>
}
?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
</div>
</div> <!-- container -->

View File

@ -230,7 +230,6 @@ if (! function_exists('form_textarea')) {
if ((is_array($extra) && array_key_exists('cols', $extra)) || (is_string($extra) && stripos(preg_replace('/\s+/', '', $extra), 'cols=') !== false)) {
unset($defaults['cols']);
}
return '<textarea ' . rtrim(parse_form_attributes($data, $defaults)) . stringify_attributes($extra) . '>'
. htmlspecialchars($val)
. "</textarea>\n";
@ -561,7 +560,7 @@ if (! function_exists('set_value')) {
if ($value === null) {
$value = $request->getPost($field) ?? $default;
}
return ($htmlEscape) ? esc($value) : $value;
}
}