bug fixes : ps
This commit is contained in:
parent
ed22d87e1f
commit
3b8a6af038
@ -400,9 +400,9 @@ class Inwardgateregister extends BaseController
|
||||
$IsThisOpenOrderPO = $this->request->getPost('hiddenIsOpenOrder');
|
||||
$DeliveryChellanOrInvoiceNo = $this->request->getPost('InvoiceNo');
|
||||
$DeliveryChellan = (string)$this->request->getPost('InvoiceDate');
|
||||
$DeliveryChellanDate = get_date_time_format_new($DeliveryChellan);
|
||||
$DeliveryChellanDate = get_date_time_dynamical_format('d-m-Y',$DeliveryChellan);
|
||||
$Mat_Rcvd_Dt = (string)$this->request->getPost('MaterialRcvdDate');
|
||||
$MaterialRcvdDt = get_date_time_format_new($Mat_Rcvd_Dt);
|
||||
$MaterialRcvdDt = get_date_time_dynamical_format('d-m-Y',$Mat_Rcvd_Dt);
|
||||
$VehicleNo = $this->request->getPost('VehicleNo');
|
||||
$TransporterId = $this->request->getPost('TransporterId');
|
||||
$DriverName = $this->request->getPost('DriverName');
|
||||
@ -830,6 +830,8 @@ function viewIGRDetails()
|
||||
}
|
||||
|
||||
log_message('error', 'UpdateIGR igrarr: ' . json_encode($igrarr));
|
||||
$getigrstatus = $this->inwardgateregister_model->getigrstatus($IGRNo);
|
||||
$getigrstatus = $getigrstatus->IGRStatus;
|
||||
$updateigrmaster = $this->inwardgateregister_model->updateigr($igrarr, $IGRNo);
|
||||
log_message('error', "Master updated successfully: " . $updateigrmaster);
|
||||
if(!empty($tableData )){
|
||||
@ -1083,7 +1085,8 @@ function viewIGRDetails()
|
||||
|
||||
|
||||
if ($updateigrmaster > 0 || $updateigrlineitem > 0) {
|
||||
if ($IGRStatus == IGR_CREATED || $IGRStatus == MRIR_CREATED || $IGRStatus == MRIR_APPROVED ) {
|
||||
|
||||
if ($getigrstatus == 'ST027') {
|
||||
|
||||
$result_for_email = $this->inwardgateregister_model->getDetailsforEmail($this->session->get('userId'));
|
||||
$notification = new Notification();
|
||||
@ -1091,7 +1094,7 @@ function viewIGRDetails()
|
||||
for ($i = 0; $i < count($result_for_email['emails']); $i++) {
|
||||
$email_response = $notification->sendEmail([
|
||||
'recipient_email' => $result_for_email['emails'][$i]->email,
|
||||
'subject' => 'Resico Industries - IGR Notification',
|
||||
'subject' => $result_for_email['company'].' - IGR Notification',
|
||||
'description' => 'IGR Number : '.$IGRNo.' is Edited By '.($result_for_email['full_name'] ?? $this->session->get('name')),
|
||||
'company' => $result_for_email['company'],
|
||||
'from_mail'=> $result_for_email['from_mail']
|
||||
|
||||
@ -40,9 +40,10 @@ class Notification
|
||||
if (!empty($ccRecipients)) {
|
||||
$this->email->setCC($ccRecipients);
|
||||
}
|
||||
} else {
|
||||
$this->email->setCC('vadivel.j@venbainfotech.com');
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// $this->email->setCC('vadivel.j@venbainfotech.com');
|
||||
// }
|
||||
|
||||
if ($bcc !== '') {
|
||||
$bccRecipients = explode(',', trim($bcc));
|
||||
@ -50,9 +51,10 @@ class Notification
|
||||
if(!empty($bccRecipients)) {
|
||||
$this->email->setBCC($bccRecipients);
|
||||
}
|
||||
}else{
|
||||
$this->email->setCC('gowtham.m@venbainfotech.com');
|
||||
}
|
||||
// else{
|
||||
// $this->email->setCC('gowtham.m@venbainfotech.com');
|
||||
// }
|
||||
|
||||
if ($this->email->send()) {
|
||||
$message['success'] = 'Email sent successfully';
|
||||
|
||||
@ -32,10 +32,10 @@ if (!function_exists('get_date_time_format')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('get_date_time_format_new')) {
|
||||
function get_date_time_format_new($val)
|
||||
if (!function_exists('get_date_time_dynamical_format')) {
|
||||
function get_date_time_dynamical_format($format,$val)
|
||||
{
|
||||
$date = \DateTime::createFromFormat('d/m/Y', $val, new \DateTimeZone('Asia/Kolkata'));
|
||||
$date = \DateTime::createFromFormat($format, $val, new \DateTimeZone('Asia/Kolkata'));
|
||||
return $date->format('Y-m-d H:i:s');
|
||||
}
|
||||
}
|
||||
|
||||
@ -1233,5 +1233,15 @@ class Inwardgateregister_model extends Model
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getigrstatus($IGRNo){
|
||||
|
||||
$builder = $this->db->table('t_igr_master')
|
||||
->select('IGRStatus')
|
||||
->where('IGRNO',$IGRNo)
|
||||
->get();
|
||||
$result = $builder->getRow();
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -14,30 +14,6 @@
|
||||
outline: 1px solid slategrey;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
// $("#InvoiceDate").datepicker({
|
||||
// maxDate: 'now',
|
||||
// dateFormat: 'dd-mm-yy',
|
||||
// changeMonth: true,
|
||||
// changeYear: true,
|
||||
// yearRange: '-100:+0'
|
||||
// });
|
||||
// $("#MaterialRcvdDate").datepicker({
|
||||
// maxDate: 'now',
|
||||
// dateFormat: 'dd-mm-yy',
|
||||
// changeMonth: true,
|
||||
// changeYear: true,
|
||||
// yearRange: '-100:+0'
|
||||
// }).datepicker("setDate", new Date());
|
||||
|
||||
});
|
||||
//jquery for vechicle masking
|
||||
// $(document).ready(function(){
|
||||
// Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
|
||||
// });
|
||||
</script>
|
||||
<div class="content-page">
|
||||
<div class="content">
|
||||
<!-- Start Content-->
|
||||
@ -115,21 +91,7 @@
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label class="col-form-label">Invoice Date<span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<input class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="InvoiceDate" name="InvoiceDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off">
|
||||
<!-- <input type="text" class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="InvoiceDate" name="InvoiceDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off"> -->
|
||||
<!-- <div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="ri-calendar-event-fill"></i>
|
||||
</span>
|
||||
</div> -->
|
||||
</div><!-- input-group -->
|
||||
|
||||
<!-- <input type="date" class="form-control" id="invoiceDate" name="invoice_date" value="<?= isset($invoice_details['invoice_date']) ? $invoice_details['invoice_date'] : '' ?>" max="<?= date('d/m/Y'); ?>" required> -->
|
||||
<?php
|
||||
// $data = array('name' => 'InvoiceDate', 'value' => set_value('InvoiceDate'), 'id' => 'InvoiceDate', 'class' => 'form-control num', 'required' => 'true', 'autocomplete' => 'off');
|
||||
// echo form_input($data);
|
||||
?>
|
||||
<input class="form-control" data-provide="datepicker" data-date-format="dd-mm-yyyy" data-date-autoclose="true" id="InvoiceDate" name="InvoiceDate" data-date-end-date="<?= date('d-m-Y'); ?>" required autocomplete="off">
|
||||
</div>
|
||||
|
||||
|
||||
@ -137,19 +99,7 @@
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label class="col-form-label">Material Received Date<span class="text-danger">*</span></label>
|
||||
<div class="input-group">
|
||||
<input class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="MaterialRcvdDate" name="MaterialRcvdDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off">
|
||||
<!-- <input type="text" class="form-control" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="MaterialRcvdDate" name="MaterialRcvdDate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
<i class="ri-calendar-event-fill"></i>
|
||||
</span>
|
||||
</div> -->
|
||||
</div>
|
||||
<?php
|
||||
// $data = array('name' => 'MaterialRcvdDate', 'value' => set_value('MaterialRcvdDate'), 'id' => 'MaterialRcvdDate', 'class' => 'form-control num', 'required' => 'true', 'autocomplete' => 'off');
|
||||
// echo form_input($data);
|
||||
?>
|
||||
<input class="form-control" data-provide="datepicker" data-date-format="dd-mm-yyyy" data-date-autoclose="true" id="MaterialRcvdDate" name="MaterialRcvdDate" data-date-end-date="<?= date('d-m-Y'); ?>" required autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
<!-- Flatpickr CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
||||
<!-- Flatpickr JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
|
||||
<style>
|
||||
|
||||
|
||||
@ -97,14 +101,14 @@
|
||||
var mindt = year - 70;
|
||||
var maxdt = year - 15;
|
||||
|
||||
$("#Invoice_Date , #MaterialRcvdDate").datepicker({
|
||||
minDate: new Date(year - SIAStartYear, 1, 1),
|
||||
maxDate: 'now',
|
||||
dateFormat: 'dd-mm-yy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-100:+0'
|
||||
});
|
||||
// $("#Invoice_Date , #MaterialRcvdDate").datepicker({
|
||||
// minDate: new Date(year - SIAStartYear, 1, 1),
|
||||
// maxDate: 'now',
|
||||
// dateFormat: 'dd-mm-yy',
|
||||
// changeMonth: true,
|
||||
// changeYear: true,
|
||||
// yearRange: '-100:+0'
|
||||
// });
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
@ -382,19 +386,13 @@
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">Invoice Date <span class="text-danger">*</span></label>
|
||||
<?php
|
||||
$data = array('name' => 'InvoiceDate', 'value' => set_value('InvoiceDate'), 'id' => 'Invoice_Date', 'class' => 'form-control', 'required=>"true"');
|
||||
echo form_input($data);
|
||||
?>
|
||||
<input type="date" class="form-control" id="InvoiceDate" name="InvoiceDate" required autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">Material Received Date <span class="text-danger">*</span></label>
|
||||
<?php
|
||||
$data = array('name' => 'MaterialRcvdDate', 'value' => set_value('MaterialRcvdDate'), 'id' => 'MaterialRcvdDate', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
<input type="date" class="form-control" id="MaterialRcvdDate" name="MaterialRcvdDate" required autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@ -795,7 +793,7 @@
|
||||
// alert(igrstatus);
|
||||
var buttonContainer = $(".buttonContainer");
|
||||
var modal = $(this); // Reference to the modal itself
|
||||
var invoiceDateInput = modal.find('#Invoice_Date');
|
||||
var invoiceDateInput = modal.find('#InvoiceDate');
|
||||
var invoiceNoInput = modal.find('#Invoice_No');
|
||||
var MaterialRcvdDateInput = modal.find('#MaterialRcvdDate');
|
||||
var VehicleNoInput = modal.find('#Vehicle_No');
|
||||
@ -848,6 +846,8 @@
|
||||
|
||||
var parsedData = JSON.parse(data);
|
||||
console.log(parsedData);
|
||||
flatpickr("#InvoiceDate", { dateFormat: "d-m-Y",});
|
||||
flatpickr("#MaterialRcvdDate", { dateFormat: "d-m-Y",});
|
||||
if (parsedData['details'].length === 0) {
|
||||
console.log("No data available");
|
||||
// Reset all relevant fields and table
|
||||
@ -866,7 +866,7 @@
|
||||
$("#Supplier").val('');
|
||||
$("#Add1").val('');
|
||||
$("#Invoice_No").val('');
|
||||
$("#Invoice_Date").val('');
|
||||
$("#InvoiceDate").val('');
|
||||
$("#MaterialRcvdDate").val('');
|
||||
$("#ser").val('');
|
||||
$("#tbleIGRAppend").empty(); // Clear the table
|
||||
@ -923,7 +923,7 @@
|
||||
// Format dates
|
||||
var dcd = new Date(item.DeliveryChellanDate);
|
||||
var dcd2 = (String(dcd.getDate()).padStart(2, '0') + '-' + (String(dcd.getMonth() + 1).padStart(2, '0')) + '-' + dcd.getFullYear());
|
||||
$("#Invoice_Date").val(dcd2);
|
||||
$("#InvoiceDate").val(dcd2);
|
||||
console.log(item.MaterialRcvdDate)
|
||||
var Mat_rcv_date = (item.MaterialRcvdDate == 'null') ? ' ' : formatDateTime(item.MaterialRcvdDate, 1);
|
||||
$("#MaterialRcvdDate").val(Mat_rcv_date);
|
||||
@ -1099,7 +1099,7 @@
|
||||
// $('#content').loader('show');
|
||||
var igrno = $("#IGRNO1").val();
|
||||
var materialrcv_date = $("#MaterialRcvdDate").val();
|
||||
var inv_date = $("#Invoice_Date").val();
|
||||
var inv_date = $("#InvoiceDate").val();
|
||||
|
||||
$.ajax({
|
||||
data: {
|
||||
@ -1146,7 +1146,7 @@
|
||||
formData.append('po', pono);
|
||||
formData.append('mrc', $("#MaterialRcvdDate").val());
|
||||
formData.append('invno', $("#Invoice_No").val());
|
||||
formData.append('invdate', $("#Invoice_Date").val());
|
||||
formData.append('invdate', $("#InvoiceDate").val());
|
||||
formData.append('vehicle_no', $('#Vehicle_No').val());
|
||||
formData.append('Transporter_Id', $('#Transporter_Id').val());
|
||||
formData.append('driver', $('#Driver_Name').val());
|
||||
@ -1206,7 +1206,7 @@
|
||||
formData.append('po', pono);
|
||||
formData.append('mrc', $("#MaterialRcvdDate").val());
|
||||
formData.append('invno', $("#Invoice_No").val());
|
||||
formData.append('invdate', $("#Invoice_Date").val());
|
||||
formData.append('invdate', $("#InvoiceDate").val());
|
||||
formData.append('vehicle_no', $('#Vehicle_No').val());
|
||||
formData.append('Transporter_Id', $('#Transporter_Id').val());
|
||||
formData.append('driver', $('#Driver_Name').val());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user