FIX_From date and to date
This commit is contained in:
parent
a6620b84e8
commit
440c772645
@ -311,7 +311,6 @@ class Inwardgateregister extends BaseController
|
|||||||
|
|
||||||
function SaveIGR()
|
function SaveIGR()
|
||||||
{
|
{
|
||||||
//print_r($this->request->getPost());die;
|
|
||||||
#Step 1 IGR Details
|
#Step 1 IGR Details
|
||||||
$PONO = $this->request->getPost('PONO');
|
$PONO = $this->request->getPost('PONO');
|
||||||
$IsThisOpenOrderPO = $this->request->getPost('hiddenIsOpenOrder');
|
$IsThisOpenOrderPO = $this->request->getPost('hiddenIsOpenOrder');
|
||||||
@ -362,9 +361,9 @@ class Inwardgateregister extends BaseController
|
|||||||
// print_r( $igr );die;
|
// print_r( $igr );die;
|
||||||
#Step 4 Calling DB to Save IGR Master
|
#Step 4 Calling DB to Save IGR Master
|
||||||
$IGRNO = $this->inwardgateregister_model->addigrM($igr);
|
$IGRNO = $this->inwardgateregister_model->addigrM($igr);
|
||||||
// Get the uploaded files
|
// echo "master - no problem";
|
||||||
// $IGRNO = "IGRNO02750";
|
// $IGRNO = "IGRNO02767";
|
||||||
// $IGRNO = "IGRNO02734";
|
// print_r($this->request->getPost());die;
|
||||||
if($IGRNO){
|
if($IGRNO){
|
||||||
$files = $this->request->getFiles();
|
$files = $this->request->getFiles();
|
||||||
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
$fileNames = $this->request->getPost('file_name'); // Get user-entered file names
|
||||||
@ -461,20 +460,25 @@ class Inwardgateregister extends BaseController
|
|||||||
$GrossWeightDate = !empty($grossWeightDate) && is_string($grossWeightDate) ? date('Y-m-d H:i:s', strtotime($grossWeightDate)) : null;
|
$GrossWeightDate = !empty($grossWeightDate) && is_string($grossWeightDate) ? date('Y-m-d H:i:s', strtotime($grossWeightDate)) : null;
|
||||||
$TareWeightDate = !empty($tareWeightDate) && is_string($tareWeightDate) ? date('Y-m-d H:i:s', strtotime($tareWeightDate)) : null;
|
$TareWeightDate = !empty($tareWeightDate) && is_string($tareWeightDate) ? date('Y-m-d H:i:s', strtotime($tareWeightDate)) : null;
|
||||||
log_message('error', "TareWeightDate" . $TareWeightDate);
|
log_message('error', "TareWeightDate" . $TareWeightDate);
|
||||||
if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') {
|
|
||||||
$Remarks = $this->request->getPost('txtRemarks' . $i);
|
$Remarks = $this->request->getPost('txtRemarks' . $i);
|
||||||
$ItemStatus = '';
|
$ItemStatus = '';
|
||||||
|
if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') {
|
||||||
if ($PendingQty == 0.00) {
|
if ($PendingQty == 0.00) {
|
||||||
$ItemStatus = $IGRStatus;
|
$ItemStatus = $IGRStatus;
|
||||||
} else {
|
} else {
|
||||||
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
|
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if ((int)$IsThisOpenOrderPO == 1) {
|
||||||
|
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
|
||||||
|
}
|
||||||
|
|
||||||
$CreatedBy = $this->session->get('userId');
|
$CreatedBy = $this->session->get('userId');
|
||||||
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus,'GrossWeight' => (float)$GrossWeight ,'GrossWeightDate'=> $GrossWeightDate,'TareWeight' => (float)$TareWeight ,'TareWeightDate' => $TareWeightDate ,'NetWeight' => (float)$NetWeight, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
|
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus,'GrossWeight' => (float)$GrossWeight ,'GrossWeightDate'=> $GrossWeightDate,'TareWeight' => (float)$TareWeight ,'TareWeightDate' => $TareWeightDate ,'NetWeight' => (float)$NetWeight, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
|
||||||
$igrDetails['WeightFile'] = $requestWeightFileName;
|
$igrDetails['WeightFile'] = $requestWeightFileName;
|
||||||
log_message('error', 'SaveIGR igrDetails result : ' . json_encode($igrDetails));
|
|
||||||
|
|
||||||
|
log_message('error', 'SaveIGR igrDetails result : ' . json_encode($igrDetails));
|
||||||
|
$igrlineno = "";
|
||||||
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
||||||
$igrlineno = !empty($igrD) ? $igrD : '';
|
$igrlineno = !empty($igrD) ? $igrD : '';
|
||||||
|
|
||||||
@ -527,7 +531,7 @@ class Inwardgateregister extends BaseController
|
|||||||
log_message('error', "History updated successfully. History id: " . $history_id);
|
log_message('error', "History updated successfully. History id: " . $history_id);
|
||||||
}
|
}
|
||||||
$get_pre_qty = $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
|
$get_pre_qty = $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
|
||||||
$av_qty = 0;
|
$av_qty = 0; //$av_qty means Avaliable Quantity
|
||||||
if (!empty($get_pre_qty)) {
|
if (!empty($get_pre_qty)) {
|
||||||
foreach ($get_pre_qty as $gt) {
|
foreach ($get_pre_qty as $gt) {
|
||||||
$av_qty = $gt->Current_stock;
|
$av_qty = $gt->Current_stock;
|
||||||
@ -543,49 +547,11 @@ class Inwardgateregister extends BaseController
|
|||||||
$ReceivedQuantity = $key->ReceivedQuantity;
|
$ReceivedQuantity = $key->ReceivedQuantity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
|
$totalReceivedqty = (int)$IsThisOpenOrderPO == 1 ? 0 : $ReceivedQuantity + $QuantityAsPerInvoice ;
|
||||||
|
// $totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
|
||||||
$POLineItem = array('ReceivedQuantity' => $totalReceivedqty, 'Status' => $ItemStatus, 'UpdateBY' => $CreatedBy, 'UpdatedOn' => $createddt);
|
$POLineItem = array('ReceivedQuantity' => $totalReceivedqty, 'Status' => $ItemStatus, 'UpdateBY' => $CreatedBy, 'UpdatedOn' => $createddt);
|
||||||
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem, $PONO, $MaterialCode);
|
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem, $PONO, $MaterialCode);
|
||||||
}
|
}
|
||||||
else if ((int)$IsThisOpenOrderPO == 1) {
|
|
||||||
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
|
|
||||||
|
|
||||||
# Is this open order po means i have to save IGR DETAILS
|
|
||||||
$Remarks = $this->request->getPost('txtRemarks' . $i);
|
|
||||||
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
|
|
||||||
$CreatedBy = $this->session->get('userId');
|
|
||||||
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus,'GrossWeight' => (float)$GrossWeight ,'GrossWeightDate'=> $GrossWeightDate,'TareWeight' => (float)$TareWeight ,'TareWeightDate' => $TareWeightDate ,'NetWeight' => (float)$NetWeight, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
|
|
||||||
$igrDetails['WeightFile'] = $requestWeightFileName;
|
|
||||||
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
|
||||||
$igrD ='';
|
|
||||||
$igrlineno = !empty($igrD) ? $igrD : '';
|
|
||||||
log_message('error', 'SaveIGR igrDetails result : ' . json_encode($igrDetails)." IgrLineNo : ".$igrlineno);
|
|
||||||
$itemvalue = '';
|
|
||||||
$SupplierId = '';
|
|
||||||
$polineitemvalue = $this->inwardgateregister_model->getitemvalue($PONO, $MaterialCode);
|
|
||||||
foreach ($polineitemvalue as $it) {
|
|
||||||
$itemvalue = $it->Rate;
|
|
||||||
$SupplierId = $it->SupplierID;
|
|
||||||
}
|
|
||||||
# Is this open order po means i have to save add material history
|
|
||||||
$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);
|
|
||||||
|
|
||||||
# Is this open order po means i have to save the get received qty in PO lineitem table
|
|
||||||
$get_pre_qty = $this->inwardgateregister_model->get_CurrentQty($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,$IGRStatus);
|
$this->inwardgateregister_model->UpdatePOMaster($PONO, $CreatedBy,$IGRStatus);
|
||||||
|
|
||||||
#Step 9 Updating Pending Quantity IN PO Master amd Line Item Details.
|
#Step 9 Updating Pending Quantity IN PO Master amd Line Item Details.
|
||||||
|
|||||||
@ -51,7 +51,7 @@ class Department_model extends Model
|
|||||||
function departmentListing()
|
function departmentListing()
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_departmentdetails as BaseT')
|
$builder = $this->db->table('t_departmentdetails as BaseT')
|
||||||
->select('BaseT.DepartmentName, BaseT.DEPCode, BaseT.HeadDept, BaseT.IsActive')
|
->select('BaseT.CreatedDt,BaseT.DepartmentName, BaseT.DEPCode, BaseT.HeadDept, BaseT.IsActive')
|
||||||
->orderBy("BaseT.DEPCode", "asc");
|
->orderBy("BaseT.DEPCode", "asc");
|
||||||
$query =$builder->get();
|
$query =$builder->get();
|
||||||
$result = $query->getResult();
|
$result = $query->getResult();
|
||||||
|
|||||||
@ -153,7 +153,7 @@ class Inwardgateregister_model extends Model
|
|||||||
->join('t_purchaseorder_lineitem POL', 'POL.PONO = POM.PONO')
|
->join('t_purchaseorder_lineitem POL', 'POL.PONO = POM.PONO')
|
||||||
->join('t_supplierdetailsn sup', 'POM.SupplierID = sup.SupplierID')
|
->join('t_supplierdetailsn sup', 'POM.SupplierID = sup.SupplierID')
|
||||||
->join('t_ogr_master OGM ', 'POM.PONO = OGM.PONO_INV', 'left')
|
->join('t_ogr_master OGM ', 'POM.PONO = OGM.PONO_INV', 'left')
|
||||||
->where('POM.POType !=', SERVICE)
|
// ->where('POM.POType !=', SERVICE) // due to client requirements - he wants to remove the conidition.
|
||||||
->where('POM.Status', PO_RELEASED)
|
->where('POM.Status', PO_RELEASED)
|
||||||
->orWhere('POM.Status',REQITEM_Emergency_PO_CREATED)
|
->orWhere('POM.Status',REQITEM_Emergency_PO_CREATED)
|
||||||
->orWhere('POM.Status',IGR_CREATED)
|
->orWhere('POM.Status',IGR_CREATED)
|
||||||
@ -164,6 +164,7 @@ class Inwardgateregister_model extends Model
|
|||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
$result = $query->getResult();
|
$result = $query->getResult();
|
||||||
|
// echo $this->db->getLastQuery()->getQuery(); die;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@ -328,11 +329,10 @@ class Inwardgateregister_model extends Model
|
|||||||
->join('t_purchaseorder_master PO', 'igr.PONO = PO.PONO')
|
->join('t_purchaseorder_master PO', 'igr.PONO = PO.PONO')
|
||||||
->join('t_supplierdetailsn` sup', 'PO.SupplierID = sup.SupplierID')
|
->join('t_supplierdetailsn` sup', 'PO.SupplierID = sup.SupplierID')
|
||||||
->where('igr.IGRStatus !=', MRIR_CREATED)
|
->where('igr.IGRStatus !=', MRIR_CREATED)
|
||||||
->where('PO.IsQualityChkReqired', 1)
|
|
||||||
->orderBy('igr.CreatedDate', 'desc');
|
->orderBy('igr.CreatedDate', 'desc');
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
$result = $query->getResult();
|
$result = $query->getResult();
|
||||||
|
// echo $this->db->getLastQuery()->getQuery();die;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,7 +346,7 @@ class Inwardgateregister_model extends Model
|
|||||||
|
|
||||||
$builder = $this->db->table('t_igr_master igr')
|
$builder = $this->db->table('t_igr_master igr')
|
||||||
->distinct()
|
->distinct()
|
||||||
->select('igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity,POM.POType')
|
->select('igr.IGRNO,igr.*,igrd.*,MM.MaterialName,MM.UOM,sup.Address,sup.SupplierName,POM.ServiceDescription,POL.Quantity,POM.POType,POM.IsOpenOrder')
|
||||||
->join('t_igr_details igrd', 'igrd.IGRNO = igr.IGRNO')
|
->join('t_igr_details igrd', 'igrd.IGRNO = igr.IGRNO')
|
||||||
->join('t_purchaseorder_master POM', 'igr.PONO = POM.PONO')
|
->join('t_purchaseorder_master POM', 'igr.PONO = POM.PONO')
|
||||||
->join('t_purchaseorder_lineitem POL', 'igr.PONO = POL.PONO and POL.MaterialCode=igrd.MaterialCode ')
|
->join('t_purchaseorder_lineitem POL', 'igr.PONO = POL.PONO and POL.MaterialCode=igrd.MaterialCode ')
|
||||||
|
|||||||
@ -1578,7 +1578,7 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per,
|
|||||||
|
|
||||||
|
|
||||||
$builder = $this->db->table('t_purchaseorder_master mast')->distinct()
|
$builder = $this->db->table('t_purchaseorder_master mast')->distinct()
|
||||||
->select('mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,rmast.ReqType,mast.Status,mast.CapitalRange,
|
->select('mast.PODate,mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,rmast.ReqType,mast.Status,mast.CapitalRange,
|
||||||
(select FirstName from t_employee_details where EmpID=EID)as Approver,sup.SupplierName,sup.MSME')
|
(select FirstName from t_employee_details where EmpID=EID)as Approver,sup.SupplierName,sup.MSME')
|
||||||
// ->orderBy('mast.Status',"PO_CREATED");
|
// ->orderBy('mast.Status',"PO_CREATED");
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ class User_model extends Model
|
|||||||
function userListing()
|
function userListing()
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_employee_details EMP')
|
$builder = $this->db->table('t_employee_details EMP')
|
||||||
->select('EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,EMP.EmailId,EMP.ContactNumber,
|
->select('user.createdDtm,EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,user.email as EmailId,EMP.ContactNumber,
|
||||||
DEPT.DEPCode,DEPT.DepartmentName,role.role,user.userId')
|
DEPT.DEPCode,DEPT.DepartmentName,role.role,user.userId')
|
||||||
->join('t_departmentdetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode')
|
->join('t_departmentdetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode')
|
||||||
->join('tbl_users user', 'user.EmpID = EMP.EmpID')
|
->join('tbl_users user', 'user.EmpID = EMP.EmpID')
|
||||||
|
|||||||
@ -5,6 +5,40 @@
|
|||||||
margin: 0px !important;
|
margin: 0px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px; /* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
.Date-filter-form input, .Date-filter-form button {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.Date-filter-form button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.Date-filter-form button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
th, td {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
|
|
||||||
@ -20,13 +54,25 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.box-header -->
|
<!-- /.box-header -->
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter" >
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
<table id="example1" class="table table-hover editableTable" style="background-color:#fff;font-size:12px;">
|
<table id="example1" class="table table-hover editableTable" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
<!-- <th>#</th> -->
|
<!-- <th>#</th> -->
|
||||||
<th>PONO#</th>
|
|
||||||
<th>PO Type</th>
|
|
||||||
<th>PO Date</th>
|
<th>PO Date</th>
|
||||||
|
<th>PONO</th>
|
||||||
|
<th>PO Type</th>
|
||||||
<th>Supplier Name</th>
|
<th>Supplier Name</th>
|
||||||
<th>Total Order Value</th>
|
<th>Total Order Value</th>
|
||||||
<th>PO Status</th>
|
<th>PO Status</th>
|
||||||
@ -44,12 +90,12 @@
|
|||||||
?>
|
?>
|
||||||
<tr id="<?php echo $index; ?>">
|
<tr id="<?php echo $index; ?>">
|
||||||
<!-- <td align="left"><?php echo $index; ?></td> -->
|
<!-- <td align="left"><?php echo $index; ?></td> -->
|
||||||
<td><?php echo $record->PONO ?></td>
|
|
||||||
<td><?php echo $record->ReqType ?></td>
|
|
||||||
<td align="right"><?php $Pdt = new DateTime($record->PODate);
|
<td align="right"><?php $Pdt = new DateTime($record->PODate);
|
||||||
$PODate = $Pdt->format('d-m-Y');
|
$PODate = $Pdt->format('d-m-Y');
|
||||||
echo $PODate
|
echo $PODate
|
||||||
?></td>
|
?></td>
|
||||||
|
<td><?php echo $record->PONO ?></td>
|
||||||
|
<td><?php echo $record->ReqType ?></td>
|
||||||
<td><?php echo $record->SupplierName ?></td>
|
<td><?php echo $record->SupplierName ?></td>
|
||||||
<td align="right"><?php echo $record->TotalOrderValue ?></td>
|
<td align="right"><?php echo $record->TotalOrderValue ?></td>
|
||||||
|
|
||||||
@ -121,7 +167,7 @@
|
|||||||
<!-- /.content -->
|
<!-- /.content -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.content-wrapper -->
|
<!-- /.content-wrapper -->
|
||||||
<script>
|
<!-- <script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||||
$('#example1').DataTable({
|
$('#example1').DataTable({
|
||||||
@ -138,5 +184,85 @@
|
|||||||
"autoWidth": false
|
"autoWidth": false
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script> -->
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function (date) {
|
||||||
|
var dateSplit = date.split('-');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#example1').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 0,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[0, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@ -1986,7 +1986,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
<th>SNo</th>
|
<th>SNo</th>
|
||||||
<th>Requisition No</th>
|
<th>Requisition No</th>
|
||||||
<th>Item Code</th>
|
<th>Item Code</th>
|
||||||
<th>Item Description</th>
|
<th>Item Name</th>
|
||||||
<th>Quantity</th>
|
<th>Quantity</th>
|
||||||
<th>UOM</th>
|
<th>UOM</th>
|
||||||
<th>Rate <?php echo "($INRSYM)" ?></th>
|
<th>Rate <?php echo "($INRSYM)" ?></th>
|
||||||
@ -2022,7 +2022,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
<td align="left"><?php echo $index; ?></td>
|
<td align="left"><?php echo $index; ?></td>
|
||||||
<td><?php echo $record->ReqNo ?></td>
|
<td><?php echo $record->ReqNo ?></td>
|
||||||
<td><?php echo $record->MaterialCode ?></td>
|
<td><?php echo $record->MaterialCode ?></td>
|
||||||
<td><?php echo $record->ServiceMaterialDescription ?></td>
|
<td><?php echo $record->MaterialName ?></td>
|
||||||
<td align="right"><?php echo $record->Quantity ?></td>
|
<td align="right"><?php echo $record->Quantity ?></td>
|
||||||
<td><?php echo $record->UOM ?></td>
|
<td><?php echo $record->UOM ?></td>
|
||||||
|
|
||||||
@ -2477,10 +2477,6 @@ if (!empty($getlogpodtl)) {
|
|||||||
<td align="left"><%=BasicAmount%></td>
|
<td align="left"><%=BasicAmount%></td>
|
||||||
<td align="left"><%=Taxvalue%></td>
|
<td align="left"><%=Taxvalue%></td>
|
||||||
<td align="left"><%=TotalValue%></td>
|
<td align="left"><%=TotalValue%></td>
|
||||||
<td align="left"><%=ActualQuantity%></td>
|
|
||||||
<td align="left"><%=ReceivedQuantity%></td>
|
|
||||||
<td align="left"><%=PendingQuantity%></td>
|
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a data-target='#EDITSERVICE' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EDITSERVICE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ReqNo%> Requisition details"></i> </a> <a href='#' onclick="DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a>
|
<a data-target='#EDITSERVICE' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EDITSERVICE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=ReqNo%> Requisition details"></i> </a> <a href='#' onclick="DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del"><span class="glyphicon glyphicon-trash"></span></a>
|
||||||
|
|
||||||
@ -2580,16 +2576,13 @@ if (!empty($getlogpodtl)) {
|
|||||||
index: temp,
|
index: temp,
|
||||||
ReqNo: Reqnumber,
|
ReqNo: Reqnumber,
|
||||||
MaterialCode: materialCode,
|
MaterialCode: materialCode,
|
||||||
MaterialName: ServiceDescription,
|
MaterialName: materialName,
|
||||||
Quantity: quantity,
|
Quantity: quantity,
|
||||||
UOM: uom,
|
UOM: uom,
|
||||||
Rate: itemRate,
|
Rate: itemRate,
|
||||||
BasicAmount: basicval,
|
BasicAmount: basicval,
|
||||||
Taxvalue: TotalTaxValue,
|
Taxvalue: TotalTaxValue,
|
||||||
TotalValue: TotalOrderValue,
|
TotalValue: TotalOrderValue
|
||||||
ActualQuantity: quantity,
|
|
||||||
ReceivedQuantity: 0,
|
|
||||||
PendingQuantity: quantity
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
@ -2684,7 +2677,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
var cellval = tr.cells;
|
var cellval = tr.cells;
|
||||||
|
|
||||||
cellval[2].innerHTML = editMaterialCode;
|
cellval[2].innerHTML = editMaterialCode;
|
||||||
cellval[3].innerHTML = ServiceDescription;
|
cellval[3].innerHTML = editDescription;
|
||||||
cellval[4].innerHTML = editQuantity;
|
cellval[4].innerHTML = editQuantity;
|
||||||
cellval[5].innerHTML = editUOM;
|
cellval[5].innerHTML = editUOM;
|
||||||
cellval[6].innerHTML = parseFloat(itemRate).toFixed(2);
|
cellval[6].innerHTML = parseFloat(itemRate).toFixed(2);
|
||||||
|
|||||||
@ -32,6 +32,29 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style>
|
||||||
|
.dataTables_wrapper .top {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.dataTables_wrapper .dataTables_length {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.dataTables_wrapper .dt-buttons,
|
||||||
|
.dataTables_wrapper .dataTables_filter {
|
||||||
|
float: right;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.dataTables_wrapper .dt-buttons {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.dataTables_wrapper .dataTables_filter {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
|
|
||||||
@ -85,7 +108,6 @@
|
|||||||
<table id="dataTableHistoriek" class="table table-bordered table-hover editableTable" style="background-color:#fff;font-size:12px;">
|
<table id="dataTableHistoriek" class="table table-bordered table-hover editableTable" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="display:none;"></th>
|
|
||||||
<th>PO Date</th>
|
<th>PO Date</th>
|
||||||
<th>PONO#</th>
|
<th>PONO#</th>
|
||||||
<th>PO Type</th>
|
<th>PO Type</th>
|
||||||
@ -105,7 +127,6 @@
|
|||||||
$index = $index + 1;
|
$index = $index + 1;
|
||||||
?>
|
?>
|
||||||
<tr id="<?php echo $index; ?>">
|
<tr id="<?php echo $index; ?>">
|
||||||
<td style="display:none;"><?php echo $record->PODate ?></th>
|
|
||||||
<td align="right"><?php $Pdt = new DateTime($record->PODate);
|
<td align="right"><?php $Pdt = new DateTime($record->PODate);
|
||||||
$PODate = $Pdt->format('d-m-Y');
|
$PODate = $Pdt->format('d-m-Y');
|
||||||
echo $PODate
|
echo $PODate
|
||||||
@ -184,25 +205,58 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.content-wrapper -->
|
<!-- /.content-wrapper -->
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function (date) {
|
||||||
|
var dateSplit = date.split('-');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
// Initialize the DataTable
|
// Initialize the DataTable
|
||||||
var table = $('#dataTableHistoriek').DataTable({
|
var table = $('#dataTableHistoriek').DataTable({
|
||||||
"paging": true,
|
"paging": true,
|
||||||
"lengthChange": true,
|
"lengthChange": true,
|
||||||
|
"scrollCollapse": true,
|
||||||
"searching": true,
|
"searching": true,
|
||||||
"ordering": true,
|
"ordering": true,
|
||||||
"columnDefs": [{
|
"columnDefs": [{
|
||||||
"targets": 1,
|
"targets": 0,
|
||||||
"type": "date-eu"
|
"type": "date-eu"
|
||||||
}],
|
}],
|
||||||
"aaSorting": [
|
"aaSorting": [
|
||||||
[1, "desc"]
|
[0, "desc"]
|
||||||
],
|
],
|
||||||
"info": true,
|
"info": true,
|
||||||
"autoWidth": true,
|
"autoWidth": true,
|
||||||
"pageLength": 10,
|
"pageLength": 10,
|
||||||
"lengthMenu": [10, 25, 50, 100],
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||||
|
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||||
|
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
extend: 'excelHtml5',
|
||||||
|
text: 'Export to Excel',
|
||||||
|
title: 'Purchase Order',
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':visible:not(:last-child)' // Exclude first and last columns
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
extend: 'pdfHtml5',
|
||||||
|
text: 'Export to PDF',
|
||||||
|
title: 'Purchase Order',
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':visible:not(:last-child)' // Exclude first and last columns
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -239,7 +293,7 @@ $(document).ready(function() {
|
|||||||
var fromDate = $("#fromDate").datepicker("getDate");
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
var toDate = $("#toDate").datepicker("getDate");
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
var dateStr = data[1]; // Assuming the date is in the first column
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
// Convert dateStr to Date object
|
// Convert dateStr to Date object
|
||||||
var dateParts = dateStr.split("-");
|
var dateParts = dateStr.split("-");
|
||||||
|
|||||||
@ -184,9 +184,8 @@
|
|||||||
<table id="cc" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
|
<table id="cc" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th style="text-align:center">PO No</th>
|
|
||||||
<th style="text-align:center">PO Date</th>
|
<th style="text-align:center">PO Date</th>
|
||||||
|
<th style="text-align:center">PO No</th>
|
||||||
<th style="text-align:center">Supplier Name</th>
|
<th style="text-align:center">Supplier Name</th>
|
||||||
<th style="text-align:center">Material Name</th>
|
<th style="text-align:center">Material Name</th>
|
||||||
<th style="text-align:center">Category</th>
|
<th style="text-align:center">Category</th>
|
||||||
@ -214,12 +213,13 @@
|
|||||||
<!-- <td><span>
|
<!-- <td><span>
|
||||||
<a href="<?= base_url() ?>report/link_purchase?sid=<?php //echo $rel->sid;?>&ab=<?php //echo $ab;?>&mid=<?php //echo $rel->mid;?>"><?php //echo $rel->supplier_name;?></a>
|
<a href="<?= base_url() ?>report/link_purchase?sid=<?php //echo $rel->sid;?>&ab=<?php //echo $ab;?>&mid=<?php //echo $rel->mid;?>"><?php //echo $rel->supplier_name;?></a>
|
||||||
</span></td>-->
|
</span></td>-->
|
||||||
<td><span>
|
|
||||||
<?php echo $rel->po;?>
|
|
||||||
</span></td>
|
|
||||||
<td><span>
|
<td><span>
|
||||||
<?php echo $rel->pdate;?>
|
<?php echo $rel->pdate;?>
|
||||||
</span></td>
|
</span></td>
|
||||||
|
<td><span>
|
||||||
|
<?php echo $rel->po;?>
|
||||||
|
</span></td>
|
||||||
|
|
||||||
<td><span>
|
<td><span>
|
||||||
|
|
||||||
<?php echo $rel->supplier;?>
|
<?php echo $rel->supplier;?>
|
||||||
@ -371,7 +371,9 @@ $(document).ready(function() {
|
|||||||
"language": {
|
"language": {
|
||||||
"emptyTable": "<center> Data Not Found ! </center>"
|
"emptyTable": "<center> Data Not Found ! </center>"
|
||||||
},
|
},
|
||||||
"aaSorting": [[ 1, "desc" ]],
|
"aaSorting": [[ 0, "desc" ]],
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
"autoWidth": false,
|
"autoWidth": false,
|
||||||
orderCellsTop: true,
|
orderCellsTop: true,
|
||||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||||
|
|||||||
@ -6447,7 +6447,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
index: temp,
|
index: temp,
|
||||||
ReqNo: Reqnumber,
|
ReqNo: Reqnumber,
|
||||||
MaterialCode: materialCode,
|
MaterialCode: materialCode,
|
||||||
MaterialName: ItemServiceDescription,
|
MaterialName: materialName,
|
||||||
Quantity: quantity,
|
Quantity: quantity,
|
||||||
UOM: uom,
|
UOM: uom,
|
||||||
Rate: itemRate,
|
Rate: itemRate,
|
||||||
@ -6801,7 +6801,7 @@ $('#content').loader('hide');
|
|||||||
var tr = document.getElementById(userid);
|
var tr = document.getElementById(userid);
|
||||||
var cellval = tr.cells;
|
var cellval = tr.cells;
|
||||||
cellval[3].innerHTML = editMaterialCode;
|
cellval[3].innerHTML = editMaterialCode;
|
||||||
cellval[3].innerHTML = ItemServiceDescription;
|
cellval[3].innerHTML = editDescription;
|
||||||
cellval[4].innerHTML = editQuantity;
|
cellval[4].innerHTML = editQuantity;
|
||||||
cellval[5].innerHTML = editUOM;
|
cellval[5].innerHTML = editUOM;
|
||||||
cellval[6].innerHTML = itemRate;
|
cellval[6].innerHTML = itemRate;
|
||||||
|
|||||||
@ -1,26 +1,80 @@
|
|||||||
|
<style>
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
/* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form input,
|
||||||
|
.Date-filter-form button {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<CENTER><h3 class="box-title"> Asset Details</h3></CENTER>
|
<CENTER>
|
||||||
|
<h3 class="box-title"> Asset Details</h3>
|
||||||
|
</CENTER>
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 text-right">
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter">
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 text-right">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<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(); ?>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>
|
<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>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
||||||
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:12px;">
|
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Created Date</th>
|
||||||
<th>Asset Code</th>
|
<th>Asset Code</th>
|
||||||
<th>Asset Name</th>
|
<th>Asset Name</th>
|
||||||
<th>Asset Description</th>
|
<th>Asset Description</th>
|
||||||
@ -37,12 +91,16 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($userRecords))
|
if (!empty($userRecords)) {
|
||||||
{
|
foreach ($userRecords as $record) {
|
||||||
foreach($userRecords as $record)
|
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<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 align="right"><?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><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->AssetName ?></td>
|
||||||
<td><?php echo $record->Description ?></td>
|
<td><?php echo $record->Description ?></td>
|
||||||
@ -73,7 +131,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||||
<script type="text/javascript">
|
<!-- <script type="text/javascript">
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||||
@ -90,6 +148,85 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script> -->
|
||||||
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
|
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||||
|
var dateSplit = date.split('-');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#datatable').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 0,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[0, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@ -1,17 +1,71 @@
|
|||||||
|
<style>
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
/* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form input,
|
||||||
|
.Date-filter-form button {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<CENTER><h3 class="box-title"> Configuration Details</h3></CENTER>
|
<CENTER>
|
||||||
|
<h3 class="box-title"> Configuration Details</h3>
|
||||||
|
</CENTER>
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 text-right">
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter">
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 text-right">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<a class="btn btn-success" href="<?php echo base_url(); ?>addconfig">Add New Configuration</a>
|
<a class="btn btn-success" href="<?php echo base_url(); ?>addconfig">Add New Configuration</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<?php
|
<?php
|
||||||
helper('form');
|
helper('form');
|
||||||
@ -44,10 +98,10 @@
|
|||||||
<table id="configtable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<table id="configtable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Create Date</th>
|
||||||
<th>Configuration ID</th>
|
<th>Configuration ID</th>
|
||||||
<th>Configuration Name</th>
|
<th>Configuration Name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Create Date</th>
|
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -57,7 +111,12 @@
|
|||||||
foreach ($userRecords as $record) {
|
foreach ($userRecords as $record) {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<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 align="right"><?php echo $cdate; ?> </td>
|
||||||
<td><?php echo $record->Config_ID ?></td>
|
<td><?php echo $record->Config_ID ?></td>
|
||||||
<td><?php echo $record->ConfigName ?></td>
|
<td><?php echo $record->ConfigName ?></td>
|
||||||
<td><?php echo $record->Comments ?> </td>
|
<td><?php echo $record->Comments ?> </td>
|
||||||
@ -67,12 +126,7 @@
|
|||||||
$CreatedDate = $dt->format('d-m-Y');
|
$CreatedDate = $dt->format('d-m-Y');
|
||||||
echo $CreatedDate ?> </td> -->
|
echo $CreatedDate ?> </td> -->
|
||||||
|
|
||||||
<?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 align="right"><?php echo $cdate; ?> </td>
|
|
||||||
|
|
||||||
<td><a href="<?php echo base_url() . 'configurationctrl/editconfig?ConfigID=' . $record->Config_ID; ?>"><i class="fa fa-pencil"></i> </a>
|
<td><a href="<?php echo base_url() . 'configurationctrl/editconfig?ConfigID=' . $record->Config_ID; ?>"><i class="fa fa-pencil"></i> </a>
|
||||||
<!-- <a><i class="fa fa-trash"></i> </a> -->
|
<!-- <a><i class="fa fa-trash"></i> </a> -->
|
||||||
@ -94,7 +148,7 @@
|
|||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
|
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||||
<script type="text/javascript">
|
<!-- <script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||||
$('#configtable').DataTable({
|
$('#configtable').DataTable({
|
||||||
@ -110,4 +164,84 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
</script> -->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||||
|
var dateSplit = date.split('-');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#configtable').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 0,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[0, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -1,3 +1,34 @@
|
|||||||
|
<style>
|
||||||
|
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px; /* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
.Date-filter-form input, .Date-filter-form button {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.Date-filter-form button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.Date-filter-form button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
@ -8,19 +39,31 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 text-right">
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter" >
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 text-right">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<a data-toggle="modal" href="#ccwizard" data-id="0" data-name="" class="btn btn-success">Add New Cost List</a>
|
<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>
|
<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>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="display:none;"></th>
|
|
||||||
<th>Create Date</th>
|
<th>Create Date</th>
|
||||||
<th>Create Time</th>
|
<th>Create Time</th>
|
||||||
<th>Cost Center Code</th>
|
<th>Cost Center Code</th>
|
||||||
@ -34,14 +77,11 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!empty($userRecords)) {
|
if (!empty($userRecords)) {
|
||||||
foreach ($userRecords as $record) {
|
foreach ($userRecords as $record) {
|
||||||
|
|
||||||
|
|
||||||
$createdat = new DateTime($record->CreatedDate);
|
$createdat = new DateTime($record->CreatedDate);
|
||||||
$date = $createdat->format('d-m-Y');
|
$date = $createdat->format('d-m-Y');
|
||||||
$time = $createdat->format('h:i A');
|
$time = $createdat->format('h:i A');
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="display:none;"><?php echo $record->CreatedDate ?></td>
|
|
||||||
<td align="right"><?php echo $date; ?></td>
|
<td align="right"><?php echo $date; ?></td>
|
||||||
<td align="right"><?php echo $time; ?></td>
|
<td align="right"><?php echo $time; ?></td>
|
||||||
<td><?php echo $record->code ?></td>
|
<td><?php echo $record->code ?></td>
|
||||||
@ -123,22 +163,22 @@
|
|||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
// $(function() {
|
||||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm A');
|
// $.fn.dataTable.moment('DD-MM-YYYY HH:mm A');
|
||||||
$('#datatable').DataTable({
|
// $('#datatable').DataTable({
|
||||||
"paging": true,
|
// "paging": true,
|
||||||
"lengthChange": true,
|
// "lengthChange": true,
|
||||||
"searching": true,
|
// "searching": true,
|
||||||
"ordering": true,
|
// "ordering": true,
|
||||||
// "columnDefs" : [{"targets":3, "type":"date-eu"}],
|
// // "columnDefs" : [{"targets":3, "type":"date-eu"}],
|
||||||
"aaSorting": [
|
// "aaSorting": [
|
||||||
[3, "desc"]
|
// [3, "desc"]
|
||||||
],
|
// ],
|
||||||
"info": true,
|
// "info": true,
|
||||||
"autoWidth": true
|
// "autoWidth": true
|
||||||
|
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -188,5 +228,84 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function (date) {
|
||||||
|
var dateSplit = date.split('-');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#datatable').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 0,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[0, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
|
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
|
||||||
@ -4,6 +4,43 @@
|
|||||||
// f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
|
// f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
|
||||||
// collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
|
// collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
/* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form input,
|
||||||
|
.Date-filter-form button {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<!-- <section class="content-header"> -->
|
<!-- <section class="content-header"> -->
|
||||||
@ -39,14 +76,30 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<center> <h3 class="box-title">Department Details</h3></center>
|
<center>
|
||||||
|
<h3 class="box-title">Department Details</h3>
|
||||||
|
</center>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<!-- </section> -->
|
<!-- </section> -->
|
||||||
<!-- <section class="content"> -->
|
<!-- <section class="content"> -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 text-right">
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter">
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 text-right">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<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(); ?>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>
|
<a class="btn btn-success" href="<?php echo base_url(); ?>exportdepartment">Export department details <i class="fa fa-download" aira-hidden="true"></i></a>
|
||||||
@ -55,10 +108,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
||||||
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:12px;">
|
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Create Date</th>
|
||||||
<th>Department Code</th>
|
<th>Department Code</th>
|
||||||
<th>Department Name</th>
|
<th>Department Name</th>
|
||||||
<th>Head Department</th>
|
<th>Head Department</th>
|
||||||
@ -68,18 +121,25 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($userRecords))
|
if (!empty($userRecords)) {
|
||||||
{
|
foreach ($userRecords as $record) {
|
||||||
foreach($userRecords as $record)
|
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<!-- <td title=" - Click here to view department details"> </td> -->
|
<!-- <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 align="right"><?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><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->DepartmentName ?></td>
|
||||||
<td><?php echo $record->HeadDept ?></td>
|
<td><?php echo $record->HeadDept ?></td>
|
||||||
<td><?php if($record->IsActive == 1){echo "Active";}
|
<td><?php if ($record->IsActive == 1) {
|
||||||
else { echo "In Active";} ?></td>
|
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> </a></td> -->
|
<!-- <td><a data-toggle="tooltip" "><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the department details"></i> </a></td> -->
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -98,7 +158,7 @@
|
|||||||
|
|
||||||
</div><!-- content wrapper div closed -->
|
</div><!-- content wrapper div closed -->
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
<!-- <script type="text/javascript">
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
@ -113,4 +173,84 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
</script> -->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||||
|
var dateSplit = date.split('-');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#datatable').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 0,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[0, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -1293,7 +1293,7 @@ foreach ($PaymentTerms as $TER) {
|
|||||||
<th>SNo</th>
|
<th>SNo</th>
|
||||||
<th>Requisition No</th>
|
<th>Requisition No</th>
|
||||||
<th>Item Code</th>
|
<th>Item Code</th>
|
||||||
<th>Item Description</th>
|
<th>Item Name</th>
|
||||||
<th>Quantity</th>
|
<th>Quantity</th>
|
||||||
<th>UOM</th>
|
<th>UOM</th>
|
||||||
<th>Rate<?php echo $INRSYM ?></th>
|
<th>Rate<?php echo $INRSYM ?></th>
|
||||||
@ -1331,7 +1331,7 @@ foreach ($PaymentTerms as $TER) {
|
|||||||
<td align="left"><?php echo $index; ?></td>
|
<td align="left"><?php echo $index; ?></td>
|
||||||
<td><?php echo $record->ReqNo ?></td>
|
<td><?php echo $record->ReqNo ?></td>
|
||||||
<td><?php echo $record->MaterialCode ?></td>
|
<td><?php echo $record->MaterialCode ?></td>
|
||||||
<td><?php echo $record->ServiceMaterialDescription ?></td>
|
<td><?php echo $record->MaterialName ?></td>
|
||||||
<td align="right"><?php echo $record->Quantity ?></td>
|
<td align="right"><?php echo $record->Quantity ?></td>
|
||||||
<td><?php echo $record->UOM ?></td>
|
<td><?php echo $record->UOM ?></td>
|
||||||
<td align="right"><?php echo $record->Rate ?></td>
|
<td align="right"><?php echo $record->Rate ?></td>
|
||||||
@ -1755,7 +1755,7 @@ foreach ($PaymentTerms as $TER) {
|
|||||||
var cellval = tr.cells;
|
var cellval = tr.cells;
|
||||||
|
|
||||||
cellval[2].innerHTML = editMaterialCode;
|
cellval[2].innerHTML = editMaterialCode;
|
||||||
cellval[3].innerHTML = materialspecialinstruction;
|
cellval[3].innerHTML = editDescription;
|
||||||
cellval[4].innerHTML = editQuantity;
|
cellval[4].innerHTML = editQuantity;
|
||||||
cellval[5].innerHTML = editUOM;
|
cellval[5].innerHTML = editUOM;
|
||||||
cellval[6].innerHTML = parseFloat(itemRate).toFixed(2);
|
cellval[6].innerHTML = parseFloat(itemRate).toFixed(2);
|
||||||
|
|||||||
@ -2,24 +2,66 @@
|
|||||||
#datatable_filter {
|
#datatable_filter {
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
#datatable_wrapper .row .col-sm-4 {
|
#datatable_wrapper .row .col-sm-4 {
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
#datatable_paginate .pagination {
|
#datatable_paginate .pagination {
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
margin: 0 0 15px;
|
margin: 0 0 15px;
|
||||||
}
|
}
|
||||||
#datatable_wrapper .row:nth-child(3), #datatable_wrapper .row:nth-child(1){
|
|
||||||
|
#datatable_wrapper .row:nth-child(3),
|
||||||
|
#datatable_wrapper .row:nth-child(1) {
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#datatable_info {
|
#datatable_info {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_wrapper {
|
.dataTables_wrapper {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
/* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form input,
|
||||||
|
.Date-filter-form button {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
@ -49,23 +91,39 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<CENTER><h3 class="box-title"> Employee Details</h3></CENTER>
|
<CENTER>
|
||||||
|
<h3 class="box-title"> Employee Details</h3>
|
||||||
|
</CENTER>
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 text-right">
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter">
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 text-right">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<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(); ?>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>
|
<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>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
||||||
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
|
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Created Date</th>
|
||||||
<th>Emp ID</th>
|
<th>Emp ID</th>
|
||||||
<th>Employee Name</th>
|
<th>Employee Name</th>
|
||||||
<th>Contact Number</th>
|
<th>Contact Number</th>
|
||||||
@ -76,12 +134,16 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($userRecords))
|
if (!empty($userRecords)) {
|
||||||
{
|
foreach ($userRecords as $record) {
|
||||||
foreach($userRecords as $record)
|
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
<?php if (date('d-m-Y', strtotime($record->Created_date)) == "30-11--0001") {
|
||||||
|
$cdate = '00-00-0000';
|
||||||
|
} else {
|
||||||
|
$cdate = date('d-m-Y', strtotime($record->Created_date));
|
||||||
|
} ?>
|
||||||
|
<td align="right"><?php echo $cdate; ?></td>
|
||||||
<td><u><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><u><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><?php echo $record->FirstName; ?></td>
|
<td><?php echo $record->FirstName; ?></td>
|
||||||
<td><?php echo $record->ContactNumber ?></td>
|
<td><?php echo $record->ContactNumber ?></td>
|
||||||
@ -106,7 +168,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
<!-- <script type="text/javascript">
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
@ -123,4 +185,84 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
</script> -->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||||
|
var dateSplit = date.split('-');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#datatable').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 0,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[0, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -87,7 +87,6 @@
|
|||||||
</section>
|
</section>
|
||||||
<section class="content" style="margin: 15px;"><br />
|
<section class="content" style="margin: 15px;"><br />
|
||||||
<div style="border:2px solid #333;">
|
<div style="border:2px solid #333;">
|
||||||
|
|
||||||
<form action="<?php echo base_url() ?>SaveIGR" method="post" enctype="multipart/form-data">
|
<form action="<?php echo base_url() ?>SaveIGR" method="post" enctype="multipart/form-data">
|
||||||
<div class="row"><br /><br />
|
<div class="row"><br /><br />
|
||||||
<div id="content"> </div>
|
<div id="content"> </div>
|
||||||
@ -462,6 +461,7 @@
|
|||||||
$('#txtRowCount').val('');
|
$('#txtRowCount').val('');
|
||||||
var id = $('#PONO').val();
|
var id = $('#PONO').val();
|
||||||
var status = '';
|
var status = '';
|
||||||
|
var isOpenOrder = 0;
|
||||||
if (id != '-1') {
|
if (id != '-1') {
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
var y = <?php echo json_encode($PO_NO, JSON_PRETTY_PRINT) ?>;
|
var y = <?php echo json_encode($PO_NO, JSON_PRETTY_PRINT) ?>;
|
||||||
@ -473,7 +473,7 @@
|
|||||||
$("#po").val(obj.PONO);
|
$("#po").val(obj.PONO);
|
||||||
$("#Sup").val(obj.SupplierName);
|
$("#Sup").val(obj.SupplierName);
|
||||||
$("#hiddenIsOpenOrder").val(obj.IsOpenOrder);
|
$("#hiddenIsOpenOrder").val(obj.IsOpenOrder);
|
||||||
var isOpenOrder = parseInt(obj.IsOpenOrder, 2);
|
isOpenOrder = parseInt(obj.IsOpenOrder ? obj.IsOpenOrder : "0", 2);
|
||||||
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open";
|
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open";
|
||||||
$('.help-block').text(formatted_IsOpenOrder);
|
$('.help-block').text(formatted_IsOpenOrder);
|
||||||
var button_text_for_IGRDraftLink = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "Save as Draft IGR" : "Save as Open IGR";
|
var button_text_for_IGRDraftLink = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "Save as Draft IGR" : "Save as Open IGR";
|
||||||
@ -510,7 +510,7 @@
|
|||||||
'<td name="UOM">' + item.UOM + '</td>' +
|
'<td name="UOM">' + item.UOM + '</td>' +
|
||||||
'<td name="Quantity1' + i + '" id="Quantity_1' + i + '">' + item.Quantity + '</td>' +
|
'<td name="Quantity1' + i + '" id="Quantity_1' + i + '">' + item.Quantity + '</td>' +
|
||||||
'<td name="ReceivedQuantity' + i + '" id="ReceivedQuantity' + i + '">' + item.ReceivedQuantity + '</td>' +
|
'<td name="ReceivedQuantity' + i + '" id="ReceivedQuantity' + i + '">' + item.ReceivedQuantity + '</td>' +
|
||||||
'<td name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + item.PendingQty + '</td>' +
|
'<td name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + ((isOpenOrder === 0 || isNaN(isOpenOrder)) ? item.PendingQty : 0 ) + '</td>' +
|
||||||
'<td data-name="sel" ><input type="text" onchange="validateReceivedQuantity(' + i + ')"id="QuantityAsPerInvoice' + i + '" name="QuantityAsPerInvoice' + i + '" value="" onkeypress="return isNumberKey(event);" autocomplete="off"></td>' +
|
'<td data-name="sel" ><input type="text" onchange="validateReceivedQuantity(' + i + ')"id="QuantityAsPerInvoice' + i + '" name="QuantityAsPerInvoice' + i + '" value="" onkeypress="return isNumberKey(event);" autocomplete="off"></td>' +
|
||||||
'<td><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" autocomplete="off"> </td>' +
|
'<td><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" autocomplete="off"> </td>' +
|
||||||
'<td><a target="_blank" data-toggle="modal" data-target="#WeightCalculator" title="Weight Calculator" data-index="' + i + '" data-material="' + item.MaterialName + '"><i class="fa fa-solid fa-truck" style="text-align: center;"></i></a> </td>' +
|
'<td><a target="_blank" data-toggle="modal" data-target="#WeightCalculator" title="Weight Calculator" data-index="' + i + '" data-material="' + item.MaterialName + '"><i class="fa fa-solid fa-truck" style="text-align: center;"></i></a> </td>' +
|
||||||
@ -554,7 +554,7 @@
|
|||||||
type: 'hidden',
|
type: 'hidden',
|
||||||
id: 'txtPendingQty' + i,
|
id: 'txtPendingQty' + i,
|
||||||
name: 'txtPendingQty' + i,
|
name: 'txtPendingQty' + i,
|
||||||
value: item.PendingQty
|
value: ((isOpenOrder === 0 || isNaN(isOpenOrder)) ? item.PendingQty : 0 )
|
||||||
}).appendTo('form');
|
}).appendTo('form');
|
||||||
|
|
||||||
$('<input>').attr({
|
$('<input>').attr({
|
||||||
@ -673,8 +673,11 @@
|
|||||||
// InvoiceQty
|
// InvoiceQty
|
||||||
return true;
|
return true;
|
||||||
}}else{
|
}}else{
|
||||||
|
console.log(InvoiceQty + RecQty);
|
||||||
|
$('#PendingQuantity' + Rowid).text(0.00);
|
||||||
$('#txtPendingQty' + Rowid).val(0.00);
|
$('#txtPendingQty' + Rowid).val(0.00);
|
||||||
$("#txtQuantityAsPerInvoice" + Rowid).val(0.00);
|
$("#ReceivedQuantity" + Rowid).val(InvoiceQty + RecQty);
|
||||||
|
$("#txtQuantityAsPerInvoice" + Rowid).val((InvoiceQty + RecQty));
|
||||||
// InvoiceQty
|
// InvoiceQty
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -764,7 +764,8 @@
|
|||||||
<td class="text-right" style="border:0em;"><?php echo number_alignment(abs(array_sum($igst))); ?></td>
|
<td class="text-right" style="border:0em;"><?php echo number_alignment(abs(array_sum($igst))); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if(isset($reveuetax)){ ?>
|
<?php $AfterPackagingValue = []; $AfterFreightValue= []; $AfterDiscount =[];
|
||||||
|
if(isset($reveuetax)){ ?>
|
||||||
|
|
||||||
<?php foreach ($reveuetax as $key => $value) {
|
<?php foreach ($reveuetax as $key => $value) {
|
||||||
$AfterPackagingValue[] = isset($value->AfterPackagingValue) ? $value->AfterPackagingValue : 0.00;
|
$AfterPackagingValue[] = isset($value->AfterPackagingValue) ? $value->AfterPackagingValue : 0.00;
|
||||||
|
|||||||
@ -1,69 +1,131 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
//echo "OUTIF";
|
//echo "OUTIF";
|
||||||
if(empty($Status))
|
if (empty($Status)) {
|
||||||
{
|
|
||||||
//echo "INIF";
|
//echo "INIF";
|
||||||
//print_r($Status);
|
//print_r($Status);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.table-bordered>thead>tr>th, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>tbody>tr>td, .table-bordered>tfoot>tr>td {border: 1px solid #333;}
|
.table-bordered>thead>tr>th,
|
||||||
|
.table-bordered>tbody>tr>th,
|
||||||
|
.table-bordered>tfoot>tr>th,
|
||||||
|
.table-bordered>thead>tr>td,
|
||||||
|
.table-bordered>tbody>tr>td,
|
||||||
|
.table-bordered>tfoot>tr>td {
|
||||||
|
border: 1px solid #333;
|
||||||
|
}
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
width: 1000px ! important;
|
width: 1000px ! important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal
|
.modal {
|
||||||
{
|
|
||||||
padding-right: 25% ! important;
|
padding-right: 25% ! important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_filter {
|
#Requisition_filter {
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_wrapper .row .col-sm-4 {
|
#Requisition_wrapper .row .col-sm-4 {
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_paginate .pagination {
|
#Requisition_paginate .pagination {
|
||||||
flex-basis: 50%;
|
flex-basis: 50%;
|
||||||
float: inline-end;
|
float: inline-end;
|
||||||
margin: 0 0 15px;
|
margin: 0 0 15px;
|
||||||
}
|
}
|
||||||
#Requisition_wrapper .row:nth-child(3), #Requisition_wrapper .row:nth-child(1){
|
|
||||||
|
#Requisition_wrapper .row:nth-child(3),
|
||||||
|
#Requisition_wrapper .row:nth-child(1) {
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Requisition_info {
|
#Requisition_info {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_wrapper {
|
.dataTables_wrapper {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style>
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
/* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form input,
|
||||||
|
.Date-filter-form button {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<CENTER><h3 class="box-title">Purchase Order Approve List </h3></CENTER>
|
<CENTER>
|
||||||
|
<h3 class="box-title">Purchase Order Approve List </h3>
|
||||||
|
</CENTER>
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter">
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
<table id="Requisition" class="table table-hover" style="background-color:#fff;font-size:12px;">
|
<table id="Requisition" class="table table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
|
|
||||||
|
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>PO Date</th>
|
||||||
<th>Purchase Order Number</th>
|
<th>Purchase Order Number</th>
|
||||||
<th>Purchase Order Type</th>
|
<th>Purchase Order Type</th>
|
||||||
<th>Cost Center Name</th>
|
<th>Cost Center Name</th>
|
||||||
<th>Supplier Name</th>
|
<th>Supplier Name</th>
|
||||||
<th>Created By</th>
|
<th>Created By</th>
|
||||||
<th>Department</th>
|
<th>Department</th>
|
||||||
<th>Created Date</th>
|
<!-- <th>Created Date</th> -->
|
||||||
|
|
||||||
<th>Total Order Value</th>
|
<th>Total Order Value</th>
|
||||||
<th>Approved By</th>
|
<th>Approved By</th>
|
||||||
@ -77,32 +139,30 @@ if(empty($Status))
|
|||||||
<tbody id="ApprovalList">
|
<tbody id="ApprovalList">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(!empty($AppList))
|
if (!empty($AppList)) {
|
||||||
{
|
|
||||||
$index = 0;
|
$index = 0;
|
||||||
foreach($AppList as $record)
|
foreach ($AppList as $record) {
|
||||||
{
|
|
||||||
$index = $index + 1;
|
$index = $index + 1;
|
||||||
//echo $index;
|
//echo $index;
|
||||||
?>
|
?>
|
||||||
<tr id="<?php echo $index ?>">
|
<tr id="<?php echo $index ?>">
|
||||||
|
|
||||||
|
<td align="right" style="width:75px"><?php $podt = new DateTime($record->PODate);
|
||||||
|
$PODate = $podt->format('d-m-Y');
|
||||||
|
echo $PODate;
|
||||||
|
?></td>
|
||||||
<td><a target="_blank" href="<?php echo base_url() ?>purchaseorder/CreatePOPrint?PONO=<?php echo $record->PONO ?>&ReqType=<?php echo $record->RType ?>" data-id="<%=index%>" data-userid="<?php echo $record->PONO ?>"><u><?php echo $record->PONO ?> </td>
|
<td><a target="_blank" href="<?php echo base_url() ?>purchaseorder/CreatePOPrint?PONO=<?php echo $record->PONO ?>&ReqType=<?php echo $record->RType ?>" data-id="<%=index%>" data-userid="<?php echo $record->PONO ?>"><u><?php echo $record->PONO ?> </td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<td><?php echo $record->RType ?> </td>
|
<td><?php echo $record->RType ?> </td>
|
||||||
<td><?php echo $record->CostCenterName ?> </td>
|
<td><?php echo $record->CostCenterName ?> </td>
|
||||||
<!-- <td><?php // echo $record->CostCenterCode?></td> -->
|
<!-- <td><?php // echo $record->CostCenterCode
|
||||||
|
?></td> -->
|
||||||
<td><?php echo $record->SupplierName ?></td>
|
<td><?php echo $record->SupplierName ?></td>
|
||||||
<td><?php echo $record->FirstName ?></td>
|
<td><?php echo $record->FirstName ?></td>
|
||||||
<td><?php echo $record->DepartmentName ?></td>
|
<td><?php echo $record->DepartmentName ?></td>
|
||||||
<td align="right"><?php $Cdt = new DateTime($record->CreatedDate);
|
<!-- <td align="right"><?php // $Cdt = new DateTime($record->CreatedDate);
|
||||||
$CreatedDate = $Cdt->format('d-m-Y');
|
// $CreatedDate = $Cdt->format('d-m-Y');
|
||||||
echo $CreatedDate;
|
// echo $CreatedDate;
|
||||||
?></td>
|
?></td> -->
|
||||||
|
|
||||||
|
|
||||||
<td align="right"><?php echo $record->TotalOrderValue ?></td>
|
<td align="right"><?php echo $record->TotalOrderValue ?></td>
|
||||||
@ -154,9 +214,9 @@ if(empty($Status))
|
|||||||
<td contenteditable="true" id="remarks<?php echo $index; ?>"><?php
|
<td contenteditable="true" id="remarks<?php echo $index; ?>"><?php
|
||||||
|
|
||||||
if ($record->Remarks == '') {
|
if ($record->Remarks == '') {
|
||||||
|
} else {
|
||||||
}
|
echo $record->Remarks;
|
||||||
else{ echo $record->Remarks; }?></td>
|
} ?></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -164,7 +224,6 @@ if(empty($Status))
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -183,8 +242,7 @@ if(empty($Status))
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function showvalue(PONO,value,Status,Remark)
|
function showvalue(PONO, value, Status, Remark) {
|
||||||
{
|
|
||||||
var Remarks = '';
|
var Remarks = '';
|
||||||
var curtremarks = document.getElementById('remarks' + value + '').innerHTML;
|
var curtremarks = document.getElementById('remarks' + value + '').innerHTML;
|
||||||
//var curtremarks = curtremarks.trim();
|
//var curtremarks = curtremarks.trim();
|
||||||
@ -196,18 +254,13 @@ if(empty($Status))
|
|||||||
if ((curtremarks == '<br>' || curtremarks == '') && Remark == '') {
|
if ((curtremarks == '<br>' || curtremarks == '') && Remark == '') {
|
||||||
Remarks = '';
|
Remarks = '';
|
||||||
//alert("To Store both empty:-" + Remarks)
|
//alert("To Store both empty:-" + Remarks)
|
||||||
}
|
} else if ((curtremarks != '' && Remark == '')) {
|
||||||
else if((curtremarks != '' && Remark == ''))
|
|
||||||
{
|
|
||||||
Remarks = curtremarks;
|
Remarks = curtremarks;
|
||||||
//alert("To Store current empty:-" + Remarks)
|
//alert("To Store current empty:-" + Remarks)
|
||||||
}
|
} else if ((Remark != '') && (curtremarks == '' || curtremarks == '<br>')) {
|
||||||
else if((Remark != '') && (curtremarks == '' || curtremarks == '<br>'))
|
|
||||||
{
|
|
||||||
Remarks = Remark;
|
Remarks = Remark;
|
||||||
//alert("To Store current empty:-" + Remarks)
|
//alert("To Store current empty:-" + Remarks)
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
Remarks = Remark + "||" + curtremarks;
|
Remarks = Remark + "||" + curtremarks;
|
||||||
//alert("To Store both:-" + Remarks)
|
//alert("To Store both:-" + Remarks)
|
||||||
}
|
}
|
||||||
@ -218,9 +271,7 @@ if(empty($Status))
|
|||||||
var strMsg = 'Do you want to Approve and Release this Purchase Order?'
|
var strMsg = 'Do you want to Approve and Release this Purchase Order?'
|
||||||
var StatusCode = 'ST026';
|
var StatusCode = 'ST026';
|
||||||
//alert(StatusCode);
|
//alert(StatusCode);
|
||||||
}
|
} else if (Status == '2') {
|
||||||
else if(Status == '2')
|
|
||||||
{
|
|
||||||
var strMsg = 'Do you want to put Hold this Purchase Order?';
|
var strMsg = 'Do you want to put Hold this Purchase Order?';
|
||||||
var StatusCode = 'ST052';
|
var StatusCode = 'ST052';
|
||||||
//alert(StatusCode);
|
//alert(StatusCode);
|
||||||
@ -228,22 +279,22 @@ if(empty($Status))
|
|||||||
|
|
||||||
/* MSG*/
|
/* MSG*/
|
||||||
var answer = confirm(strMsg);
|
var answer = confirm(strMsg);
|
||||||
if (answer)
|
if (answer) {
|
||||||
{
|
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{PONO:PO,SCode:StatusCode,NewRemarks:Remarks},
|
data: {
|
||||||
|
PONO: PO,
|
||||||
|
SCode: StatusCode,
|
||||||
|
NewRemarks: Remarks
|
||||||
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url() ?>purchaseorder/ReleasePO",
|
url: "<?php echo base_url() ?>purchaseorder/ReleasePO",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if(data)
|
if (data) {
|
||||||
{
|
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
alert("Error");
|
alert("Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,18 +303,14 @@ if(empty($Status))
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* MSG*/
|
/* MSG*/
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
alert('please Select Status!');
|
alert('please Select Status!');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -276,12 +323,11 @@ alert('please Select Status!');
|
|||||||
var startDate = '';
|
var startDate = '';
|
||||||
var endDate = '';
|
var endDate = '';
|
||||||
|
|
||||||
function Reset()
|
function Reset() {
|
||||||
{
|
|
||||||
$('#RequisitionStatus').val("-1");
|
$('#RequisitionStatus').val("-1");
|
||||||
$('#SearchDate').val('');
|
$('#SearchDate').val('');
|
||||||
}
|
}
|
||||||
<!-- JQuery For POP UP and Getting all relevant Data -->
|
// <!--JQuery For POP UP and Getting all relevant Data-- >
|
||||||
$("#myModal").on("shown.bs.modal", function(e) {
|
$("#myModal").on("shown.bs.modal", function(e) {
|
||||||
var ReqId = $(e.relatedTarget).data('userid');
|
var ReqId = $(e.relatedTarget).data('userid');
|
||||||
$("#RequistionNo").val('');
|
$("#RequistionNo").val('');
|
||||||
@ -309,7 +355,9 @@ $("#myModal").on("shown.bs.modal", function(e) {
|
|||||||
|
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{id:ReqId},
|
data: {
|
||||||
|
id: ReqId
|
||||||
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
url: "<?php echo base_url() ?>requisitionform/ViewRequest",
|
url: "<?php echo base_url() ?>requisitionform/ViewRequest",
|
||||||
@ -344,7 +392,10 @@ function printpdf(PONO,value,Status) {
|
|||||||
alert('inside if ' + PONO + Status + value);
|
alert('inside if ' + PONO + Status + value);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{PONO1:PONO,Status1:Status},
|
data: {
|
||||||
|
PONO1: PONO,
|
||||||
|
Status1: Status
|
||||||
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url() ?>purchaseorder/Poprintpdf",
|
url: "<?php echo base_url() ?>purchaseorder/Poprintpdf",
|
||||||
/*success:function(data) {
|
/*success:function(data) {
|
||||||
@ -362,8 +413,7 @@ function printpdf(PONO,value,Status) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
alert('inside else ' + PONO + Status + value);
|
alert('inside else ' + PONO + Status + value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -378,19 +428,18 @@ $(function() {
|
|||||||
var SIAStartYear = year - 2015;
|
var SIAStartYear = year - 2015;
|
||||||
var mindt = year - 70;
|
var mindt = year - 70;
|
||||||
var maxdt = year - 15;
|
var maxdt = year - 15;
|
||||||
$( ".datePicker" ).datepicker(
|
$(".datePicker").datepicker({
|
||||||
{
|
|
||||||
minDate: new Date(year - SIAStartYear, 1, 1),
|
minDate: new Date(year - SIAStartYear, 1, 1),
|
||||||
maxDate: 'now',
|
maxDate: 'now',
|
||||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,
|
dateFormat: 'mm/dd/yy',
|
||||||
}
|
changeMonth: true,
|
||||||
);
|
changeYear: true,
|
||||||
|
});
|
||||||
//$('#SearchDate').daterangepicker( );
|
//$('#SearchDate').daterangepicker( );
|
||||||
//Initialize Select2 Elements
|
//Initialize Select2 Elements
|
||||||
$(".select2").select2();
|
$(".select2").select2();
|
||||||
//$('#SearchDate').val('');
|
//$('#SearchDate').val('');
|
||||||
$('#SearchDate').daterangepicker(
|
$('#SearchDate').daterangepicker({
|
||||||
{
|
|
||||||
locale: {
|
locale: {
|
||||||
format: 'DD-MM-YYYY'
|
format: 'DD-MM-YYYY'
|
||||||
},
|
},
|
||||||
@ -424,23 +473,103 @@ $(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||||
$('#Requisition').DataTable({
|
// $('#Requisition').DataTable({
|
||||||
columnDefs: [{ width: 200}],
|
// columnDefs: [{ width: 200}],
|
||||||
fixedColumns: true,
|
// fixedColumns: true,
|
||||||
paging: true,
|
// paging: true,
|
||||||
lengthChange: true,
|
// lengthChange: true,
|
||||||
searching: true,
|
// searching: true,
|
||||||
ordering: true,
|
// ordering: true,
|
||||||
aaSorting: [[ 6, "desc" ]],
|
// aaSorting: [[ 0, "desc" ]],
|
||||||
|
|
||||||
info: true,
|
// info: true,
|
||||||
autoWidth: true,
|
// autoWidth: true,
|
||||||
pageLength: 10,
|
// pageLength: 10,
|
||||||
lengthMenu: [10, 25, 50, 100]
|
// lengthMenu: [10, 25, 50, 100]
|
||||||
|
|
||||||
|
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||||
|
<script>
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||||
|
var dateSplit = date.split('/');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#Requisition').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 0,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[0, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@ -1,4 +1,40 @@
|
|||||||
|
<style>
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
/* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form input,
|
||||||
|
.Date-filter-form button {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -26,11 +62,27 @@
|
|||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<CENTER><h3 class="box-title"> Material Master Details</h3></CENTER>
|
<CENTER>
|
||||||
|
<h3 class="box-title"> Material Master Details</h3>
|
||||||
|
</CENTER>
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 text-right">
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter">
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 text-right">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<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(); ?>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>
|
<a class="btn btn-success" href="<?php echo base_url(); ?>exportmaterial">Export Material Master <i class="fa fa-download" aira-hidden="true"></i></a>
|
||||||
@ -42,8 +94,7 @@
|
|||||||
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
|
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="display: none;"></th>
|
<th>Created Date</th>
|
||||||
<th>Created On</th>
|
|
||||||
<th>Material Code</th>
|
<th>Material Code</th>
|
||||||
<th>Material Description</th>
|
<th>Material Description</th>
|
||||||
<th>Type of Material</th>
|
<th>Type of Material</th>
|
||||||
@ -55,16 +106,17 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($userRecords))
|
if (!empty($userRecords)) {
|
||||||
{
|
foreach ($userRecords as $record) {
|
||||||
foreach($userRecords as $record)
|
|
||||||
{
|
|
||||||
$date = date("Y-m-d");
|
$date = date("Y-m-d");
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
<?php if (date('d-m-Y', strtotime($record->CreatedDate)) == "30-11--0001") {
|
||||||
<td style="display: none;"><?php echo $record->CreatedDate; ?></td>
|
$cdate = '00-00-0000';
|
||||||
<td style="width:8%;"><?php echo format_date($record->CreatedDate,0,'d/m/Y') ?></td>
|
} else {
|
||||||
|
$cdate = date('d-m-Y', strtotime($record->CreatedDate));
|
||||||
|
} ?>
|
||||||
|
<td style="width:8%;" align="right"><?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: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:12%;"><?php echo $record->MaterialName ?></td>
|
||||||
<td style="width:10%;"><?php echo $record->MaterialType ?></td>
|
<td style="width:10%;"><?php echo $record->MaterialType ?></td>
|
||||||
@ -90,7 +142,7 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
<!-- <script type="text/javascript">
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
@ -106,4 +158,84 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
</script> -->
|
||||||
|
<script>
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||||
|
var dateSplit = date.split('-');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#datatable').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 0,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[0, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
$insuranceStatus = array(
|
$insuranceStatus = array(
|
||||||
array("name" => "NO", "value" => "0"), array("name" => "YES", "value" => "1")
|
array("name" => "NO", "value" => "0"),
|
||||||
|
array("name" => "YES", "value" => "1")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$ReqType = '';
|
$ReqType = '';
|
||||||
$CompanyAddress = '';
|
$CompanyAddress = '';
|
||||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
@ -26,9 +26,7 @@ if (!empty($AvlBudAmt)) {
|
|||||||
$AvlAmount = number_format($AvlBudAmt, 2, '.', '');
|
$AvlAmount = number_format($AvlBudAmt, 2, '.', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!empty($INRSYMBOL)) {
|
if (!empty($INRSYMBOL)) {
|
||||||
|
|
||||||
foreach ($INRSYMBOL as $INRS) {
|
foreach ($INRSYMBOL as $INRS) {
|
||||||
$INRSYM = $INRS->FontCode2000;
|
$INRSYM = $INRS->FontCode2000;
|
||||||
}
|
}
|
||||||
@ -94,9 +92,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
yearRange: '0:+10'
|
yearRange: '0:+10'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#PoTypeOptions').change(function() {
|
$('#PoTypeOptions').change(function() {
|
||||||
var potypeval = $('#PoTypeOptions').val();
|
var potypeval = $('#PoTypeOptions').val();
|
||||||
var poopt = <?php echo json_encode($PoTypeOptions, JSON_PRETTY_PRINT) ?>;
|
var poopt = <?php echo json_encode($PoTypeOptions, JSON_PRETTY_PRINT) ?>;
|
||||||
@ -118,10 +113,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
document.getElementById("Date").checked = true;
|
document.getElementById("Date").checked = true;
|
||||||
|
|
||||||
$('#drpSupplier').change(function() {
|
$('#drpSupplier').change(function() {
|
||||||
@ -188,7 +179,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
$('#ReqNo').change(function() {
|
$('#ReqNo').change(function() {
|
||||||
|
|
||||||
|
|
||||||
var id = $('#ReqNo').val();
|
var id = $('#ReqNo').val();
|
||||||
$("#AvlBudAmt").val('');
|
$("#AvlBudAmt").val('');
|
||||||
|
|
||||||
@ -510,7 +500,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
$('#EditTotalOrderValue').val(parseFloat(TotAmt).toFixed(2));
|
$('#EditTotalOrderValue').val(parseFloat(TotAmt).toFixed(2));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateTaxValue() {
|
function calculateTaxValue() {
|
||||||
@ -628,16 +617,15 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<?php
|
<?php
|
||||||
$attributes = array('class' => 'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO', 'enctype' => 'multipart/form-data');
|
$attributes = array('class' => 'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO', 'enctype' => 'multipart/form-data');
|
||||||
|
|
||||||
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
|
echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div id="content"></div>
|
<div id="content"></div><!-- content div closed here -->
|
||||||
<div class="header-container">
|
<div class="header-container">
|
||||||
<h2>Service Purchase Order</h2>
|
<h2>Service Purchase Order</h2>
|
||||||
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-cancel" id="back" value="Back">Back</a>
|
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-cancel" id="back" value="Back">Back</a>
|
||||||
</div>
|
</div> <!-- header-container div closed here -->
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -658,7 +646,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div> <!-- 1.1. col-md-3 div closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Purchase Order Type</label>
|
<label>Purchase Order Type</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -668,7 +656,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> <!-- 1.2. col-md-3 div closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Select Supplier<span class="badge mandatory">*</span></label>
|
<label>Select Supplier<span class="badge mandatory">*</span></label>
|
||||||
|
|
||||||
@ -686,7 +674,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div> <!-- 1.3. col-md-3 div closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Supplier Address</label>
|
<label>Supplier Address</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -695,9 +683,9 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo Form_textarea($data);
|
echo Form_textarea($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> <!-- 1.4. col-md-3 div closed here -->
|
||||||
</div>
|
</div> <!-- 1. col-md-12 div closed here -->
|
||||||
</div>
|
</div> <!-- 1. row div closed here -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -756,7 +744,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- 2. row div closed here -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -800,7 +788,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- 3. row div closed here -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -855,7 +843,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- 4. row div closed here -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -902,29 +890,27 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- 5. row div closed here -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="btn-container" style="text-align: right; ">
|
<div class="btn-container" style="text-align: right; ">
|
||||||
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
|
<a data-toggle="modal"><button type="submit" onclick="openModal();" class="btn btn-success" id="abcd">Select Line Item</button> </a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- 6. row div closed here -->
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<table class="table table-bordered" style="border:1px solid #333" id="ServiceTable">
|
<table class="table table-bordered" style="border:1px solid #333" id="ServiceTable">
|
||||||
<!-- Model for Add servicepo -->
|
|
||||||
<div class="modal fade" id="SERVICE" role="dialog">
|
<div class="modal fade" id="SERVICE" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<!-- Modal content-->
|
|
||||||
<form>
|
<form>
|
||||||
<div class="modal-content" style="width:900px;">
|
<div class="modal-content" style="width:900px;">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<center>
|
<center>
|
||||||
<h4>Add Service Purchase Order Item </h4>
|
<h4>Add Service Purchase Order Item </h4>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div><!-- SERVICE modal-header closed here -->
|
||||||
<div align="left">
|
<div align="left">
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Req No<span class="badge mandatory">*</span></label>
|
<label>Req No<span class="badge mandatory">*</span></label>
|
||||||
@ -971,7 +957,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- SERVICE.1 closed here -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Item Code<span class="badge mandatory">*</span></label>
|
<label>Item Code<span class="badge mandatory">*</span></label>
|
||||||
@ -1032,7 +1018,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div><!-- SERVICE.2 closed here -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -1070,8 +1056,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div><!-- SERVICE.3 closed here -->
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
|
|
||||||
@ -1099,7 +1084,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div><!-- SERVICE.4 closed here -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
|
|
||||||
@ -1127,8 +1112,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div><!-- SERVICE.5 closed here -->
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
|
|
||||||
@ -1156,7 +1140,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div><!-- SERVICE.6 closed here -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-5 col-md-offset-4" align="right">
|
<div class="col-md-5 col-md-offset-4" align="right">
|
||||||
<label>Other Allowances <?php echo "($INRSYM)" ?></label>
|
<label>Other Allowances <?php echo "($INRSYM)" ?></label>
|
||||||
@ -1169,7 +1153,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- SERVICE.7 closed here -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-5 col-md-offset-4" align="right">
|
<div class="col-md-5 col-md-offset-4" align="right">
|
||||||
<label><?php echo "Total Order Value ($INRSYM)"; ?></label>
|
<label><?php echo "Total Order Value ($INRSYM)"; ?></label>
|
||||||
@ -1182,7 +1166,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- SERVICE.8 closed here -->
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
|
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
|
||||||
@ -1193,7 +1177,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$data = array('name' => 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction'), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
|
$data = array('name' => 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction'), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
|
||||||
echo form_textarea($data); ?>
|
echo form_textarea($data); ?>
|
||||||
|
|
||||||
</div>
|
</div><!-- SERVICE modal-footer closed here -->
|
||||||
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
@ -1201,14 +1185,13 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
|
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||||
<a class="btn btn-success font AddService" ID="AddService"> <span class="bold">Add Service</span></a>
|
<a class="btn btn-success font AddService" ID="AddService"> <span class="bold">Add Service</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- SERVICE modal-footer closed here -->
|
||||||
</div>
|
</div><!-- SERVICE left closed here -->
|
||||||
</form>
|
</div><!-- SERVICE modal-content closed here -->
|
||||||
|
</form><!-- SERVICE form closed here -->
|
||||||
|
</div><!-- SERVICE modal-dialog closed here -->
|
||||||
|
</div><!-- SERVICE modal closed here -->
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- END of model for Add servicepo -->
|
|
||||||
<!-- Edit Service po moddel-->
|
|
||||||
<div class="modal fade" id="EDITSERVICE" role="dialog">
|
<div class="modal fade" id="EDITSERVICE" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<!-- Modal content-->
|
<!-- Modal content-->
|
||||||
@ -1219,7 +1202,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<center>
|
<center>
|
||||||
<h4>Edit Service Purchase Order Item </h4>
|
<h4>Edit Service Purchase Order Item </h4>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div><!-- EDITSERVICE modal-header closed here -->
|
||||||
<div align="left">
|
<div align="left">
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -1231,10 +1214,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$data = array('name' => 'EditReqNo', 'value' => set_value('EditReqNo'), 'id' => 'EditReqNo', 'class' => 'form-control', 'readonly' => 'true');
|
$data = array('name' => 'EditReqNo', 'value' => set_value('EditReqNo'), 'id' => 'EditReqNo', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.1.1 col-md-3 closed here -->
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Department Name</label>
|
<label>Department Name</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1243,17 +1224,16 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.1.2 col-md-3 closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Cost Center Code</label>
|
<label>Cost Center Code</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'EditCostCenter', 'value' => set_value('EditCostCenter'), 'id' => 'EditCostCenter', 'class' => 'form-control', 'readonly' => 'true');
|
$data = array('name' => 'EditCostCenter', 'value' => set_value('EditCostCenter'), 'id' => 'EditCostCenter', 'class' => 'form-control', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.1.3 col-md-3 closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Avail Budget Amount <?php echo "($INRSYM)" ?></label>
|
<label>Avail Budget Amount <?php echo "($INRSYM)" ?></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1262,8 +1242,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.1.4 col-md-3 closed here -->
|
||||||
</div>
|
</div><!-- EDITSERVICE.1 col-md-12 closed here -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Item Code<span class="badge mandatory" #fff ;">*</span></label>
|
<label>Item Code<span class="badge mandatory" #fff ;">*</span></label>
|
||||||
@ -1276,7 +1256,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.2.1 col-md-3 closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Item Name</label>
|
<label>Item Name</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1285,10 +1265,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.2.2 col-md-3 closed here -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3" id=EditotherDescription>
|
<div class="col-md-3" id=EditotherDescription>
|
||||||
<label>Item Description</label>
|
<label>Item Description</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1297,9 +1274,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.2.3 col-md-3 closed here -->
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>UOM</label>
|
<label>UOM</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1308,7 +1283,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.2.4 col-md-3 closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Service Schedule Type</label>
|
<label>Service Schedule Type</label>
|
||||||
<div>
|
<div>
|
||||||
@ -1318,12 +1293,9 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
<input type="hidden" name="EditFrequencyNo" id="EditFrequencyNo" value="EditFrequencyNo" />
|
<input type="hidden" name="EditFrequencyNo" id="EditFrequencyNo" value="EditFrequencyNo" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.2.5 col-md-3 closed here -->
|
||||||
|
</div><!-- EDITSERVICE.2 col-md-12 closed here -->
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Quantity<span class="badge mandatory">*</span></label>
|
<label>Quantity<span class="badge mandatory">*</span></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1332,7 +1304,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.3.1 col-md-3 closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory">*</span></label>
|
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory">*</span></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1341,13 +1313,13 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.3.2 col-md-3 closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Per</label><!--date should be come-->
|
<label>Per</label><!--date should be come-->
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'EditPer', 'value' => set_value('EditPer'), 'id' => 'EditPer', 'class' => 'form-control');
|
$data = array('name' => 'EditPer', 'value' => set_value('EditPer'), 'id' => 'EditPer', 'class' => 'form-control');
|
||||||
echo form_input($data); ?>
|
echo form_input($data); ?>
|
||||||
</div>
|
</div><!-- EDITSERVICE.3.3 col-md-3 closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label><?php echo "Basic Amount ($INRSYM)"; ?></label>
|
<label><?php echo "Basic Amount ($INRSYM)"; ?></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1356,16 +1328,13 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.3.4 col-md-3 closed here -->
|
||||||
|
</div><!-- EDITSERVICE.3 col-md-12 closed here -->
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
|
|
||||||
CGST In %
|
CGST In %
|
||||||
</div>
|
</div><!-- EDITSERVICE.4.1 col-md-6 closed here -->
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
@ -1375,7 +1344,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div><!-- EDITSERVICE.4.2 col-md-3 closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
@ -1385,14 +1354,12 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div><!-- EDITSERVICE.4.3 col-md-3 closed here -->
|
||||||
|
</div><!-- EDITSERVICE.4 col-md-12 closed here -->
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
|
|
||||||
SGST In %
|
SGST In %
|
||||||
</div>
|
</div><!-- EDITSERVICE.5.1 col-md-6 closed here -->
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1403,7 +1370,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div><!-- EDITSERVICE.5.2 col-md-3 closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
@ -1413,15 +1380,15 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div><!-- EDITSERVICE.5.3 col-md-3 closed here -->
|
||||||
|
|
||||||
</div>
|
</div><!-- EDITSERVICE.5 col-md-12 closed here -->
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-6" align="right">
|
<div class="col-md-6" align="right">
|
||||||
|
|
||||||
IGST In %
|
IGST In %
|
||||||
</div>
|
</div><!-- EDITSERVICE.6.1 col-md-6 closed here -->
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1432,7 +1399,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div><!-- EDITSERVICE.6.2 col-md-3 closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
@ -1442,13 +1409,13 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div><!-- EDITSERVICE.6.3 col-md-3 closed here -->
|
||||||
|
|
||||||
</div>
|
</div><!-- EDITSERVICE.6 col-md-12 closed here -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-5 col-md-offset-4" align="right">
|
<div class="col-md-5 col-md-offset-4" align="right">
|
||||||
<label>Other Allowances <?php echo "($INRSYM)" ?></label>
|
<label>Other Allowances <?php echo "($INRSYM)" ?></label>
|
||||||
</div>
|
</div><!-- EDITSERVICE.7.1 col-md-5 col-md-offset-4 closed here -->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -1456,8 +1423,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.7.2 col-md-3 closed here -->
|
||||||
</div>
|
</div><!-- EDITSERVICE.7 col-md-12 closed here -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-5 col-md-offset-4" align="right">
|
<div class="col-md-5 col-md-offset-4" align="right">
|
||||||
<label><?php echo "Total Order Value ($INRSYM)"; ?></label>
|
<label><?php echo "Total Order Value ($INRSYM)"; ?></label>
|
||||||
@ -1470,33 +1437,29 @@ if (!empty($INRSYMBOL)) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE.8 col-md-12 closed here -->
|
||||||
|
|
||||||
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
|
<div class="col-md-12" style="padding: 0px 30px 10px 30px;">
|
||||||
<label>Service Description </label>
|
<label>Service Description </label>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction'), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
|
$data = array('name' => 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction'), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
|
||||||
echo form_textarea($data); ?>
|
echo form_textarea($data); ?>
|
||||||
|
</div><!-- EDITSERVICE.9 col-md-12 closed here -->
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
|
<a class="btn btn-cancel" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||||
<a class="btn btn-success font EditService" ID="Edit"> <span class="bold">Update Service</span></a>
|
<a class="btn btn-success font EditService" ID="Edit"> <span class="bold">Update Service</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div><!-- EDITSERVICE modal-footer closed here -->
|
||||||
</div>
|
</div><!-- EDITSERVICE left closed here -->
|
||||||
</form>
|
</div><!-- EDITSERVICE modal-content closed here -->
|
||||||
|
</form><!-- EDITSERVICE form closed here -->
|
||||||
|
</div><!-- EDITSERVICE modal-dialog closed here -->
|
||||||
|
</div><!-- EDITSERVICE modal closed here -->
|
||||||
|
|
||||||
</div>
|
</table><!-- ServiceTable table closed here -->
|
||||||
</div>
|
</div><!-- container-fluid div closed here -->
|
||||||
<!-- End of Model for EDIT servicepo -->
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<table id="serviceTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<table id="serviceTax" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
@ -1505,7 +1468,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<th>SNo</th>
|
<th>SNo</th>
|
||||||
<th>Requisition No</th>
|
<th>Requisition No</th>
|
||||||
<th>Item Code</th>
|
<th>Item Code</th>
|
||||||
<th>Item Description</th>
|
<th>Item Name</th>
|
||||||
<th>Quantity</th>
|
<th>Quantity</th>
|
||||||
<th>UOM</th>
|
<th>UOM</th>
|
||||||
<th>Rate <?php echo "($INRSYM)" ?></th>
|
<th>Rate <?php echo "($INRSYM)" ?></th>
|
||||||
@ -1515,12 +1478,10 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody id='ServiceAppend'>
|
<tbody id='ServiceAppend'>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table><!-- serviceTax table closed here -->
|
||||||
</div>
|
</div><!-- box-body div closed here -->
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -1532,31 +1493,28 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount'), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true');
|
$data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount'), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div><!-- 7.1.1 col-md-2 div closed here -->
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<label>CGST <?php echo "($INRSYM)" ?></label>
|
<label>CGST <?php echo "($INRSYM)" ?></label>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'txtTotCgst', 'value' => set_value('txtTotCgst'), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true');
|
$data = array('name' => 'txtTotCgst', 'value' => set_value('txtTotCgst'), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div><!-- 7.1.2 col-md-2 div closed here -->
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<label>SGST <?php echo "($INRSYM)" ?></label>
|
<label>SGST <?php echo "($INRSYM)" ?></label>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'txtTotSgst', 'value' => set_value('txtTotSgst'), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true');
|
$data = array('name' => 'txtTotSgst', 'value' => set_value('txtTotSgst'), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div><!-- 7.1.3 col-md-2 div closed here -->
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<label>IGST <?php echo "($INRSYM)" ?> </label>
|
<label>IGST <?php echo "($INRSYM)" ?> </label>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'txtTotIgst', 'value' => set_value('txtTotIgst'), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true');
|
$data = array('name' => 'txtTotIgst', 'value' => set_value('txtTotIgst'), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div><!-- 7.1.4 col-md-2 div closed here -->
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<label>Other Allowances <?php echo "($INRSYM)" ?> </label>
|
<label>Other Allowances <?php echo "($INRSYM)" ?> </label>
|
||||||
<?php
|
<?php
|
||||||
@ -1564,7 +1522,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div><!-- 7.1.5 col-md-2 div closed here -->
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<label>Total Order Value <?php echo "($INRSYM)" ?> </label>
|
<label>Total Order Value <?php echo "($INRSYM)" ?> </label>
|
||||||
<?php
|
<?php
|
||||||
@ -1572,9 +1530,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div><!-- 7.1.6 col-md-2 div closed here -->
|
||||||
</div>
|
</div><!-- 7.1 col-md-12 div closed here -->
|
||||||
<!--start new fields 1 sep-->
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label>Description Of Service<span class="badge mandatory">*</label>
|
<label>Description Of Service<span class="badge mandatory">*</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1582,16 +1539,15 @@ if (!empty($INRSYMBOL)) {
|
|||||||
$data = array('name' => 'descofpo', 'value' => set_value('descofpo'), 'id' => 'descofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
|
$data = array('name' => 'descofpo', 'value' => set_value('descofpo'), 'id' => 'descofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
|
||||||
echo form_textarea($data);
|
echo form_textarea($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div><!-- 7.2 form-group div closed here -->
|
||||||
</div><!--end new fields 1 sep-->
|
</div><!-- 7.2 col-md-12 div closed here -->
|
||||||
<div class="col-md-12" style="padding:0px;">
|
<div class="col-md-12" style="padding:0px;">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label>Scope Of Work</label> <?php
|
<label>Scope Of Work</label> <?php
|
||||||
$data = array('name' => 'ScopeOfWork', 'value' => set_value('ScopeOfWork'), 'id' => 'ScopeOfWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40');
|
$data = array('name' => 'ScopeOfWork', 'value' => set_value('ScopeOfWork'), 'id' => 'ScopeOfWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40');
|
||||||
echo form_textarea($data); ?>
|
echo form_textarea($data); ?>
|
||||||
</div>
|
</div><!-- 7.3.1 col-md-12 div closed here -->
|
||||||
|
</div><!-- 7.3 col-md-12 div closed here -->
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<br/>
|
<br/>
|
||||||
@ -1608,19 +1564,15 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<a class="btn btn-reset Save" ID="Cancel" onclick="Reset();"> <span class="bold">Reset</span></a>
|
<a class="btn btn-reset Save" ID="Cancel" onclick="Reset();"> <span class="bold">Reset</span></a>
|
||||||
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save as Draft</span></a>
|
<a class="btn btn-success Save" ID="Save" onclick="Save(0)"> <span class="bold">Save as Draft</span></a>
|
||||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||||
</div>
|
</div><!-- 7.4 btn-container div closed here -->
|
||||||
</div><br />
|
</div><br/><!-- 7.4 right div closed here -->
|
||||||
</div>
|
</div><!-- 7.4 row div closed here -->
|
||||||
</div>
|
</div><!-- 7.4 col-md-12 div closed here -->
|
||||||
<br />
|
</div><!-- 7. row div closed here -->
|
||||||
</div>
|
</div> <!-- container-fluid div closed here -->
|
||||||
</div>
|
</div> <!-- box div closed here -->
|
||||||
|
</section> <!-- content section closed here -->
|
||||||
</div>
|
</div> <!-- content-wrapper div closed here -->
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
<script type="text/html" id="ServiceList">
|
<script type="text/html" id="ServiceList">
|
||||||
<tr id="<%=index%>">
|
<tr id="<%=index%>">
|
||||||
<td align="left"><%=index%></td>
|
<td align="left"><%=index%></td>
|
||||||
@ -1661,6 +1613,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||||
|
|
||||||
|
console.log("Worng");
|
||||||
userid = $(e.relatedTarget).data('userid');
|
userid = $(e.relatedTarget).data('userid');
|
||||||
|
|
||||||
var tr = document.getElementById(userid);
|
var tr = document.getElementById(userid);
|
||||||
@ -1825,7 +1779,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
index: temp,
|
index: temp,
|
||||||
ReqNo: Reqnumber,
|
ReqNo: Reqnumber,
|
||||||
MaterialCode: materialCode,
|
MaterialCode: materialCode,
|
||||||
MaterialName: ServiceDescription,
|
MaterialName: materialName,
|
||||||
Quantity: quantity,
|
Quantity: quantity,
|
||||||
UOM: uom,
|
UOM: uom,
|
||||||
Rate: itemRate,
|
Rate: itemRate,
|
||||||
@ -1919,7 +1873,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
var cellval = tr.cells;
|
var cellval = tr.cells;
|
||||||
|
|
||||||
cellval[2].innerHTML = editMaterialCode;
|
cellval[2].innerHTML = editMaterialCode;
|
||||||
cellval[3].innerHTML = ServiceDescription;
|
cellval[3].innerHTML = editDescription;
|
||||||
cellval[4].innerHTML = editQuantity;
|
cellval[4].innerHTML = editQuantity;
|
||||||
cellval[5].innerHTML = editUOM;
|
cellval[5].innerHTML = editUOM;
|
||||||
cellval[6].innerHTML = parseFloat(itemRate).toFixed(2);
|
cellval[6].innerHTML = parseFloat(itemRate).toFixed(2);
|
||||||
@ -2341,10 +2295,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function openModal() {
|
function openModal() {
|
||||||
if (vaildateBeforeOpenModal()) {
|
if (vaildateBeforeOpenModal()) {
|
||||||
$('#SERVICE').modal('show');
|
$('#SERVICE').modal('show');
|
||||||
|
|||||||
@ -1,4 +1,40 @@
|
|||||||
|
<style>
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
/* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form input,
|
||||||
|
.Date-filter-form button {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
@ -29,23 +65,38 @@
|
|||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<center><b><h3 class="box-title">Supplier Listing</h3></b></center>
|
<center><b>
|
||||||
|
<h3 class="box-title">Supplier Listing</h3>
|
||||||
|
</b></center>
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 text-right">
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter">
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 text-right">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<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(); ?>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>
|
<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>
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
||||||
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px !important;">
|
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px !important;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th style="width:75px">Created Date</th>
|
||||||
<th>Supplier ID</th>
|
<th>Supplier ID</th>
|
||||||
<th>Supplier Name</th>
|
<th>Supplier Name</th>
|
||||||
<th>Address</th>
|
<th>Address</th>
|
||||||
@ -59,12 +110,16 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($userRecords))
|
if (!empty($userRecords)) {
|
||||||
{
|
foreach ($userRecords as $record) {
|
||||||
foreach($userRecords as $record)
|
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<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><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->SupplierName ?></td>
|
||||||
<td><?php echo $record->Address ?></td>
|
<td><?php echo $record->Address ?></td>
|
||||||
@ -73,7 +128,9 @@
|
|||||||
<td><?php echo $record->PAN ?></td>
|
<td><?php echo $record->PAN ?></td>
|
||||||
<td><?php echo $record->GSTNO ?></td>
|
<td><?php echo $record->GSTNO ?></td>
|
||||||
<td><?php echo $record->PaymentTerms ?></td>
|
<td><?php echo $record->PaymentTerms ?></td>
|
||||||
<td><?php if($record->IsActive == 0){ echo "Deactived"; }else{ ?>
|
<td><?php if ($record->IsActive == 0) {
|
||||||
|
echo "Deactived";
|
||||||
|
} else { ?>
|
||||||
<a onclick="deletesupplier('<?php echo $record->SupplierID; ?>')"><i class="fa fa-trash"></i> </a>
|
<a onclick="deletesupplier('<?php echo $record->SupplierID; ?>')"><i class="fa fa-trash"></i> </a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
@ -93,31 +150,30 @@
|
|||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
// $(function () {
|
||||||
|
|
||||||
$(function () {
|
// $('#datatable').DataTable({
|
||||||
|
// "paging": true,
|
||||||
|
// "lengthChange": true,
|
||||||
|
// "searching": true,
|
||||||
|
// "ordering": true,
|
||||||
|
// "info": true,
|
||||||
|
// "autoWidth": true
|
||||||
|
|
||||||
$('#datatable').DataTable({
|
// });
|
||||||
"paging": true,
|
// });
|
||||||
"lengthChange": true,
|
function deletesupplier(sid) {
|
||||||
"searching": true,
|
alert(sid);
|
||||||
"ordering": true,
|
|
||||||
"info": true,
|
|
||||||
"autoWidth": true
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
function deletesupplier(sid)
|
|
||||||
{alert(sid);
|
|
||||||
var answer = confirm(" Do you want to delete the Supplier from the List?")
|
var answer = confirm(" Do you want to delete the Supplier from the List?")
|
||||||
if (answer)
|
if (answer) {
|
||||||
{
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{id:userid},
|
data: {
|
||||||
|
id: userid
|
||||||
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url() ?>deletesupplier",
|
url: "<?php echo base_url() ?>deletesupplier",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if(data)
|
if (data) {
|
||||||
{
|
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
location.reload();
|
location.reload();
|
||||||
@ -126,5 +182,84 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||||
|
var dateSplit = date.split('-');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#datatable').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 0,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[0, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -1,4 +1,40 @@
|
|||||||
|
<style>
|
||||||
|
.Date-filter-form {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
/* Adjust the gap as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form input,
|
||||||
|
.Date-filter-form button {
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Date-filter-form button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button:hover {
|
||||||
|
color: #0056b3;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
@ -28,11 +64,27 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<center><b><h3 class="box-title">User Listing</h3></b></center>
|
<center><b>
|
||||||
|
<h3 class="box-title">User Listing</h3>
|
||||||
|
</b></center>
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 text-right">
|
<div class="col-xs-12 col-md-6">
|
||||||
|
<form class="Date-filter-form" id="DateRangeFilter">
|
||||||
|
<input type="hidden" name="table" value="requisition">
|
||||||
|
<label for="fromDate">From:</label>
|
||||||
|
<input type="text" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<label for="toDate">To:</label>
|
||||||
|
<input type="text" id="toDate" name="toDate" placeholder="Select To Date" autocomplete="off" required>
|
||||||
|
|
||||||
|
<button type="submit">Search</button>
|
||||||
|
<i class="fa fa-repeat" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
|
||||||
|
<div class="error" id="error"></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 text-right">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<a class="btn btn-success" href="<?php echo base_url(); ?>addNew">Add New User</a>
|
<a class="btn btn-success" href="<?php echo base_url(); ?>addNew">Add New User</a>
|
||||||
</div>
|
</div>
|
||||||
@ -40,11 +92,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
|
||||||
<table class="table table-hover table-bordered" id="datatable" style="background-color:#fff;font-size:12px;">
|
<table class="table table-hover table-bordered" id="datatable" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
<th>User Id</th>
|
<th>Created Date</th>
|
||||||
|
<!-- <th>User Id</th> -->
|
||||||
<th>User Name</th>
|
<th>User Name</th>
|
||||||
<th>Email</th>
|
<th>Email</th>
|
||||||
<th>Contact Number</th>
|
<th>Contact Number</th>
|
||||||
@ -56,13 +108,17 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($userRecords))
|
if (!empty($userRecords)) {
|
||||||
{
|
foreach ($userRecords as $record) {
|
||||||
foreach($userRecords as $record)
|
|
||||||
{
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $record->userId ?></td>
|
<?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 align="right"><?php echo $cdate; ?> </td>
|
||||||
|
<!-- <td><?php echo $record->userId ?></td> -->
|
||||||
<td><?php echo $record->FirstName ?></td>
|
<td><?php echo $record->FirstName ?></td>
|
||||||
<td><?php echo $record->EmailId ?></td>
|
<td><?php echo $record->EmailId ?></td>
|
||||||
<td><?php echo $record->ContactNumber ?></td>
|
<td><?php echo $record->ContactNumber ?></td>
|
||||||
@ -90,49 +146,124 @@
|
|||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
// $(function () {
|
||||||
|
|
||||||
|
// $('#datatable').DataTable({
|
||||||
|
// "paging": true,
|
||||||
|
// "lengthChange": true,
|
||||||
|
// "searching": true,
|
||||||
|
// "ordering": true,
|
||||||
|
// "info": true,
|
||||||
|
// "autoWidth": true
|
||||||
|
|
||||||
$(function () {
|
// });
|
||||||
|
// });
|
||||||
$('#datatable').DataTable({
|
|
||||||
"paging": true,
|
|
||||||
"lengthChange": true,
|
|
||||||
"searching": true,
|
|
||||||
"ordering": true,
|
|
||||||
"info": true,
|
|
||||||
"autoWidth": true
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function deleteUser(userid)
|
function deleteUser(userid) {
|
||||||
{
|
|
||||||
var answer = confirm(" Do you want to delete the user from the List?")
|
var answer = confirm(" Do you want to delete the user from the List?")
|
||||||
if (answer)
|
if (answer) {
|
||||||
{
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{id:userid},
|
data: {
|
||||||
|
id: userid
|
||||||
|
},
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url() ?>user/deleteUser",
|
url: "<?php echo base_url() ?>user/deleteUser",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if(data)
|
if (data) {
|
||||||
{
|
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
|
|
||||||
location.reload();
|
location.reload();
|
||||||
|
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
alert("Error");
|
alert("Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<script>
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||||
|
var dateSplit = date.split('-');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Initialize the DataTable
|
||||||
|
var table = $('#datatable').DataTable({
|
||||||
|
"paging": true,
|
||||||
|
"lengthChange": true,
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 0,
|
||||||
|
"type": "date-eu"
|
||||||
|
}],
|
||||||
|
"aaSorting": [
|
||||||
|
[0, "desc"]
|
||||||
|
],
|
||||||
|
"info": true,
|
||||||
|
"autoWidth": true,
|
||||||
|
"pageLength": 10,
|
||||||
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize the datepickers
|
||||||
|
$("#fromDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var minDate = $(this).datepicker("getDate");
|
||||||
|
$("#toDate").datepicker("option", "minDate", minDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#toDate").datepicker({
|
||||||
|
dateFormat: 'dd-mm-yy',
|
||||||
|
onSelect: function(selectedDate) {
|
||||||
|
var maxDate = $(this).datepicker("getDate");
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", maxDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reset button functionality
|
||||||
|
$("#resetButton").click(function() {
|
||||||
|
$("#fromDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("setDate", null);
|
||||||
|
$("#toDate").datepicker("option", "minDate", null);
|
||||||
|
$("#fromDate").datepicker("option", "maxDate", null);
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date range filter
|
||||||
|
$.fn.dataTable.ext.search.push(
|
||||||
|
|
||||||
|
function(settings, data, dataIndex) {
|
||||||
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
|
// Convert dateStr to Date object
|
||||||
|
var dateParts = dateStr.split("-");
|
||||||
|
var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object
|
||||||
|
|
||||||
|
if (!fromDate || !toDate) {
|
||||||
|
return true; // No filter if dates are not selected
|
||||||
|
}
|
||||||
|
|
||||||
|
return date >= fromDate && date <= toDate;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Handle form submission
|
||||||
|
$("#DateRangeFilter").submit(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
table.draw();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@ -48,6 +48,29 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style>
|
||||||
|
.dataTables_wrapper .top {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.dataTables_wrapper .dataTables_length {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.dataTables_wrapper .dt-buttons,
|
||||||
|
.dataTables_wrapper .dataTables_filter {
|
||||||
|
float: right;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.dataTables_wrapper .dt-buttons {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.dataTables_wrapper .dataTables_filter {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
var d = new Date();
|
var d = new Date();
|
||||||
@ -91,7 +114,6 @@
|
|||||||
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="display:none;"></th>
|
|
||||||
<th>Create Date</th>
|
<th>Create Date</th>
|
||||||
<th>Create time</th>
|
<th>Create time</th>
|
||||||
<th>IGR No</th>
|
<th>IGR No</th>
|
||||||
@ -116,7 +138,6 @@
|
|||||||
$time = $createddate->format('h:i A');
|
$time = $createddate->format('h:i A');
|
||||||
?>
|
?>
|
||||||
<tr id="<?php echo $index ?>" >
|
<tr id="<?php echo $index ?>" >
|
||||||
<th style="display:none;"><?php echo $record->CreatedDate ?></th>
|
|
||||||
<td align="right"><?php echo $date; ?></td>
|
<td align="right"><?php echo $date; ?></td>
|
||||||
<td align="right"><?php echo $time; ?></td>
|
<td align="right"><?php echo $time; ?></td>
|
||||||
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<?php echo $index;?>" data-inx="<?php echo $index;?>" data-userid="<?php echo $record->IGRNO ?>" data-igrstatus="<?php echo $record->IGRStatus ?>"> <u><?php echo $record->IGRNO ?></u></a></td>
|
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<?php echo $index;?>" data-inx="<?php echo $index;?>" data-userid="<?php echo $record->IGRNO ?>" data-igrstatus="<?php echo $record->IGRStatus ?>"> <u><?php echo $record->IGRNO ?></u></a></td>
|
||||||
@ -184,6 +205,7 @@
|
|||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
<span class="help-block"></span>
|
<span class="help-block"></span>
|
||||||
|
<input type="hidden" name="hiddenIsOpenOrder" id="hiddenIsOpenOrder" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label>Supplier Name </label>
|
<label>Supplier Name </label>
|
||||||
@ -608,10 +630,14 @@ console.log(parsedData);
|
|||||||
var baseUrl = '<?php echo base_url(); ?>purchaseorder/CreatePOPrint';
|
var baseUrl = '<?php echo base_url(); ?>purchaseorder/CreatePOPrint';
|
||||||
var newUrl = baseUrl + '?PONO=' + item.PONO + '&ReqType=' + item.POType;
|
var newUrl = baseUrl + '?PONO=' + item.PONO + '&ReqType=' + item.POType;
|
||||||
$('#printLink').attr('href', newUrl);
|
$('#printLink').attr('href', newUrl);
|
||||||
var isOpenOrder = parseInt(item.IsOpenOrder, 2);
|
var isOpenOrder = parseInt(item.IsOpenOrder ? item.IsOpenOrder : "0", 2);
|
||||||
|
console.log(item.IsOpenOrder);
|
||||||
|
console.log(isOpenOrder);
|
||||||
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open";
|
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "" : "Open";
|
||||||
$('.help-block').text(formatted_IsOpenOrder);
|
$('.help-block').text(formatted_IsOpenOrder);
|
||||||
|
var button_text_for_IGRDraft= (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "Save as Draft IGR" : "Save as Open IGR";
|
||||||
|
$('#draftIGR').text(button_text_for_IGRDraft);
|
||||||
|
$("#hiddenIsOpenOrder").val(isOpenOrder);
|
||||||
$("#Vehicle_No").val(item.VehicleNo);
|
$("#Vehicle_No").val(item.VehicleNo);
|
||||||
$("#Driver_Name").val(item.DriverName);
|
$("#Driver_Name").val(item.DriverName);
|
||||||
$("#DriverMobileNumber").val(item.DriverMobileNumber);
|
$("#DriverMobileNumber").val(item.DriverMobileNumber);
|
||||||
@ -655,8 +681,8 @@ console.log(parsedData);
|
|||||||
'<td style="width: 200px; word-wrap: break-word; word-break: break-all; white-space: normal;">' + item.MaterialName + '</td>' +
|
'<td style="width: 200px; word-wrap: break-word; word-break: break-all; white-space: normal;">' + item.MaterialName + '</td>' +
|
||||||
'<td style="width: 50px;" name="UOM">' + item.UOM + '</td>' +
|
'<td style="width: 50px;" name="UOM">' + item.UOM + '</td>' +
|
||||||
'<td style="width: 100px;" align="right" id="Quantity' + i + '" name="Quantity">' + parseInt(item.Quantity) + '</td>' +
|
'<td style="width: 100px;" align="right" id="Quantity' + i + '" name="Quantity">' + parseInt(item.Quantity) + '</td>' +
|
||||||
'<td style="width: 100px;" align="right" data-name="sel" ><input type="text" onchange="validateReceivedQuantity(' + i + ')"id="QuantityAsPerInvoice' + i + '" name="QuantityAsPerInvoice' + i + '" value="' + parseInt(item.QuantityAsPerInvoice) + '" onkeypress="return isNumberKey(event);" style="width: 75px;"></td>' +
|
'<td style="width: 100px;" align="right" data-name="sel" ><input type="text" onchange="validateReceivedQuantity(' + i + ','+isOpenOrder+')"id="QuantityAsPerInvoice' + i + '" name="QuantityAsPerInvoice' + i + '" value="' + parseInt(item.QuantityAsPerInvoice) + '" onkeypress="return isNumberKey(event);" style="width: 75px;"></td>' +
|
||||||
'<td style="width: 100px;" name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + parseInt(item.Quantity - item.QuantityAsPerInvoice) + '</td>' +
|
'<td style="width: 100px;" name="PendingQuantity' + i + '" id="PendingQuantity' + i + '">' + ((isOpenOrder) ? 0 : parseInt(item.Quantity - item.QuantityAsPerInvoice)) + '</td>' +
|
||||||
'<td style="width: 150px;"><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" style="width: 75px;"> </td>' +
|
'<td style="width: 150px;"><input type="text" id="Remark' + i + '" name="Remark' + i + '" class="form" onchange="SetRemarks(' + i + ')" style="width: 75px;"> </td>' +
|
||||||
'<td style="width: 50px;"><a target="_blank" data-toggle="modal" data-target="#WeightCalculator" title="Weight Calculator" data-index="'+i+'" data-material="'+item.MaterialName+'" data-igrstatus = "'+igrstatus+'"><i class="fa fa-solid fa-truck" style="text-align: center;"></i></a> </td>' +
|
'<td style="width: 50px;"><a target="_blank" data-toggle="modal" data-target="#WeightCalculator" title="Weight Calculator" data-index="'+i+'" data-material="'+item.MaterialName+'" data-igrstatus = "'+igrstatus+'"><i class="fa fa-solid fa-truck" style="text-align: center;"></i></a> </td>' +
|
||||||
'<input type="hidden" id="IGRNO' + i + '" name="IGRNO' + i + '" value="' + item.IGRNO + '">' +
|
'<input type="hidden" id="IGRNO' + i + '" name="IGRNO' + i + '" value="' + item.IGRNO + '">' +
|
||||||
@ -772,6 +798,7 @@ console.log(parsedData);
|
|||||||
formData.append('driver_mobile', $('#DriverMobileNumber').val());
|
formData.append('driver_mobile', $('#DriverMobileNumber').val());
|
||||||
formData.append('status', status);
|
formData.append('status', status);
|
||||||
formData.append('tableData', JSON.stringify(tableData));
|
formData.append('tableData', JSON.stringify(tableData));
|
||||||
|
formData.append('isOpenOrder', $("#hiddenIsOpenOrder").val());
|
||||||
formData.append('MasterFile', $('#MasterFile')[0].files[0]);
|
formData.append('MasterFile', $('#MasterFile')[0].files[0]);
|
||||||
formData.append('file_name[]', $('#file_name').val());
|
formData.append('file_name[]', $('#file_name').val());
|
||||||
var empFiles = $('#emp_file')[0] ? $('#emp_file')[0].files : null;
|
var empFiles = $('#emp_file')[0] ? $('#emp_file')[0].files : null;
|
||||||
@ -829,6 +856,7 @@ console.log(parsedData);
|
|||||||
formData.append('driver_mobile', $('#DriverMobileNumber').val());
|
formData.append('driver_mobile', $('#DriverMobileNumber').val());
|
||||||
formData.append('status', status);
|
formData.append('status', status);
|
||||||
formData.append('tableData', JSON.stringify(tableData));
|
formData.append('tableData', JSON.stringify(tableData));
|
||||||
|
formData.append('isOpenOrder',$("#hiddenIsOpenOrder").val());
|
||||||
formData.append('MasterFile', $('#MasterFile')[0].files[0]);
|
formData.append('MasterFile', $('#MasterFile')[0].files[0]);
|
||||||
formData.append('file_name[]', $('#file_name').val());
|
formData.append('file_name[]', $('#file_name').val());
|
||||||
var empFiles = $('#emp_file')[0] ? $('#emp_file')[0].files : null;
|
var empFiles = $('#emp_file')[0] ? $('#emp_file')[0].files : null;
|
||||||
@ -1376,10 +1404,16 @@ function deleteBill(Billno,i){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateReceivedQuantity(Rowid) {
|
function validateReceivedQuantity(Rowid,isOpenOrder) {
|
||||||
var InvoiceQty = parseFloat($('#QuantityAsPerInvoice' + Rowid).val() || '0.00'); // working fine
|
var InvoiceQty = parseFloat($('#QuantityAsPerInvoice' + Rowid).val() || '0.00'); // working fine
|
||||||
var OrderedQty = parseFloat($("#Quantity" + Rowid).text());
|
var OrderedQty = parseFloat($("#Quantity" + Rowid).text());
|
||||||
|
if(isOpenOrder == 1){
|
||||||
|
var PendingQty = 0;
|
||||||
|
$('#PendingQuantity' + Rowid).text(PendingQty.toFixed(0));
|
||||||
|
$('#txtPendingQty' + Rowid).val(PendingQty.toFixed(0));
|
||||||
|
$('#txtQuantityAsPerInvoice' + Rowid).val(InvoiceQty.toFixed(2));
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
if (parseInt(OrderedQty) !== 0) {
|
if (parseInt(OrderedQty) !== 0) {
|
||||||
if ((InvoiceQty) > OrderedQty) {
|
if ((InvoiceQty) > OrderedQty) {
|
||||||
alert("Pending Quantity is exceeding the Ordered Quantity. Please contact the Purchase Team for further process.");
|
alert("Pending Quantity is exceeding the Ordered Quantity. Please contact the Purchase Team for further process.");
|
||||||
@ -1404,6 +1438,7 @@ function deleteBill(Billno,i){
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
function isNumberKey(evt) {
|
function isNumberKey(evt) {
|
||||||
@ -1524,8 +1559,20 @@ function deleteBill(Billno,i){
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu-pre'] = function (date) {
|
||||||
|
var dateSplit = date.split('-');
|
||||||
|
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||||
|
};
|
||||||
// Initialize the DataTable
|
// Initialize the DataTable
|
||||||
var table = $('#Inwardgateregistertable').DataTable({
|
var table = $('#Inwardgateregistertable').DataTable({
|
||||||
"paging": true,
|
"paging": true,
|
||||||
@ -1533,16 +1580,36 @@ $(document).ready(function() {
|
|||||||
"searching": true,
|
"searching": true,
|
||||||
"ordering": true,
|
"ordering": true,
|
||||||
"columnDefs": [{
|
"columnDefs": [{
|
||||||
"targets": 1,
|
"targets": 0,
|
||||||
"type": "date-eu"
|
"type": "date-eu"
|
||||||
}],
|
}],
|
||||||
"aaSorting": [
|
"aaSorting": [
|
||||||
[1, "desc"]
|
[0, "desc"]
|
||||||
],
|
],
|
||||||
"info": true,
|
"info": true,
|
||||||
"autoWidth": true,
|
"autoWidth": true,
|
||||||
"pageLength": 10,
|
"pageLength": 10,
|
||||||
"lengthMenu": [10, 25, 50, 100],
|
"lengthMenu": [10, 25, 50, 100],
|
||||||
|
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||||
|
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||||
|
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
extend: 'excelHtml5',
|
||||||
|
text: 'Export to Excel',
|
||||||
|
title: 'Inward Gate Register',
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':visible:not(:last-child)' // Exclude first and last columns
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
extend: 'pdfHtml5',
|
||||||
|
text: 'Export to PDF',
|
||||||
|
title: 'Inward Gate Register',
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':visible:not(:last-child)' // Exclude first and last columns
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1579,7 +1646,7 @@ $(document).ready(function() {
|
|||||||
var fromDate = $("#fromDate").datepicker("getDate");
|
var fromDate = $("#fromDate").datepicker("getDate");
|
||||||
var toDate = $("#toDate").datepicker("getDate");
|
var toDate = $("#toDate").datepicker("getDate");
|
||||||
|
|
||||||
var dateStr = data[1]; // Assuming the date is in the first column
|
var dateStr = data[0]; // Assuming the date is in the first column
|
||||||
|
|
||||||
// Convert dateStr to Date object
|
// Convert dateStr to Date object
|
||||||
var dateParts = dateStr.split("-");
|
var dateParts = dateStr.split("-");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user