diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php index 3b1aa430..5a657732 100755 --- a/application/controllers/amendmentpurchaseorder.php +++ b/application/controllers/amendmentpurchaseorder.php @@ -107,6 +107,7 @@ class amendmentpurchaseorder extends BaseController $data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate(); $data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006'); $data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018'); + $data['PoTypeOptions'] = $this->purchaseorder_model->getConfigValue('C026'); if($ReqType == SERVICE) { @@ -566,13 +567,14 @@ class amendmentpurchaseorder extends BaseController function UpdateAmendServicePurchaseOrder() { + $PONO =$this->input->post('txtPONO'); $MAD=''; $POdt =$this->input->post('PODate'); $PODate = $this->getDateformat($POdt); //echo $PODate; - $SupplierID = $this->input->post('drpSupplier'); + $SupplierID = $this->input->post('drpSupplier'); $DeliveryAddr = $this->input->post('txtDeliveryAddress'); $dt = $this->input->post('Deliverydt'); $DeliveryOption = $this->input->post('DateRange'); @@ -611,7 +613,7 @@ function UpdateAmendServicePurchaseOrder() // } $PaymentTermsText=$this->input->post('beforePaymentTermsText'); - $PaymentTerms=$this->input->post('PaymentTerms'); + $PaymentTerms=$this->input->post('PaymentTerms'); $Otherpayment=$this->input->post('Otherpayment'); $Otherpaymentamend=$this->input->post('Otherpayment'); $beforePaymentTerms=$this->input->post('beforePaymentTerms'); @@ -623,7 +625,16 @@ function UpdateAmendServicePurchaseOrder() //echo "MAD IS" . $MAD . "
"; $POType = $this->input->post('POType'); - + + $ModeOfShipment=$this->input->post('addmodeofshipment'); + $SupplierReference=$this->input->post('amendsupplierreference'); + $SuppliersOfferNo=$this->input->post('amendsupplierofferno'); + $OtherReferences=$this->input->post('amendotherreference'); + $Fincap=$this->input->post('amendfincap'); + $InsuranceOptions=$this->input->post('insuranceStatus'); + $InsuranceNo=$this->input->post('insuranceNo'); + $ServiceTypeOptions=$this->input->post('PoTypeOptions'); + $DescriptionOfPo = $this->input->post('amenddescofpo'); $scopeofwork = $this->input->post('ScopeofWork'); $TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary'); $POStatus = $this->input->post('txtStatus'); @@ -643,7 +654,7 @@ function UpdateAmendServicePurchaseOrder() $Otherpayment=''; } - $POMaster = array('ParentPO'=>$PONO,'POType'=>$POType,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$scopeofwork,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'ServiceWorkStatus'=>$WorkStatus,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD); + $POMaster = array('ParentPO'=>$PONO,'POType'=>$POType,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$scopeofwork,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'ServiceWorkStatus'=>$WorkStatus,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'Description_Of_Service'=>$DescriptionOfPo,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions); //print_r($POMaster); @@ -675,7 +686,7 @@ function UpdateAmendServicePurchaseOrder() $Reqnumber = $this->input->post('Reqnumber'.$i); $itemRate = $this->input->post('itemRate'.$i); $beforeitemRate = $this->input->post('beforeitemRate'.$i); - + $Per = $this->input->post('per'.$i); $AfterSGST = $this->input->post('AfterSgst'.$i); $beforeSGSTvalue = $this->input->post('beforeSgstvalue'.$i); $AfterCGST = $this->input->post('AfterCgst'.$i); @@ -748,7 +759,7 @@ function UpdateAmendServicePurchaseOrder() //echo "
CAD IS" . $CAD . "
"; - $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'ServiceMaterialDescription'=>$servicematerialdescription,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ReceivedQuantity'=>$RecQtyvalue,'AmendedDetails'=>$CAD); + $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'ServiceMaterialDescription'=>$servicematerialdescription,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ReceivedQuantity'=>$RecQtyvalue,'AmendedDetails'=>$CAD,'Per'=>$Per); //print_r($POLineItemList); $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); @@ -771,8 +782,9 @@ function UpdateAmendServicePurchaseOrder() function EditAmendCapitalPurchaseOrder() { + - //echo "WELCOME-"; + $PONO =$this->input->post('txtPONO'); //echo $PONO."--"; @@ -821,6 +833,15 @@ function UpdateAmendServicePurchaseOrder() //echo "Tjb" . $Totalserviceorder."--" . $PreServiceTotalorder;die(); $TotalCapitalorder= $this->input->post('CapitalToatlOrder');//For International total CapitalOrder $preTotalCapitalorder= $this->input->post('preinterTotalorderValue');//For International pre total CapitalOrder + + $ModeOfShipment=$this->input->post('addmodeofshipment'); + $SupplierReference=$this->input->post('amendsupplierreference'); + $SuppliersOfferNo=$this->input->post('amendsupplierofferno'); + $OtherReferences=$this->input->post('amendotherreference'); + $Fincap=$this->input->post('amendfincap'); + $InsuranceOptions=$this->input->post('insuranceStatus'); + $InsuranceNo=$this->input->post('insuranceNo'); + $ServiceTypeOptions=$this->input->post('PoTypeOptions'); //echo $TotalCapitalorder . "-" . $preTotalCapitalorder; if($PoRange==1){ $MAD.="Amended TotalOrder Vale:  " . $PreServiceTotalorder . "
"; @@ -893,7 +914,7 @@ function UpdateAmendServicePurchaseOrder() $Otherpayment=''; } $updatedBy = $this->session->userdata ( 'userId' ); - $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$FinalTotalOrder,'POType'=>$POType,'PODate'=>$PODate,'Status'=>PO_RELEASED,'CapitalRange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'PaymentOtherDescription'=>$Otherpayment,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'AmendedDetails'=>$MAD,'Import_DispatchDetails'=>$curdispatch,'Import_PlaceofOrgin'=>$PlaceOforigin); + $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$FinalTotalOrder,'POType'=>$POType,'PODate'=>$PODate,'Status'=>PO_RELEASED,'CapitalRange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'PaymentOtherDescription'=>$Otherpayment,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'AmendedDetails'=>$MAD,'Import_DispatchDetails'=>$curdispatch,'Import_PlaceofOrgin'=>$PlaceOforigin,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions); // print_r($POMaster); $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster,$CreateBy,$PONO); @@ -926,7 +947,7 @@ function UpdateAmendServicePurchaseOrder() $Reqnumber = $this->input->post('Reqnumber'.$i); $preitemRate = $this->input->post('itemRate'.$i); $itemRate = $this->input->post('rateInUs'.$i); - + $Per = $this->input->post('per'.$i); $Exchangerate = $this->input->post('echangeRate'.$i); $BasicPriceinmton = $this->input->post('rateInUs'.$i); $Productprice = $this->input->post('basicvalInINR'.$i); @@ -971,9 +992,9 @@ function UpdateAmendServicePurchaseOrder() $SGST = $this->input->post('SGST'.$i); $preSGST = $this->input->post('beforeSGST'.$i); - $CGST = $this->input->post('CGST'.$i); + $CGST = $this->input->post('CGST'.$i); $preCGST = $this->input->post('beforeCGST'.$i); - $IGST = $this->input->post('IGST'.$i); + $IGST = $this->input->post('IGST'.$i); $preIGST = $this->input->post('beforeIGST'.$i); $SGSTvalue=$this->input->post('afterSGST'.$i); @@ -983,9 +1004,20 @@ function UpdateAmendServicePurchaseOrder() $IGSTvalue=$this->input->post('afterIGST'.$i); $preIGSTvalue=$this->input->post('beforeIGSTvalue'.$i); $otherallowance=$this->input->post('otherallowance'.$i); - $preotherallowance=$this->input->post('beforeotherallowance'.$i); - $TotalServiceOrderValue = $this->input->post('totalservicevalue'.$i); - $POLineItemNo = $this->input->post('LineItemNo'.$i); + $preotherallowance=$this->input->post('beforeotherallowance'.$i); + $DiscountType = $this->input->post('DisType'.$i); + $DiscountValue = $this->input->post('DisVal'.$i); + $AfterDiscount = $this->input->post('AfterDisVal'.$i); + $preDiscountType = $this->input->post('beforeDisType'.$i); + $preDiscountValue = $this->input->post('beforeDisVal'.$i); + $preAfterDiscount = $this->input->post('beforeAfterDisVal'.$i); + $TotalServiceOrderValue = $this->input->post('totalservicevalue'.$i); + $CapitalItemDescrition = $this->input->post('CapitalItemDescrition'.$i); + $FreightType = $this->input->post('FreightType'.$i); + $FreightValue = $this->input->post('FreightVal'.$i); + $AfterFreightValue = $this->input->post('AfterFreightVal'.$i); + $NOOfTrip = $this->input->post('NoOfTrip'.$i); + $POLineItemNo = $this->input->post('LineItemNo'.$i); $rowspanvalue=0; if($Quantity != $preQuantity) @@ -999,7 +1031,11 @@ function UpdateAmendServicePurchaseOrder() $CAD.="Amended Rate : " . $preitemRate ."Current Rate : " . $itemRate . ""; } - if($PoRange==1){ + if($PoRange==1){ + if(($DiscountValue!=$preDiscountValue) && ($AfterDiscount!=$preAfterDiscount)){ + $rowspanvalue+=2; + $CAD.="Amended Discount : " . $preDiscountValue ."Current Discount : " . $DiscountValue . "Amended Discount value : " . $preAfterDiscount ."Current Discount value: " . $AfterDiscount . ""; + } if(($SGST != $preSGST) && ($SGSTvalue != $preSGSTvalue)) { $rowspanvalue+=2; @@ -1031,10 +1067,10 @@ function UpdateAmendServicePurchaseOrder() $CAD.=$CAD2; } - //echo $CAD; + - $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'AmendedDetails'=>$CAD); - // print_r($POLineItemList); + $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'AmendedDetails'=>$CAD,'Per'=>$Per,'ServiceMaterialDescription'=>$CapitalItemDescrition); + $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); @@ -1043,22 +1079,19 @@ function UpdateAmendServicePurchaseOrder() foreach($POLineItem as $line): $LineItemNo = $line['LineItemNo']; endforeach; - //echo $LineItemNo; + if(trim($POType) == CAPITAL ) { - $ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$CGST,'After_CGST'=>$CGSTvalue,'SGST'=>$SGST,'After_SGST'=>$SGSTvalue,'IGST'=>$IGST,'After_IGST'=>$IGSTvalue, 'otherallowance'=>$otherallowance,'TotalValue'=>$TotalServiceOrderValue,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt); - // print_r($ServiceTaxList); + if($capitalType=='1'){ + $ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$CGST,'After_CGST'=>$CGSTvalue,'SGST'=>$SGST,'After_SGST'=>$SGSTvalue,'IGST'=>$IGST,'After_IGST'=>$IGSTvalue, 'otherallowance'=>$otherallowance,'TotalValue'=>$TotalServiceOrderValue,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'discount'=>$DiscountType,'discountval'=>$DiscountValue,'Afterdiscountval'=>$AfterDiscount); + $ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList); - //echo "Service"; - //print_r($ServiceTax); - $ImportTaxList = array('LineItemNo'=>$LineItemNo, 'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'AfterHighSeasSalesCharge'=>$AfterHighSeas,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'ExciseDuty'=>$ExciseDuty,'AfterExciseDuty'=>$AfterExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd,'AfterExciseDutyEdCess'=>$AfterExciseDutyEd,'ExciseDutySHCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'AfterExciseDutySHCess'=>$AfterExciseDutySH,'AfterAddlExciseDuty'=>$AfterAddAdtional,'Grossdutypayable'=>$Grossdutypayable,'AvailableModvat'=>$AvailableModvat,'Grossexpensesduetocustomduty'=>$Grossexpensesduetocustomduty,'purchaseratePerKG'=>$purchaseratePerKG,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'RMCIncludingCustomersPerKG'=>$RMCIncludingCustomersPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem); - //print_r($ImportTaxList); - //die(); - - + } //echo "Service"; + else if($capitalType=='0'){ //print_r($ServiceTax); + $ImportTaxList = array('LineItemNo'=>$LineItemNo, 'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'AfterHighSeasSalesCharge'=>$AfterHighSeas,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'ExciseDuty'=>$ExciseDuty,'AfterExciseDuty'=>$AfterExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd,'AfterExciseDutyEdCess'=>$AfterExciseDutyEd,'ExciseDutySHCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'AfterExciseDutySHCess'=>$AfterExciseDutySH,'AfterAddlExciseDuty'=>$AfterAddAdtional,'Grossdutypayable'=>$Grossdutypayable,'AvailableModvat'=>$AvailableModvat,'Grossexpensesduetocustomduty'=>$Grossexpensesduetocustomduty,'purchaseratePerKG'=>$purchaseratePerKG,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'RMCIncludingCustomersPerKG'=>$RMCIncludingCustomersPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem,'FreightType'=>$FreightType,'NoOfTrip'=>$NOOfTrip,'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue); $ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList); - + } } @@ -1538,4 +1571,4 @@ function UpdateAmendServicePurchaseOrder() return $retDate; } -} \ No newline at end of file +} diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index f3e0cacd..0b4ab1a4 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -452,7 +452,7 @@ class purchaseorder extends BaseController $CapitalRange = $_GET['CapitalRange']; $CapitalAvlBudget = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode,$FYdt,$ReqType); - + print_r($CapitalAvlBudget);die(); if(count($CapitalAvlBudget)>0) { diff --git a/application/views/editCapitalAmendPO.php b/application/views/editCapitalAmendPO.php index 85b70d87..a1db7fcd 100755 --- a/application/views/editCapitalAmendPO.php +++ b/application/views/editCapitalAmendPO.php @@ -1,5 +1,7 @@ "NO","value"=>"0"),array("name"=>"YES","value"=>"1") + ); $requestedBy=$requestedBy[0]->FirstName; // $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); // $CurrentDate = $dt->format('Y-m-d'); @@ -20,7 +22,7 @@ $TotalCGST = 0.0; $TotalIGST = 0.0; $Totalotherallowances = 0.0; - + $TotalDiscountedAmt=0.0; $TotalSummary = 0.0; $TotalBasicAmount = 0.0; @@ -60,8 +62,16 @@ $ExchangeDate=''; $ExchangeRateOn=''; $UpdatedOn; - $CapitalRange=''; -$PoStatusName=''; + $CapitalRange=''; + $PoStatusName=''; + $ModeOfShipment=''; + $SupplierReference=''; + $SuppliersOfferNo=''; + $OtherReferences=''; + $Fincap=''; + $InsuranceOptions=''; + $InsuranceNo=''; + $ServiceTypeOptions=''; $INR=''; $INRSYM=''; @@ -138,6 +148,14 @@ if(!empty($POMaster)) else{ $ExitTotalOrderValue=$Req->TotalOrderValue; } + $ModeOfShipment=$Req->Mode_Of_Shipment; + $SupplierReference=$Req->Supplier_Reference; + $SuppliersOfferNo=$Req->Supplier_Offer_No; + $OtherReferences=$Req->Other_Reference; + $Fincap=$Req->Fincap; + $InsuranceOptions=$Req->InsuranceStatus; + $InsuranceNo=$Req->InsuranceNumber; + $ServiceTypeOptions=$Req->POSubType; } } @@ -183,12 +201,45 @@ if(!empty($AvlBudAmt)) toolbar: false // plugins: "link image" }); - + tinymce.init({ + selector: "textarea#EditItemDescription", + menubar: false, + statusbar: false, + toolbar: false + }); + var insuranceOpt = ''; var DelOpt = ''; var SchName = ; var others =''; var DelDt = ''; $(document).ready(function () { +$('#RequistionNo').attr("style", "pointer-events: none;"); +$('#PODate').attr("style", "pointer-events: none;"); +$('#drpSupplier').attr("style", "pointer-events: none;"); + +$('#SupAddress').attr("style", "pointer-events: none;"); +$('#POType').attr("style", "pointer-events: none;"); +$('#DeliveryAddr').attr("style", "pointer-events: none;"); + +$('#workstatus').attr("style", "pointer-events: none;"); + +$('#addmodeofshipment').attr("style", "pointer-events: none;"); +$('#amendsupplierreference').attr("style", "pointer-events: none;"); +$('#amendsupplierofferno').attr("style", "pointer-events: none;"); +$('#amendotherreference').attr("style", "pointer-events: none;"); +$('#amendfincap').attr("style", "pointer-events: none;"); +$('#PoTypeOptions').attr("style", "pointer-events: none;"); +$('#insuranceNo').attr("style", "pointer-events: none;"); +$('#insuranceStatus').attr("style", "pointer-events: none;"); +$('#Exchangerateon').attr("style", "pointer-events: none;"); +$('#ExchangeRt').attr("style", "pointer-events: none;"); +$('#PlaceOforigin').attr("style", "pointer-events: none;"); + if(insuranceOpt=="1"){ + +} +else{ +$('#insuranceTxtDiv').hide(); +} if(DelOpt=="0"){ $('#Deliverydtdiv').show(); $('#Schedulediv').hide(); @@ -351,7 +402,7 @@ document.getElementById('dispatchinternational').style.display = 'block'; foreach ($ReqList as $SID): - $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqNo; + $options[$SID->ReqNo] = $SID->ReqNo; endforeach; } @@ -570,7 +621,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'addmodeofshipment','value' => set_value('addmodeofshipment'),'id'=>'addmodeofshipment', 'class' => 'form-control'); + $data = array('name' => 'addmodeofshipment','value' => set_value('addmodeofshipment',$ModeOfShipment),'id'=>'addmodeofshipment', 'class' => 'form-control'); echo form_input($data); ?>
@@ -586,7 +637,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'amendsupplierreference','value' => set_value('amendsupplierreference'),'id'=>'amendsupplierreference', 'class' => 'form-control'); + $data = array('name' => 'amendsupplierreference','value' => set_value('amendsupplierreference',$SupplierReference),'id'=>'amendsupplierreference', 'class' => 'form-control'); echo form_input($data); ?>
@@ -602,7 +653,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'amendsupplierofferno','value' => set_value('amendsupplierofferno'),'id'=>'amendsupplierofferno', 'class' => 'form-control'); + $data = array('name' => 'amendsupplierofferno','value' => set_value('amendsupplierofferno',$SuppliersOfferNo),'id'=>'amendsupplierofferno', 'class' => 'form-control'); echo form_input($data); ?>
@@ -616,7 +667,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'amendotherreference','value' => set_value('amendotherreference'),'id'=>'amendotherreference', 'class' => 'form-control'); + $data = array('name' => 'amendotherreference','value' => set_value('amendotherreference',$OtherReferences),'id'=>'amendotherreference', 'class' => 'form-control'); echo form_input($data); ?>
@@ -626,7 +677,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'amendfincap','value' => set_value('amendfincap'),'id'=>'amendfincap', 'class' => 'form-control'); + $data = array('name' => 'amendfincap','value' => set_value('amendfincap',$Fincap),'id'=>'amendfincap', 'class' => 'form-control'); echo form_input($data); ?>
@@ -635,6 +686,99 @@ document.getElementById('dispatchinternational').style.display = 'block'; + +
+
+
+
+ + + +
+ + 'Select Work Status'); + + + if(!empty($PoTypeOptions)) + { + foreach ($PoTypeOptions as $POpt): + + if($ServiceTypeOptions==$POpt->ConfigValue){ + $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + } + endforeach; + foreach ($PoTypeOptions as $POpt1): + + if($ServiceTypeOptions!=$POpt1->ConfigValue){ + $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; + } + endforeach; + } + + echo form_dropdown('PoTypeOptions', $optionsPO,set_value('PoTypeOptions'),'id="PoTypeOptions"' ,'required="true"' ,'class="form-control select2'); + + + ?> +
+ + + +
+
+
+
+
+ +
+ + +
+ + + + +
+
+
+ +
+ 'insuranceNo','value' => set_value('insuranceNo',$InsuranceNo),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true'); + echo form_input($data); + ?> +
+
+ +
+
+
@@ -746,7 +890,7 @@ document.getElementById('dispatchinternational').style.display = 'block'; $row=array("materialCode"=>$record->MaterialCode,"ReqNo"=>$record->ReqNo); array_push($res_arr_values, $row); ?> - + @@ -758,6 +902,7 @@ document.getElementById('dispatchinternational').style.display = 'block'; + @@ -811,6 +956,10 @@ document.getElementById('dispatchinternational').style.display = 'block'; + + + + @@ -830,6 +979,13 @@ document.getElementById('dispatchinternational').style.display = 'block'; + + + + + + + @@ -839,6 +995,9 @@ document.getElementById('dispatchinternational').style.display = 'block'; + + + @@ -861,7 +1020,7 @@ document.getElementById('dispatchinternational').style.display = 'block'; $TotalCGST = $TotalCGST+$record->After_CGST; $TotalIGST = $TotalIGST+$record->After_IGST; $Totalotherallowances = $Totalotherallowances+$record->otherallowance; - + $TotalDiscountedAmt = $record->Afterdiscountval; $TotalSummary = $TotalSummary+$record->ServiceTaxamount;//tax $TotalBasicAmount = $TotalBasicAmount+($record->Rate * $record->Quantity);//basic //$ServiceDescription = $ServiceDescription; @@ -889,15 +1048,13 @@ document.getElementById('dispatchinternational').style.display = 'block'; // $totorder=$totorder+$record->TotalOrderValue; - - - } + //echo $TotalSummary; if($CapitalRange=='1'){ - - $totalCapitalOrder = $totalCapitalOrder+$TotalBasicAmount; + + $totalCapitalOrder = $totalCapitalOrder+$TotalBasicAmount-$TotalDiscountedAmt; } else if($CapitalRange=='0') @@ -1034,7 +1191,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'EditCPQuantity','value' => set_value('EditCPQuantity'),'id'=>'EditCPQuantity', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();'); + $data = array('name' => 'EditCPQuantity','value' => set_value('EditCPQuantity'),'id'=>'EditCPQuantity', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();calculateFreight(3);'); echo form_input($data); ?>
@@ -1043,7 +1200,7 @@ document.getElementById('dispatchinternational').style.display = 'block';
'EditCPRate','value' => set_value('EditCPRate'),'id'=>'EditCPRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();' ); + $data = array('name' => 'EditCPRate','value' => set_value('EditCPRate'),'id'=>'EditCPRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();calculateFreight(3);' ); echo form_input($data); ?>
@@ -1068,6 +1225,49 @@ document.getElementById('dispatchinternational').style.display = 'block';
+
+
+
+ +
+ 'Select Discount Type'); + //print_r( $options); + + if(!empty($TaxType)) + { + foreach ($TaxType as $SID): + + + $options[$SID->ConfigValue] = $SID->ConfigValue; + + endforeach; + } + + echo form_dropdown('EditDiscountType', $options,set_value('EditDiscountType'),'id="EditDiscountType"' ,'class="form-control"'); + + ?> +
+
+
+ +
+ 'txtEditDiscount','value' => set_value('txtEditDiscount'),'id'=>'txtEditDiscount', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'EditRatechange();calculateDiscount(1);','style'=>'text-align:right;'); + echo form_input($data); + ?> +
+
+
+ +
+ 'txtEditAfterDiscount','value' => set_value('txtEditAfterDiscount'),'id'=>'txtEditAfterDiscount', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;'); + echo form_input($data); + ?> +
+
+
CGST In % @@ -1165,7 +1365,7 @@ document.getElementById('dispatchinternational').style.display = 'block'; ?>
-
+
+
+
+
+ +
+
+
+
+ + + +
+ + 'Select Work Status'); + + + if(!empty($PoTypeOptions)) + { + foreach ($PoTypeOptions as $POpt): + + if($ServiceTypeOptions==$POpt->ConfigValue){ + $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + } + endforeach; + foreach ($PoTypeOptions as $POpt1): + + if($ServiceTypeOptions!=$POpt1->ConfigValue){ + $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; + } + endforeach; + } + + echo form_dropdown('PoTypeOptions', $optionsPO,set_value('PoTypeOptions'),'id="PoTypeOptions"' ,'required="true"' ,'class="form-control select2'); + + + ?> +
+ + + +
+
+
+
+
+ +
+ + +
+ + + + +
+
+
+ +
+ 'insuranceNo','value' => set_value('insuranceNo',$InsuranceNo),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true'); + echo form_input($data); + ?> +
+
+
@@ -1255,7 +1394,7 @@ $(document).ready(function () { ReqNo ?> MaterialCode ?> - MaterialName ?> + ServiceMaterialDescription ?> Quantity ?> UOM ?> @@ -1276,7 +1415,8 @@ $(document).ready(function () { - + + @@ -1395,7 +1535,7 @@ $(document).ready(function () {
'amenddescofpo','value' => set_value('amenddescofpo'),'id'=>'amenddescofpo', 'class' => 'form-control' ,'rows' => '3', 'cols' => '40' ); + $data = array('name' => 'amenddescofpo','value' => set_value('amenddescofpo',$DescriptionOfPo),'id'=>'amenddescofpo', 'class' => 'form-control' ,'rows' => '3', 'cols' => '40' ); echo form_textarea($data); ?>
@@ -1491,9 +1631,11 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) { $('#EditdeptName').val($('#departmentName'+userid).val()); $("#EditCostCenter").val($('#costCode'+userid).val()); $('#EditAvlBudAmt').val(AvlBudAmt); - $('#EdittxtSpcialInstruction').val($('#servicematerialdescription'+userid).val()); + + tinyMCE.get('EdittxtSpcialInstruction').setContent($('#servicematerialdescription'+userid).val()); $('#EditItemName').val($('#materialName'+userid).val()); $('#EditUOM').val($('#uom'+userid).val()); + $('#EditAmendPer').val($('#per'+userid).val()); $('#EditQuantity').val($('#quantity'+userid).val()); RequistQuantity = $('#quantity'+userid).val(); $('#EditRate').val($('#itemRate'+userid).val()); @@ -1583,6 +1725,13 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) { var editMaterialCode = $("#EditMaterialCode").val(); var editDescription = $("#EditItemName").val(); var editUOM = $('#EditUOM').val(); + var editPer=''; + if($("#EditAmendPer").val().trim()==''){ + editPer = $("#EditUOM").val(); + } + else{ + editPer = $("#EditAmendPer").val(); + } var editQuantity = $('#EditQuantity').val(); var otherallowance=$('#otherallowance').val(); //alert(otherallowance); @@ -1612,7 +1761,7 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) { var cellval = tr.cells; cellval[2].innerHTML = editMaterialCode; - cellval[3].innerHTML = editDescription; + cellval[3].innerHTML = materialspecialinstruction; cellval[4].innerHTML = editQuantity; cellval[5].innerHTML =editUOM; cellval[6].innerHTML =parseFloat(itemRate).toFixed(2); @@ -1624,6 +1773,7 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) { $('#materialCode'+userid).val(editMaterialCode); $('#materialName'+userid).val(editDescription); $('#uom'+userid).val(editUOM); + $('#per'+userid).val(editPer); $('#CostCode'+userid).val(CostCode); $('#quantity'+userid).val(editQuantity); $('#itemRate'+userid).val(itemRate); @@ -1970,11 +2120,16 @@ function validateServiceTax() // { // return false; // } - else if(ExceedBudget($('#EditTotalOrderValue').val(),$('#EditAvlBudAmt').val()) == false) + else if(ExceedBudget($('#txtEditBasicValue').val(),$('#EditAvlBudAmt').val()) == false) { $('#EditRate').focus(); return false; } + else if($('#EdittxtSpcialInstruction').val()==''){ + alert('Please Enter the Service Description'); + $('#EdittxtSpcialInstruction').focus(); + return false; + } else { return true; @@ -2005,7 +2160,7 @@ $('#txtStatus').val(stat); //$('#SpcialInstruction').val(splinstr); $('#txtDeliveryAddress').val(deladd); AvlBudAmt = ''; -var txtTotalOrderValueSummary = $('#txtTotalOrderValueSummary').val(); +var txtTotalOrderValueSummary = $('#txtTotBasicAmount').val(); if(validate()) { @@ -2014,6 +2169,11 @@ var txtTotalOrderValueSummary = $('#txtTotalOrderValueSummary').val(); return false; } + else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){ + alert('Please Enter Other Payment Details'); + $('#Otherpayment').focus(); + return false; + } else{ $('#content').loader('show'); $.ajax({ @@ -2023,6 +2183,7 @@ var txtTotalOrderValueSummary = $('#txtTotalOrderValueSummary').val(); success:function(data) { if(data) { + $('#content').loader('hide'); alert(data); $('#txtRowCount').val(''); @@ -2117,4 +2278,4 @@ $("#PaymentTerms").change(function() { $('#otheroptiondiv').hide(); } }); - \ No newline at end of file +