diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 1971a74a..5dc43d28 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -258,6 +258,7 @@ $routes->post('UpdateIGR', 'Inwardgateregister::UpdateIGR'); $routes->post('updateIGRWeight', 'Inwardgateregister::updateIGRWeight'); $routes->post('UpdateIGRLineItem', 'Inwardgateregister::updateIGRLineItem'); $routes->post('ViewIGRHistory', 'Inwardgateregister::ViewIGRHistory'); +$routes->post('getCostCenterData', 'Inwardgateregister::getCostCenterData'); $routes->post('ViewIGRfile', 'Inwardgateregister::ViewIGRfile'); $routes->post('inwardgateregister/addloadfile', 'Inwardgateregister::addloadfile'); $routes->post('inwardgateregister/edituploadfile', 'Inwardgateregister::edituploadfile'); diff --git a/app/Controllers/Inwardgateregister.php b/app/Controllers/Inwardgateregister.php index c9116b3c..5ca365b9 100755 --- a/app/Controllers/Inwardgateregister.php +++ b/app/Controllers/Inwardgateregister.php @@ -580,6 +580,13 @@ function viewIGRDetails() $result = $this->inwardgateregister_model->ViewIGRHistory($IGRNO); return $this->response->setJSON($result); } + function getCostCenterData() + { + $pono = $this->request->getPost('pono'); + $result = $this->inwardgateregister_model->getCostCenterData($pono); + + return $this->response->setJSON($result); + } function UpdateIGR() diff --git a/app/Models/Inwardgateregister_model.php b/app/Models/Inwardgateregister_model.php index 3fa342be..400cc159 100755 --- a/app/Models/Inwardgateregister_model.php +++ b/app/Models/Inwardgateregister_model.php @@ -916,4 +916,22 @@ class Inwardgateregister_model extends Model $query = $result->get(); return $query->getResult(); } + + public function getCostCenterData($pono) + { + $builder = $this->db->table('t_purchaseorder_lineitem'); + + $builder->select('t_purchaseorder_lineitem.ReqNo,reqMaster.CostCenterCode,CSMaster.CostCenterName'); + $builder->join('t_requestion_master reqMaster', 't_purchaseorder_lineitem.ReqNo = reqMaster.ReqNo', 'left'); + $builder->join('t_costcenter_master CSMaster', 'reqMaster.CostCenterCode = CSMaster.CostCenterCode', 'left'); + $builder->where('PONO', $pono); + $builder->groupBy('t_purchaseorder_lineitem.ReqNo'); + $query = $builder->get(); + $result = $query->getResult(); + return $result; + + + } + + } \ No newline at end of file diff --git a/app/Views/createPOfromRequistion.php b/app/Views/createPOfromRequistion.php index ff7dc4fe..c87b9db2 100644 --- a/app/Views/createPOfromRequistion.php +++ b/app/Views/createPOfromRequistion.php @@ -26,6 +26,13 @@ { min-height: 733px; } + #REQLIST_filter{ + float: inline-end; + } + #REQLIST_wrapper .row .col-sm-4{ + flex-basis: 50%; + float: inline-end; + }
Select + Requested Date Requistion Number Requistion Type Requested By - Requested Date Tot. No. Of Line Items Po Created Line Items Partial PO Created Line Items @@ -251,14 +258,17 @@ ?>   - ReqNo; ?> - ReqType; ?> - FirstName; ?> - ReqDate); + + ReqDate); $RequestedDate = $dt->format('d-m-Y'); echo $RequestedDate; - ?> + ?> + + ReqNo; ?> + ReqType; ?> + FirstName; ?> + TotalNoofLineItems; ?> PolineItems; ?> PartilallyLineItems; ?> @@ -367,7 +377,7 @@ function selectReqNo(rowId) if(!ckb ) { - var removeItem = cellval[1].innerText; + var removeItem = cellval[2].innerText; $.each(RequistionList.Req, function(i, el){ @@ -389,13 +399,13 @@ function selectReqNo(rowId) if(RequistionList.Req.length > 0) { - if(Type == cellval[2].innerText ) + if(Type == cellval[3].innerText ) { RequistionList.Req.push({ - "ReqNo" : cellval[1].innerText, - "ReqType" : cellval[2].innerText, - "ReqBy" : cellval[3].innerText, + "ReqNo" : cellval[2].innerText, + "ReqType" : cellval[3].innerText, + "ReqBy" : cellval[4].innerText, }); @@ -413,11 +423,11 @@ function selectReqNo(rowId) RequistionList.Req.push({ - "ReqNo" : cellval[1].innerText, - "ReqType" : cellval[2].innerText, - "ReqBy" : cellval[3].innerText, + "ReqNo" : cellval[2].innerText, + "ReqType" : cellval[3].innerText, + "ReqBy" : cellval[4].innerText, }); - Type =cellval[2].innerText; + Type =cellval[3].innerText; } @@ -477,8 +487,8 @@ $(function () { "paging": true, "lengthChange": true, "searching": true, - "columnDefs" : [{"targets":4, "type":"date-eu"}], - "aaSorting": [[ 4, "desc" ]], + "columnDefs" : [{"targets":1, "type":"date-eu"}], + "aaSorting": [[ 2, "desc" ]], "ordering": true, "info": true, "autoWidth": true diff --git a/app/Views/editrequisitionform.php b/app/Views/editrequisitionform.php index 5ca339bc..ef5aaba1 100644 --- a/app/Views/editrequisitionform.php +++ b/app/Views/editrequisitionform.php @@ -42,7 +42,27 @@ if (!empty($ReqPOType)) { } ?> + + + + + + --> + + + + @@ -281,31 +337,10 @@ - -
  • - - - Complaint - - - - - -
  • - - + + +

    PURCHASE

    @@ -435,8 +470,318 @@ + + + +
  • + + + Purchase order + + + + + +
  • + + + + + + AssDep; + if ( + $assd == PURCHASE || + $assd == FINANCE || + $assd == MANAGEMENT || + $DEPCode == PURCHASE || + $DEPCode == FINANCE || + $DEPCode == MANAGEMENT + ) { + $check = $check + 1; ?> +
  • + + + Purchase order + + + + + +
  • + AssDep; + $check1 = 1; + ?> + + + + + + + + + + + +
  • + + + Old Inspection + + + + + +
  • + + + + + AssDep; + //echo $assd; + if ( + $assd == STORE || + $DEPCode == QUALITY || + $assd == QUALITY || + $DEPCode == STORE || + $DEPCode == SECURITY || + $assd == SECURITY + ) { + $check81 = $check81 + 1; ?> +
  • + + + Inward + + + + + +
  • + + + AssDep; ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    INVENTORY

    @@ -550,6 +895,22 @@ }} ?> + + + + + + + + + + + + + + + +

    PRODUCTION

    @@ -623,7 +984,10 @@ } ?> - + + + + @@ -713,7 +1077,11 @@ - + + + + + @@ -783,6 +1151,19 @@ + + + + + + + + + + + + +

    OTHERS

    + + + - - - -
  • - - - Purchase order - - - - - -
  • - - - - - - AssDep; - if ( - $assd == PURCHASE || - $assd == FINANCE || - $assd == MANAGEMENT || - $DEPCode == PURCHASE || - $DEPCode == FINANCE || - $DEPCode == MANAGEMENT - ) { - $check = $check + 1; ?> -
  • - - - Purchase order - - - - - -
  • - AssDep; - $check1 = 1; - ?> - - - - - - - - @@ -1672,99 +1874,13 @@ } } ?> - - -
  • - - - Old Inspection - - - - - -
  • - - - - - AssDep; - //echo $assd; - if ( - $assd == STORE || - $DEPCode == QUALITY || - $assd == QUALITY || - $DEPCode == STORE || - $DEPCode == SECURITY || - $assd == SECURITY - ) { - $check81 = $check81 + 1; ?> -
  • - - - Inward - - - - - -
  • - - AssDep; ?> - - - - + + + + + + + + +
  • + + + Complaint + + + + + +
  • + diff --git a/app/Views/requisitionform.php b/app/Views/requisitionform.php index 930f88a3..2c61feb6 100644 --- a/app/Views/requisitionform.php +++ b/app/Views/requisitionform.php @@ -21,6 +21,18 @@ if (!empty($Emp)) { .num { text-align: right; } + #MaterialCode~.select2 .select2-selection--single{ + height: auto; + max-height: 45px; + padding: 5px 3px; + line-height: normal; + } + #MaterialCode~.select2 .select2-selection__rendered{ + overflow: visible; + text-overflow: ellipsis; + white-space: pre-wrap; + line-height: normal; + }
    @@ -34,12 +46,35 @@ if (!empty($Emp)) {
    + +
    + + + + * +
    + 'Select Requested By'); + if (!empty($RequestBy)) { + foreach ($RequestBy as $EID) : + $RequestByOpt[$EID->EmpID] = $EID->Full_Name; + endforeach; + } + echo form_dropdown('EmpID', $RequestByOpt, set_value('EmpID'), 'id="EmpID"', 'class = "form-control select2"', 'required="true"'); + // $data = array('name' => 'EmpID', 'value' => set_value('EmpID', $FirstName), 'id' => 'EmpID', 'class' => 'form-control', 'readonly' => 'true'); + // echo form_input($data); + ?> + +
    +
    +
    - + *
    'Select Request Type'); @@ -61,23 +96,7 @@ if (!empty($Emp)) {
    -
    - -
    - 'Select Requested By'); - if (!empty($RequestBy)) { - foreach ($RequestBy as $EID) : - $RequestByOpt[$EID->EmpID] = $EID->Full_Name; - endforeach; - } - echo form_dropdown('EmpID', $RequestByOpt, set_value('EmpID'), 'id="EmpID"', 'class = "form-control select2"', 'required="true"'); - // $data = array('name' => 'EmpID', 'value' => set_value('EmpID', $FirstName), 'id' => 'EmpID', 'class' => 'form-control', 'readonly' => 'true'); - // echo form_input($data); - ?> - -
    -
    +
    @@ -99,7 +118,7 @@ if (!empty($Emp)) {
    - + *
    'Select Cost Center Name'); @@ -112,7 +131,7 @@ if (!empty($Emp)) { endforeach; } - echo form_dropdown('CostCenter', $Costs, set_value('CostCenter'), 'id="CostCenter"', 'class = "form-control"'); + echo form_dropdown('CostCenter', $Costs, set_value('CostCenter'), 'id="CostCenter"', 'class = "form-control select2"'); ?> @@ -127,7 +146,7 @@ if (!empty($Emp)) { ?>
    -
    -
    - -
    - 'Description', 'value' => set_value('Description'), 'id' => 'Description', 'class' => 'form-control', 'readonly' => 'true'); - echo form_input($data); - - - - ?> -
    -
    - @@ -289,16 +307,8 @@ if (!empty($Emp)) {
    -
    - -
    - 'EditDescription', 'value' => set_value('EditDescription'), 'id' => 'EditDescription', 'class' => 'form-control', 'readonly' => 'true'); - echo form_input($data); - ?> -
    -
    -
    + +
    -
    +
    -
    +
    +
    + +
    + 'EditDescription', 'value' => set_value('EditDescription'), 'id' => 'EditDescription', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
    +
    @@ -365,9 +385,10 @@ if (!empty($Emp)) {
    -   Save - - + +   Save As Draft + +

    @@ -401,6 +422,8 @@ if (!empty($Emp)) { $("#CostCenter").select2(); $("#RequestType").select2(); $("#MaterialCode").select2(); + $("#EmpID").select2(); + $("#ScheduleType").select2(); $('#CostCenter').change(function() { @@ -453,7 +476,11 @@ if (!empty($Emp)) { $('#txtDeletedRow').val(''); $("#Description").val(''); $("#UOM").val(''); - $('#CostCenter').val("-1"); + // Get the ID of the first option + var firstOptionId = $('#CostCenter option:first').val(); + // Reset the Select2 dropdown to the first option + $('#CostCenter').val(firstOptionId).select2('data', { id: firstOptionId, text: $('#CostCenter option:selected').text() }); + removeHiddenRows($('#Items').find('tr').length); $('#tempAppend').empty(); @@ -661,10 +688,10 @@ if (!empty($Emp)) { diff --git a/app/Views/viewinwardgateregister.php b/app/Views/viewinwardgateregister.php index 2e9a5eb0..da6b741e 100644 --- a/app/Views/viewinwardgateregister.php +++ b/app/Views/viewinwardgateregister.php @@ -106,7 +106,7 @@ $createddate = new DateTime($record->CreatedDate); echo $createddate->format('d-m-Y h:i A'); ?> IGRNO ?> - PONO ?> + PONO ?> SupplierName ?> DeliveryChellanOrInvoiceNo ?> " title="IGR History" data-igrno="IGRNO ?>" data-pono="PONO ?>"> +   + @@ -370,6 +372,27 @@
    + + +