Bug Fixes : ps
This commit is contained in:
parent
22a401fcb5
commit
229ac1b4a2
@ -136,19 +136,24 @@ class Driver extends BaseController
|
||||
public function loadDriverAttendance()
|
||||
{
|
||||
|
||||
$input_driver_id = $this->request->getPost('gobal_driver_id') ? $this->request->getPost('gobal_driver_id') : $this->request->getGet('gobal_driver_id');
|
||||
$input_month_year = $this->request->getPost('month_year') ? $this->request->getPost('month_year') : $this->request->getGet('month_year');
|
||||
list($month, $year) = explode('-', $input_month_year);
|
||||
$input_driver_id = $this->request->getGet('gobal_driver_id');
|
||||
// $input_month_year = $this->request->getPost('month_year') ? $this->request->getPost('month_year') : get_date_time_dynamical_format('d-M-Y','d-m-',"01-"+$this->request->getGet('month_year')) ;
|
||||
$input_date = $this->request->getGet('date')
|
||||
? $this->request->getGet('date')
|
||||
: get_date_time_dynamical_format('d-M-Y','d-m-Y',"01-".$this->request->getGet('month_year'));
|
||||
|
||||
$month_in_number = get_date_time_dynamical_format('M','m',"$month");// refer helper
|
||||
$get_last_date_of_the_month = cal_days_in_month(CAL_GREGORIAN, $month_in_number, $year);
|
||||
$from_mysql_date = get_date_time_dynamical_format('d-m-Y','Y-m-d',"01-$month_in_number-$year");
|
||||
$to_mysql_date = get_date_time_dynamical_format('d-m-Y','Y-m-d',"$get_last_date_of_the_month-$month_in_number-$year");
|
||||
$indian_date = get_date_time_dynamical_format('d-m-Y','d-m-Y',"$get_last_date_of_the_month-$month_in_number-$year");
|
||||
|
||||
list($date,$month,$year) = explode('-', $input_date);
|
||||
|
||||
$get_last_date_of_the_month = cal_days_in_month(CAL_GREGORIAN, $month, $year);
|
||||
$from_mysql_date = get_date_time_dynamical_format('d-m-Y','Y-m-d',"01-$month-$year");
|
||||
$to_mysql_date = get_date_time_dynamical_format('d-m-Y','Y-m-d',"$get_last_date_of_the_month-$month-$year");
|
||||
$indian_date = get_date_time_dynamical_format('d-m-Y','d-m-Y',"$get_last_date_of_the_month-$month-$year");
|
||||
|
||||
$data['driver_attendance_list'] = $this->driver_model->useDriverAttendanceTable()->getDriverAttendanceList($input_driver_id,$from_mysql_date,$to_mysql_date);
|
||||
$data['page_driver_name'] = $this->driver_model->getDriverName($input_driver_id);
|
||||
$data['invoice_info'] = $this->driver_model->getInvoiceInfo();
|
||||
$data['datefordropdown'] = $input_month_year;
|
||||
$data['datefordropdown'] = $input_date;
|
||||
$data['gobal_driver_id'] = $input_driver_id;
|
||||
|
||||
$this->global['pageTitle'] = 'Driver Attendance List';
|
||||
|
||||
@ -632,7 +632,7 @@ class Emergencypurchaseorder extends BaseController
|
||||
if (count($mrirmaster) > 0) {
|
||||
foreach ($mrirmaster as $key) {
|
||||
|
||||
$MRIRNO = $key->MRIRNo;
|
||||
$MRIRNO = $key->MRIRNO;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1525,6 +1525,6 @@ class Emergencypurchaseorder extends BaseController
|
||||
$this->purchaseorder_model->DeletePOServiceTax($LineItemNo);
|
||||
}
|
||||
$this->purchaseorder_model->DeletePOLineItem($LineItemNo, $ReqNo, $MaterialCode);
|
||||
echo "Successfully Deleted the Line item" . $LineItemNo;
|
||||
echo "Successfully Deleted the Line item " . $LineItemNo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1962,7 +1962,7 @@ class Purchaseorder extends BaseController
|
||||
$this->purchaseorder_model->DeletePOServiceTax($LineItemNo);
|
||||
}
|
||||
$this->purchaseorder_model->DeletePOLineItem($LineItemNo, $ReqNo, $MaterialCode);
|
||||
echo "Successfully Deleted the Line item" . $LineItemNo;
|
||||
echo "Successfully Deleted the Line item " . $LineItemNo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -341,7 +341,7 @@ class Servicepurchaseorder extends BaseController
|
||||
}
|
||||
}
|
||||
}
|
||||
echo 'Service Purchase Order Created Successfully!The PO NO Is: ' . $PONO;
|
||||
echo 'Service Purchase Order Created Successfully! PO Number Is: ' . $PONO;
|
||||
}
|
||||
//update service po
|
||||
function UpdateServicePurchaseOrder()
|
||||
|
||||
@ -47,11 +47,11 @@ class Driver_model extends Model
|
||||
return $this->table . '.' . $field;
|
||||
}, $this->allowedFields));
|
||||
|
||||
$selectFields = "CONCAT_WS(' ', t_employee_details.FirstName, t_employee_details.LastName) AS FullName, t_employee_details.IsActive as employee_isactive, t_driver.driver_name,ip_clients.client_name as customer,ip_invoices.received_qty as quantity,t_driver_payroll.id as payroll_id,t_driver_payroll.PayOn," . $fields;
|
||||
$selectFields = "CONCAT_WS(' ', t_employee_details.FirstName, t_employee_details.LastName) AS FullName, t_employee_details.IsActive as employee_isactive, CONCAT_WS(' ', driver.FirstName, driver.LastName) AS driver_name,ip_clients.client_name as customer,ip_invoices.received_qty as quantity,t_driver_payroll.id as payroll_id,t_driver_payroll.PayOn," . $fields;
|
||||
|
||||
$month_year = get_date_time_dynamical_format('Y-m-d','m-Y',"$from");
|
||||
return $this->select($selectFields)
|
||||
->join('t_driver', 't_driver.driver_id = ' . $this->table . '.driver_id', 'left')
|
||||
->join('t_employee_details as driver', 'driver.EmpID = ' . $this->table . '.driver_id', 'left')
|
||||
->join('tbl_users', 'tbl_users.userId = ' . $this->table . '.created_by', 'left')
|
||||
->join('t_employee_details', 'tbl_users.EmpID = t_employee_details.EmpID', 'left')
|
||||
->join('ip_invoices', 'ip_invoices.invoice_number = ' . $this->table . '.invoice_number', 'left')
|
||||
@ -60,6 +60,7 @@ class Driver_model extends Model
|
||||
->where($this->table.'.date BETWEEN "'.$from.'" AND "'.$to.'"')
|
||||
->where($this->table . '.driver_id', $driver_id)
|
||||
->where($this->table . '.isactive', 1)
|
||||
->where('driver.is_driver', 1)
|
||||
->findAll();
|
||||
|
||||
}
|
||||
@ -73,9 +74,9 @@ class Driver_model extends Model
|
||||
|
||||
function getDriverName($id)
|
||||
{
|
||||
$builder = $this->db->table('t_driver')
|
||||
->select('driver_name')
|
||||
->where('driver_id', $id);
|
||||
$builder = $this->db->table('t_employee_details')
|
||||
->select('CONCAT_WS(" ", t_employee_details.FirstName, t_employee_details.LastName) as driver_name')
|
||||
->where('EmpID', $id);
|
||||
|
||||
$query = $builder->get()->getRow();
|
||||
|
||||
|
||||
@ -2991,15 +2991,8 @@ if (!empty($getlogpodtl)) {
|
||||
type: "POST",
|
||||
url: "<?php echo base_url() ?>purchaseorder/DeletePODetails",
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$('#loader').hide();
|
||||
alert(data);
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
$('#loader').hide();
|
||||
(data) ? alert(response) : alert("Error");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -6,6 +6,13 @@
|
||||
label {
|
||||
font-style: bold;
|
||||
}
|
||||
|
||||
input[type="file"] {
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -333,64 +333,105 @@ if (!empty($INRSYMBOL)) {
|
||||
function vaildateBeforeOpenModal() {
|
||||
|
||||
var radioValue = $("input[name='DateRange']:checked").val();
|
||||
if (capitalType == 'International') {
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 0 && $('#Deliverydate').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 1 && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 2 && $('#Dispatch').val().trim() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if ($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else if ($('#DeliveryAddr').val() == '') {
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select Capital Type');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
|
||||
if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if (radioValue == 0 && $('#Deliverydate').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 1 && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 2 && $('#Dispatch').val().trim() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if ($('#DeliveryAddr').val() == '') {
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select POType');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
|
||||
} else if ($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else if ($('#currencytype').val() == '0') {
|
||||
alert('Please Select the Currency Type');
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
} else if (capitalType == 'International') {
|
||||
if ($('#ExchangeRt').val() == '') {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRt').focus();
|
||||
return false;
|
||||
} else if ($('#PlaceOforigin').val().trim() == '') {
|
||||
alert('Please Enter the Place Of Origin');
|
||||
$('#PlaceOforigin').focus();
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (capitalType == 'Domestic') {
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if ($('#currencytype').val() == '0') {
|
||||
alert('Please Select the Currency Type');
|
||||
$('#currencytype').focus();
|
||||
return false;
|
||||
} else if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 0 && $('#Deliverydate').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 1 && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 2 && $('#Dispatch').val().trim() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if ($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '') {
|
||||
alert('Please Enter the Dispatch Instruction');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
} else if ($('#ExchangeRt').val() == '') {
|
||||
alert('Please Enter the Exchange Rate');
|
||||
$('#ExchangeRt').focus();
|
||||
return false;
|
||||
} else if ($('#PlaceOforigin').val().trim() == '') {
|
||||
alert('Please Enter the Place Of Origin');
|
||||
$('#PlaceOforigin').focus();
|
||||
return false;
|
||||
} else if ($('#DeliveryAddr').val() == '') {
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select Capital Type');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
|
||||
} else if ($('#BudgetType').val() == "0") {
|
||||
alert('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
<div class="content-page">
|
||||
|
||||
@ -221,7 +221,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
|
||||
<div class="col-md-6">
|
||||
<label class="form" for="load_type">Load Type</label>
|
||||
<select class="form-control" id="load_type" name="load_type" onchange="salary();">
|
||||
<select class="form-control" id="load_type" name="load_type" onchange="updateSalaryBasedOnType();">
|
||||
<option value="">Select</option>
|
||||
<option value="Load">Load</option>
|
||||
<option value="Waste Core">Waste Core</option>
|
||||
@ -234,11 +234,11 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
<div class="row mt-2">
|
||||
<div class="col-md-4">
|
||||
<label class="form" for="salary_amount">Salary Amount</label>
|
||||
<input type="text" class="form-control" id="salary_amount" name="salary_amount" onkeypress="return isNumber(event);" onchange="salary();">
|
||||
<input type="text" class="form-control" id="salary_amount" name="salary_amount" onkeypress="return isNumber(event);" onchange="fetchSalary();">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form" for="food_amount">Food Amount</label>
|
||||
<input type="text" class="form-control" id="food_amount" name="food_amount" onkeypress="return isNumber(event);" onchange="salary();">
|
||||
<input type="text" class="form-control" id="food_amount" name="food_amount" onkeypress="return isNumber(event);" onchange="fetchSalary();">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form" for="total_amount">Total Amount</label>
|
||||
@ -463,25 +463,29 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
|
||||
if (result) { return result; } else { event.preventDefault(); }
|
||||
}
|
||||
|
||||
function salary() {
|
||||
|
||||
var type = $('#load_type').val();
|
||||
|
||||
if(type == 'Load'){
|
||||
var value = parseFloat(1300);
|
||||
$('#salary_amount').val(value);
|
||||
}else if(type == 'Waste Core'){
|
||||
var value = parseFloat(1050);
|
||||
$('#salary_amount').val(value);
|
||||
}
|
||||
var sa = parseFloat($('#salary_amount').val()) || 0;
|
||||
var fa = parseFloat($('#food_amount').val()) || 0;
|
||||
var ttl = sa + fa;
|
||||
|
||||
$('#total_amount').val(ttl.toFixed(2));
|
||||
$(document).ready(function() {
|
||||
updateSalaryBasedOnType();
|
||||
fetchSalary();
|
||||
});
|
||||
|
||||
function updateSalaryBasedOnType() {
|
||||
var type = $('#load_type').val();
|
||||
if (type == 'Load') {
|
||||
$('#salary_amount').val(1300);
|
||||
} else if (type == 'Waste Core') {
|
||||
$('#salary_amount').val(1050);
|
||||
}
|
||||
fetchSalary();
|
||||
}
|
||||
|
||||
function fetchSalary() {
|
||||
var sa = parseFloat($('#salary_amount').val()) || 0;
|
||||
var fa = parseFloat($('#food_amount').val()) || 0;
|
||||
var ttl = sa + fa;
|
||||
|
||||
$('#total_amount').val(ttl.toFixed(2));
|
||||
}
|
||||
|
||||
function customerandquantity(){
|
||||
if ($('#invoice_number').val() === '') {
|
||||
alert('Please Enter the Valid Invoice Number');
|
||||
|
||||
@ -5358,15 +5358,8 @@ if (!empty($getlogpodtl)) {
|
||||
type: "POST",
|
||||
url: "<?php echo base_url() ?>purchaseorder/DeletePODetails",
|
||||
success: function (data) {
|
||||
$('#loader').show();
|
||||
|
||||
if (data) {
|
||||
// $('#content').loader('hide');
|
||||
alert(data);
|
||||
} else {
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
$('#loader').hide();
|
||||
(data) ? alert(response) : alert("Error");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -6,6 +6,13 @@
|
||||
label {
|
||||
font-style: bold;
|
||||
}
|
||||
|
||||
input[type="file"] {
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
|
||||
|
||||
@ -191,7 +191,7 @@ $Reqon = '';
|
||||
$RequesterName = '';
|
||||
|
||||
if (!empty($POMaster)) {
|
||||
//print_r($POMaster);
|
||||
// dd($POMaster);
|
||||
//print_r($POItem);
|
||||
foreach ($POMaster as $Req) {
|
||||
$parentPO = $Req->ParentPO;
|
||||
@ -218,6 +218,7 @@ if (!empty($POMaster)) {
|
||||
|
||||
$DeliveryAddress = $Req->DeliveryAddress;
|
||||
$PONOStatus = $Req->StatusCode;
|
||||
// dd($PONOStatus);
|
||||
$PONO = $Req->PONO;
|
||||
$ServiceDescription = $Req->ServiceDescription;
|
||||
$CapitalRange = $Req->CapitalRange;
|
||||
@ -4477,7 +4478,8 @@ if (!empty($getlogpodtl)) {
|
||||
});
|
||||
index = parseInt(index) + 1;
|
||||
// $PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED
|
||||
PONOStatus = <?php echo $PONOStatus; ?>
|
||||
var PONOStatus = <?php echo '"'.$PONOStatus.'"'; ?>
|
||||
console.log("PONOStatus",PONOStatus);
|
||||
|
||||
|
||||
// var template = jQuery("#RevenueList").html();
|
||||
@ -5087,12 +5089,7 @@ if (!empty($getlogpodtl)) {
|
||||
url: "<?php echo base_url() ?>purchaseorder/DeletePODetails",
|
||||
success: function (data) {
|
||||
$('#loader').hide();
|
||||
if (data) {
|
||||
alert(data);
|
||||
|
||||
} else {
|
||||
alert("Error");
|
||||
}
|
||||
(data) ? alert(response) : alert("Error");
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@ -2044,14 +2044,8 @@ foreach ($PaymentTerms as $TER) {
|
||||
type: "POST",
|
||||
url: "<?php echo base_url() ?>purchaseorder/DeletePODetails",
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$('#loader').hide();
|
||||
alert(data);
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
$('#loader').hide();
|
||||
(data) ? alert(response) : alert("Error");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -5334,14 +5334,7 @@ if (!empty($getlogpodtl)) {
|
||||
url: "<?php echo base_url() ?>purchaseorder/DeletePODetails",
|
||||
success: function(data) {
|
||||
$('#loader').hide();
|
||||
|
||||
if (data) {
|
||||
// $('#content').loader('hide');
|
||||
alert(data);
|
||||
} else {
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
(data) ? alert(response) : alert("Error");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -135,7 +135,15 @@
|
||||
} else {
|
||||
$cdate = date('d-m-Y', strtotime($record->Created_date));
|
||||
} ?>
|
||||
<td><a class="a_tag_link" href="<?php echo base_url() . 'employeedetails/ViewEmployee/?EmpID=' . $record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u></td>
|
||||
<td><a class="a_tag_link" href="<?php echo base_url() . 'employeedetails/ViewEmployee/?EmpID=' . $record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u>
|
||||
<?php if($record->is_driver){ ?>
|
||||
|
||||
<a title="Trip Details" style="cursor:pointer;" href="<?= base_url() . 'loadDriverAttendance?gobal_driver_id=' . $record->EmpID.'&date='.$cdate; ?>">
|
||||
<i class="fa fa-truck"></i>
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
</td>
|
||||
<td><?php echo $record->FirstName; ?></td>
|
||||
<td><?php echo $record->ContactNumber ?></td>
|
||||
<td><?php echo $record->Designation ?></td>
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="row" style="padding-left: 26px;">
|
||||
<div class="row" style="padding: 18px 26px;">
|
||||
<div class="col-md-3">
|
||||
<span>Holiday Name : </span>
|
||||
<input type="text" name="hname" id="hname" class="form-control">
|
||||
|
||||
@ -204,15 +204,15 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
function vaildateBeforeOpenModal() {
|
||||
var radioValue = $("input[name='DateRange']:checked").val();
|
||||
if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if ($('#drpSupplier').val() == "0") {
|
||||
if ($('#drpSupplier').val() == "0") {
|
||||
alert('Please Select the Supplier details');
|
||||
$('#drpSupplier').focus();
|
||||
return false;
|
||||
} else if ($('#DeliveryAddr').val() == '') {
|
||||
} else if ($('#PODate').val() == '') {
|
||||
alert('Please Enter the Purchase Order date');
|
||||
$('#PODate').focus();
|
||||
return false;
|
||||
} else if ($('#DeliveryAddr').val() == '') {
|
||||
alert('Please Enter the Delivery Address');
|
||||
$('#DeliveryAddr').focus();
|
||||
return false;
|
||||
@ -224,15 +224,7 @@ if (!empty($INRSYMBOL)) {
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 0 && $('#Deliverydate').val() == '') {
|
||||
alert('Please Select the Delivery Date');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if (radioValue == 1 && $('#Scheduleby').val().trim() == '') {
|
||||
alert('Please Enter the Schedule By');
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
} else if ($('#PoTypeOptions').val() == "0") {
|
||||
alert('Please Select Revenue Type');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
@ -3944,7 +3936,7 @@ if (!empty($INRSYMBOL)) {
|
||||
} else {
|
||||
|
||||
var formData = new FormData($('.CreatePO')[0]);
|
||||
|
||||
disableButtons();
|
||||
|
||||
|
||||
$.ajax({
|
||||
@ -3962,15 +3954,19 @@ if (!empty($INRSYMBOL)) {
|
||||
//$('#SpcialInstruction').val('');
|
||||
//$('#txtDeliveryAddress').val('');
|
||||
window.location = "purchaseorderListing";
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
|
||||
|
||||
} else {
|
||||
alert("Error");
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.error("AJAX Error: " + textStatus + ": " + errorThrown);
|
||||
alert("Error: " + textStatus);
|
||||
setTimeout(function() { enableButtons(); }, 2000);
|
||||
}
|
||||
|
||||
});
|
||||
@ -4214,9 +4210,29 @@ if (!empty($INRSYMBOL)) {
|
||||
}
|
||||
|
||||
function Reset() {
|
||||
disableButtons();
|
||||
location.reload();
|
||||
setTimeout(function() {
|
||||
enableButtons();
|
||||
}, 2000);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function disableButtons() {
|
||||
document.querySelectorAll('.Save, .Submit').forEach(function(button) {
|
||||
button.classList.add('disabled');
|
||||
button.setAttribute('disabled', 'disabled');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function enableButtons() {
|
||||
document.querySelectorAll('.Save, .Submit').forEach(function(button) {
|
||||
button.classList.remove('disabled');
|
||||
button.removeAttribute('disabled');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
@ -407,11 +407,14 @@ if (!empty($Emp)) {
|
||||
$("#UOM").val('');
|
||||
// Get the ID of the first option
|
||||
var firstOptionId = $('#CostCenter option:first').val();
|
||||
// Reset the Select2 dropdown to the first option
|
||||
$('#CostCenter').val(firstOptionId).select2('data', {
|
||||
id: firstOptionId,
|
||||
text: $('#CostCenter option:selected').text()
|
||||
});
|
||||
$('#CostCenter').val("-1");
|
||||
|
||||
|
||||
// // Reset the Select2 dropdown to the first option
|
||||
// $('#CostCenter').val(firstOptionId).select2('data', {
|
||||
// id: firstOptionId,
|
||||
// text: $('#CostCenter option:selected').text()
|
||||
// });
|
||||
|
||||
|
||||
removeHiddenRows($('#Items').find('tr').length);
|
||||
@ -605,12 +608,13 @@ if (!empty($Emp)) {
|
||||
</script>
|
||||
<script>
|
||||
function validate() {
|
||||
if ($("option:selected", $("#RequestType")).val() == '-1') {
|
||||
alert('Please Select Request Type ');
|
||||
return false;
|
||||
} else if ($("option:selected", $("#EmpID")).val() == '-1') {
|
||||
if ($("option:selected", $("#EmpID")).val() == '-1') {
|
||||
alert('Please Select Request by');
|
||||
return false;
|
||||
}
|
||||
else if ($("option:selected", $("#RequestType")).val() == '-1') {
|
||||
alert('Please Select Request Type ');
|
||||
return false;
|
||||
} else if ($("#txtRowCount").val().length < 1) {
|
||||
alert('Please Add Line Item');
|
||||
return false;
|
||||
|
||||
@ -176,9 +176,9 @@ if (!empty($Status)) {
|
||||
href="<?php echo base_url() . 'EditRequisitionForm?ReqNo=' . $record->ReqNo . '&ReqType=' . $record->ReqType; ?>"><i
|
||||
class="fas fa-pencil-alt" data-toggle="tooltip"
|
||||
title="<?php echo $record->ReqNo; ?> - Click here to view Requisition details"></i> </a>
|
||||
<a data-toggle="tooltip" onclick="DeleteRow('<?php echo $record->ReqNo; ?>' )"><span
|
||||
class="fas fa-trash"
|
||||
title="<?php echo $record->ReqNo; ?> - Click here to Delete Requisition details"></span></a>
|
||||
<a data-toggle="tooltip" href="#" onclick="DeleteRow('<?php echo $record->ReqNo; ?>' )"><i
|
||||
class="fas fa-trash" data-toggle="tooltip"
|
||||
title="<?php echo $record->ReqNo; ?> - Click here to Delete Requisition details"></i> </a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user