code merged
This commit is contained in:
parent
175ec7e1b8
commit
34cbd1536c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -51,7 +51,7 @@ class servicepurchaseorder extends BaseController
|
||||
// $this->global['pageTitle'] = 'Resico : Update Service PO Status';
|
||||
$this->global['pageTitle'] = $this->CompanyName.' : Update Service PO Status';
|
||||
$data['PO'] = $this->purchaseorder_model->GetServicePOListforStatusUpdate();
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
$this->loadViews("statusofservicepurchaseorder", $this->global,$data,Null);
|
||||
|
||||
}
|
||||
@ -90,11 +90,10 @@ class servicepurchaseorder extends BaseController
|
||||
<td align='left'>".$SupplierID."</td>
|
||||
<td align='left'>".$MaterialCode."</td>
|
||||
<td align='left' >".$Description."</td>
|
||||
<td align='left'>".$UOM."</td>
|
||||
<td align='left'>".$Quantity."</td>
|
||||
<td align='left'>".$Rate."</td>
|
||||
|
||||
<td align='left'>".$Workstatus."</td>
|
||||
<td align='left'>".$UOM."</td>
|
||||
<td align='left'>".$Quantity."</td>
|
||||
<td align='left'>".$Rate."</td>
|
||||
<td align='left'>".$Workstatus."</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
@ -208,11 +207,11 @@ class servicepurchaseorder extends BaseController
|
||||
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
//$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
if($DeliveryOption==1)
|
||||
{
|
||||
$Deliverydt = '';
|
||||
@ -222,28 +221,26 @@ class servicepurchaseorder extends BaseController
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
$ModeOfShipment=$this->input->post('addmodeofshipment');
|
||||
$SupplierReference=$this->input->post('addsupplierreference');
|
||||
$SuppliersOfferNo=$this->input->post('addsupplierofferno');
|
||||
$OtherReferences=$this->input->post('addotherreference');
|
||||
$Fincap=$this->input->post('addfincap');
|
||||
$InsuranceOptions=$this->input->post('insuranceStatus');
|
||||
$InsuranceNo=$this->input->post('insuranceNo');
|
||||
$ServiceTypeOptions=$this->input->post('PoTypeOptions');
|
||||
$DescriptionOfPo = $this->input->post('descofpo');
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
$ModeOfShipment=$this->input->post('addmodeofshipment');
|
||||
$SupplierReference=$this->input->post('addsupplierreference');
|
||||
$SuppliersOfferNo=$this->input->post('addsupplierofferno');
|
||||
$OtherReferences=$this->input->post('addotherreference');
|
||||
$Fincap=$this->input->post('addfincap');
|
||||
$InsuranceOptions=$this->input->post('insuranceStatus');
|
||||
$InsuranceNo=$this->input->post('insuranceNo');
|
||||
$ServiceTypeOptions=$this->input->post('PoTypeOptions');
|
||||
$DescriptionOfPo = $this->input->post('descofpo');
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
$OtherPayment=$this->input->post('Otherpayment');
|
||||
|
||||
$POType = $this->input->post('POType');
|
||||
|
||||
$BudgetType = $this->input->post('Budget');
|
||||
$SpcialInstruction = $this->input->post('ScopeOfWork');
|
||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||
$POStatus = $this->input->post('txtStatus');
|
||||
|
||||
$CreateBy = $this->session->userdata ( 'userId' );
|
||||
$POStatus = $this->input->post('txtStatus');
|
||||
$CreateBy = $this->session->userdata ( 'userId' );
|
||||
$RowCount = $this->input->post('txtRowCount');
|
||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||
|
||||
|
||||
$comma_separated = explode(':', $DeletedRow);
|
||||
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
@ -251,11 +248,11 @@ class servicepurchaseorder extends BaseController
|
||||
|
||||
$WorkStatus=$this->input->post('workstatus');
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus, 'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption, 'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'POType'=>$POType,'PaymentOtherDescription'=>$OtherPayment,'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);
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus, 'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption, 'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'POType'=>$POType,'PaymentOtherDescription'=>$OtherPayment,'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,'BudgetType'=>$BudgetType);
|
||||
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$ServiceTypeOptions);
|
||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$ServiceTypeOptions);
|
||||
|
||||
$PONO = '';
|
||||
$PONO = '';
|
||||
if(count($POMaster)>0)
|
||||
{
|
||||
$PONO = $POMaster[0]['PONO'];
|
||||
@ -266,7 +263,7 @@ class servicepurchaseorder extends BaseController
|
||||
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
$Per = $this->input->post('per'.$i);
|
||||
$Per = $this->input->post('per'.$i);
|
||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||
$Quantity = $this->input->post('quantity'.$i);
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
@ -280,7 +277,7 @@ class servicepurchaseorder extends BaseController
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
$ServiceFrequency=$this->input->post('Frequency'.$i);
|
||||
$ItemDescription = $this->input->post('ItemDescription'.$i);
|
||||
$OtherAmt = $this->input->post('OtherAmt'.$i);
|
||||
$OtherAmt = $this->input->post('OtherAmt'.$i);
|
||||
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
||||
|
||||
$SkipInsert = "False";
|
||||
@ -304,12 +301,12 @@ class servicepurchaseorder extends BaseController
|
||||
|
||||
$RetItemNo = $this->requistion_model->getItemNumber($Reqnumber,$MaterialCode);
|
||||
|
||||
$ItemNo = '';
|
||||
$ItemNo = '';
|
||||
if(count($RetItemNo)>0)
|
||||
{
|
||||
$ItemNo = $RetItemNo[0]['ItemNo'];
|
||||
}
|
||||
|
||||
|
||||
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ServiceMaterialDescription'=>$ItemDescription,'Per'=>$Per,'ItemNo'=>$ItemNo);
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
@ -320,7 +317,6 @@ class servicepurchaseorder extends BaseController
|
||||
{
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
//echo $LineItemNo;
|
||||
|
||||
if(trim($POType) == SERVICE )
|
||||
{
|
||||
@ -330,48 +326,58 @@ class servicepurchaseorder extends BaseController
|
||||
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
echo 'Service Purchase Order Created Successfully!The PO NO Is: '.$PONO;
|
||||
|
||||
}
|
||||
|
||||
//update service po
|
||||
function UpdateServicePurchaseOrder()
|
||||
{
|
||||
$PONO =$this->input->post('txtPONO');
|
||||
//echo $PONO;
|
||||
$newsup=$this->input->post('newsup');
|
||||
// $newSupId = split("[ - ]+", $newsup);
|
||||
$newSupId = preg_split('[-]',$newsup);
|
||||
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
|
||||
|
||||
$b4supplier=$this->input->post('b4supplier');
|
||||
$b4date=$this->input->post('b4podate');
|
||||
$b4podate = $this->getDateformat($b4date);
|
||||
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
if($DeliveryOption==1){
|
||||
$Deliverydt = '';
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||
}
|
||||
else{
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = '';
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
$ModeOfShipment=$this->input->post('editmodeofshipment');
|
||||
$SupplierReference=$this->input->post('editsupplierreference');
|
||||
$SuppliersOfferNo=$this->input->post('editsupplierofferno');
|
||||
$OtherReferences=$this->input->post('editotherreference');
|
||||
$Fincap=$this->input->post('editfincap');
|
||||
$InsuranceOptions=$this->input->post('insuranceStatus');
|
||||
$InsuranceNo=$this->input->post('insuranceNo');
|
||||
$ServiceTypeOptions=$this->input->post('PoTypeOptions');
|
||||
$DescriptionOfPo = $this->input->post('editdescofpo');
|
||||
$ModeOfShipment=$this->input->post('editmodeofshipment');
|
||||
$SupplierReference=$this->input->post('editsupplierreference');
|
||||
$SuppliersOfferNo=$this->input->post('editsupplierofferno');
|
||||
$OtherReferences=$this->input->post('editotherreference');
|
||||
$Fincap=$this->input->post('editfincap');
|
||||
$InsuranceOptions=$this->input->post('insuranceStatus');
|
||||
$InsuranceNo=$this->input->post('insuranceNo');
|
||||
$ServiceTypeOptions=$this->input->post('PoTypeOptions');
|
||||
$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');
|
||||
|
||||
$BudgetType = $this->input->post('Budget');
|
||||
|
||||
$SpcialInstruction = $this->input->post('ScopeofWork');
|
||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||
@ -388,32 +394,69 @@ class servicepurchaseorder extends BaseController
|
||||
|
||||
|
||||
// PO Master
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'PaymentOtherDescription'=>$OtherPayment,'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);
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'PaymentOtherDescription'=>$OtherPayment,'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,'BudgetType'=>$BudgetType);
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
$LineItemStatus = REQITEM_NEW;
|
||||
|
||||
|
||||
if($PODate != $b4podate )
|
||||
{
|
||||
$logpo =array('PONO'=>$PONO,'LineItemNo'=>'-','UpdateBy'=>$updatedBy,'OldValue'=>$b4podate,'NewValue'=>$PODate,'Entity'=>'PO DateChanged');
|
||||
|
||||
$this->purchaseorder_model->insertlogpo($logpo);
|
||||
}
|
||||
|
||||
if(!empty($newSupId[0] ))
|
||||
{
|
||||
if($newSupId[0] != $b4supplier)
|
||||
{
|
||||
$logpo =array('PONO'=>$PONO,'LineItemNo'=>'-','UpdateBy'=>$updatedBy,'OldValue'=>$b4supplier,'NewValue'=>$newsup,'Entity'=>'Supplier Changed');
|
||||
$this->purchaseorder_model->insertlogpo($logpo);
|
||||
}
|
||||
}
|
||||
|
||||
for ($i = 1; $i <= $RowCount; $i++)
|
||||
{
|
||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||
$Quantity = $this->input->post('quantity'.$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);
|
||||
$Cgst = $this->input->post('Cgst'.$i);
|
||||
$Sgst = $this->input->post('Sgst'.$i);
|
||||
$Igst = $this->input->post('Igst'.$i);
|
||||
$AfterCgst = $this->input->post('AfterCgst'.$i);
|
||||
$AfterSgst = $this->input->post('AfterSgst'.$i);
|
||||
$AfterIgst = $this->input->post('AfterIgst'.$i);
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
$ServiceFrequency=$this->input->post('Frequency'.$i);
|
||||
$Sgst = $this->input->post('Sgst'.$i);
|
||||
$Igst = $this->input->post('Igst'.$i);
|
||||
$AfterCgst = $this->input->post('AfterCgst'.$i);
|
||||
$AfterSgst = $this->input->post('AfterSgst'.$i);
|
||||
$AfterIgst = $this->input->post('AfterIgst'.$i);
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
$ServiceFrequency=$this->input->post('Frequency'.$i);
|
||||
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
||||
$ItemDescription = $this->input->post('ItemDescription'.$i);
|
||||
$OtherAmt = $this->input->post('OtherAmt'.$i);
|
||||
$Per = $this->input->post('per'.$i);
|
||||
|
||||
$OtherAmt = $this->input->post('OtherAmt'.$i);
|
||||
$Per = $this->input->post('per'.$i);
|
||||
|
||||
$ReqDetails = array('Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber,$MaterialCode,$ReqDetails);
|
||||
|
||||
if($Quantity != $b4qty)
|
||||
{
|
||||
$logpo =array('PONO'=>$PONO,'LineItemNo'=>$POLineItemNo,'UpdateBy'=>$updatedBy,'OldValue'=>$b4qty,'NewValue'=>$Quantity,'Entity'=>'Quantity Changed');
|
||||
$this->purchaseorder_model->insertlogpo($logpo);
|
||||
}
|
||||
|
||||
if($itemRate != $b4rate)
|
||||
{
|
||||
$logpo =array('PONO'=>$PONO,'LineItemNo'=>$POLineItemNo,'UpdateBy'=>$updatedBy,'OldValue'=>$b4rate,'NewValue'=>$itemRate,'Entity'=>'Rate Changed');
|
||||
$this->purchaseorder_model->insertlogpo($logpo);
|
||||
}
|
||||
|
||||
$POLineItem = array();
|
||||
$LineItemNo = '';
|
||||
$SkipInsert = "False";
|
||||
@ -490,13 +533,146 @@ class servicepurchaseorder extends BaseController
|
||||
}
|
||||
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO;
|
||||
}
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = $this->CompanyName.' : Edit Service Purchase order form';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
|
||||
function uploadfile()
|
||||
{
|
||||
$bill= $this->input->post('param1');
|
||||
$oldfile= $this->input->post('param2');
|
||||
// $new_file_name =$_FILES['file']['name'];
|
||||
$new_file_name =$_FILES['file']['name'];
|
||||
$new_file_name = str_replace(" ","",$new_file_name);
|
||||
if(!empty($new_file_name))
|
||||
{
|
||||
$Picture = $this->add();
|
||||
}
|
||||
|
||||
$uploadfile = $this->purchaseorder_model->updatefile($bill,$Picture,$oldfile);
|
||||
|
||||
if($uploadfile > 0){
|
||||
echo "file updated successfully!";
|
||||
}
|
||||
else{
|
||||
echo "file not updated!";
|
||||
}
|
||||
}
|
||||
|
||||
function add()
|
||||
{
|
||||
$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'];
|
||||
$config['file_name'] = str_replace(" ","",$_FILES['file']['name']);
|
||||
//print_r($config) ;
|
||||
//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 ;
|
||||
}
|
||||
|
||||
/*-----------------------------------*/
|
||||
|
||||
function addfileuplod()
|
||||
{
|
||||
|
||||
$pono= $this->input->post('PONO');
|
||||
|
||||
$new_file_name =$_FILES['file']['name'];
|
||||
|
||||
$new_file_name = str_replace(" ","",$new_file_name);
|
||||
|
||||
$files = $this->purchaseorder_model->getfies($pono);
|
||||
|
||||
$fcount = 0;
|
||||
|
||||
foreach ($files as $value)
|
||||
{
|
||||
|
||||
$lastfile = $value->FilePath;
|
||||
if($lastfile == $new_file_name)
|
||||
{
|
||||
$fcount++;
|
||||
}
|
||||
}
|
||||
$upfile='';
|
||||
|
||||
if($fcount == 0)
|
||||
{
|
||||
if(!empty($new_file_name))
|
||||
{
|
||||
$Picture = $this->adfile();
|
||||
$filelist =array('PONO'=>$pono,'FilePath'=>$Picture);
|
||||
$upfile = $this->purchaseorder_model->insertfile($filelist);
|
||||
}
|
||||
|
||||
}
|
||||
if($upfile > 0){
|
||||
echo "file updated successfully!";
|
||||
}
|
||||
else{
|
||||
echo " No File Choose or File name already Exist";
|
||||
}
|
||||
}
|
||||
|
||||
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'];
|
||||
$config['file_name'] = str_replace(" ","",$_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 ;
|
||||
}
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
//$this->global['pageTitle'] = 'Resico : 404 - Page Not Found';
|
||||
$this->global['pageTitle'] = $this->CompanyName.' : Edit Service Purchase order form';
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -471,12 +471,8 @@ $("#PaymentMethod").select2();
|
||||
<div style="border:2px solid #333">
|
||||
<div class="col-md-12">
|
||||
|
||||
<!-- <center><b><h2>Resico Industries - Edit Capital Purchase Order- <?php echo $PONO;?></h2></b></center> -->
|
||||
<center><b><h2><?php echo $pageTitle . '-' . $PONO;?></h2></b></center>
|
||||
<center><b><h2><?php echo $pageTitle . '-' . $PONO;?></h2></b></center>
|
||||
|
||||
<!-- <div class="col-md-1"><br/>
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>purchaseorder/CreatecapitalPOPrint" target="_blank">Print</a>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
@ -3803,18 +3799,15 @@ $("#PaymentMethod").select2();
|
||||
|
||||
|
||||
|
||||
<!--################################################################## -->
|
||||
<?php if(!empty($update)){?>
|
||||
<?php if(!empty($update)){?>
|
||||
<div class="col-md-12" id="editpodiv">
|
||||
<div class="col-md-12"><label>Editable POScreen</label>
|
||||
<table id="edittable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
||||
<thead style="background-color:#ddf">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>Sno</th>
|
||||
<th>PONO</th>
|
||||
<!-- <th>Material</th> -->
|
||||
<!-- <th>Date</th> -->
|
||||
<th>LineItemNo</th>
|
||||
<th>LineItemNo</th>
|
||||
<th>Entity</th>
|
||||
<th>OldValue</th>
|
||||
<th>NewValue</th>
|
||||
@ -3829,7 +3822,7 @@ $("#PaymentMethod").select2();
|
||||
<?php
|
||||
if(!empty($getlogpodtl))
|
||||
{
|
||||
//print_r($getlogpodtl); die;
|
||||
|
||||
$inde = 0;
|
||||
foreach($getlogpodtl as $oldpo)
|
||||
{
|
||||
@ -3842,14 +3835,14 @@ $("#PaymentMethod").select2();
|
||||
|
||||
<td><?php echo $oldpo->LineItemNo;?></td>
|
||||
<td><?php echo $oldpo->Entity?></td>
|
||||
<?php if($oldpo->entity =='PO DateChanged'){
|
||||
<?php if($oldpo->Entity =='PO DateChanged'){
|
||||
$oldValue = date('d-m-Y',strtotime($oldpo->OldValue));
|
||||
}else{
|
||||
$oldValue = $oldpo->OldValue;
|
||||
}?>
|
||||
<td><?php if(!empty($oldpo->SupplierName)){echo $oldValue.'-'.$oldpo->SupplierName;}else{echo $oldValue;} ?></td>
|
||||
|
||||
<?php if($oldpo->entity =='PO DateChanged'){
|
||||
<?php if($oldpo->Entity =='PO DateChanged'){
|
||||
$newValue = date('d-m-Y',strtotime($oldpo->NewValue));
|
||||
}else{
|
||||
$newValue = $oldpo->NewValue;
|
||||
|
||||
@ -68,7 +68,7 @@ $totIgst = 0.0;
|
||||
$ServiceDescription = '';
|
||||
$CapitalRange = '';
|
||||
$otherPayment='';
|
||||
$BudgetType = '';
|
||||
$BudgetType = '';
|
||||
if(!empty($POMaster))
|
||||
{
|
||||
//print_r($POMaster);
|
||||
@ -103,28 +103,19 @@ $otherPayment = $Req->PaymentOtherDescription;
|
||||
$insurencestatus = $Req->InsuranceStatus;
|
||||
$insurenceno = $Req->InsuranceNumber;
|
||||
$BudgetType = $Req->BudgetType;
|
||||
|
||||
$IGRNO = $Req->IGRNO;
|
||||
}
|
||||
}
|
||||
//echo $BudgetType;
|
||||
if(!empty($RequistionDetails))
|
||||
{
|
||||
foreach ($RequistionDetails as $ReqDet)
|
||||
{
|
||||
$Reqonn=new DateTime($ReqDet->ReqDate);
|
||||
$Reqon=$Reqonn->format('d-m-Y');
|
||||
|
||||
// $Pdt = new DateTime($Req->PODate);
|
||||
// $PODate = $Pdt->format('Y-m-d');
|
||||
$Requestedby=$ReqDet->Requestedby;
|
||||
$RequesterName=$ReqDet->FirstName;
|
||||
//$Status=$ReqDet->Status;
|
||||
}
|
||||
}
|
||||
// foreach ($POSTATUS as $PST )
|
||||
// {
|
||||
// $POStatus=$PST->StatusName;
|
||||
// }
|
||||
if(!empty($getlogpodtl ))
|
||||
{
|
||||
foreach ($getlogpodtl as $values )
|
||||
@ -135,7 +126,7 @@ $update=$values->FirstName;
|
||||
?>
|
||||
<style>
|
||||
|
||||
#packagingcalmodel {
|
||||
#packagingcalmodel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
@ -200,37 +191,17 @@ var DelDt = '<?php echo $Deliverydt; ?>';
|
||||
var insurancestatus = '<?php echo $insurencestatus;?>';
|
||||
|
||||
var budgettype='<?php echo $BudgetType;?>';
|
||||
// if(budgettype == 'CAPITAL')
|
||||
// {
|
||||
// document.getElementById('BudgetType').text = 2;
|
||||
// document.getElementById('BudgetType').value = 'player';
|
||||
// $('[name=BudgetType]').val(budgettype);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
//document.getElementById('BudgetType').text = 1;
|
||||
// document.getElementById('BudgetType').value = 'player';
|
||||
//}
|
||||
|
||||
|
||||
var insuranceno = '<?php echo $insurenceno;?>';
|
||||
var statuscheck='<?php echo $PONOStatus;?>';
|
||||
$(document).ready(function () {
|
||||
if(statuscheck=="<?php echo SPECIAL_PO;?>")
|
||||
{
|
||||
$('#splpodiv').show();
|
||||
// var js_array =<?php echo json_encode($billfile);?>;
|
||||
|
||||
// if(js_array.length === 0) {
|
||||
// $('#table3').hide();
|
||||
// }
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#splpodiv').hide();
|
||||
}
|
||||
/*****************************/
|
||||
var update = '<?php echo json_encode($update)?>';
|
||||
if(update !='null')
|
||||
{
|
||||
@ -2210,8 +2181,7 @@ return tot;
|
||||
<div style="border:2px solid #333">
|
||||
<div id="content"></div>
|
||||
<div>
|
||||
<!-- <center><b><h2>Resico Industries - Edit Revenue Purchase Order - <?php echo $PONO;?></h2></b></center></div> -->
|
||||
<center><b><h2><?php echo $pageTitle . '-' . $PONO;?></h2></b></center>
|
||||
<center><b><h2><?php echo $pageTitle . '-' . $PONO;?></h2></b></center></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@ -3828,7 +3798,7 @@ return tot;
|
||||
{
|
||||
$index = $index + 1;
|
||||
?>
|
||||
<tr id="<?php echo $index ; ?>">
|
||||
<tr id="<?php echo $index ; ?>">
|
||||
<td align="left"><?php echo $index ; ?></td>
|
||||
<td><?php echo $record->ReqNo ?></td>
|
||||
<td><?php echo $record->MaterialCode ?></td>
|
||||
@ -4019,27 +3989,7 @@ return tot;
|
||||
<div class="col-md-12" id="splpodiv">
|
||||
<div class="col-md-12"><label>Special po Table List</label>
|
||||
|
||||
<table id="table2" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" > <div class="col-md-12">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-offset-10 col-md-8" >
|
||||
|
||||
<input type="button" class="btn btn-primary" id ="addmorebutton" value=" ADD FILES..">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="newdiv"></div>
|
||||
<input type="hidden" name="hidecounter" id="hidecounter" value="0" />
|
||||
<input type="hidden" name="hideconstant" id="hideconstant" value="0" />
|
||||
|
||||
</div>
|
||||
<table id="table2" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<!-- <th>Bill No </th> -->
|
||||
@ -4096,6 +4046,17 @@ return tot;
|
||||
<div class="col-md-12"><!-- <label>Special po Table List</label> -->
|
||||
|
||||
<table id="table3" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-offset-10 col-md-8" >
|
||||
|
||||
<input type="button" class="btn btn-primary" id ="addmorebutton" value=" ADD FILES..">
|
||||
</div>
|
||||
<div id="newdiv"></div>
|
||||
<input type="hidden" name="hidecounter" id="hidecounter" value="0" />
|
||||
<input type="hidden" name="hideconstant" id="hideconstant" value="0" />
|
||||
<input type ="hidden" name ="hiddenIGRNO" id="hiddenIGRNO" value ="<?php echo $IGRNO;?>" />
|
||||
|
||||
</div>
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>Bill No </th>
|
||||
@ -4118,7 +4079,7 @@ return tot;
|
||||
<td><?php echo $gd->BillNo ?></td>
|
||||
|
||||
<td ><?php echo (!empty($gd->FilePath))?$gd->FilePath:"No File"; ?></td>
|
||||
<input type="hidden" id="hiddenigrno" value="<?= $gd->IGRNO?>">
|
||||
<!-- <input type="hidden" id="hiddenigrno" value="<?php $gd->IGRNO?>"> -->
|
||||
<input type="hidden" id="billnos<?=$index?>" value="<?= $gd->BillNo?>">
|
||||
<input type="hidden" id="file<?=$index?>" name ='file' value="<?=$gd->FilePath?>">
|
||||
|
||||
@ -4191,7 +4152,7 @@ return tot;
|
||||
$oldValue = $oldpo->OldValue;
|
||||
}?>
|
||||
<td><?php if(!empty($oldpo->SupplierName)){echo $oldValue.'-'.$oldpo->SupplierName;}else{echo $oldValue;} ?></td>
|
||||
<?php if($oldpo->entity =='PO DateChanged'){
|
||||
<?php if($oldpo->Entity =='PO DateChanged'){
|
||||
$newValue = date('d-m-Y',strtotime($oldpo->NewValue));
|
||||
}else{
|
||||
$newValue = $oldpo->NewValue;
|
||||
@ -4623,8 +4584,8 @@ return tot;
|
||||
$('#RevenueSgst'+userid).val(0);
|
||||
}
|
||||
$('#RevenueAfterCgst'+userid).val(AfterCgst);
|
||||
//$('#RevenueAfterSgst'+userid).val(AfterSgst);
|
||||
//$('#RevenueSgst'+userid).val(Sgst);
|
||||
$('#RevenueAfterSgst'+userid).val(AfterSgst);
|
||||
$('#RevenueSgst'+userid).val(Sgst);
|
||||
$('#RevenueIgst'+userid).val(Igst);
|
||||
$('#RevenueAfterIgst'+userid).val(AfterIgst);
|
||||
$('#FreightType'+userid).val(FreightType);
|
||||
@ -4736,7 +4697,7 @@ return tot;
|
||||
var rows = document.getElementById('revenueTax').rows.length;
|
||||
|
||||
var editrow = parseFloat(rows)-1;
|
||||
|
||||
|
||||
var totBasicAmt = 0;
|
||||
var totDiscountAmt = 0;
|
||||
var totPackagingAmt = 0;
|
||||
@ -4974,7 +4935,7 @@ return tot;
|
||||
{
|
||||
var id = [];
|
||||
var DelRows = $('#txtDeletedRow').val();
|
||||
|
||||
|
||||
var tr = document.getElementById(rowid);
|
||||
// var cellval = tr.cells;
|
||||
var MaterialCode = $('#materialCode'+rowid).val();
|
||||
@ -5090,7 +5051,7 @@ return tot;
|
||||
var Discount =$('#AfterDisVal'+rowid).val() == '' ? '0.00' : $('#AfterDisVal'+rowid).val();
|
||||
var BasicVal = $('#basicval'+rowid).val() == '' ? '0.00' : $('#basicval'+rowid).val();
|
||||
var TotalVal =$('#TotalOrderValue'+rowid).val() == '' ? '0.00' : $('#TotalOrderValue'+rowid).val();
|
||||
|
||||
|
||||
var Cgst = $('#RevenueAfterCgst'+rowid).val() == '' ? '0.00' : $('#RevenueAfterCgst'+rowid).val();
|
||||
var Sgst =$('#RevenueAfterSgst'+rowid).val() == '' ? '0.00' : $('#RevenueAfterSgst'+rowid).val();
|
||||
var Igst = $('#RevenueAfterIgst'+rowid).val() == '' ? '0.00' : $('#RevenueAfterIgst'+rowid).val();
|
||||
@ -5607,7 +5568,7 @@ return tot;
|
||||
<script>
|
||||
$('#insurancestatus').change(function(){
|
||||
var ans=$("#insurancestatus").val();
|
||||
|
||||
|
||||
if(ans == 0){
|
||||
$("#insurancenodiv").hide();
|
||||
//$("#insuranceno").val("");
|
||||
@ -5704,8 +5665,8 @@ return tot;
|
||||
|
||||
|
||||
var PONO =$('#txtPONO').val();
|
||||
var igr =$('#hiddenigrno').val();
|
||||
|
||||
var igr =$('#hiddenIGRNO').val();
|
||||
|
||||
formData.append('file',file);
|
||||
formData.append('PONO',PONO);
|
||||
formData.append('count',counter);
|
||||
@ -5763,10 +5724,9 @@ return tot;
|
||||
|
||||
|
||||
var bill = <?php echo json_encode($billfile)?>;
|
||||
|
||||
if(bill.length>=5){
|
||||
|
||||
swal("No more files to add");//this allows only 5 files;
|
||||
swal("You have to upload five files only");//this allows only 5 files;
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
@ -5815,7 +5775,8 @@ else{
|
||||
//var file = $('#imag').val();
|
||||
|
||||
var file = $('#images').val();
|
||||
if (file=='')
|
||||
|
||||
if (file == '')
|
||||
{
|
||||
swal('File not found');
|
||||
|
||||
@ -5833,13 +5794,13 @@ else{
|
||||
|
||||
var number = id.replace(/[^0-9]+/ig,"");
|
||||
if(size > 2100000){
|
||||
|
||||
|
||||
swal('Sorry Your File is Large To 2MB');
|
||||
removeRow(id);
|
||||
//$('input[name = browseFiles'+number+']').val(' ');
|
||||
}else {
|
||||
var name = $('input[name='+id+']')[0].files[0].name;
|
||||
|
||||
|
||||
$("#maint_filename"+number).val(name);
|
||||
}
|
||||
}
|
||||
@ -5849,6 +5810,6 @@ else{
|
||||
counter--;
|
||||
$("#divid"+number).remove();
|
||||
$('#hidecounter').val(counter);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -63,10 +63,6 @@ if(!empty($INRSYMBOL))
|
||||
$INR=$INR->FontCode2000;
|
||||
}
|
||||
}
|
||||
//echo $INR;
|
||||
//echo "$CompanyAddress";
|
||||
//$Exchangerate=$ExchangeRate;
|
||||
|
||||
|
||||
$index = 0;
|
||||
$SupId = '';
|
||||
@ -364,13 +360,7 @@ else
|
||||
<div style="border:2px solid #333">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-11">
|
||||
<?php if ($parentPO == '') { ?>
|
||||
<!-- <center><b><h2>Resico Industries - Edit Import Purchase Order-<?php echo $PONO?></h2></b></center> -->
|
||||
<center><b><h2><?php echo $pageTitle . '-' . $PONO;?></h2></b></center>
|
||||
<?php } else {?>
|
||||
<!-- <center><b><h2>Resico Industries - Amended Purchase Order-<?php echo $PONO?></h2></b></center> -->
|
||||
<center><b><h2><?php echo $pageTitle . '-' . $PONO;?></h2></b></center>
|
||||
<?php } ?>
|
||||
<center><b><h2><?php echo $pageTitle . '-' . $PONO;?></h2></b></center>
|
||||
</div>
|
||||
<!--<div class="col-md-1"><br/>
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>purchaseorder/CreateimportPOPrint" target="_blank">Print</a>
|
||||
@ -3087,7 +3077,7 @@ echo form_textarea($data);
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
<tbody>
|
||||
<?php
|
||||
if(!empty($getlogpodtl))
|
||||
{
|
||||
@ -3110,7 +3100,7 @@ echo form_textarea($data);
|
||||
}?>
|
||||
<td><?php if(!empty($oldpo->SupplierName)){echo $oldValue.'-'.$oldpo->SupplierName;}else{echo $oldValue;} ?></td>
|
||||
|
||||
<?php if($oldpo->entity =='PO DateChanged'){
|
||||
<?php if($oldpo->Entity =='PO DateChanged'){
|
||||
$newValue = date('d-m-Y',strtotime($oldpo->NewValue));
|
||||
}else{
|
||||
$newValue = $oldpo->NewValue;
|
||||
|
||||
@ -346,7 +346,7 @@ if(!empty($ReqPOType))
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Edit Line Item </h4></center>
|
||||
</div>
|
||||
|
||||
@ -38,27 +38,20 @@ if(!empty($INRSYMBOL))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//echo "$INRSYM";
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
#packagingcalmodel {
|
||||
#packagingcalmodel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
#freightcalmodel {
|
||||
#freightcalmodel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
#ExciseDutyCalModel {
|
||||
#ExciseDutyCalModel {
|
||||
margin-top:200px;
|
||||
z-index: 1080 !important;
|
||||
}
|
||||
@ -75,7 +68,7 @@ if(!empty($INRSYMBOL))
|
||||
padding-right:30% ! important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
<!-- Rich text -->
|
||||
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
||||
@ -122,7 +115,7 @@ if(!empty($INRSYMBOL))
|
||||
|
||||
|
||||
|
||||
function openModal()
|
||||
function openModal()
|
||||
{
|
||||
if(vaildateBeforeOpenModal())
|
||||
{
|
||||
@ -173,21 +166,18 @@ function vaildateBeforeOpenModal()
|
||||
$('#Deliverydate').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else if($('#PoTypeOptions').val()==0)
|
||||
else if($('#PoTypeOptions').val()=="0")
|
||||
{
|
||||
swal('Please Select POType');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#BudgetType').val()=="0")
|
||||
{
|
||||
swal('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
swal('Please Select POType');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#BudgetType').val()=="0")
|
||||
{
|
||||
swal('Please Select Budget Type');
|
||||
$('#BudgetType').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
@ -219,16 +209,14 @@ $(function()
|
||||
minDate : d,
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
$("#Deliverydt").datepicker({
|
||||
});
|
||||
$("#Deliverydt").datepicker({
|
||||
minDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#PoTypeOptions').change(function()
|
||||
{
|
||||
$('#PoTypeOptions').change(function()
|
||||
{
|
||||
var potypeval=$('#PoTypeOptions').val();
|
||||
var poopt= <?php echo json_encode($PoTypeOptions, JSON_PRETTY_PRINT) ?>;
|
||||
var config=poopt[0].ConfigValue;
|
||||
@ -244,19 +232,14 @@ $('#PoTypeOptions').change(function()
|
||||
if(obj.PaymentID=='PT05')
|
||||
{
|
||||
|
||||
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
|
||||
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$.each(Payment,function(idx,obj)
|
||||
{
|
||||
if(obj.PaymentID=='PT05')
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(obj.PaymentID=='PT05'){}
|
||||
else
|
||||
{
|
||||
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
|
||||
@ -267,9 +250,6 @@ $('#PoTypeOptions').change(function()
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$('#drpSupplier').change(function() {
|
||||
|
||||
var id = $('#drpSupplier').val();
|
||||
@ -621,77 +601,6 @@ $('#EditPackagingType').change(function() {
|
||||
|
||||
});
|
||||
|
||||
//for freight type//
|
||||
// $('#drpFreight').change(function() {
|
||||
// if($('#Rate').val() != '' && $('#MaterialCode').val() != "0" )
|
||||
// {
|
||||
// swal();
|
||||
// $('#txtFreight').val('');
|
||||
// $('#txtAfterFreight').val('');
|
||||
// selValue = $("#drpFreight").val() ;
|
||||
// if(selValue == PercentageType)
|
||||
// {
|
||||
// var PackagingCalculation = '';
|
||||
// $('#freightcalmodel').modal('show');
|
||||
// //$('#freightcalmodel').modal('blur');
|
||||
// $('#txtFreight').removeAttr( 'readonly','true' );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (selValue == NilType)
|
||||
// {
|
||||
|
||||
// $('#txtFreight').attr('readonly', 'true');
|
||||
// $('#txtFreight').val('0.00');
|
||||
// }
|
||||
|
||||
// else
|
||||
// {
|
||||
// $('#txtFreight').removeAttr( 'readonly','true' );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// swal('Please Select MaterialCode and Rate Field Value');
|
||||
// $('#drpFreight').val("0");
|
||||
// $('#Rate').focus();
|
||||
// }
|
||||
// calculateFreight(0);
|
||||
|
||||
|
||||
//});
|
||||
//for edit freight type//
|
||||
// $('#drpEditFreight').change(function() {
|
||||
|
||||
// $('#txtEditFreight').val('');
|
||||
// $('#txtEditAfterFreight').val('');
|
||||
// selValue = $("#drpEditFreight").val() ;
|
||||
|
||||
// if(selValue == PercentageType)
|
||||
// {
|
||||
// var PackagingCalculation = '';
|
||||
// // $('#freight').modal('show');
|
||||
// $('#freightcalmodel').modal('show');
|
||||
// $('#txtEditFreight').removeAttr( 'readonly','true' );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (selValue == NilType)
|
||||
// {
|
||||
|
||||
// $('#txtEditFreight').attr('readonly', 'true');
|
||||
// $('#txtEditFreight').val('0.00');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $('#txtEditFreight').removeAttr( 'readonly','true' );
|
||||
// }
|
||||
// }
|
||||
// //calculatePackaging(1);
|
||||
|
||||
// });
|
||||
|
||||
$('#txtExciseDuty').change(function() {
|
||||
|
||||
if($('#Rate').val() != '' && $('#MaterialCode').val() != "0" )
|
||||
@ -2129,22 +2038,11 @@ return true;
|
||||
|
||||
function validateEditExceedLimit()
|
||||
{
|
||||
//swal(" Edit Budget Check");
|
||||
|
||||
var avalbudAmt = parseFloat($('#EditAvlBudAmt').val());
|
||||
var basicAmountRate = parseFloat($('#txtEditBasicValue').val());
|
||||
//swal(basicAmountRate);
|
||||
// var totalAmount = parseFloat($('#txtEditTotalOrderValue').val());
|
||||
|
||||
// if(basicAmountRate > avalbudAmt)// || totalAmount > avalbudAmt)
|
||||
// {
|
||||
// swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
// $('#EditRate').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return true;
|
||||
// }
|
||||
return true;
|
||||
|
||||
}
|
||||
function calculateEditTotalValue()
|
||||
@ -2224,13 +2122,11 @@ function calculateEditTaxValue()
|
||||
<div style="border:2px solid #333">
|
||||
<div id="content"></div>
|
||||
<div>
|
||||
<!-- <center><b><h2>Resico Industries - Revenue Purchase Order</h2></b></center></div> -->
|
||||
<center><b><h2><?php echo $pageTitle .' (Revenue)'; ?></h2></b></center></div>
|
||||
<center><b><h2><?php echo $pageTitle .' (Revenue)'; ?></h2></b></center></div>
|
||||
<div class="col-md-12 text-right" style="padding-bottom:6px; padding-right:29px;">
|
||||
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-primary" id="back" value="Back">Back</a>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
@ -2292,7 +2188,7 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
<div class="col-md-2" style="padding: 0px;">
|
||||
|
||||
<div id="div1" style="display:block;font-size:11px;">
|
||||
<div id="div1" style="display:block;">
|
||||
<b><u>Select Tax Range</u></b><br/>
|
||||
<tr>
|
||||
<td>
|
||||
@ -2440,8 +2336,7 @@ function calculateEditTaxValue()
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-6" style="padding: 0px;">
|
||||
|
||||
<label>Revenue Type Options</label>
|
||||
<!-- <label>Revenue Options<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label> -->
|
||||
<label>Revenue Type Options</label>
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
@ -2524,18 +2419,18 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2" style="padding-right: 0px;">
|
||||
<label for="BudgetType">Budget Type</label>
|
||||
<?php
|
||||
|
||||
<div class="col-md-2" style="padding-right: 0px;">
|
||||
<label for="BudgetType">Budget Type</label>
|
||||
<?php
|
||||
|
||||
|
||||
$optionsnew=array('0'=>'Select','1'=>'REVENUE','2'=>'CAPITAL');
|
||||
echo form_dropdown('BudgetType', $optionsnew,set_value('BudgetType'),'id="BudgetType"' ,'required="true"' ,'class="form-control select2');
|
||||
$optionsnew=array('0'=>'Select','1'=>'REVENUE','2'=>'CAPITAL');
|
||||
echo form_dropdown('BudgetType', $optionsnew,set_value('BudgetType'),'id="BudgetType"' ,'required="true"' ,'class="form-control select2');
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -3660,9 +3555,9 @@ $("#insurance").change(function(){
|
||||
});
|
||||
$("#BudgetType").change(function(){
|
||||
|
||||
var aa = $("#BudgetType option:selected").text();
|
||||
var aa = $("#BudgetType option:selected").text();
|
||||
|
||||
$('#Budget').val(aa);
|
||||
$('#Budget').val(aa);
|
||||
|
||||
|
||||
});
|
||||
@ -3782,7 +3677,7 @@ $("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
||||
});
|
||||
$('.AddRevenue').click(function(){
|
||||
tinyMCE.triggerSave();
|
||||
if(validateRevenueTax() && ExceedQuantityCheck())
|
||||
if(validateRevenueTax() && ExceedQuantityCheck())
|
||||
{
|
||||
var temp = index;
|
||||
var Reqnumber = $('#ReqNo').val();
|
||||
@ -4184,7 +4079,6 @@ function validateEditRevenueTax()
|
||||
function DeleteRow(rowid)
|
||||
{
|
||||
var DelRows = $('#txtDeletedRow').val();
|
||||
//alertMaterialListrowid);
|
||||
|
||||
var answer = confirm(" Do you want to delete the Item from the List?")
|
||||
if (answer)
|
||||
@ -4294,65 +4188,55 @@ var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
||||
//swal(txtTotBasicAmount+"--"+txtTotalDiscount+"--"+finalBasicAmount+"--"+AvlBudAmt);
|
||||
if(validate())
|
||||
{
|
||||
if(document.getElementById('revenueTax').rows.length < 3)
|
||||
if(document.getElementById('revenueTax').rows.length < 3)
|
||||
{
|
||||
swal('Please Select Line item to Create PO');
|
||||
$('#Deliverydt').focus();
|
||||
return false;
|
||||
}
|
||||
// else if(parseInt(AvlBudAmt) < parseInt(finalBasicAmount)) {
|
||||
// swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||
|
||||
// return false;
|
||||
// }
|
||||
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
|
||||
swal('Please Enter Payable Terms Description');
|
||||
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
|
||||
swal('Please Enter Payable Terms Description');
|
||||
$('#Otherpayment').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#insurance').val() == 1 && $('#insuranceno').val() == ''){
|
||||
swal('Please Enter Insurance No..!');
|
||||
$('#insurance').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
else if($('#PoTypeOptions').val()=="0")
|
||||
{
|
||||
alert('Please Select POType');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
else if($('#insurance').val() == 1 && $('#insuranceno').val() == ''){
|
||||
swal('Please Enter Insurance No..!');
|
||||
$('#insurance').focus();
|
||||
return false;
|
||||
}
|
||||
else if($('#PoTypeOptions').val()=="0")
|
||||
{
|
||||
swal('Please Select POType');
|
||||
$('#PoTypeOptions').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:$('.CreatePO').serialize(),
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>purchaseorder/addNewPurchaseOrder",
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
//$('#SpcialInstruction').val('');
|
||||
//$('#txtDeliveryAddress').val('');
|
||||
window.location = "purchaseorderListing";
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:$('.CreatePO').serialize(),
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>purchaseorder/addNewPurchaseOrder",
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
swal(data);
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
//$('#SpcialInstruction').val('');
|
||||
//$('#txtDeliveryAddress').val('');
|
||||
window.location = "purchaseorderListing";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
swal("Error");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -4430,7 +4314,6 @@ function change(){
|
||||
|
||||
$('#AfterCgst').val(calculateCgstTax($('#txtBasicValue').val(),$('#Cgst').val(),$('#txtAfterDiscount').val ()== '' ? '0.00' : $('#txtAfterDiscount').val(),$('#txtAfterPackaging').val() == '' ? '0.00' :$('#txtAfterPackaging').val(),$('#txtAfterFreight').val() == '' ? '0.00' :$('#txtAfterFreight').val()));
|
||||
}
|
||||
//alert($('#Cgst').val());
|
||||
if($("#Sgst").val()!=''){
|
||||
|
||||
$('#AfterSgst').val(calculateCgstTax($('#txtBasicValue').val(),$('#Sgst').val(),$('#txtAfterDiscount').val ()== '' ? '0.00' : $('#txtAfterDiscount').val(),$('#txtAfterPackaging').val() == '' ? '0.00' :$('#txtAfterPackaging').val(),$('#txtAfterFreight').val() == '' ? '0.00' :$('#txtAfterFreight').val()));
|
||||
@ -4471,18 +4354,16 @@ function calculateTotalValue()
|
||||
|
||||
function calculateCgstTax(varBasicValue,Cgst,discount,pack,freight)
|
||||
{
|
||||
//alert('hai');
|
||||
var discount = discount;
|
||||
var packaging = pack;
|
||||
var freight = freight;
|
||||
var packfreight =parseFloat(packaging)+parseFloat(freight);
|
||||
// alert( packfreight);
|
||||
|
||||
var basicValue1 = parseFloat(varBasicValue-discount);
|
||||
// alert("basicValue1:"+basicValue1);
|
||||
|
||||
var basicValue =parseFloat(basicValue1+packfreight);
|
||||
var Cgst = parseFloat(Cgst);
|
||||
// alert("Cgst:"+Cgst);
|
||||
// alert ("basicValue:"+basicValue);
|
||||
|
||||
var ServiceTaxValue = 0.0;
|
||||
|
||||
|
||||
@ -4499,7 +4380,7 @@ function calculateTotalValue()
|
||||
var packaging = pack;
|
||||
var freight = freight;
|
||||
var packfreight =parseFloat(packaging)+parseFloat(freight);
|
||||
// alert( packfreight);
|
||||
|
||||
var basicValue1 = parseFloat(varBasicValue-discount);
|
||||
var basicValue =parseFloat(basicValue1+packfreight)
|
||||
var Sgst = parseFloat(Sgst);
|
||||
@ -4515,19 +4396,19 @@ function calculateTotalValue()
|
||||
function calculateIgstTax(varBasicValue,Igst,discount,pack1,freight1)
|
||||
{
|
||||
var discount = discount;
|
||||
// alert(discount);
|
||||
|
||||
var packaging=parseFloat(pack1);
|
||||
//alert(packaging);
|
||||
|
||||
var freight=parseFloat(freight1);
|
||||
//alert(freight);
|
||||
|
||||
var packfreight=parseFloat(packaging)+parseFloat(freight);
|
||||
//alert(packfreight);
|
||||
|
||||
var basicValue1 = parseFloat(varBasicValue-discount);
|
||||
// alert(basicValue1);
|
||||
var basicValue =parseFloat(basicValue1+packfreight)
|
||||
// alert(basicValue);
|
||||
|
||||
var basicValue =parseFloat(basicValue1+packfreight)
|
||||
|
||||
var Igst = parseFloat(Igst);
|
||||
//alert(Igst);
|
||||
|
||||
var ServiceTaxValue = 0.0;
|
||||
|
||||
ServiceTaxValue = <?php echo SERVICETAX_IGST; ?>;
|
||||
@ -4554,7 +4435,7 @@ function calculateTotalValue()
|
||||
var totvalue = parseFloat(AfterCgst)+ parseFloat(AfterSgst) + parseFloat(AfterIgst) ;
|
||||
|
||||
var tot = parseFloat(totvalue).toFixed(2);
|
||||
//alert('tot:'+tot);
|
||||
|
||||
return tot;
|
||||
}
|
||||
|
||||
@ -4591,7 +4472,4 @@ location.reload();
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@ -289,7 +289,7 @@ if(!empty($Emp))
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #3c8dbc;color:#fff;">
|
||||
<div class="modal-header" style="background-color: #5d0411;color:#fff;">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<center><h4>Edit Line Item </h4></center>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user