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/Controllers/Purchaseorder.php b/app/Controllers/Purchaseorder.php index 75d00545..e1da44f6 100755 --- a/app/Controllers/Purchaseorder.php +++ b/app/Controllers/Purchaseorder.php @@ -1215,6 +1215,7 @@ class Purchaseorder extends BaseController //This used to Edit the Revenue Purchase Order function EditRevenuePurchaseOrder() { + // print_r($this->request->getPost());die; $PONO = $this->request->getPost('txtPONO'); $POdt = $this->request->getPost('PODate'); $PODate = get_date_time_format($POdt); diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php index ed31234f..fba5c928 100755 --- a/app/Views/EditservicePurchaseorder.php +++ b/app/Views/EditservicePurchaseorder.php @@ -1201,7 +1201,7 @@ if (!empty($getlogpodtl)) { -     +     @@ -1271,7 +1271,7 @@ if (!empty($getlogpodtl)) {
-
+
-
+
'ScopeofWork', 'value' => set_value('ScopeofWork', strip_tags($ServiceDescription)), 'id' => 'ScopeofWork', 'class' => 'form-control', 'rows' => '10', 'cols' => '40'); @@ -2116,9 +2116,6 @@ if (!empty($getlogpodtl)) { ?>
- - - - - - -
@@ -2148,14 +2141,10 @@ if (!empty($getlogpodtl)) { $data = array('name' => 'ViewFrequency', 'value' => set_value('ViewFrequency'), 'id' => 'ViewFrequency', 'class' => 'form-control', 'readonly' => 'true'); echo form_input($data); ?> -
- -
-
@@ -2175,9 +2164,9 @@ if (!empty($getlogpodtl)) {
- 'ViewPer', 'value' => set_value('ViewPer'), 'id' => 'ViewPer', 'class' => 'form-control'); - echo form_input($data); ?> + + 'ViewPer', 'value' => set_value('ViewPer'), 'id' => 'ViewPer', 'class' => 'form-control'); + echo form_input($data); ?>
@@ -2188,27 +2177,21 @@ if (!empty($getlogpodtl)) { ?>
-
- CGST In %
-
- 'ViewCgst', 'value' => set_value('ViewCgst'), 'id' => 'ViewCgst', 'class' => 'form-control num', 'placeholder' => 'CGST TAX PERCENTAGE', 'readonly' => 'true'); echo form_input($data); ?>
-
- 'ViewAfterCgst', 'value' => set_value('ViewAfterCgst'), 'id' => 'ViewAfterCgst', 'class' => 'form-control num', 'placeholder' => 'After CGST', 'readonly' => 'true'); echo form_input($data); @@ -2216,17 +2199,13 @@ if (!empty($getlogpodtl)) {
-
- SGST In %
-
- 'ViewSgst', 'value' => set_value('ViewSgst'), 'id' => 'ViewSgst', 'class' => 'form-control num', 'placeholder' => 'SGST TAX PERCENTAGE', 'readonly' => 'true'); echo form_input($data); @@ -2236,43 +2215,33 @@ if (!empty($getlogpodtl)) {
- 'ViewAfterSgst', 'value' => set_value('ViewAfterSgst'), 'id' => 'ViewAfterSgst', 'class' => 'form-control num', 'placeholder' => 'After SGST', 'readonly' => 'true'); echo form_input($data); ?>
-
-
- IGST In %
-
- 'ViewIgst', 'value' => set_value('ViewIgst'), 'id' => 'ViewIgst', 'class' => 'form-control num', 'placeholder' => 'IGST TAX PERCENTAGE', 'readonly' => 'true'); echo form_input($data); ?>
-
- 'ViewAfterIgst', 'value' => set_value('ViewAfterIgst'), 'id' => 'ViewAfterIgst', 'class' => 'form-control num', 'placeholder' => 'After IGST', 'readonly' => 'true'); echo form_input($data); ?>
-
-
@@ -2302,21 +2271,18 @@ if (!empty($getlogpodtl)) {
- 'ViewtxtSpcialInstruction', 'value' => set_value('ViewtxtSpcialInstruction'), 'id' => 'ViewtxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40', 'readonly' => 'true'); - echo form_textarea($data); - ?> + + 'ViewtxtSpcialInstruction', 'value' => set_value('ViewtxtSpcialInstruction'), 'id' => 'ViewtxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40', 'readonly' => 'true'); + echo form_textarea($data); ?>
-

- +

+
-
@@ -3293,13 +3259,21 @@ if (!empty($getlogpodtl)) { tinyMCE.get('EdittxtSpcialInstruction').setContent($('#ItemDescription' + userid).val()); RequistQuantity = $('#quantity' + userid).val(); - + $("#EditMaterialCode").empty(); - var Material = ; - // For Binding Material list center for the selected Requistion Number + $("#EditMaterialCode").append($('') + .val($('#materialCode' + userid).val()) + .html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val()) + .prop('selected', true) + ); + // Make the select element read-only (disable it) + $("#EditMaterialCode").prop('disabled', true); - // $("#EditMaterialCode").append($('').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val())); + + + // For Binding Material list center for the selected Requistion Number + var Material = ; var isAdded = "0"; for (i = 0; i < Material.length; i++) { @@ -3336,6 +3310,11 @@ if (!empty($getlogpodtl)) { } }); + + + + + $("#VIEWSERVICE").on("shown.bs.modal", function(e) { userid = $(e.relatedTarget).data('userid'); diff --git a/app/Views/capitalpurchaseorder.php b/app/Views/capitalpurchaseorder.php index 95915c00..256141f0 100755 --- a/app/Views/capitalpurchaseorder.php +++ b/app/Views/capitalpurchaseorder.php @@ -1,1888 +1,1258 @@ - 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; - - ?> - - - - - - - - +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 - -
-
-
-
-
-
-
-
-
- - -