CHANGES_FiX : ps
This commit is contained in:
parent
4ded903ae3
commit
e7bfa010fb
@ -50,9 +50,7 @@ class Employeedetails extends BaseController
|
||||
public function index()
|
||||
{
|
||||
$data['userRecords'] = $this->employeedetails_model->employeeListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Employee Listing';
|
||||
|
||||
$this->loadViews("employeeListing", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
|
||||
@ -291,6 +291,7 @@ class Inwardgateregister extends BaseController
|
||||
|
||||
function addNewigr()
|
||||
{
|
||||
#Step 1 IGR Details
|
||||
$PONO = $this->request->getPost('PONO');
|
||||
$DeliveryChellanOrInvoiceNo = $this->request->getPost('InvoiceNo');
|
||||
$DeliveryChellan = (string)$this->request->getPost('InvoiceDate');
|
||||
@ -298,170 +299,181 @@ class Inwardgateregister extends BaseController
|
||||
$Mat_Rcvd_Dt = (string)$this->request->getPost('MaterialRcvdDate');
|
||||
$MaterialRcvdDt = get_date_time_format($Mat_Rcvd_Dt);
|
||||
$VehicleNo = $this->request->getPost('VehicleNo');
|
||||
$CourierNo = $this->request->getPost('CourierNo');
|
||||
$DriverName = $this->request->getPost('DriverName');
|
||||
$DriverMobileNumber = $this->request->getPost('DriverMobileNumber');
|
||||
$CreatedBy = $this->session->get('userId');
|
||||
$RowCount = $this->request->getPost('txtRowCount');
|
||||
$createddt = get_current_date_time();
|
||||
$IGRStatus = IGR_CREATED;
|
||||
$document = null;
|
||||
$igr = array();
|
||||
$igr = array(); // For IGR Master
|
||||
$paymentstatus = NO_PAIDIGR;
|
||||
$constant = $this->request->getPost('hideconstants');
|
||||
$arr = [];
|
||||
$arr = []; // For File to Save
|
||||
$prefile = array();
|
||||
$fileupdated_count = 0;
|
||||
$fileupdated_name = [];
|
||||
|
||||
|
||||
$igr = array('PONO' => $PONO, 'VehicleNo' => $VehicleNo, 'DeliveryChellanOrInvoiceNo' => $DeliveryChellanOrInvoiceNo, 'DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt, 'CourierNo' => $CourierNo, 'IGRStatus' => $IGRStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt, 'PaymentStatus' => $paymentstatus);
|
||||
$igrM = $this->inwardgateregister_model->addigrM($igr);
|
||||
|
||||
$IGRNO = !empty($igrM) ? $igrM : '';
|
||||
// $IGRNO = "IGRNO02695";
|
||||
|
||||
for ($i = 1; $i <= $constant; $i++) {
|
||||
$pathname = 'browseFiles' . $i;
|
||||
$file = $this->request->getFile($pathname);
|
||||
if ($file && $file->isValid()) {
|
||||
$requestfilename = $file->getName();
|
||||
if (!empty($requestfilename)) {
|
||||
|
||||
$files = str_replace(" ", "", $_FILES[$pathname]['name']);
|
||||
$fcount = 0;
|
||||
|
||||
foreach ($prefile as $value) {
|
||||
if ($value == $files) { $fcount++; }
|
||||
}
|
||||
|
||||
if ($fcount == 0) {
|
||||
if ($file->isValid() && !$file->hasMoved()) {
|
||||
$path = ROOTPATH.'public/uploads/Igrfiles/';
|
||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||
$Picture = $file->getName();
|
||||
$file->move($path,$Picture);
|
||||
log_message('error', "File new" . $i . " uploaded successfully. File name: " . $requestfilename);
|
||||
}
|
||||
$arr[] = array($Picture);
|
||||
}
|
||||
|
||||
$prefile[] = $files;
|
||||
}
|
||||
|
||||
} else {
|
||||
log_message('error', "No file uploaded for new" . $i . " or there was an error uploading the file.");
|
||||
}
|
||||
}
|
||||
if (!empty($arr)) {
|
||||
foreach ($arr as $ma) {
|
||||
|
||||
|
||||
$index = 0;
|
||||
foreach ($ma as $key => $value) {
|
||||
$index++;
|
||||
if ($index == 1) {
|
||||
$filename = $value;
|
||||
}
|
||||
}
|
||||
if (!empty($filename)) {
|
||||
|
||||
$myfile = array('FilePath' => $filename, 'PONO' => $PONO, 'IGRNO' => $IGRNO);
|
||||
$this->inwardgateregister_model->fileupload($myfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$OGRStatus = IGR_CREATED;
|
||||
$check_OGRPO = $this->inwardgateregister_model->update_OGR($PONO, $OGRStatus);
|
||||
|
||||
|
||||
$IGRItemStatus = REQITEM_NEW;
|
||||
$TotalPendingQty = '';
|
||||
$TotalPendingQty = (int)$TotalPendingQty;
|
||||
|
||||
for ($i = 1; $i <= $RowCount; $i++) {
|
||||
$MaterialCode = $this->request->getPost('MaterialCode' . $i);
|
||||
$MaterialCode = $MaterialCode !== null && is_string($MaterialCode) ? trim($MaterialCode) : null;
|
||||
$QuantityAsPerInvoice = $this->request->getPost('txtQuantityAsPerInvoice' . $i);
|
||||
$QuantityAsPerInvoice = $QuantityAsPerInvoice !== null && is_string($QuantityAsPerInvoice) ? trim($QuantityAsPerInvoice) : null;
|
||||
$OrderedQuantity = $this->request->getPost('OrderedQuantity' . $i);
|
||||
$OrderedQuantity = $OrderedQuantity !== null && is_string($OrderedQuantity) ? trim($OrderedQuantity) : null;
|
||||
$ReceivedQty = $this->request->getPost('txtReceivedQuantity' . $i);
|
||||
$ReceivedQty = $ReceivedQty !== null && is_string($ReceivedQty) ? trim($ReceivedQty) : null;
|
||||
$PendingQty = $this->request->getPost('txtPendingQty' . $i);
|
||||
$TotalPendingQty = $TotalPendingQty + $PendingQty;
|
||||
|
||||
if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') {
|
||||
$Remarks = $this->request->getPost('txtRemarks' . $i);
|
||||
$ItemStatus = '';
|
||||
if ($PendingQty == 0.00) {
|
||||
$ItemStatus = IGR_CREATED;
|
||||
} else {
|
||||
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
|
||||
}
|
||||
|
||||
$CreatedBy = $this->session->get('userId');
|
||||
|
||||
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
|
||||
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
||||
$igr = array('PONO' => $PONO, 'VehicleNo' => $VehicleNo, 'DeliveryChellanOrInvoiceNo' => $DeliveryChellanOrInvoiceNo, 'DeliveryChellanDate' => $DeliveryChellanDate, 'MaterialRcvdDate' => $MaterialRcvdDt, 'DriverName' => $DriverName, 'DriverMobileNumber' => $DriverMobileNumber,'IGRStatus' => $IGRStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt, 'PaymentStatus' => $paymentstatus);
|
||||
//Saving IGR details Here
|
||||
$IGRNO = $this->inwardgateregister_model->addigrM($igr);
|
||||
if($IGRNO){
|
||||
#Step 2 File Details Gathering
|
||||
if($constant){
|
||||
for ($i = 1; $i <= $constant; $i++) {
|
||||
$pathname = 'browseFiles' . $i;
|
||||
$file = $this->request->getFile($pathname);
|
||||
if ($file && $file->isValid()) {
|
||||
$requestfilename = $file->getName();
|
||||
if (!empty($requestfilename)) {
|
||||
|
||||
$igrlineno = !empty($igrD) ? $igrD : '';
|
||||
$files = str_replace(" ", "", $_FILES[$pathname]['name']);
|
||||
$fcount = 0;
|
||||
|
||||
foreach ($prefile as $value) {
|
||||
if ($value == $files) { $fcount++; }
|
||||
}
|
||||
|
||||
if ($fcount == 0) {
|
||||
if ($file->isValid() && !$file->hasMoved()) {
|
||||
$path = ROOTPATH.'public/uploads/Igrfiles/';
|
||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||
$Picture = $file->getName();
|
||||
$file->move($path,$Picture);
|
||||
log_message('error', "File new" . $i . " uploaded successfully. File name: " . $requestfilename);
|
||||
}
|
||||
$arr[] = array($Picture);
|
||||
}
|
||||
|
||||
$prefile[] = $files;
|
||||
}
|
||||
|
||||
$itemvalue = '';
|
||||
$SupplierId = '';
|
||||
$polineitemvalue = $this->inwardgateregister_model->getitemvalue($PONO, $MaterialCode);
|
||||
|
||||
foreach ($polineitemvalue as $it) {
|
||||
$itemvalue = $it->Rate;
|
||||
$SupplierId = $it->SupplierID;
|
||||
} else {
|
||||
log_message('error', "No file uploaded for new" . $i . " or there was an error uploading the file.");
|
||||
}
|
||||
}
|
||||
#Step 2.1 Saving File Details
|
||||
if (!empty($arr)) {
|
||||
foreach ($arr as $ma) {
|
||||
$index = 0;
|
||||
foreach ($ma as $key => $value) {
|
||||
$index++;
|
||||
if ($index == 1) {
|
||||
$filename = $value;
|
||||
}
|
||||
}
|
||||
if (!empty($filename)) {
|
||||
|
||||
$historydetails = array('MaterialCode' => $MaterialCode, 'Transaction_type' => "Add", 'Ref_Type' => "IGR", 'Ref_No' => $igrlineno, 'Quantity' => $QuantityAsPerInvoice, 'CreatedBy' => $CreatedBy, 'CreatedOn' => $createddt, 'SupplierID' => $SupplierId, 'ItemValue' => $itemvalue);
|
||||
|
||||
|
||||
$this->inwardgateregister_model->addmaterialhistory($historydetails);
|
||||
|
||||
$get_pre_qty = $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
|
||||
$av_qty = 0;
|
||||
if (!empty($get_pre_qty)) {
|
||||
foreach ($get_pre_qty as $gt) {
|
||||
$av_qty = $gt->Current_stock;
|
||||
$myfile = array('FilePath' => $filename, 'PONO' => $PONO, 'IGRNO' => $IGRNO);
|
||||
$fileupdated = $this->inwardgateregister_model->fileupload($myfile);
|
||||
if ($fileupdated) {
|
||||
$fileupdated_count++;
|
||||
$fileupdated_name[] = $filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$currentav_qty = $QuantityAsPerInvoice + $av_qty;
|
||||
|
||||
|
||||
$current_qty = array('Current_stock' => $currentav_qty);
|
||||
|
||||
$this->inwardgateregister_model->addmaterialmaster($current_qty, $MaterialCode);
|
||||
|
||||
$Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO, $MaterialCode);
|
||||
|
||||
$ReceivedQuantity = 0.00;
|
||||
if (count($Recqty) > 0) {
|
||||
foreach ($Recqty as $key) {
|
||||
$ReceivedQuantity = $key->ReceivedQuantity;
|
||||
}
|
||||
}
|
||||
$totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
|
||||
|
||||
$POLineItem = array('ReceivedQuantity' => $totalReceivedqty, 'Status' => $ItemStatus, 'UpdateBY' => $CreatedBy, 'UpdatedOn' => $createddt);
|
||||
|
||||
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem, $PONO, $MaterialCode);
|
||||
}
|
||||
}
|
||||
|
||||
$this->inwardgateregister_model->UpdatePOMaster($PONO, $CreatedBy);
|
||||
if ($TotalPendingQty == 0.00) {
|
||||
#Step 3 Updating OGR Details
|
||||
$OGRStatus = IGR_CREATED;
|
||||
$check_OGRPO = $this->inwardgateregister_model->update_OGR($PONO, $OGRStatus);
|
||||
// echo "step3";
|
||||
// echo "uuu".(int)$check_OGRPO;
|
||||
$IGRItemStatus = REQITEM_NEW;
|
||||
$TotalPendingQty = '';
|
||||
$TotalPendingQty = (int)$TotalPendingQty;
|
||||
// echo "step4";
|
||||
#Step 4 To Update the Date PO MASTER , Material Master , Historydetails and IGR line Item Details Updating OGR Details
|
||||
for ($i = 1; $i <= (int)$RowCount; $i++) {
|
||||
$MaterialCode = $this->request->getPost('MaterialCode' . $i);
|
||||
$MaterialCode = $MaterialCode !== null && is_string($MaterialCode) ? trim($MaterialCode) : null;
|
||||
$QuantityAsPerInvoice = $this->request->getPost('txtQuantityAsPerInvoice' . $i);
|
||||
$QuantityAsPerInvoice = $QuantityAsPerInvoice !== null && is_string($QuantityAsPerInvoice) ? trim($QuantityAsPerInvoice) : null;
|
||||
$OrderedQuantity = $this->request->getPost('OrderedQuantity' . $i);
|
||||
$OrderedQuantity = $OrderedQuantity !== null && is_string($OrderedQuantity) ? trim($OrderedQuantity) : null;
|
||||
$ReceivedQty = $this->request->getPost('txtReceivedQuantity' . $i);
|
||||
$ReceivedQty = $ReceivedQty !== null && is_string($ReceivedQty) ? trim($ReceivedQty) : null;
|
||||
$PendingQty = $this->request->getPost('txtPendingQty' . $i);
|
||||
$TotalPendingQty = $TotalPendingQty + $PendingQty;
|
||||
|
||||
$Newstatus = array('Status' => IGR_CREATED);
|
||||
if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') {
|
||||
$Remarks = $this->request->getPost('txtRemarks' . $i);
|
||||
$ItemStatus = '';
|
||||
if ($PendingQty == 0.00) {
|
||||
$ItemStatus = IGR_CREATED;
|
||||
} else {
|
||||
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
|
||||
}
|
||||
|
||||
$this->inwardgateregister_model->POLineItemsupdatestatus($PONO, $Newstatus);
|
||||
$this->inwardgateregister_model->pomasterupdatestatus($PONO, $Newstatus);
|
||||
} else { /*echo 'error' ;*/
|
||||
}
|
||||
echo "<script>alert('Successfully Created IGR Number:$IGRNO'); window.location.href='viewIGRDetails';</script>";
|
||||
|
||||
$CreatedBy = $this->session->get('userId');
|
||||
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
|
||||
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
||||
$igrlineno = !empty($igrD) ? $igrD : '';
|
||||
$itemvalue = '';
|
||||
$SupplierId = '';
|
||||
$polineitemvalue = $this->inwardgateregister_model->getitemvalue($PONO, $MaterialCode);
|
||||
foreach ($polineitemvalue as $it) {
|
||||
$itemvalue = $it->Rate;
|
||||
$SupplierId = $it->SupplierID;
|
||||
}
|
||||
$historydetails = array('MaterialCode' => $MaterialCode, 'Transaction_type' => "Add", 'Ref_Type' => "IGR", 'Ref_No' => $igrlineno, 'Quantity' => $QuantityAsPerInvoice, 'CreatedBy' => $CreatedBy, 'CreatedOn' => $createddt, 'SupplierID' => $SupplierId, 'ItemValue' => $itemvalue);
|
||||
$this->inwardgateregister_model->addmaterialhistory($historydetails);
|
||||
$get_pre_qty = $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
|
||||
$av_qty = 0;
|
||||
if (!empty($get_pre_qty)) {
|
||||
foreach ($get_pre_qty as $gt) {
|
||||
$av_qty = $gt->Current_stock;
|
||||
}
|
||||
}
|
||||
$currentav_qty = $QuantityAsPerInvoice + $av_qty;
|
||||
$current_qty = array('Current_stock' => $currentav_qty);
|
||||
$this->inwardgateregister_model->addmaterialmaster($current_qty, $MaterialCode);
|
||||
$Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO, $MaterialCode);
|
||||
$ReceivedQuantity = 0.00;
|
||||
if (count($Recqty) > 0) {
|
||||
foreach ($Recqty as $key) {
|
||||
$ReceivedQuantity = $key->ReceivedQuantity;
|
||||
}
|
||||
}
|
||||
$totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
|
||||
$POLineItem = array('ReceivedQuantity' => $totalReceivedqty, 'Status' => $ItemStatus, 'UpdateBY' => $CreatedBy, 'UpdatedOn' => $createddt);
|
||||
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem, $PONO, $MaterialCode);
|
||||
}
|
||||
}
|
||||
|
||||
$this->inwardgateregister_model->UpdatePOMaster($PONO, $CreatedBy);
|
||||
|
||||
#Step 6 Updating Pending Quantity IN PO Master amd Line Item Details.
|
||||
if ($TotalPendingQty == 0.00) {
|
||||
$Newstatus = array('Status' => IGR_CREATED);
|
||||
$this->inwardgateregister_model->POLineItemsupdatestatus($PONO, $Newstatus);
|
||||
$this->inwardgateregister_model->pomasterupdatestatus($PONO, $Newstatus);
|
||||
} else {
|
||||
/*echo 'error' ;*/
|
||||
}
|
||||
#finally
|
||||
$finalstatement = "Successfully Created IGR Number: $IGRNO \n";
|
||||
if ($fileupdated_count > 0) {
|
||||
$finalstatement .= "Number of files updated: $fileupdated_count \n";
|
||||
$finalstatement .= "Files: \n " . implode('\n ', $fileupdated_name);
|
||||
} else {
|
||||
$finalstatement .= "No files to update";
|
||||
}
|
||||
} else {
|
||||
$finalstatement = 'No data available to process IGR.';
|
||||
}
|
||||
|
||||
// Escape newlines and quotes for the JavaScript alert
|
||||
$finalstatement = json_encode($finalstatement);
|
||||
|
||||
|
||||
echo "<script>
|
||||
alert('$finalstatement');
|
||||
window.location.href='viewIGRDetails';
|
||||
</script>";
|
||||
|
||||
}
|
||||
|
||||
function ViewIGR()
|
||||
{
|
||||
|
||||
@ -998,7 +998,9 @@ class User extends BaseController
|
||||
$email = $this->request->getPost('MailID');
|
||||
$SelectedDepartment = (string)$this->request->getPost('txtSelectedDepartment');
|
||||
$comma_separated = explode(':', $SelectedDepartment);
|
||||
|
||||
if(count($comma_separated)== 1 && in_array('DEP27', $comma_separated)){
|
||||
$roleId = '6';
|
||||
}
|
||||
$userInfo = [
|
||||
'email' => $email,
|
||||
'EmpID' => $EmpID,
|
||||
|
||||
@ -145,7 +145,7 @@ class Inwardgateregister_model extends Model
|
||||
{
|
||||
|
||||
$builder = $this->db->table('T_PurchaseOrder_Master POM')
|
||||
->distinct()->select('POM.PONO,POM.ServiceDescription,POM.DeliveryDate,sup.SupplierName,sup.Address,POM.status,OGR_Status,POM.PODate,POM.IsOpenOrder')
|
||||
->distinct()->select('POM.PONO,POM.ServiceDescription,POM.DeliveryDate,sup.SupplierName,sup.Address,POM.status,OGR_Status,POM.PODate,POM.IsOpenOrder,POM.CreatedDate')
|
||||
->select("IF(POM.PODate IS NOT NULL, DATE_FORMAT(POM.PODate, '%Y-%m-%d'), NULL) AS formatted_PODate")
|
||||
->select("IF(POM.IsOpenOrder IS NULL OR POM.IsOpenOrder = '', 0, POM.IsOpenOrder) AS formatted_IsOpenOrder")
|
||||
->join('T_PurchaseOrder_LineItem POL', 'POL.PONO = POM.PONO')
|
||||
@ -157,7 +157,8 @@ class Inwardgateregister_model extends Model
|
||||
->orWhere('POM.Status',IGR_CREATED)
|
||||
->orWhere('POM.Status', MRIR_CREATED)
|
||||
->orWhere('POM.Status', MRIR_APPROVED)
|
||||
->orWhere('POM.Status', OGR_COMPLETE);
|
||||
->orWhere('POM.Status', OGR_COMPLETE)
|
||||
->orderBy('POM.CreatedDate', 'desc');
|
||||
$query = $builder->get();
|
||||
|
||||
$result = $query->getResult();
|
||||
@ -198,22 +199,26 @@ class Inwardgateregister_model extends Model
|
||||
|
||||
function addigrM($igrM)
|
||||
{
|
||||
|
||||
$this->db->transStart();
|
||||
$builder = $this->db->table('T_IGR_Master');
|
||||
$builder->insert($igrM);
|
||||
$aff_row = $this->db->affectedRows();
|
||||
$this->db->transComplete();
|
||||
// echo "ii" .$this->db->getLastQuery()->getQuery();
|
||||
$builder = $this->db->table('T_IGR_Master');
|
||||
$builder->insert($igrM);
|
||||
$YesIAmAffected = $this->db->affectedRows();
|
||||
$this->db->transComplete();
|
||||
|
||||
$result = $this->db->table('T_IGR_Master')
|
||||
->select('IGRNO')
|
||||
->orderBy('CreatedDate', 'desc')
|
||||
->get()
|
||||
->getRow();
|
||||
$result = [];
|
||||
if ($YesIAmAffected > 0) {
|
||||
$result = $this->db->table('T_IGR_Master')
|
||||
->select('IGRNO')
|
||||
->orderBy('CreatedDate', 'desc')
|
||||
->get()
|
||||
->getRow();
|
||||
// $result->IGRNO;
|
||||
}
|
||||
|
||||
$igrno = ($aff_row && $result !== null) ? $result->IGRNO : 0;
|
||||
$igrno = ($YesIAmAffected && !empty($result)) ? $result->IGRNO : '';
|
||||
return $igrno;
|
||||
}
|
||||
}
|
||||
|
||||
function addigrD($igrD)
|
||||
{
|
||||
|
||||
@ -181,8 +181,8 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="cc" style="background-color:#fff;font-size:13px;">
|
||||
<thead>
|
||||
<table id="cc" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
|
||||
<thead style="background-color: #ddd;">
|
||||
<tr>
|
||||
|
||||
<th style="text-align:center">PO No</th>
|
||||
|
||||
@ -262,7 +262,8 @@
|
||||
<aside class="main-sidebar "><!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar"><!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
<ul class="sidebar-menu">
|
||||
|
||||
|
||||
<?php if ($DEPCode != SECURITY) { ?>
|
||||
<!-- Dashboard Starts -->
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>dashboard">
|
||||
@ -278,6 +279,7 @@
|
||||
</a>
|
||||
</li><!--Dashboard active treeview -->
|
||||
<!-- Dashboard Ends -->
|
||||
<?php } ?>
|
||||
|
||||
<!-- Complaint starts -->
|
||||
<li class="treeview">
|
||||
@ -1469,7 +1471,7 @@
|
||||
<li class="treeview">
|
||||
<a href="">
|
||||
<i class="fa fa-check-square-o"></i>
|
||||
<span> Inspection</span>
|
||||
<span> Inward</span>
|
||||
<span class="pull-right-container">
|
||||
<span class="fa fa-angle-down pull-right"></span>
|
||||
</span>
|
||||
@ -1597,24 +1599,46 @@
|
||||
<li class="treeview">
|
||||
<a href="">
|
||||
<i class="fa fa-check-square-o"></i>
|
||||
<span> Inspection</span>
|
||||
<span> Inward</span>
|
||||
<span class="pull-right-container">
|
||||
<span class="fa fa-angle-down pull-right"></span>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li>
|
||||
<a href="<?php echo base_url(); ?>Addigr">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>Inward Gate Register Entry</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo base_url(); ?>Viewigr">
|
||||
<?php $link = ($DEPCode == SECURITY) ? base_url() . 'ViewigrDetails' : base_url() . 'Viewigr'; ?>
|
||||
<a href="<?php echo $link; ?>">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>View Inward Gate Register</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo base_url(); ?>AddOgr">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>Outward Gate Register Entry</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo base_url(); ?>ViewOgr">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>View Outward Gate Register</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($assd != SECURITY || $DEPCode != SECURITY) { ?>
|
||||
<li>
|
||||
<a href="<?php echo base_url(); ?>ViewMRIR">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>View Material Inspection Report</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if ($assd == QUALITY || $DEPCode == QUALITY) { ?>
|
||||
<li>
|
||||
<a href="<?php echo base_url(); ?>quality">
|
||||
<i class="fa fa-list-alt"></i>
|
||||
@ -1633,30 +1657,9 @@
|
||||
<span>Inward Material Test Report</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo base_url(); ?>Addigr">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>Inward Gate Register Entry</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- <li>
|
||||
<a href="<?php echo base_url(); ?>ViewigrDetails">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>View Inward Gate Register</span>
|
||||
</a>
|
||||
</li> -->
|
||||
<li>
|
||||
<a href="<?php echo base_url(); ?>AddOgr">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>Outward Gate Register Entry</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo base_url(); ?>ViewOgr">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>View Outward Gate Register</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
@ -20,11 +20,7 @@
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
|
||||
});
|
||||
//jquery for vechicle masking
|
||||
$(document).ready(function(){
|
||||
Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@ -112,15 +108,15 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Delivery Challan/Inv No</label>
|
||||
<label>Invoice Number</label>
|
||||
<?php
|
||||
$data = array('name' => 'InvoiceNo','value' => set_value('InvoiceNo'),'id'=>'InvoiceNo', 'class' => 'form-control', 'required=>"true"','onkeypress'=>'return isNumberKey(event);' );
|
||||
$data = array('name' => 'InvoiceNo','value' => set_value('InvoiceNo'),'id'=>'InvoiceNo', 'class' => 'form-control', 'required=>"true"' );
|
||||
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Delivery Challan/Inv Date</label>
|
||||
<label>Invoice Date</label>
|
||||
<?php
|
||||
$data = array('name' => 'InvoiceDate','value' => set_value('InvoiceDate'),'id'=>'InvoiceDate', 'class' => 'form-control num', 'required'=>'true' );
|
||||
echo form_input($data);
|
||||
@ -140,17 +136,23 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Vechicle No</label>
|
||||
<label>Vechicle Number</label>
|
||||
<?php
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo'), 'id'=>'VehicleNo', 'class' => 'form-control', );
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo'), 'id'=>'VehicleNo', 'class' => 'form-control', 'maxlength' => '20' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
<span pattern="" required="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Courier No</label>
|
||||
<label>Driver Name</label>
|
||||
<?php
|
||||
$data = array('name' => 'CourierNo','value' => set_value('CourierNo'),'id'=>'CourierNo', 'class' => 'form-control','onkeypress'=>'return isNumberKey(event);' );
|
||||
$data = array('name' => 'DriverName','value' => set_value('DriverName'), 'id'=>'DriverName', 'class' => 'form-control', 'maxlength' => '50' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Driver Mobile Number</label>
|
||||
<?php
|
||||
$data = array('name' => 'DriverMobileNumber','value' => set_value('DriverMobileNumber'), 'id'=>'DriverMobileNumber', 'class' => 'form-control', 'maxlength' => '50' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -292,26 +294,6 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
|
||||
|
||||
<script>
|
||||
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
function validate_Vechicle(){
|
||||
|
||||
var reg = /^^[A-Z]{2}\s[0-9]{2}\s[A-Z]{2}\s[0-9]{4}$/;
|
||||
// alert();
|
||||
var VehicleNo = $('#VehicleNo').val();
|
||||
if(VehicleNo != "")
|
||||
{
|
||||
if (reg.test(VehicleNo) == false)
|
||||
{
|
||||
alert('Please Enter Valid Vehicle Number');
|
||||
return (false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function validate()
|
||||
{
|
||||
var rowcount = $("#txtRowCount").val();
|
||||
@ -368,11 +350,6 @@ function validate()
|
||||
return false;
|
||||
|
||||
}
|
||||
else if($('#VehicleNo').val() == '' && $('#CourierNo').val() == '')
|
||||
{
|
||||
alert('Please Enter the Vechicle / Courier Number');
|
||||
return false;
|
||||
}
|
||||
else if(isExceed == 1 ){
|
||||
|
||||
alert("Advised Quantity is exceeding the Ordered Quantity.Please Contact Purchase Team for further Process ")
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
<th>Invoice No</th>
|
||||
<th>Date of Invoice</th>
|
||||
<th>Vechicle No</th>
|
||||
<th style="display:none">Created Date</th>
|
||||
<th>Courier No</th>
|
||||
<th>File</th>
|
||||
|
||||
@ -71,6 +72,7 @@
|
||||
$date = new DateTime($record->DeliveryChellanDate);
|
||||
echo $date->format('d-m-Y'); ?></td>
|
||||
<td><?php echo $record->VehicleNo ?></td>
|
||||
<td style="display:none"><?php echo $record->CreatedDate ?></td>
|
||||
<td><?php echo $record->CourierNo ?></td>
|
||||
<td><?php if(!empty($record->FilePath)){ ?>
|
||||
<!-- <a target="_blank" href="<?php echo base_url().$record->file ?>"><i class="fa fa-download" ></i></a> -->
|
||||
@ -272,17 +274,17 @@
|
||||
</div>
|
||||
<div class="col-md-12" style=" padding-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
<label>Delivery Challan/Invoice NO </label>
|
||||
<label>Invoice Number </label>
|
||||
<?php
|
||||
$data = array('name' => 'DeliveryChallan/InvoiceNO','value' => set_value('DeliveryChallan/InvoiceNO'),'id'=>'Invoice_No', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
|
||||
$data = array('name' => 'InvoiceNO','value' => set_value('InvoiceNO'),'id'=>'Invoice_No', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
|
||||
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Delivery Challan / Invoice Date </label>
|
||||
<label>Invoice Date </label>
|
||||
<?php
|
||||
$data = array('name' => 'DeliveryChallan/InvoiceDate','value' => set_value('DeliveryChallan/InvoiceDate'),'id'=>'Invoice_Date', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
|
||||
$data = array('name' => 'InvoiceDate','value' => set_value('InvoiceDate'),'id'=>'Invoice_Date', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
|
||||
|
||||
echo form_input($data);
|
||||
?>
|
||||
@ -295,6 +297,31 @@
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style=" padding-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
<label>Vehicle Number</label>
|
||||
<?php
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo'),'id'=>'Vehicle_No', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
|
||||
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Driver Name </label>
|
||||
<?php
|
||||
$data = array('name' => 'DriverName','value' => set_value('DriverName'),'id'=>'Driver_Name', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
|
||||
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Driver Mobile Number </label>
|
||||
<?php
|
||||
$data = array('name' => 'DriverMobileNumber','value' => set_value('DriverMobileNumber'),'id'=>'DriverMobileNumber', 'class' => 'form-control' , 'readonly'=>'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@ -531,7 +558,7 @@ $("#hiddenPONO").val(po);
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"aaSorting": [[ 4, "desc" ]],
|
||||
"aaSorting": [[ 6, "desc" ]],
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
$date = new DateTime($record->DeliveryChellanDate);
|
||||
echo $date->format('d-m-Y'); ?></td>
|
||||
<td><?php echo $record->VehicleNo ?></td>
|
||||
<td><?php echo $record->CourierNo ?></td>
|
||||
<td><?php echo $record->CreatedDate ?></td>
|
||||
<td>
|
||||
<a href="<?php echo base_url().'MRIRcontroller/igrdatavalues?IGRNO='.$record->IGRNO; ?>"><button style="font-size:12px" id="generated" name="generated">Generate MRIR <i class="fa fa-file-text"></i></button></a>
|
||||
</td>
|
||||
@ -174,17 +174,17 @@
|
||||
</div>
|
||||
<div class="col-md-12" style=" padding-bottom: 10px;">
|
||||
<div class="col-md-4">
|
||||
<label>Delivery Challan/Invoice NO </label>
|
||||
<label>Invoice Number </label>
|
||||
<?php
|
||||
$data = array('name' => 'DeliveryChallan/InvoiceNO','value' => set_value('DeliveryChallan/InvoiceNO'),'id'=>'Invoice_No', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
|
||||
$data = array('name' => 'InvoiceNO','value' => set_value('InvoiceNO'),'id'=>'Invoice_No', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
|
||||
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Delivery Challan / Invoice Date </label>
|
||||
<label>Invoice Date </label>
|
||||
<?php
|
||||
$data = array('name' => 'DeliveryChallan/InvoiceDate','value' => set_value('DeliveryChallan/InvoiceDate'),'id'=>'Invoice_Date', 'class' => 'form-control', 'required=>"true"');
|
||||
$data = array('name' => 'InvoiceDate','value' => set_value('InvoiceDate'),'id'=>'Invoice_Date', 'class' => 'form-control', 'required=>"true"');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user