From 440c772645ec3ba4ec01ef72ab93307db5fd0386 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Fri, 16 Aug 2024 10:22:46 +0000 Subject: [PATCH] FIX_From date and to date --- app/Controllers/Inwardgateregister.php | 66 +- app/Models/Department_model.php | 2 +- app/Models/Inwardgateregister_model.php | 8 +- app/Models/Purchaseorder_model.php | 2 +- app/Models/User_model.php | 2 +- app/Views/AmendPOlist.php | 140 ++- app/Views/EditservicePurchaseorder.php | 17 +- app/Views/POlist.php | 64 +- app/Views/Report_pending_purchase.php | 18 +- app/Views/alterpurchaseorder.php | 4 +- app/Views/assetListing.php | 273 ++++-- app/Views/configlisting.php | 284 ++++-- app/Views/costListing.php | 173 +++- app/Views/departmentListing.php | 308 ++++-- app/Views/editServiceAmendPO.php | 6 +- app/Views/employeeListing.php | 320 ++++-- app/Views/inwardgateregister.php | 13 +- app/Views/po_pdf.php | 3 +- app/Views/porelease_view.php | 889 +++++++++-------- app/Views/rawmaterialListing.php | 290 ++++-- app/Views/servicePurchaseorder.php | 1192 +++++++++++------------ app/Views/supplierListing.php | 387 +++++--- app/Views/userListing.php | 365 ++++--- app/Views/viewinwardgateregister.php | 125 ++- 24 files changed, 3156 insertions(+), 1795 deletions(-) diff --git a/app/Controllers/Inwardgateregister.php b/app/Controllers/Inwardgateregister.php index a82917df..00edb421 100755 --- a/app/Controllers/Inwardgateregister.php +++ b/app/Controllers/Inwardgateregister.php @@ -311,7 +311,6 @@ class Inwardgateregister extends BaseController function SaveIGR() { - //print_r($this->request->getPost());die; #Step 1 IGR Details $PONO = $this->request->getPost('PONO'); $IsThisOpenOrderPO = $this->request->getPost('hiddenIsOpenOrder'); @@ -362,9 +361,9 @@ class Inwardgateregister extends BaseController // print_r( $igr );die; #Step 4 Calling DB to Save IGR Master $IGRNO = $this->inwardgateregister_model->addigrM($igr); - // Get the uploaded files - // $IGRNO = "IGRNO02750"; - // $IGRNO = "IGRNO02734"; + // echo "master - no problem"; + // $IGRNO = "IGRNO02767"; + // print_r($this->request->getPost());die; if($IGRNO){ $files = $this->request->getFiles(); $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; $TareWeightDate = !empty($tareWeightDate) && is_string($tareWeightDate) ? date('Y-m-d H:i:s', strtotime($tareWeightDate)) : null; log_message('error', "TareWeightDate" . $TareWeightDate); - if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') { $Remarks = $this->request->getPost('txtRemarks' . $i); $ItemStatus = ''; - if ($PendingQty == 0.00) { - $ItemStatus = $IGRStatus; - } else { + if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') { + if ($PendingQty == 0.00) { + $ItemStatus = $IGRStatus; + } else { + $ItemStatus = POLINEITEM_IGRPARTIAL_CREATED; + } + } + else if ((int)$IsThisOpenOrderPO == 1) { $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; + log_message('error', 'SaveIGR igrDetails result : ' . json_encode($igrDetails)); - + $igrlineno = ""; $igrD = $this->inwardgateregister_model->addigrD($igrDetails); $igrlineno = !empty($igrD) ? $igrD : ''; @@ -527,7 +531,7 @@ class Inwardgateregister extends BaseController log_message('error', "History updated successfully. History id: " . $history_id); } $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)) { foreach ($get_pre_qty as $gt) { $av_qty = $gt->Current_stock; @@ -543,49 +547,11 @@ class Inwardgateregister extends BaseController $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); $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); #Step 9 Updating Pending Quantity IN PO Master amd Line Item Details. diff --git a/app/Models/Department_model.php b/app/Models/Department_model.php index 19788715..e306a6f2 100644 --- a/app/Models/Department_model.php +++ b/app/Models/Department_model.php @@ -51,7 +51,7 @@ class Department_model extends Model function departmentListing() { $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"); $query =$builder->get(); $result = $query->getResult(); diff --git a/app/Models/Inwardgateregister_model.php b/app/Models/Inwardgateregister_model.php index 1fdc17ce..915355ff 100755 --- a/app/Models/Inwardgateregister_model.php +++ b/app/Models/Inwardgateregister_model.php @@ -153,7 +153,7 @@ class Inwardgateregister_model extends Model ->join('t_purchaseorder_lineitem POL', 'POL.PONO = POM.PONO') ->join('t_supplierdetailsn sup', 'POM.SupplierID = sup.SupplierID') ->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) ->orWhere('POM.Status',REQITEM_Emergency_PO_CREATED) ->orWhere('POM.Status',IGR_CREATED) @@ -164,6 +164,7 @@ class Inwardgateregister_model extends Model $query = $builder->get(); $result = $query->getResult(); + // echo $this->db->getLastQuery()->getQuery(); die; return $result; } @@ -328,11 +329,10 @@ class Inwardgateregister_model extends Model ->join('t_purchaseorder_master PO', 'igr.PONO = PO.PONO') ->join('t_supplierdetailsn` sup', 'PO.SupplierID = sup.SupplierID') ->where('igr.IGRStatus !=', MRIR_CREATED) - ->where('PO.IsQualityChkReqired', 1) ->orderBy('igr.CreatedDate', 'desc'); $query = $builder->get(); $result = $query->getResult(); - + // echo $this->db->getLastQuery()->getQuery();die; return $result; } @@ -346,7 +346,7 @@ class Inwardgateregister_model extends Model $builder = $this->db->table('t_igr_master igr') ->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_purchaseorder_master POM', 'igr.PONO = POM.PONO') ->join('t_purchaseorder_lineitem POL', 'igr.PONO = POL.PONO and POL.MaterialCode=igrd.MaterialCode ') diff --git a/app/Models/Purchaseorder_model.php b/app/Models/Purchaseorder_model.php index 440ef89b..b9898986 100644 --- a/app/Models/Purchaseorder_model.php +++ b/app/Models/Purchaseorder_model.php @@ -1578,7 +1578,7 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per, $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') // ->orderBy('mast.Status',"PO_CREATED"); diff --git a/app/Models/User_model.php b/app/Models/User_model.php index cf61f531..d51487b4 100644 --- a/app/Models/User_model.php +++ b/app/Models/User_model.php @@ -18,7 +18,7 @@ class User_model extends Model function userListing() { $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') ->join('t_departmentdetails DEPT', 'EMP.Departmentcode = DEPT.DEPCode') ->join('tbl_users user', 'user.EmpID = EMP.EmpID') diff --git a/app/Views/AmendPOlist.php b/app/Views/AmendPOlist.php index 932105d0..e9fdfd32 100644 --- a/app/Views/AmendPOlist.php +++ b/app/Views/AmendPOlist.php @@ -5,6 +5,40 @@ margin: 0px !important; } +
@@ -20,13 +54,25 @@
+
+ + + + + + + + + +
+
- - + + @@ -44,12 +90,12 @@ ?> - - + + @@ -121,7 +167,7 @@ - --> + + \ No newline at end of file diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index 26d5cc45..50bf0d6d 100644 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -1986,7 +1986,7 @@ if (!empty($getlogpodtl)) { - + @@ -2022,7 +2022,7 @@ if (!empty($getlogpodtl)) { - + @@ -2477,10 +2477,6 @@ if (!empty($getlogpodtl)) { - - - -
PONO#PO Type PO DatePONOPO Type Supplier Name Total Order Value PO Status
PONO ?>ReqType ?> PODate); $PODate = $Pdt->format('d-m-Y'); echo $PODate ?>PONO ?>ReqType ?> SupplierName ?> TotalOrderValue ?> SNo Requisition No Item CodeItem DescriptionItem Name Quantity UOM Rate ReqNo ?> MaterialCode ?>ServiceMaterialDescription ?>MaterialName ?> Quantity ?> UOM ?><%=BasicAmount%> <%=Taxvalue%> <%=TotalValue%><%=ActualQuantity%><%=ReceivedQuantity%><%=PendingQuantity%>     @@ -2580,16 +2576,13 @@ if (!empty($getlogpodtl)) { index: temp, ReqNo: Reqnumber, MaterialCode: materialCode, - MaterialName: ServiceDescription, + MaterialName: materialName, Quantity: quantity, UOM: uom, Rate: itemRate, BasicAmount: basicval, Taxvalue: TotalTaxValue, - TotalValue: TotalOrderValue, - ActualQuantity: quantity, - ReceivedQuantity: 0, - PendingQuantity: quantity + TotalValue: TotalOrderValue })); @@ -2684,7 +2677,7 @@ if (!empty($getlogpodtl)) { var cellval = tr.cells; cellval[2].innerHTML = editMaterialCode; - cellval[3].innerHTML = ServiceDescription; + cellval[3].innerHTML = editDescription; cellval[4].innerHTML = editQuantity; cellval[5].innerHTML = editUOM; cellval[6].innerHTML = parseFloat(itemRate).toFixed(2); diff --git a/app/Views/POlist.php b/app/Views/POlist.php index 385c6dd5..35ded5e0 100644 --- a/app/Views/POlist.php +++ b/app/Views/POlist.php @@ -32,6 +32,29 @@ white-space: nowrap; } +
@@ -85,7 +108,6 @@ - @@ -105,7 +127,6 @@ $index = $index + 1; ?> -
PO Date PONO# PO Type
PODate ?> PODate); $PODate = $Pdt->format('d-m-Y'); echo $PODate @@ -184,25 +205,58 @@ + + + + + + + + - - + + \ No newline at end of file diff --git a/app/Views/configlisting.php b/app/Views/configlisting.php index 87a2a395..eb9978ea 100644 --- a/app/Views/configlisting.php +++ b/app/Views/configlisting.php @@ -1,100 +1,154 @@ -
-
-
-
-

Configuration Details

-
-
-
- -
-
- + .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; + } + +
+
+
+
+
+

Configuration Details

+
+
+
+
+
+
+ + + + + + + + + +
+
+
+ +
+
+
+ getFlashdata('error'); if ($error) { ?> -
- - getFlashdata('error'); ?> -
- - + + getFlashdata('error'); ?> +
+ + getFlashdata('success'); if ($success) { ?> -
- - getFlashdata('success'); ?> -
- +
+ + getFlashdata('success'); ?> +
+ -
-
- listErrors('
', '
'); +
+
+ listErrors('
', '
'); ?>
-
-
-
-
- - - - - - - - - - - - + +
+
+
Configuration IDConfiguration NameDescriptionCreate DateAction
+ + + + + + + + + + + - - - - - - - - - - CreatedDate)) == "30-11--0001") { + + CreatedDate)) == "30-11--0001") { $cdate = '00-00-0000'; } else { $cdate = date('d-m-Y', strtotime($record->CreatedDate)); } ?> - + + + + + - + - -     + + + + + - -
Create DateConfiguration IDConfiguration NameDescriptionAction
Config_ID ?>ConfigName ?>Comments ?>
Config_ID ?>ConfigName ?>Comments ?>     - -
-
+ +
- - - - - + + + + + + - - + + \ No newline at end of file diff --git a/app/Views/costListing.php b/app/Views/costListing.php index 9bb0564d..565966f0 100644 --- a/app/Views/costListing.php +++ b/app/Views/costListing.php @@ -1,4 +1,35 @@ -
+ +
@@ -8,19 +39,31 @@
-
-
- Add New Cost List +
+
+ + + + + + + + + +
+
+
+ +
- @@ -33,16 +76,13 @@ CreatedDate); $date = $createdat->format('d-m-Y'); $time = $createdat->format('h:i A'); ?> - - + @@ -123,22 +163,22 @@ + \ No newline at end of file diff --git a/app/Views/departmentListing.php b/app/Views/departmentListing.php index d4f6215c..33525d93 100644 --- a/app/Views/departmentListing.php +++ b/app/Views/departmentListing.php @@ -1,104 +1,164 @@ +
- - -
+ + +
-
- getFlashdata('error'); - if ($error) { - ?> -
- - getFlashdata('error'); ?> -
- - getFlashdata('success'); - if ($success) { - ?> -
- - getFlashdata('success'); ?> -
- +
+ getFlashdata('error'); + if ($error) { + ?> +
+ + getFlashdata('error'); ?> +
+ + getFlashdata('success'); + if ($success) { + ?> +
+ + getFlashdata('success'); ?> +
+ -
-
- listErrors('
', '
'); - ?>
-
-
+
+
+ listErrors('
', '
'); + ?>
-
-
-

Department Details

+
+
+
+
+
+

Department Details

+
-
-
+
+
-
-
- +
+
+
+ + + + + + + + + +
+ +
+ +
-
- -
Create Date Create Time Cost Center Code
CreatedDate ?> code ?> CostCenterName ?>
- +
+
+ + + + + + + + + + + + - - - - - + + CreatedDt)) == "30-11--0001") { + $cdate = '00-00-0000'; + } else { + $cdate = date('d-m-Y', strtotime($record->CreatedDt)); + } ?> + + + + + + - - - - - - - - - - - - - - -
Create DateDepartment CodeDepartment NameHead DepartmentIsActive
Department CodeDepartment NameHead DepartmentIsActive DEPCode; ?>DepartmentName ?>HeadDept ?>IsActive == 1) { + echo "Active"; + } else { + echo "In Active"; + } ?>
DEPCode; ?>DepartmentName ?>HeadDept ?>IsActive == 1){echo "Active";} - else { echo "In Active";} ?>
- -
+ + + +
+ +
- - - + + + - --> + \ No newline at end of file diff --git a/app/Views/editServiceAmendPO.php b/app/Views/editServiceAmendPO.php index 1b00e674..c5d82c94 100644 --- a/app/Views/editServiceAmendPO.php +++ b/app/Views/editServiceAmendPO.php @@ -1293,7 +1293,7 @@ foreach ($PaymentTerms as $TER) { SNo Requisition No Item Code - Item Description + Item Name Quantity UOM Rate @@ -1331,7 +1331,7 @@ foreach ($PaymentTerms as $TER) { ReqNo ?> MaterialCode ?> - ServiceMaterialDescription ?> + MaterialName ?> Quantity ?> UOM ?> Rate ?> @@ -1755,7 +1755,7 @@ foreach ($PaymentTerms as $TER) { var cellval = tr.cells; cellval[2].innerHTML = editMaterialCode; - cellval[3].innerHTML = materialspecialinstruction; + cellval[3].innerHTML = editDescription; cellval[4].innerHTML = editQuantity; cellval[5].innerHTML = editUOM; cellval[6].innerHTML = parseFloat(itemRate).toFixed(2); diff --git a/app/Views/employeeListing.php b/app/Views/employeeListing.php index 9663122d..5ce3392d 100644 --- a/app/Views/employeeListing.php +++ b/app/Views/employeeListing.php @@ -1,112 +1,174 @@
- +
-
-
+
+
getFlashdata('error'); - if($error){ + helper('form'); + $error = session()->getFlashdata('error'); + if ($error) { $type = "error"; echo show_alert($type, $error); } $success = session()->getFlashdata('success'); - if($success){ + if ($success) { $type = "success"; echo show_alert($type, $success); } - ?> + ?> -
-
- listErrors('
', '
'); - ?>
-
-
-
-
-
-

Employee Details

-
-
-
-
-
- Add New Employee - Export Employee Details +
+
+ listErrors('
', '
'); + ?>
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
Emp IDEmployee NameContact NumberDesignationDepartmentActive
EmpID ?> FirstName; ?>ContactNumber ?>Designation ?>DepartmentName ?>IsActive == 1)? ' Active ' : ' In Active ' ; ?>
- - - +
+
+
+
+

Employee Details

+
+
+
+
+
+
+ + + + + + + + + +
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + Created_date)) == "30-11--0001") { + $cdate = '00-00-0000'; + } else { + $cdate = date('d-m-Y', strtotime($record->Created_date)); + } ?> + + + + + + + + + + +
Created DateEmp IDEmployee NameContact NumberDesignationDepartmentActive
EmpID ?> FirstName; ?>ContactNumber ?>Designation ?>DepartmentName ?>IsActive == 1) ? ' Active ' : ' In Active '; ?>
+ + + +
+
-
-
- --> + \ No newline at end of file diff --git a/app/Views/inwardgateregister.php b/app/Views/inwardgateregister.php index f9d9a4bb..10cff9a4 100755 --- a/app/Views/inwardgateregister.php +++ b/app/Views/inwardgateregister.php @@ -87,7 +87,6 @@

-


@@ -462,6 +461,7 @@ $('#txtRowCount').val(''); var id = $('#PONO').val(); var status = ''; + var isOpenOrder = 0; if (id != '-1') { $('#content').loader('show'); var y = ; @@ -473,7 +473,7 @@ $("#po").val(obj.PONO); $("#Sup").val(obj.SupplierName); $("#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"; $('.help-block').text(formatted_IsOpenOrder); var button_text_for_IGRDraftLink = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? "Save as Draft IGR" : "Save as Open IGR"; @@ -510,7 +510,7 @@ '' + item.UOM + '' + '' + item.Quantity + '' + '' + item.ReceivedQuantity + '' + - '' + item.PendingQty + '' + + '' + ((isOpenOrder === 0 || isNaN(isOpenOrder)) ? item.PendingQty : 0 ) + '' + '' + ' ' + ' ' + @@ -554,7 +554,7 @@ type: 'hidden', id: 'txtPendingQty' + i, name: 'txtPendingQty' + i, - value: item.PendingQty + value: ((isOpenOrder === 0 || isNaN(isOpenOrder)) ? item.PendingQty : 0 ) }).appendTo('form'); $('').attr({ @@ -673,8 +673,11 @@ // InvoiceQty return true; }}else{ + console.log(InvoiceQty + RecQty); + $('#PendingQuantity' + Rowid).text(0.00); $('#txtPendingQty' + Rowid).val(0.00); - $("#txtQuantityAsPerInvoice" + Rowid).val(0.00); + $("#ReceivedQuantity" + Rowid).val(InvoiceQty + RecQty); + $("#txtQuantityAsPerInvoice" + Rowid).val((InvoiceQty + RecQty)); // InvoiceQty return true; } diff --git a/app/Views/po_pdf.php b/app/Views/po_pdf.php index 6f967cee..64d5697b 100755 --- a/app/Views/po_pdf.php +++ b/app/Views/po_pdf.php @@ -764,7 +764,8 @@ - + $value) { $AfterPackagingValue[] = isset($value->AfterPackagingValue) ? $value->AfterPackagingValue : 0.00; diff --git a/app/Views/porelease_view.php b/app/Views/porelease_view.php index b0789c75..395187b1 100644 --- a/app/Views/porelease_view.php +++ b/app/Views/porelease_view.php @@ -1,353 +1,404 @@ - - +
- - -
-
-
-

Purchase Order Approve List

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
Purchase Order NumberPurchase Order TypeCost Center NameSupplier NameCreated ByDepartmentCreated DateTotal Order ValueApproved ByStatusActionRemarks
PONO ?> RType ?> CostCenterName ?> SupplierName ?>FirstName ?>DepartmentName?>CreatedDate); - $CreatedDate = $Cdt->format('d-m-Y'); - echo $CreatedDate; - ?>TotalOrderValue ?>Approver?> 'AWAITING APPROVE', - 'AWAITING RELEASE' => 'AWAITING APPROVE', - 'RELEASER ONHOLD' => 'APPROVER ONHOLD', - 'PO RELEASED' => 'PO APPROVED', - ]; - - if (isset($record->StatusName) && !empty($record->StatusName)) { - if (isset($statusMappings[$record->StatusName])) { - echo $statusMappings[$record->StatusName]; - } else { - echo $record->StatusName; - } + + +
+
+
+
+

Purchase Order Approve List

+
+
+
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - StatusName == 'RELEASER ONHOLD' or $record->StatusName == 'AWAITING RELEASE' or $record->StatusName == 'AMENDMENT PO'){ - if($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED ){ - - ?> - - -
-
"; - }?> - - + + + StatusName == 'RELEASER ONHOLD' or $record->StatusName == 'AWAITING RELEASE' or $record->StatusName == 'AMENDMENT PO'){ + if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) { + + ?> + + +
-
"; + } ?> + + + + + + + + Remarks; }?> - - - - - - + ?> - - - - -
PO DatePurchase Order NumberPurchase Order TypeCost Center NameSupplier NameCreated ByDepartmentTotal Order ValueApproved ByStatusActionRemarks
PODate); + $PODate = $podt->format('d-m-Y'); + echo $PODate; + ?>PONO ?> RType ?> CostCenterName ?> SupplierName ?>FirstName ?>DepartmentName ?>TotalOrderValue ?>Approver ?> 'AWAITING APPROVE', + 'AWAITING RELEASE' => 'AWAITING APPROVE', + 'RELEASER ONHOLD' => 'APPROVER ONHOLD', + 'PO RELEASED' => 'PO APPROVED', + ]; + + if (isset($record->StatusName) && !empty($record->StatusName)) { + if (isset($statusMappings[$record->StatusName])) { + echo $statusMappings[$record->StatusName]; } else { - echo "Status not provided"; + echo $record->StatusName; } - - - - ?> - - - Remarks == ''){ - + } else { + echo "Status not provided"; + } + + + + ?> + + + Remarks == '') { + } else { + echo $record->Remarks; + } ?>
-
-
-
- -
+ +
+ +
+
+
+ +
- - - - + + + - - \ No newline at end of file + $(function() { + + $('#Items').DataTable({ + "paging": false, + "lengthChange": true, + "searching": false, + "ordering": false, + "info": false, + "autoWidth": false + + }); + + $.fn.dataTable.moment('DD-MM-YYYY'); + // $('#Requisition').DataTable({ + // columnDefs: [{ width: 200}], + // fixedColumns: true, + // paging: true, + // lengthChange: true, + // searching: true, + // ordering: true, + // aaSorting: [[ 0, "desc" ]], + + // info: true, + // autoWidth: true, + // pageLength: 10, + // lengthMenu: [10, 25, 50, 100] + + + // }); + }); + + + + \ No newline at end of file diff --git a/app/Views/rawmaterialListing.php b/app/Views/rawmaterialListing.php index d01ad659..c354edc5 100644 --- a/app/Views/rawmaterialListing.php +++ b/app/Views/rawmaterialListing.php @@ -1,96 +1,148 @@ - -
-
-
- getFlashdata('error'); - if($error){ - $type = "error"; - echo show_alert($type, $error); - } - $success = session()->getFlashdata('success'); - if($success){ - $type = "success"; - echo show_alert($type, $success); - } - ?> + +
+
+
+ getFlashdata('error'); + if ($error) { + $type = "error"; + echo show_alert($type, $error); + } + $success = session()->getFlashdata('success'); + if ($success) { + $type = "success"; + echo show_alert($type, $success); + } + ?> + +
+
+ listErrors('
', '
'); + ?>
+
-
-
-
-

Material Master Details

-
-
+
+
+
+
+
+

Material Master Details

+
+
+
-
- +
+
+ + + + + + + + + +
+
+
+
-
- - +
+
+ + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + CreatedDate)) == "30-11--0001") { + $cdate = '00-00-0000'; + } else { + $cdate = date('d-m-Y', strtotime($record->CreatedDate)); + } ?> + + - stock != null || ''){?> - - - - + stock != null || '') { ?> + + + + - + - - -
Created DateMaterial CodeMaterial DescriptionType of MaterialUOMOpening StockMaterial CategoryHSN Code
Created OnMaterial CodeMaterial DescriptionType of MaterialUOMOpening StockMaterial CategoryHSN Code
CreatedDate; ?>CreatedDate,0,'d/m/Y') ?>MaterialCode ?> MaterialCode ?> MaterialName ?> MaterialType ?> UOM ?>stock?>0stock ?>0 Category ?>HSNCODE ?>HSNCODE ?>
-
+ + + +
-
-
-
+
+
+
- --> + \ No newline at end of file diff --git a/app/Views/servicePurchaseorder.php b/app/Views/servicePurchaseorder.php index b6df14e9..edb0f790 100644 --- a/app/Views/servicePurchaseorder.php +++ b/app/Views/servicePurchaseorder.php @@ -1,9 +1,9 @@ "NO", "value" => "0"), array("name" => "YES", "value" => "1") + array("name" => "NO", "value" => "0"), + array("name" => "YES", "value" => "1") ); - $ReqType = ''; $CompanyAddress = ''; $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); @@ -26,9 +26,7 @@ if (!empty($AvlBudAmt)) { $AvlAmount = number_format($AvlBudAmt, 2, '.', ''); } - if (!empty($INRSYMBOL)) { - foreach ($INRSYMBOL as $INRS) { $INRSYM = $INRS->FontCode2000; } @@ -94,9 +92,6 @@ if (!empty($INRSYMBOL)) { yearRange: '0:+10' }); - - - $('#PoTypeOptions').change(function() { var potypeval = $('#PoTypeOptions').val(); var poopt = ; @@ -118,10 +113,6 @@ if (!empty($INRSYMBOL)) { } }); - - - - document.getElementById("Date").checked = true; $('#drpSupplier').change(function() { @@ -188,7 +179,6 @@ if (!empty($INRSYMBOL)) { $('#ReqNo').change(function() { - var id = $('#ReqNo').val(); $("#AvlBudAmt").val(''); @@ -510,7 +500,6 @@ if (!empty($INRSYMBOL)) { $('#EditTotalOrderValue').val(parseFloat(TotAmt).toFixed(2)); - } function calculateTaxValue() { @@ -628,16 +617,15 @@ if (!empty($INRSYMBOL)) {
'form-label-left ServicePO ', 'name' => 'ServicePO', 'id' => 'ServicePO', 'enctype' => 'multipart/form-data'); - echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?>
-
+

Service Purchase Order

Back -
+
@@ -658,7 +646,7 @@ if (!empty($INRSYMBOL)) { ?> -
+
@@ -668,7 +656,7 @@ if (!empty($INRSYMBOL)) { echo form_input($data); ?>
-
+
@@ -686,7 +674,7 @@ if (!empty($INRSYMBOL)) { ?> -
+
@@ -695,9 +683,9 @@ if (!empty($INRSYMBOL)) { echo Form_textarea($data); ?>
-
- - + + +
@@ -756,7 +744,7 @@ if (!empty($INRSYMBOL)) {
- +
@@ -800,7 +788,7 @@ if (!empty($INRSYMBOL)) {
-
+
@@ -855,7 +843,7 @@ if (!empty($INRSYMBOL)) {
-
+
@@ -902,601 +890,576 @@ if (!empty($INRSYMBOL)) {
-
+
-
- -
-
+ +
+ + + + 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction'), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); + echo form_textarea($data); ?> + +
+ + + +
+ + + + + + + + +
@@ -1505,7 +1468,7 @@ if (!empty($INRSYMBOL)) { - + @@ -1515,14 +1478,12 @@ if (!empty($INRSYMBOL)) { - - -
SNo Requisition No Item CodeItem DescriptionItem Name Quantity UOM Rate Action
-
+ + + -
@@ -1532,31 +1493,28 @@ if (!empty($INRSYMBOL)) { $data = array('name' => 'txtTotBasicAmount', 'value' => set_value('txtTotBasicAmount'), 'id' => 'txtTotBasicAmount', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?> -
+
'txtTotCgst', 'value' => set_value('txtTotCgst'), 'id' => 'txtTotCgst', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?> -
- - +
'txtTotSgst', 'value' => set_value('txtTotSgst'), 'id' => 'txtTotSgst', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?> -
+
'txtTotIgst', 'value' => set_value('txtTotIgst'), 'id' => 'txtTotIgst', 'class' => 'form-control num', 'readonly' => 'true'); echo form_input($data); ?> -
- +
-
+
-
- - + +
@@ -1582,19 +1539,18 @@ if (!empty($INRSYMBOL)) { $data = array('name' => 'descofpo', 'value' => set_value('descofpo'), 'id' => 'descofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); echo form_textarea($data); ?> -
-
+ +
'ScopeOfWork', 'value' => set_value('ScopeOfWork'), 'id' => 'ScopeOfWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); echo form_textarea($data); ?> -
- -
+ +
-
+

@@ -1608,19 +1564,15 @@ if (!empty($INRSYMBOL)) {   Reset   Save as Draft   Submit -
-

-
- -
- - - - - - - - + +
+ + + + + + + - + + + +
+
+
+

Supplier Listing

+
+
+
+
+
+
+ + + + + + + + + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + CreatedOn)) == "30-11--0001") { + $cdate = '00-00-0000'; + } else { + $cdate = date('d-m-Y', strtotime($record->CreatedOn)); + } ?> + + + + + + + + + + + + + +
Created DateSupplier IDSupplier NameAddressContact NumberEmail AddressPANGST NumberPayment Terms
SupplierID ?>SupplierName ?>Address ?>ContactNumber ?>EmailAddress ?>PAN ?>GSTNO ?>PaymentTerms ?>IsActive == 0) { + echo "Deactived"; + } else { ?> +     + +
+ +
+
+
+
+ +
+ + + \ No newline at end of file diff --git a/app/Views/userListing.php b/app/Views/userListing.php index ab347e3c..99ed5b13 100644 --- a/app/Views/userListing.php +++ b/app/Views/userListing.php @@ -1,138 +1,269 @@ - +
- +
-
-
- getFlashdata('error'); - if($error){ +
+
+ getFlashdata('error'); + if ($error) { $type = "error"; echo show_alert($type, $error); } $success = session()->getFlashdata('success'); - if($success){ + if ($success) { $type = "success"; echo show_alert($type, $success); } - ?> + ?> -
-
- listErrors('
', '
'); - ?>
-
-
-
-
-
-

User Listing

-
-
-
-
-
- Add New User +
+
+ listErrors('
', '
'); + ?>
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
User IdUser NameEmailContact NumberDesignationDepartmentRole NameActions
userId ?>FirstName ?>EmailId ?>ContactNumber ?>Designation ?>DepartmentName ?>role ?> -     - -     -
- +
+
+
+

User Listing

+
+
+
+
+
+
+ + + + + + + + + +
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + createdDtm)) == "30-11--0001") { + $cdate = '00-00-0000'; + } else { + $cdate = date('d-m-Y', strtotime($record->createdDtm)); + } ?> + + + + + + + + + + + + +
Created DateUser NameEmailContact NumberDesignationDepartmentRole NameActions
FirstName ?>EmailId ?>ContactNumber ?>Designation ?>DepartmentName ?>role ?> +     + +     +
+ +
+
-
-
+ // $(function () { + // $('#datatable').DataTable({ + // "paging": true, + // "lengthChange": true, + // "searching": true, + // "ordering": true, + // "info": true, + // "autoWidth": true + + // }); + // }); + + + + function deleteUser(userid) { + var answer = confirm(" Do you want to delete the user from the List?") + if (answer) { + $.ajax({ + data: { + id: userid + }, + type: "POST", + url: "user/deleteUser", + success: function(data) { + if (data) { + $('#content').loader('hide'); + alert(data); + + location.reload(); + + + } else { + alert("Error"); + } + + } + }); + } + } + + \ No newline at end of file diff --git a/app/Views/viewinwardgateregister.php b/app/Views/viewinwardgateregister.php index 9385c0a0..7053b6e9 100644 --- a/app/Views/viewinwardgateregister.php +++ b/app/Views/viewinwardgateregister.php @@ -48,6 +48,29 @@ white-space: nowrap; } + @@ -1524,8 +1559,20 @@ function deleteBill(Billno,i){ + + + + + + + +