From 8550d370ce4d389c32f14b9e6da5f15d1a70cc75 Mon Sep 17 00:00:00 2001 From: Smart Date: Tue, 24 Sep 2024 16:30:58 +0530 Subject: [PATCH 1/3] GWM : loan master --- app/Controllers/Payslip.php | 12 +++++-- app/Views/editOldemppay.php | 66 ++++++++++++++-------------------- app/Views/monthlypayinputs.php | 61 ++++++++++++++++--------------- 3 files changed, 67 insertions(+), 72 deletions(-) diff --git a/app/Controllers/Payslip.php b/app/Controllers/Payslip.php index edaec602..5de14363 100755 --- a/app/Controllers/Payslip.php +++ b/app/Controllers/Payslip.php @@ -67,7 +67,7 @@ class Payslip extends BaseController $PayOn = $this->request->getPost('payon'); $EmpId = $this->request->getPost('employee'); - + $res = $this->payroll_model->getMonthlyPayDetails($EmpId, $PayOn); $result = $res[0]; @@ -83,10 +83,13 @@ class Payslip extends BaseController { $loan_id = $result->Loan_ID; + if($result->Remaining_Due - 1 == 0){ $is_Active = 0; }else{ $is_Active = 1; } + $loan = [ 'Paid_Due' => $result->Paid_Due + 1, 'Remaining_Due' => $result->Remaining_Due - 1, 'Paid_Amount' => $result->Paid_Amount + $result->Loan_Recovered, + 'is_Active' => $is_Active ]; $loanHistory = [ @@ -130,11 +133,16 @@ class Payslip extends BaseController 'ESINumber' => $result->ESINO, 'UANNO' => $result->PFNO, ]; + + // print_r($result); // print_r($loan); // print_r($loanHistory); // print_r($data); // die; + + + $insert = $this->payroll_model->insertPayroll($data); if($insert){ if(count($loan)){ @@ -703,7 +711,7 @@ class Payslip extends BaseController $data['pf'] = $pf; $data['over_time'] = $ot; -// dd($data); + $this->global['pageTitle'] = 'Payroll Monthly Inputs'; $this->loadViews("monthlypayinputs", $this->global, $data, NULL); } diff --git a/app/Views/editOldemppay.php b/app/Views/editOldemppay.php index fef1c8ff..bcfd424e 100755 --- a/app/Views/editOldemppay.php +++ b/app/Views/editOldemppay.php @@ -246,17 +246,30 @@ if (!empty($emppay)) {
Paid Amount - +
+
+
+ Paid Due + +
+
+
+
+ Remaining Due + +
+
+ - - +
- +
@@ -308,27 +321,7 @@ if (!empty($emppay)) { - - - - - - - +ConfigValue; +} + +$insuranceStatus = array( + array("name" => "NO", "value" => "0"), + array("name" => "YES", "value" => "1") +); +$ReqType = ''; +$CompanyAddress = ''; +$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); +$CurrentDate = $dt->format('d-m-Y'); +$MaxPoDate = ''; +$AvlAmount = 0; +$paymentDate = ''; +$paymentCheckDays = 'Before'; +$paymentCheckDays1 = 'After'; +if (!empty($MaxPODate)) { + foreach ($MaxPODate as $date) { + + $MaxPoDate = $date->PODate; + } +} +if (!empty($CompanyDetails)) { + foreach ($CompanyDetails as $Req) { + $CompanyAddress = $Req->Address; + } +} +if (!empty($AvlBudAmt)) { + + $AvlAmount = number_format($AvlCapitalBudAmt, 2, '.', ''); +} + +// if(!empty($AvlimportBudAmt)) +// { + +// $AvlAmount = $AvlimportBudAmt; + +// } + + + +$INR = ''; +$INRSYM = ''; +if (!empty($INRSYMBOL)) { + foreach ($INRSYMBOL as $INR) { + $INRSYM = $INR->Currency_Code; + $INR = $INR->FontCode2000; + } +} + +// echo $INRSYM; +// echo $INR; + +?> + + + + + + + + -
-
- -
- -
-
-
-

- Back -
+ } + +
+
+ +
+ +
+
+
+

+ Back
- - -
-
-
-
- 'form-label-left CapitalPO ', 'name' => 'CapitalPO', 'id' => 'ImportPO', 'enctype' => 'multipart/form-data'); - echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> +
+ + +
+
+
+
+ 'form-label-left CapitalPO ', 'name' => 'CapitalPO', 'id' => 'ImportPO', 'enctype' => 'multipart/form-data'); + echo form_open(base_url() . '/purchaseorder/addPO/', $attributes); ?> -
-
- - +
+ + 'Selected Requisition Numbers'); - if (!empty($ReqList)) { - foreach ($ReqList as $SID) : - - // print_r($SID->ReqNo); - $options[$SID->ReqNo] = $SID->ReqNo . "-" . $SID->ReqBy; - $ReqType = $SID->ReqType; - endforeach; - } - echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"'); - ?> -
-
- -
- - 'POType', 'value' => set_value('POType', CAPITAL), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
- - 'Select Supplier'); - //print_r( $options); - - if (!empty($Suplist)) { - foreach ($Suplist as $SID) : - $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; - endforeach; - } - echo form_dropdown('drpSupplier', $options, set_value('drpSupplier'), 'id="drpSupplier" required="true" class="form-control select2"'); - - ?> -
-
- -
- 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
+ $options = array("0" => 'Selected Requisition Numbers'); + if (!empty($ReqList)) { + foreach ($ReqList as $SID) : + // print_r($SID->ReqNo); + $options[$SID->ReqNo] = $SID->ReqNo . "-" . $SID->ReqBy; + $ReqType = $SID->ReqType; + endforeach; + } + echo form_multiselect('RequistionNo', $options, set_value('RequistionNo', array()), 'id="RequistionNo"', 'required="true"'); + ?>
- -
-
- -
- 'Select Currency Type '); - //print_r( $options); - if (!empty($Currency)) { - foreach ($Currency as $Cur) : - - $options[$Cur->Currency_Code] = $Cur->Currency_Code . ' ' . ' - ' . ' ' . $Cur->Country_and_Currency; - - endforeach; - } - echo form_dropdown('currencytype', $options, set_value('currencytype'), 'id="currencytype" class="form-control select2" required="true"'); - ?> - -
-
-
- Select Delivery By*
-
-
-
- - "DateRange", "id" => "Date", "value" => "2", 'checked' => set_radio('DateRange', '2', FALSE))); ?>     -
-
- "DateRange", "id" => "DeliverycheckDate", "value" => "0", 'checked' => set_radio('DateRange', '0', FALSE))); ?>     -
-
- "DateRange", "id" => "Schedule", "value" => "1", 'checked' => 'checked')); ?> -
-
-
-
-
- +
+ +
'Scheduleby', 'value' => set_value('Scheduleby'), 'id' => 'Scheduleby', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110'); + $data = array('name' => 'POType', 'value' => set_value('POType', CAPITAL), 'id' => 'POType', 'class' => 'form-control', 'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ + 'Select Supplier'); + //print_r( $options); + + if (!empty($Suplist)) { + foreach ($Suplist as $SID) : + $options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName; + endforeach; + } + echo form_dropdown('drpSupplier', $options, set_value('drpSupplier'), 'id="drpSupplier" required="true" class="form-control select2"'); + + ?> +
+
+ +
+ 'SupAddress', 'value' => set_value('SupAddress'), 'id' => 'SupAddress', 'class' => 'form-control', 'readonly' => 'true', 'rows' => '3', 'cols' => '40'); echo Form_textarea($data); ?> -
- +
+ +
+
+ +
'Dispatch','value' => set_value('Dispatch'),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true'); - // echo form_input($data); - $data = array('name' => 'Dispatch', 'value' => set_value('Dispatch'), 'id' => 'Dispatch', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40', 'maxlength' => '110'); - echo Form_textarea($data); - - ?> - -
- -
- -
- 'DeliveryAddr', 'value' => set_value('DeliveryAddr', $CompanyAddress), 'id' => 'DeliveryAddr', 'class' => 'form-control', 'required' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
-
- -
-
- Check Today's Foreign Exchange value (Click here) -
-
- -
- format('d-m-Y'); - $data = array('type' => 'text', 'name' => 'Exchangerateon', 'value' => set_value('Exchangerateon', $formattedDate), 'id' => 'Exchangerateon', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
-
-
- * -
- 'ExchangeRt', 'value' => set_value('ExchangeRt'), 'id' => 'ExchangeRt', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);'); - echo form_input($data); - ?> -
- -
-
- -
- 'PlaceOforigin','value' => set_value('PlaceOforigin'),'id'=>'PlaceOforigin', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); - // echo form_input($data); - $data = array('name' => 'PlaceOforigin', 'value' => set_value('PlaceOforigin'), 'id' => 'PlaceOforigin', 'class' => 'form-control', 'required' => 'true'); - echo form_input($data); - ?> -
-
-
- -
-
- -
- format('d-m-Y'); - $data = array('type' => "text", 'name' => 'PODate', 'value' => set_value('PODate', $formattedDate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); - echo form_input($data); - ?> -
-
-
- -
- - 'addmodeofshipment', 'value' => set_value('addmodeofshipment'), 'id' => 'addmodeofshipment', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- -
- - 'addsupplierreference', 'value' => set_value('addsupplierreference'), 'id' => 'addsupplierreference', 'class' => 'form-control', 'maxlength' => '40'); - echo form_input($data); - ?> -
-
-
- -
- - 'addsupplierofferno', 'value' => set_value('addsupplierofferno'), 'id' => 'addsupplierofferno', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- -
-
- -
- - 'addotherreference', 'value' => set_value('addotherreference'), 'id' => 'addotherreference', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- -
- - 'Select'); - if (!empty($PoTypeOptions)) { - foreach ($PoTypeOptions as $POpt) : - $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; - endforeach; - } - - echo form_dropdown('PoTypeOptions', $optionsPO, set_value('PoTypeOptions'), 'id="PoTypeOptions" required="true" class="form-control select2"'); - - - ?> -
-
-
- - 'Select Payment method'); + $options = array("0" => 'Select Currency Type '); //print_r( $options); + if (!empty($Currency)) { + foreach ($Currency as $Cur) : - if (!empty($Payment)) { - foreach ($Payment as $payment) : - - $options1[$payment->PaymentID] = $payment->PaymentTerms; + $options[$Cur->Currency_Code] = $Cur->Currency_Code . ' ' . ' - ' . ' ' . $Cur->Country_and_Currency; endforeach; } - - echo form_dropdown('PaymentMethod', $options1, set_value('PaymentMethod'), 'id="PaymentMethod" class="form-control" required="true"'); - - ?> -
- - -
- -
- -
- -
- - -
-
-
- -
- 'InsuranceNumber', 'value' => set_value('InsuranceNumber'), 'id' => 'InsuranceNumber', 'class' => 'form-control', 'required' => 'true'); - echo form_input($data); - ?> -
-
-
- - 'Select', '1' => 'REVENUE', '2' => 'CAPITAL'); - echo form_dropdown('BudgetType', $optionsnew, set_value('BudgetType'), 'id="BudgetType" required="true" class="form-control select2"'); - - ?> -
-
- -
- - -
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - -
SNoRequisition NoItem CodeItem DescriptionQuantityUOMRateBasic AmountTax AmountTotal Order AmountAction
-
- -
-
- - - 'CapitalBasicOrder', 'value' => set_value('CapitalBasicOrder'), 'id' => 'CapitalBasicOrder', 'class' => 'form-control num', 'readonly' => 'true',); - echo form_input($data); - ?> -
-
- - - - 'txtTotalDiscount', 'value' => set_value('txtTotalDiscount'), 'id' => 'txtTotalDiscount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); + echo form_dropdown('currencytype', $options, set_value('currencytype'), 'id="currencytype" class="form-control select2" required="true"'); ?>
-
- - '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); - ?> -
-
- - 'TotalOtherAllowances', 'value' => set_value('TotalOtherAllowances'), 'id' => 'TotalOtherAllowances', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> - -
-
- - 'TotalFreight', 'value' => set_value('TotalFreight'), 'id' => 'TotalFreight', 'class' => 'form-control num', 'readonly' => 'true'); - echo form_input($data); - ?> - -
-
- -
- -
- - - 'txttotallanding', 'value' => set_value('txttotallanding'), 'id' => 'txttotallanding', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalAssessable', 'value' => set_value('txttotalAssessable'), 'id' => 'txttotalAssessable', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalcustom', 'value' => set_value('txttotalcustom'), 'id' => 'txttotalcustom', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalSubtotal', 'value' => set_value('txttotalSubtotal'), 'id' => 'txttotalSubtotal', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalIgst', 'value' => set_value('txttotalIgst'), 'id' => 'txttotalIgst', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalcustomED', 'value' => set_value('txttotalcustomED'), 'id' => 'txttotalcustomED', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalcustomSH', 'value' => set_value('txttotalcustomSH'), 'id' => 'txttotalcustomSH', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txttotalgrossduty', 'value' => set_value('txttotalgrossduty'), 'id' => 'txttotalgrossduty', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> -
- -
- - - 'txtTotalFreight', 'value' => set_value('txtTotalFreight'), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); - echo form_input($data); - ?> - -
- -
- -
-
- - - 'CapitalToatlOrder', 'value' => set_value('CapitalToatlOrder'), 'id' => 'CapitalToatlOrder', 'class' => 'form-control num', 'readonly' => 'true',); - echo form_input($data); - ?> -
-
- -
-
- - 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction'), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); - echo form_textarea($data); - ?> -
-
- -
-
- - - - - - - - - - -   Reset -   Save as Draft -   Submit - -
-
-
-
-
-
-
-
-
- - -