diff --git a/application/controllers/employeedetails.php b/application/controllers/employeedetails.php index 27ece8a0..3a0ba9d3 100755 --- a/application/controllers/employeedetails.php +++ b/application/controllers/employeedetails.php @@ -202,12 +202,7 @@ class employeedetails extends BaseController function AddNewEmployee() { - if($this->isAdmin() == TRUE) - { - $this->loadThis(); - } - else - { + $this->load->library('form_validation'); $this->form_validation->set_rules('ContactNumber', 'ContactNumber', 'trim|required|min_length[10]|max_length[10]'); @@ -347,7 +342,7 @@ echo "";redirect('e echo "";redirect('employeeListing','refresh'); } - } + } } @@ -378,12 +373,7 @@ echo "";redirect('employeeListing',' * This function is used to load the add new Employee form with dropdown values */ function addemployee() { - if($this->isAdmin() == TRUE) - { - $this->loadThis(); - } - else - { + $this->load->model('employeedetails_model'); $GenderConfigID = 'C013'; $MartialConfigID = 'C012'; @@ -401,7 +391,7 @@ echo "";redirect('employeeListing',' $data['Department'] = $this->employeedetails_model->getDepartment(); $this->global['pageTitle'] = 'Siddharth : Add New Employee'; $this->loadViews("addemployee", $this->global, $data, NULL); - } + } /** * This function is used to check whether the Employee is existing in the database or not */ @@ -577,12 +567,7 @@ echo "";redirect('employeeListing',' /* To Update the employee details*/ function UpdateEmployee() { - if($this->isAdmin() == TRUE) - { - $this->loadThis(); - } - else - { + $EmpId = $this->input->post('employeeid'); $this->load->library('form_validation'); //$mail = $this->this->.post('emailid'); @@ -760,7 +745,7 @@ echo ""; redirect('employeeListin // redirect('employeeListing'); } - } + } /** this function can be use for excel report **/ diff --git a/application/views/editRevenuepurchaseorder.php b/application/views/editRevenuepurchaseorder.php index 789c550f..ca3cde83 100755 --- a/application/views/editRevenuepurchaseorder.php +++ b/application/views/editRevenuepurchaseorder.php @@ -489,6 +489,7 @@ $('#PackagingType').change(function() { $('#txtPackaging').attr('readonly', 'true'); $('#txtPackaging').val('0.00'); + change(); } else { @@ -516,6 +517,7 @@ $('#EditPackagingType').change(function() { $('#txtEditPackaging').attr('readonly', 'true'); $('#txtEditPackaging').val('0.00'); + Editchange(); } else { @@ -592,7 +594,7 @@ $('#drpFreight').change(function() { $('#txtFreight').attr('readonly', 'true'); $('#txtFreight').val('0.00'); - + change(); } else { @@ -644,6 +646,7 @@ $('#drpEditFreight').change(function() { $('#txtEditFreight').attr('readonly', 'true'); $('#txtEditFreight').val('0.00'); + Editchange(); } else @@ -877,7 +880,7 @@ function calculatePackaging(isEdit) var Packaging = parseFloat(AfterPackaging).toFixed(2); $('#txtAfterPackaging').val(Packaging); - RevenueChangeSgst(); + //RevenueChangeSgst(); } else { @@ -949,7 +952,7 @@ function calculatePackaging(isEdit) var Packaging = parseFloat(AfterPackaging).toFixed(2); $('#txtEditAfterPackaging').val(Packaging); - RevenueChangeEditSgst(); + //RevenueChangeEditSgst(); } else { @@ -1640,7 +1643,7 @@ function calculatePackaging(isEdit) var AfterFreightval = parseFloat(AfterFreight).toFixed(2); $('#txtAfterFreight').val(AfterFreightval); - RevenueChangeSgst(); + //RevenueChangeSgst(); } else { @@ -1737,7 +1740,7 @@ function calculatePackaging(isEdit) var AfterFreightval = parseFloat(AfterFreight).toFixed(2); $('#txtEditAfterFreight').val(AfterFreightval); - RevenueChangeEditSgst(); + //RevenueChangeEditSgst(); } else { @@ -1848,10 +1851,13 @@ function calculatePackaging(isEdit) cgst= $('#ViewCGST').val(); sgst= $('#ViewSGST').val(); igst= $('#ViewIGST').val(); - //alert(sgst); + //alert(igst); afterdiscount= $('#txtViewAfterDiscount').val(); + //alert(afterdiscount); packaging12= $('#txtViewAfterPackaging').val(); + //alert( packaging12); freight12= $('#txtViewAfterFreight').val();//ViewAfterCGST + //alert(freight12); calculateCgstTax(basicvalue,cgst,afterdiscount,packaging12,freight12); calculateSgstTax(basicvalue,sgst,afterdiscount,packaging12,freight12); calculateIgstTax(basicvalue,igst,afterdiscount,packaging12,freight12) @@ -2027,7 +2033,16 @@ SetVatorCST(); if ($("#EditDiscountType").val()!=0) { calculateDiscount(1); } - if($("#EditCgst").val()!=''){ + + + if ($("#EditPackagingType").val()!=0) { + calculatePackaging(1); + } + if($("#drpEditFreight").val()!=0){ + calculateFreight(1); + + } + if($("#EditCgst").val()!=''){ $('#EditAfterCgst').val(calculateSgstTax($('#txtEditBasicValue').val(),$('#EditCgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val(),$('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterPackaging').val(),$('#txtEditAfterFreight').val() == '' ? '0.00' : $('#txtEditAfterFreight').val())); @@ -2041,14 +2056,6 @@ SetVatorCST(); $('#EditAfterIgst').val(calculateIgstTax($('#txtEditBasicValue').val(),$('#EditIgst').val(),$('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val(),$('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterPackaging').val(),$('#txtEditAfterPackaging').val() == '' ? '0.00' : $('#txtEditAfterFreight').val())); } - - if ($("#EditPackagingType").val()!=0) { - calculatePackaging(1); - } - if($("#drpEditFreight").val()!=0){ - calculateFreight(1); - - } calculateEditTotalValue($('#isEdit').val()); } @@ -2669,25 +2676,25 @@ function calculateEditTaxValue()
- - - - + - + -
+ +