diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 7d20d269..40d8521d 100644 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -1187,16 +1187,16 @@ function edited(){ } //This used to Edit the Revenue Purchase Order - function EditRevenuePurchaseOrder() + function EditRevenuePurchaseOrder() { //echo "EDIT REBEIE"; //die(); $PONO =$this->input->post('txtPONO'); $POdt =$this->input->post('PODate'); $PODate = $this->getDateformat($POdt); - $SupplierID = $this->input->post('drpSupplier'); + $SupplierID = $this->input->post('drpSupplier'); - $newsup=$this->input->post('newsup'); + $newsup=$this->input->post('newsup'); $newSupId = split("[ - ]+", $newsup); @@ -1212,11 +1212,11 @@ function edited(){ $Deliverydt = $this->getDateformat($dt); $DeliverySchedule = ''; } -/*-----------------------------------*/ - $b4supplier=$this->input->post('b4supplier'); + + $b4supplier=$this->input->post('b4supplier'); $b4date=$this->input->post('b4podate'); $b4podate = $this->getDateformat($b4date); -/*-----------------------------------*/ + $Modeofshipment=$this->input->post('editmodeofshipment'); $supplierreference=$this->input->post('editsupplierreference'); $supplieroffno=$this->input->post('editsupplierofferno'); @@ -1258,8 +1258,7 @@ function edited(){ // PO Master // PO Master $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType); - //print_r($POList); - //die(); + $POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList); @@ -1291,10 +1290,10 @@ function edited(){ $MaterialCode = $this->input->post('materialCode'.$i); $Quantity = $this->input->post('quantity'.$i); $Reqnumber = $this->input->post('Reqnumber'.$i); -/*-----------------------------------*/ + $b4qty=$this->input->post('b4qty'.$i); $b4rate=$this->input->post('b4rate'.$i); -/*-----------------------------------*/ + $itemRate = $this->input->post('itemRate'.$i); $per=$this->input->post('per'.$i); $DiscountType = $this->input->post('DisType'.$i); @@ -1305,29 +1304,30 @@ function edited(){ $PackagingValue = $this->input->post('PackVal'.$i); $AfterPackagingValue = $this->input->post('AfterPackVal'.$i); $Cgst = $this->input->post('RevenueCgst'.$i); - $Sgst = $this->input->post('RevenueSgst'.$i); - $Igst = $this->input->post('RevenueIgst'.$i); - $AfterCgst = $this->input->post('RevenueAfterCgst'.$i); - $AfterSgst = $this->input->post('RevenueAfterSgst'.$i); - $AfterIgst = $this->input->post('RevenueAfterIgst'.$i); + $Sgst = $this->input->post('RevenueSgst'.$i); + $Igst = $this->input->post('RevenueIgst'.$i); + $AfterCgst = $this->input->post('RevenueAfterCgst'.$i); + $AfterSgst = $this->input->post('RevenueAfterSgst'.$i); + $AfterIgst = $this->input->post('RevenueAfterIgst'.$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); - $revenuedescription = $this->input->post('service_description'.$i); $InsuranceValue = $this->input->post('Insval'.$i); + $revenuedescription = $this->input->post('service_description'.$i); + $InsuranceValue = $this->input->post('Insval'.$i); $TotalOrderValue = $this->input->post('TotalOrderValue'.$i); $POLineItemNo = $this->input->post('LineItemNo'.$i); $CostCenter = $this->input->post('costCode'.$i); $LineItemNo = ''; /*---------start---------------------*/ - if($Quantity != $b4qty) + if($Quantity != $b4qty) { $logpo =array('PONO'=>$PONO,'LineItemNos'=>$POLineItemNo,'UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt,'oldValue'=>$b4qty,'newValue'=>$Quantity,'entity'=>'Quantity Changed'); $this->purchaseorder_model->insertlogpo($logpo); - } + } if($itemRate != $b4rate) @@ -1338,30 +1338,7 @@ function edited(){ $this->purchaseorder_model->insertlogpo($logpo); } - // if($PODate != $b4podate ) - // { - // $logpo =array('UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt); - - - // $this->purchaseorder_model->updatelogpo($MaterialCode,$POLineItemNo,$logpo); - // } - // if($PODate != $b4podate ) - // { - // $logpo =array('UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt); - - - // $this->purchaseorder_model->updatelogpo($MaterialCode,$POLineItemNo,$logpo); - // } - // if($PODate != $b4podate ) - // { - // $logpo =array('UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt); - - - // $this->purchaseorder_model->updatelogpo($MaterialCode,$POLineItemNo,$logpo); - // } - - - /*----------end--------------------*/ + $SkipInsert = "False"; if( count($comma_separated) > 0) @@ -1379,31 +1356,20 @@ function edited(){ } } - /*-------------start-----------------*/ - //if($MaterialCode!= ''){ + $ReqDetails = array('Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt); -//print_r($ReqDetails); - - $this->purchaseorder_model->updateReqDetails($Reqnumber,$MaterialCode,$ReqDetails); - // } - - - - - $recqty=0; + $this->purchaseorder_model->updateReqDetails($Reqnumber,$MaterialCode,$ReqDetails); + $recqty=0; if($POStatus == SPECIAL_PO) { $recqty= $Quantity; - - - - $IGRD= $this->purchaseorder_model->IGRDetailsupdate($PONO); + $IGRD= $this->purchaseorder_model->IGRDetailsupdate($PONO); $j = $i-1; @@ -1413,51 +1379,33 @@ function edited(){ $this->purchaseorder_model->updateIGR($IGRD[$j]['IGRItemNo'],$IGRDs); - - -/*------------------------------- may 24 today change edit po start---------------------------------*/ - - - $MaterialstockHistoryupdate= array('SupplierID'=>$SupplierID,'Quantity'=>$Quantity,'ItemValue'=>$itemRate,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt); - // print_r($MaterialstockHistoryupdate); + + $MaterialstockHistoryupdate= array('SupplierID'=>$SupplierID,'Quantity'=>$Quantity,'ItemValue'=>$itemRate,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt); + $itemNo = $IGRD[$j]['IGRItemNo']; - //echo $itemNo; + - $this->purchaseorder_model->updateMatStock($itemNo, - $MaterialstockHistoryupdate); + $this->purchaseorder_model->updateMatStock($itemNo, + $MaterialstockHistoryupdate); - /*-------------------------------today change edit po end---------------------------------*/ - + } - - - - - - //print_r($data['IGRDetails']); - - /*-----------end-------------------*/ - - - - - if($SkipInsert == "False") { if(strlen($POLineItemNo) == 0) { - $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Per'=>$per,'ServiceMaterialDescription'=>$revenuedescription,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter); - //print_r($POLineItemList); - $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); - if(count($POLineItem)>0) - { - $LineItemNo = $POLineItem[0]['LineItemNo']; - } + // $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Per'=>$per,'ServiceMaterialDescription'=>$revenuedescription,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter); + // //print_r($POLineItemList); + // $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); + // if(count($POLineItem)>0) + // { + // $LineItemNo = $POLineItem[0]['LineItemNo']; + // } } else @@ -1475,9 +1423,9 @@ function edited(){ $isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo); if(count($isExists) == 0) { - $RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'NoOfTrip'=>$NOOfTrip); - //print_r($RevenueTaxList); - $RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList); + // $RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'NoOfTrip'=>$NOOfTrip); + // //print_r($RevenueTaxList); + // $RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList); } else @@ -1491,67 +1439,8 @@ function edited(){ } - $counts = $this->input->post('hidecounter'); - $constants = $this->input->post('hideconstant'); - //$oldfile = $this->input->post('param2'); - $newfile = $this->input->post('param1'); - -// if(empty($newfile)) -// { -// // echo $IGRNO; -// // echo $PONO; - -// $myfile = array('FilePath'=>$oldfile,'PONO'=>$PONO,'IGRNO'=>$IGRNO); -// // print_r($myfile); -// $this->purchaseorder_model->fileupload($myfile); - -// } - -// else{ - for($i=1;$i<=$constants;$i++){ - $pathname = 'browseFiles'.$i; - - - - if(!empty($_FILES[$pathname]['name'])) - { - - - $Picture = $this->addfile($pathname); - //echo $Picture; - $arr[] = array($Picture); - } - - - } -//print_r($arr); - foreach($arr as $ma){ - - - $index = 0; - $newfile = null; - foreach($ma as $key=>$value){ - $index++; - if($index == 1){ - $newfile = $value; - } - } - - //$myfile = array('FilePath'=>$filename); - //$emergencyitemcode = $this->input->post('materialCode'.$i); - $myfile = array('FilePath'=>$newfile,'PONO'=>$PONO,'IGRNO'=>$IGRNO); - - // print_r($myfile); - - $this->purchaseorder_model->fileupload($myfile); - //addfiledetails($addfilelist); -//print_r($myfile); - - - } - // } - + } echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ; @@ -1596,13 +1485,6 @@ function edited(){ - - - - - - - function pageNotFound() { $this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found'; diff --git a/application/controllers/servicepurchaseorder.php b/application/controllers/servicepurchaseorder.php index 0f3bc758..1b93d2a2 100755 --- a/application/controllers/servicepurchaseorder.php +++ b/application/controllers/servicepurchaseorder.php @@ -383,7 +383,7 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO); $DescriptionOfPo = $this->input->post('editdescofpo'); - $PaymentTerms=$this->input->post('PaymentTerms'); + $PaymentTerms=$this->input->post('PaymentTerms'); $OtherPayment=$this->input->post('Otherpayment'); $POType = $this->input->post('POType'); @@ -438,8 +438,8 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO); $MaterialCode = $this->input->post('materialCode'.$i); $Quantity = $this->input->post('quantity'.$i); /*-----------------------------------*/ - $b4qty=$this->input->post('b4qty'.$i); - $b4rate=$this->input->post('b4rate'.$i); + $b4qty=$this->input->post('b4qty'.$i); + $b4rate=$this->input->post('b4rate'.$i); /*-----------------------------------*/ $Reqnumber = $this->input->post('Reqnumber'.$i); $itemRate = $this->input->post('itemRate'.$i); @@ -597,8 +597,9 @@ function uploadfile() { $bill= $this->input->post('param1'); $oldfile= $this->input->post('param2'); + $new_file_name =$_FILES['file']['name']; - if(!empty($_FILES['file']['name'])) + if(!empty($new_file_name)) { $Picture = $this->add(); } @@ -652,6 +653,74 @@ function uploadfile() $this->loadViews("404", $this->global, NULL, NULL); } + + + + function addfileuplod() + { + + $pono= $this->input->post('PONO'); + + + + $new_file_name =$_FILES['file']['name']; + //echo $new_file_name;die; + if(!empty($new_file_name)) + { + $Picture = $this->adfile(); + } + else + { + $Picture =''; + } +//echo $Picture;die; +$filelist =array('PONO'=>$pono,'FilePath'=>$Picture); + + + + $uploadfile = $this->purchaseorder_model->insertfile($filelist); + + if($uploadfile > 0){ + echo "file updated successfully!"; + } + else{ + echo "file not updated!"; + } + } + + function adfile() + { + $picture = ''; + if(!empty($_FILES['file']['name'])) + { + $config['upload_path'] = 'uploads/BillFiles/'; + $config['allowed_types'] = 'docx|pdf|doc|png|jpg'; + $config['file_name'] = $_FILES['file']['name']; + //print_r($config);die; + //Load upload library and initialize configuration + $this->load->library('upload',$config); + $this->upload->initialize($config); + + if($this->upload->do_upload('file')) + { + $uploadData = $this->upload->data(); + $picture = $uploadData['file_name']; + } + else + { + $error = array('error' => $this->upload->display_errors()); + $picture = ''; + } + + } + else + { + $picture = ''; + } + + return $picture ; + } + } ?> diff --git a/application/views/BatchcardMaintListing.php b/application/views/BatchcardMaintListing.php index 94291e92..f16630dc 100755 --- a/application/views/BatchcardMaintListing.php +++ b/application/views/BatchcardMaintListing.php @@ -179,7 +179,7 @@ button.dt-button, div.dt-button, a.dt-button{ doc.content[1].margin = [ -25, 0, -25, 0 ] //left, top, right, bottom }, - text: 'Save pdf', + text: 'pdf', // footer: 'true', // messageTop: $('h3').text(), title: 'Maintenance/Breakdown Report', diff --git a/application/views/EditservicePurchaseorder.php b/application/views/EditservicePurchaseorder.php index 8b438a53..eaeff3e7 100755 --- a/application/views/EditservicePurchaseorder.php +++ b/application/views/EditservicePurchaseorder.php @@ -2271,6 +2271,21 @@ $(document).ready(function () {
+ +
+ + +
+ +
+ + +
+ + + + +
@@ -2297,19 +2312,12 @@ $(document).ready(function () { - - - - + + - - - + $options = array("0"=>'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',$SupId),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2'); + ?> + + +
+ +
+ + 'POType','value' => set_value('POType',REVENUE),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+ Select Tax Range
+
+ - - - - - -
- - Select Delivery By*
-
- - - - - - -
-
- -
- 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true' ,'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
-
- -
- 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
-
- -
- 'Deliverydt','value' => set_value('Deliverydt',$Deliverydt),'id'=>'Deliverydt', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;'); - echo form_input($data); - ?> - -
-
- -
- - - -
-
-
-
- - - -
- + 'Range', 'value' => '0', 'checked' => ('0' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Local','onchange'=>'SetVatorCST();')); ?> + +
+ + + + + +
+ Select Delivery By*
+
+ + + + + +
+
+ +
+ 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true' ,'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
+
+
+ +
+ 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
+
+
+ +
+ 'Deliverydt','value' => set_value('Deliverydt',$Deliverydt),'id'=>'Deliverydt', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;'); + echo form_input($data); + ?> + +
+
+ +
- - - - - -
-
-
- -
- - 'editsupplierreference','value' => set_value('editsupplierreference',$supplierref),'id'=>'editsupplierreference', 'class' => 'form-control', 'maxlength'=>'40'); - echo form_input($data); - ?> -
- - - - -
-
-
-
- -
- - 'editsupplierofferno','value' => set_value('editsupplierofferno',$suppofferno),'id'=>'editsupplierofferno', 'class' => 'form-control'); - echo form_input($data); - ?> -
- -
-
-
-
- - -
- - 'editotherreference','value' => set_value('editotherreference',$otherref),'id'=>'editotherreference', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
- -
- - 'editfincap','value' => set_value('editfincap',$fincap),'id'=>'editfincap', 'class' => 'form-control'); - echo form_input($data); - ?> -
-
-
-
- - - - -
-
-
-
- - - -
- - 'Select Work Status'); - - - if(!empty($PoTypeOptions)) - { - - foreach ($PoTypeOptions as $POpt): - - if($revenuesubtype==$POpt->ConfigValue){ - $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; - } - - - endforeach; - foreach ($PoTypeOptions as $POpt1): - - if($revenuesubtype!=$POpt1->ConfigValue){ - $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; - } - - - endforeach; - - } - - echo form_dropdown('PoTypeOptions', $optionsPO,set_value('PoTypeOptions'),'id="PoTypeOptions"' ,'required="true"' ,'class="form-control select2'); - - - - ?> -
- - - -
-
- - 'Yes','0'=>'No'); - echo form_dropdown('insurancestatus', $optionsnew,set_value('insurancestatus'),'id="insurancestatus"' ,'required="true"' ,'class="form-control select2'); - - ?> -
-
-
-
- -
- 'insuranceno','insuranceno' => set_value('insuranceno',$insurenceno),'id'=>'insuranceno', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> -
-
-
- - - PaymentID] = $pay->PaymentTerms; - - - endforeach; - } - - echo form_dropdown('PaymentTerms', $options6,set_value('PaymentTerms',$Terms),'id="PaymentTerms"' ,'required="true"' ,'class="form-control select2'); - - ?> - - - - -
- -
- -
- - - - -
-
-
- - - - - - - - - - - - - - - - -
- -
-
- - - - - - - - - - - - -
- - -
Bill No
BillNo ?> FilePath))?$gd->FilePath:"No File"; ?> FilePath)) { ?> @@ -3753,6 +3761,7 @@ function splpoupdate(){ success:function(data) { if(data){ alert(data); + window.location.reload(); $('.content').loader('hide'); //$('#spl').find('td').eq(1).text(filename[2]); $('#EditServiceSplPOModel').modal('hide'); @@ -3779,9 +3788,143 @@ var sizef = document.getElementById('imag').files[0].size; $('#imag').val(''); } } + + + + + - diff --git a/application/views/alterpurchaseorder.php b/application/views/alterpurchaseorder.php index d99d79f7..979d291f 100755 --- a/application/views/alterpurchaseorder.php +++ b/application/views/alterpurchaseorder.php @@ -13,7 +13,7 @@ if(!empty($MaxPODate)) { $MaxPoDate = $date->PODate; } -} +} if(!empty($CompanyDetails)) { foreach ($CompanyDetails as $Req) @@ -8600,19 +8600,7 @@ var specialrow=0; addHidden(theForm,"emergencyitemcode"+temp,emergencyitemcode ); addHidden(theForm,"imag"+temp,images ); - // var a=$('#emergencyitemcode'+temp).val(); - // var b=$('#images'+temp).val(); - //console.log(a); - // console.log(b); - // addHidden(theForm,"VehicleNo"+temp,Reqnumber ); - // addHidden(theForm,"CourierNo"+temp,Reqnumber ); - // addHidden(theForm,"AQuantity"+temp,Reqnumber ); - - //$('#emergencyitemcode').val(''); - // $('#ChallanInvNo').val(''); - // $('#ChallanInvDate').val(''); - // $('#VehicleNo').val(''); - // $('#CourierNo').val(''); + $('#AQuantity').val(''); specialrow++; @@ -8622,11 +8610,7 @@ var specialrow=0; // $('#images').val(''); }//else closed }//if closed - // var tablevalue = $('#specialtable').tableToJSON(); // Convert the table into a javascript object - // var jsondata = JSON.stringify(tablevalue); - //alert(jsondata); - // $("#tablevalues").val(jsondata); - // $("#tablevalues").val(jsondata); + }//add click function closed @@ -8714,78 +8698,14 @@ var specialservicerow=0; // $("#tablevalues").val(jsondata); - }//add click function closed - // function filecheck() - // { - - // //$('#content').loader('show'); - // var sizef = document.getElementById('imag').files[0].size; - // var file = $('#imag').val(); - // //alert(file); - // if(file!='' && sizef < 2100000) - // { - - // alert('Your file added successfully'); - // } - // else - // { - // alert('Sorry Your File is Large To 2MB'); - // $('#imag').val(''); - // } - - // } - // function sfilecheck() - // { - // //$('#content').loader('show'); - // var sizef = document.getElementById('images1').files[0].size; - // var file1 = $('#images1').val(); - // if(file1!='' && sizef < 2100000) - // { - - // alert('Your file added successfully'); - // } - // else - // { - // alert('Sorry Your File is Large To 2MB'); - // $('#images1').val(''); - // } - - // } + } - - - - - var DelOpt = ''; - var SchName = ; - var DelDt = ''; - var insurancestatus = ''; + +
- 'form-label-left CreatePO ','name' => 'CreatePO','id' => 'CreatePO'); - - echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?> - -
-
-
-
-

Siddharth Industries - Edit Revenue Purchase Order -

-
-
-
-
-
- - 'Selected Requisition Numbers'); - if(!empty($ReqList)) - { - foreach ($ReqList as $SID): - - $options[$SID->ReqNo] = $SID->ReqNo ; - //$ReqType = $SID->ReqType; - endforeach; - } - echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' ); - ?> -
-
- -
+ 'form-label-left CreatePO ','name' => 'CreatePO','id' => 'CreatePO'); + + echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?> + +
+
+
+
+

Siddharth Industries - Edit Revenue Purchase Order -

+
+
+
+
+
+ + 'Selected Requisition Numbers'); + if(!empty($ReqList)) + { + foreach ($ReqList as $SID): + + $options[$SID->ReqNo] = $SID->ReqNo ; + //$ReqType = $SID->ReqType; + endforeach; + } + echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' ); + ?> +
+
+ +
'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;'); - echo form_input($data); - ?> - + $data = array('name' => 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;'); + 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',$SupId),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2'); - - ?> - - -
-
- -
- +
+
+
+ 'POType','value' => set_value('POType',REVENUE),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
-
- Select Tax Range
-
- 'Range', 'value' => '0', 'checked' => ('0' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Local','onchange'=>'SetVatorCST();')); ?> -
- 'Range', 'value' => '1', 'checked' => ('1' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Inter_state','onchange'=>'SetVatorCST();')); ?> - -
- 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> - 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?> - - -
+ 'Range', 'value' => '1', 'checked' => ('1' == $CapitalRange) ? TRUE : FALSE, 'id' => 'Inter_state','onchange'=>'SetVatorCST();')); ?> + +
+ 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> + 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?> +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BasicValue; - $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount; - $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue; - $totCgst = $totCgst + $record->AfterCGST; - $totSgst = $totSgst + $record->AfterSGST; - $totIgst = $totIgst + $record->AfterIGST; - - $totFreightAmt = $totFreightAmt + $record->AfterFreightValue; - $totInsuranceAmt = $totInsuranceAmt + $record->Insurance; - $totOrderSummaryAmt = $totOrderSummaryAmt +$record->TotalValue; - - } - ?> - - -
SNoRequisition NoItem CodeItem DescriptionQuantityUOMRate Basic Amount Tax Amount Total Order Amount Actual QuantityReceived QuantityPending QuantityAction
ReqNo ?>MaterialCode ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>BasicValue, 2, '.', ''); ?>Taxamount ?>TotalValue ?>Quantity ?>ReceivedQuantity ?>Quantity - $record->ReceivedQuantity, 2, '.', ''); ?>     - -    
-
- - - - -
-
-
- - - 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount',number_format($totBasicAmt, 2, '.', '')),'id'=>'txtTotBasicAmount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> - - -
-
- - - 'txtTotalDiscount','value' => set_value('txtTotalDiscount',number_format($totDiscountAmt, 2, '.', '')),'id'=>'txtTotalDiscount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> - -
-
- - - 'txtTotalSGST','value' => set_value('txtTotalSGST',number_format($totSgst, 2, '.', '')),'id'=>'txtTotalSGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> - -
- -
- - - 'txtTotalCGST','value' => set_value('txtTotalCGST',number_format($totCgst, 2, '.', '')),'id'=>'txtTotalCGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> - -
-
-
- - -
- - - 'txtTotalPackaing','value' => set_value('txtTotalPackaing',number_format($totPackagingAmt, 2, '.', '')),'id'=>'txtTotalPackaing', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> - -
-
- - - 'txtTotalInsurance','value' => set_value('txtTotalInsurance',number_format($totInsuranceAmt, 2, '.', '')),'id'=>'txtTotalInsurance', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> - - -
-
- - - 'txtTotalFreight','value' => set_value('txtTotalFreight',number_format($totFreightAmt, 2, '.', '')),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> - -
-
- - 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary',number_format($totOrderSummaryAmt, 2, '.', '')),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); - echo form_input($data); - ?> -
-
- -
-
- 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control' ); - echo form_textarea($data); - ?> - - -
-
- - - -
- -
- - - -
- - -
- -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - $gd) - { - - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Delivery Challan NoDelivery Challan DateMaterialReceived Date Vehicle NoCourier NoAction
DeliveryChellanOrInvoiceNo?>DeliveryChellanDate); - echo $date->format('d-m-Y'); ?>MaterialRcvdDate); - echo $date->format('d-m-Y'); ?>VehicleNo?>CourierNo?> - -
-
-
- - -
- - - -
- - - - - - - - - - - - - - - - - - - $gd) - { - $index = $row+1; - ?> - - - - - - - - - - - - - - - - - - - - - - -
Bill No FileAction
BillNo ?>FilePath))?$gd->FilePath:"No File"; ?> - FilePath)) { ?> - - -
-
-
- - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - entity =='PO DateChanged'){ - $oldValue = date('d-m-Y',strtotime($oldpo->oldValue)); - }else{ - $oldValue = $oldpo->oldValue; - }?> - - - entity =='PO DateChanged'){ - $newValue = date('d-m-Y',strtotime($oldpo->newValue)); - }else{ - $newValue = $oldpo->newValue; - }?> - - - - - - - - - - -
SnoPONOLineItemNoEntityOldValueNewValueUpdatedByUpdateOn
PONO ?>LineItemNos;?>entity?>SupplierName;?>FirstName?>UpdatedOn); - echo $date->format('d-m-Y'); ?>
-
-
- - - - - - - - - - - - - - - - + + +
+
+
+
+ + +
+ + 'Select Work Status'); + + + if(!empty($PoTypeOptions)) + { + + foreach ($PoTypeOptions as $POpt): + + if($revenuesubtype==$POpt->ConfigValue){ + $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue; + } + + endforeach; + foreach ($PoTypeOptions as $POpt1): + + if($revenuesubtype!=$POpt1->ConfigValue){ + $optionsPO[$POpt1->ConfigValue] = $POpt1->ConfigValue; + } + + endforeach; + + } + + echo form_dropdown('PoTypeOptions', $optionsPO,set_value('PoTypeOptions'),'id="PoTypeOptions"' ,'required="true"' ,'class="form-control select2'); + ?> +
+
+
+ + 'Yes','0'=>'No'); + echo form_dropdown('insurancestatus', $optionsnew,set_value('insurancestatus'),'id="insurancestatus"' ,'required="true"' ,'class="form-control select2'); + ?> +
+
+
+
+ +
+ 'insuranceno','insuranceno' => set_value('insuranceno',$insurenceno),'id'=>'insuranceno', 'class' => 'form-control' ,'required' => 'true'); + echo form_input($data); + ?> +
+
+
+ + + PaymentID] = $pay->PaymentTerms; + + endforeach; + } + echo form_dropdown('PaymentTerms', $options6,set_value('PaymentTerms',$Terms),'id="PaymentTerms"' ,'required="true"' ,'class="form-control select2'); + ?> + + +
+ +
+
+ + + +
+
+
+ +
+ + + + +
+ + + + + + + + + +
+ +
+
+ + + + + +
+ + + + +
+ -
-
- + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BasicValue; + $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount; + $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue; + $totCgst = $totCgst + $record->AfterCGST; + $totSgst = $totSgst + $record->AfterSGST; + $totIgst = $totIgst + $record->AfterIGST; + + $totFreightAmt = $totFreightAmt + $record->AfterFreightValue; + $totInsuranceAmt = $totInsuranceAmt + $record->Insurance; + $totOrderSummaryAmt = $totOrderSummaryAmt +$record->TotalValue; + + } + ?> + + +
SNoRequisition NoItem CodeItem DescriptionQuantityUOMRate Basic Amount Tax Amount Total Order Amount Actual QuantityReceived QuantityPending QuantityAction
ReqNo ?>MaterialCode ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>BasicValue, 2, '.', ''); ?>Taxamount ?>TotalValue ?>Quantity ?>ReceivedQuantity ?>Quantity - $record->ReceivedQuantity, 2, '.', ''); ?>     + +    
+
+ + + +
+
+
+ + + 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount',number_format($totBasicAmt, 2, '.', '')),'id'=>'txtTotBasicAmount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + echo form_input($data); + ?> + + +
+
+ + + 'txtTotalDiscount','value' => set_value('txtTotalDiscount',number_format($totDiscountAmt, 2, '.', '')),'id'=>'txtTotalDiscount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + echo form_input($data); + ?> + +
+
+ + + 'txtTotalSGST','value' => set_value('txtTotalSGST',number_format($totSgst, 2, '.', '')),'id'=>'txtTotalSGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + echo form_input($data); + ?> + +
+ +
+ + + 'txtTotalCGST','value' => set_value('txtTotalCGST',number_format($totCgst, 2, '.', '')),'id'=>'txtTotalCGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + echo form_input($data); + ?> + +
+
+
+ + +
+ + + 'txtTotalPackaing','value' => set_value('txtTotalPackaing',number_format($totPackagingAmt, 2, '.', '')),'id'=>'txtTotalPackaing', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + echo form_input($data); + ?> + +
+
+ + + 'txtTotalInsurance','value' => set_value('txtTotalInsurance',number_format($totInsuranceAmt, 2, '.', '')),'id'=>'txtTotalInsurance', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + echo form_input($data); + ?> + + +
+
+ + + 'txtTotalFreight','value' => set_value('txtTotalFreight',number_format($totFreightAmt, 2, '.', '')),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + echo form_input($data); + ?> + +
+
+ + 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary',number_format($totOrderSummaryAmt, 2, '.', '')),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;'); + echo form_input($data); + ?> +
+
+ +
+
+ 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control' ); + echo form_textarea($data); + ?> + +
+
+ +
+
+ +
+ + + +
-
-

- - - - - - + + + - - - - - -   Save -   Submit -   Cancel - - else if($PONOStatus == SPECIAL_PO) {?> -   Submit - - -   OK - - - -

-
- -
- -
- +
+ + + +
+
+ + + + + + + + + + + + + + + $gd) + { + + ?> + + + + + + + + + + + + + + + + + + + + + +
Delivery Challan NoDelivery Challan DateMaterialReceived Date Vehicle NoCourier NoAction
DeliveryChellanOrInvoiceNo?>DeliveryChellanDate); + echo $date->format('d-m-Y'); ?>MaterialRcvdDate); + echo $date->format('d-m-Y'); ?>VehicleNo?>CourierNo?> + +
+
+ +
+ + + + + + + + + + + + $gd) + { + if(!empty($gd->BillNo)){ + $index = $row+1; + ?> + + + + + + + - + + + + + + + + + + + + + +
Bill No FileAction
BillNo ?>FilePath))?$gd->FilePath:"No File"; ?> + FilePath)) { ?> + + +
+
+
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + entity =='PO DateChanged'){ + $oldValue = date('d-m-Y',strtotime($oldpo->oldValue)); + }else{ + $oldValue = $oldpo->oldValue; + }?> + + entity =='PO DateChanged'){ + $newValue = date('d-m-Y',strtotime($oldpo->newValue)); + }else{ + $newValue = $oldpo->newValue; + }?> + + + + + + + + + + +
SnoPONOLineItemNoEntityOldValueNewValueUpdatedByUpdateOn
PONO ?>LineItemNos;?>entity?>SupplierName;?>FirstName?>UpdatedOn); + echo $date->format('d-m-Y'); ?>
+
-
- - - - - + - + + - -function fileupload(counter) -{ - var formData = new FormData(); - var file = $("#images"+counter).prop('files')[0]; - // console.log(file); - + - - + function Copyfilename(id) + { + var size = $('input[name='+id+']')[0].files[0].size; + + var number = id.replace(/[^0-9]+/ig,""); + if(size > 2100000){ + //alert(id); + alert('Sorry Your File is Large To 2MB'); + removeRow(id); + //$('input[name = browseFiles'+number+']').val(' '); + }else { + var name = $('input[name='+id+']')[0].files[0].name; + //alert(name); + $("#maint_filename"+number).val(name); + } + } + function removeRow(input) { + + var number = input.replace(/[^0-9]+/ig,""); + if(counter >= 1){ + counter--; + + $("#divid"+number).remove(); + $('#hidecounter').val(counter); + } + + } + + diff --git a/uploads/BillFiles/1.jpg b/uploads/BillFiles/1.jpg new file mode 100755 index 00000000..033b4260 Binary files /dev/null and b/uploads/BillFiles/1.jpg differ