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
@ -90,11 +90,10 @@ class servicepurchaseorder extends BaseController
|
|||||||
<td align='left'>".$SupplierID."</td>
|
<td align='left'>".$SupplierID."</td>
|
||||||
<td align='left'>".$MaterialCode."</td>
|
<td align='left'>".$MaterialCode."</td>
|
||||||
<td align='left' >".$Description."</td>
|
<td align='left' >".$Description."</td>
|
||||||
<td align='left'>".$UOM."</td>
|
<td align='left'>".$UOM."</td>
|
||||||
<td align='left'>".$Quantity."</td>
|
<td align='left'>".$Quantity."</td>
|
||||||
<td align='left'>".$Rate."</td>
|
<td align='left'>".$Rate."</td>
|
||||||
|
<td align='left'>".$Workstatus."</td>
|
||||||
<td align='left'>".$Workstatus."</td>
|
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,11 +207,11 @@ class servicepurchaseorder extends BaseController
|
|||||||
|
|
||||||
$POdt =$this->input->post('PODate');
|
$POdt =$this->input->post('PODate');
|
||||||
$PODate = $this->getDateformat($POdt);
|
$PODate = $this->getDateformat($POdt);
|
||||||
$SupplierID = $this->input->post('drpSupplier');
|
$SupplierID = $this->input->post('drpSupplier');
|
||||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||||
$dt = $this->input->post('Deliverydt');
|
$dt = $this->input->post('Deliverydt');
|
||||||
//$Deliverydt = $this->getDateformat($dt);
|
//$Deliverydt = $this->getDateformat($dt);
|
||||||
$DeliveryOption = $this->input->post('DateRange');
|
$DeliveryOption = $this->input->post('DateRange');
|
||||||
if($DeliveryOption==1)
|
if($DeliveryOption==1)
|
||||||
{
|
{
|
||||||
$Deliverydt = '';
|
$Deliverydt = '';
|
||||||
@ -222,25 +221,23 @@ class servicepurchaseorder extends BaseController
|
|||||||
$Deliverydt = $this->getDateformat($dt);
|
$Deliverydt = $this->getDateformat($dt);
|
||||||
$DeliverySchedule = '';
|
$DeliverySchedule = '';
|
||||||
}
|
}
|
||||||
$ModeOfShipment=$this->input->post('addmodeofshipment');
|
$ModeOfShipment=$this->input->post('addmodeofshipment');
|
||||||
$SupplierReference=$this->input->post('addsupplierreference');
|
$SupplierReference=$this->input->post('addsupplierreference');
|
||||||
$SuppliersOfferNo=$this->input->post('addsupplierofferno');
|
$SuppliersOfferNo=$this->input->post('addsupplierofferno');
|
||||||
$OtherReferences=$this->input->post('addotherreference');
|
$OtherReferences=$this->input->post('addotherreference');
|
||||||
$Fincap=$this->input->post('addfincap');
|
$Fincap=$this->input->post('addfincap');
|
||||||
$InsuranceOptions=$this->input->post('insuranceStatus');
|
$InsuranceOptions=$this->input->post('insuranceStatus');
|
||||||
$InsuranceNo=$this->input->post('insuranceNo');
|
$InsuranceNo=$this->input->post('insuranceNo');
|
||||||
$ServiceTypeOptions=$this->input->post('PoTypeOptions');
|
$ServiceTypeOptions=$this->input->post('PoTypeOptions');
|
||||||
$DescriptionOfPo = $this->input->post('descofpo');
|
$DescriptionOfPo = $this->input->post('descofpo');
|
||||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||||
$OtherPayment=$this->input->post('Otherpayment');
|
$OtherPayment=$this->input->post('Otherpayment');
|
||||||
|
|
||||||
$POType = $this->input->post('POType');
|
$POType = $this->input->post('POType');
|
||||||
|
$BudgetType = $this->input->post('Budget');
|
||||||
$SpcialInstruction = $this->input->post('ScopeOfWork');
|
$SpcialInstruction = $this->input->post('ScopeOfWork');
|
||||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||||
$POStatus = $this->input->post('txtStatus');
|
$POStatus = $this->input->post('txtStatus');
|
||||||
|
$CreateBy = $this->session->userdata ( 'userId' );
|
||||||
$CreateBy = $this->session->userdata ( 'userId' );
|
|
||||||
$RowCount = $this->input->post('txtRowCount');
|
$RowCount = $this->input->post('txtRowCount');
|
||||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||||
|
|
||||||
@ -251,11 +248,11 @@ class servicepurchaseorder extends BaseController
|
|||||||
|
|
||||||
$WorkStatus=$this->input->post('workstatus');
|
$WorkStatus=$this->input->post('workstatus');
|
||||||
// PO Master
|
// 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)
|
if(count($POMaster)>0)
|
||||||
{
|
{
|
||||||
$PONO = $POMaster[0]['PONO'];
|
$PONO = $POMaster[0]['PONO'];
|
||||||
@ -266,7 +263,7 @@ class servicepurchaseorder extends BaseController
|
|||||||
|
|
||||||
for ($i = 1; $i <= $RowCount; $i++)
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
{
|
{
|
||||||
$Per = $this->input->post('per'.$i);
|
$Per = $this->input->post('per'.$i);
|
||||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||||
$Quantity = $this->input->post('quantity'.$i);
|
$Quantity = $this->input->post('quantity'.$i);
|
||||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||||
@ -280,7 +277,7 @@ class servicepurchaseorder extends BaseController
|
|||||||
$CostCenter = $this->input->post('costCode'.$i);
|
$CostCenter = $this->input->post('costCode'.$i);
|
||||||
$ServiceFrequency=$this->input->post('Frequency'.$i);
|
$ServiceFrequency=$this->input->post('Frequency'.$i);
|
||||||
$ItemDescription = $this->input->post('ItemDescription'.$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);
|
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
||||||
|
|
||||||
$SkipInsert = "False";
|
$SkipInsert = "False";
|
||||||
@ -304,7 +301,7 @@ class servicepurchaseorder extends BaseController
|
|||||||
|
|
||||||
$RetItemNo = $this->requistion_model->getItemNumber($Reqnumber,$MaterialCode);
|
$RetItemNo = $this->requistion_model->getItemNumber($Reqnumber,$MaterialCode);
|
||||||
|
|
||||||
$ItemNo = '';
|
$ItemNo = '';
|
||||||
if(count($RetItemNo)>0)
|
if(count($RetItemNo)>0)
|
||||||
{
|
{
|
||||||
$ItemNo = $RetItemNo[0]['ItemNo'];
|
$ItemNo = $RetItemNo[0]['ItemNo'];
|
||||||
@ -320,7 +317,6 @@ class servicepurchaseorder extends BaseController
|
|||||||
{
|
{
|
||||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||||
}
|
}
|
||||||
//echo $LineItemNo;
|
|
||||||
|
|
||||||
if(trim($POType) == SERVICE )
|
if(trim($POType) == SERVICE )
|
||||||
{
|
{
|
||||||
@ -330,49 +326,59 @@ class servicepurchaseorder extends BaseController
|
|||||||
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
echo 'Service Purchase Order Created Successfully!The PO NO Is: '.$PONO;
|
echo 'Service Purchase Order Created Successfully!The PO NO Is: '.$PONO;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//update service po
|
//update service po
|
||||||
function UpdateServicePurchaseOrder()
|
function UpdateServicePurchaseOrder()
|
||||||
{
|
{
|
||||||
$PONO =$this->input->post('txtPONO');
|
$PONO =$this->input->post('txtPONO');
|
||||||
//echo $PONO;
|
$newsup=$this->input->post('newsup');
|
||||||
|
// $newSupId = split("[ - ]+", $newsup);
|
||||||
|
$newSupId = preg_split('[-]',$newsup);
|
||||||
|
|
||||||
$POdt =$this->input->post('PODate');
|
$POdt =$this->input->post('PODate');
|
||||||
$PODate = $this->getDateformat($POdt);
|
$PODate = $this->getDateformat($POdt);
|
||||||
|
|
||||||
|
$b4supplier=$this->input->post('b4supplier');
|
||||||
|
$b4date=$this->input->post('b4podate');
|
||||||
|
$b4podate = $this->getDateformat($b4date);
|
||||||
|
|
||||||
$SupplierID = $this->input->post('drpSupplier');
|
$SupplierID = $this->input->post('drpSupplier');
|
||||||
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||||
$dt = $this->input->post('Deliverydt');
|
$dt = $this->input->post('Deliverydt');
|
||||||
$DeliveryOption = $this->input->post('DateRange');
|
$DeliveryOption = $this->input->post('DateRange');
|
||||||
if($DeliveryOption==1){
|
if($DeliveryOption==1){
|
||||||
$Deliverydt = '';
|
$Deliverydt = '';
|
||||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$Deliverydt = $this->getDateformat($dt);
|
$Deliverydt = $this->getDateformat($dt);
|
||||||
$DeliverySchedule = '';
|
$DeliverySchedule = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$ModeOfShipment=$this->input->post('editmodeofshipment');
|
$ModeOfShipment=$this->input->post('editmodeofshipment');
|
||||||
$SupplierReference=$this->input->post('editsupplierreference');
|
$SupplierReference=$this->input->post('editsupplierreference');
|
||||||
$SuppliersOfferNo=$this->input->post('editsupplierofferno');
|
$SuppliersOfferNo=$this->input->post('editsupplierofferno');
|
||||||
$OtherReferences=$this->input->post('editotherreference');
|
$OtherReferences=$this->input->post('editotherreference');
|
||||||
$Fincap=$this->input->post('editfincap');
|
$Fincap=$this->input->post('editfincap');
|
||||||
$InsuranceOptions=$this->input->post('insuranceStatus');
|
$InsuranceOptions=$this->input->post('insuranceStatus');
|
||||||
$InsuranceNo=$this->input->post('insuranceNo');
|
$InsuranceNo=$this->input->post('insuranceNo');
|
||||||
$ServiceTypeOptions=$this->input->post('PoTypeOptions');
|
$ServiceTypeOptions=$this->input->post('PoTypeOptions');
|
||||||
$DescriptionOfPo = $this->input->post('editdescofpo');
|
$DescriptionOfPo = $this->input->post('editdescofpo');
|
||||||
|
|
||||||
|
|
||||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||||
$OtherPayment=$this->input->post('Otherpayment');
|
$OtherPayment=$this->input->post('Otherpayment');
|
||||||
|
|
||||||
$POType = $this->input->post('POType');
|
$POType = $this->input->post('POType');
|
||||||
|
|
||||||
|
$BudgetType = $this->input->post('Budget');
|
||||||
|
|
||||||
$SpcialInstruction = $this->input->post('ScopeofWork');
|
$SpcialInstruction = $this->input->post('ScopeofWork');
|
||||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||||
$POStatus = $this->input->post('txtStatus');
|
$POStatus = $this->input->post('txtStatus');
|
||||||
@ -388,31 +394,68 @@ class servicepurchaseorder extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
// PO Master
|
// 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);
|
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||||
|
|
||||||
$LineItemStatus = REQITEM_NEW;
|
$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++)
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
{
|
{
|
||||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||||
$Quantity = $this->input->post('quantity'.$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);
|
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||||
$itemRate = $this->input->post('itemRate'.$i);
|
$itemRate = $this->input->post('itemRate'.$i);
|
||||||
$Cgst = $this->input->post('Cgst'.$i);
|
$Cgst = $this->input->post('Cgst'.$i);
|
||||||
$Sgst = $this->input->post('Sgst'.$i);
|
$Sgst = $this->input->post('Sgst'.$i);
|
||||||
$Igst = $this->input->post('Igst'.$i);
|
$Igst = $this->input->post('Igst'.$i);
|
||||||
$AfterCgst = $this->input->post('AfterCgst'.$i);
|
$AfterCgst = $this->input->post('AfterCgst'.$i);
|
||||||
$AfterSgst = $this->input->post('AfterSgst'.$i);
|
$AfterSgst = $this->input->post('AfterSgst'.$i);
|
||||||
$AfterIgst = $this->input->post('AfterIgst'.$i);
|
$AfterIgst = $this->input->post('AfterIgst'.$i);
|
||||||
$CostCenter = $this->input->post('costCode'.$i);
|
$CostCenter = $this->input->post('costCode'.$i);
|
||||||
$ServiceFrequency=$this->input->post('Frequency'.$i);
|
$ServiceFrequency=$this->input->post('Frequency'.$i);
|
||||||
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||||
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
||||||
$ItemDescription = $this->input->post('ItemDescription'.$i);
|
$ItemDescription = $this->input->post('ItemDescription'.$i);
|
||||||
$OtherAmt = $this->input->post('OtherAmt'.$i);
|
$OtherAmt = $this->input->post('OtherAmt'.$i);
|
||||||
$Per = $this->input->post('per'.$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();
|
$POLineItem = array();
|
||||||
$LineItemNo = '';
|
$LineItemNo = '';
|
||||||
@ -490,13 +533,146 @@ class servicepurchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO;
|
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 style="border:2px solid #333">
|
||||||
<div class="col-md-12">
|
<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>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<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" id="editpodiv">
|
||||||
<div class="col-md-12"><label>Editable POScreen</label>
|
<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;" >
|
<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>
|
<tr>
|
||||||
<th>Sno</th>
|
<th>Sno</th>
|
||||||
<th>PONO</th>
|
<th>PONO</th>
|
||||||
<!-- <th>Material</th> -->
|
<th>LineItemNo</th>
|
||||||
<!-- <th>Date</th> -->
|
|
||||||
<th>LineItemNo</th>
|
|
||||||
<th>Entity</th>
|
<th>Entity</th>
|
||||||
<th>OldValue</th>
|
<th>OldValue</th>
|
||||||
<th>NewValue</th>
|
<th>NewValue</th>
|
||||||
@ -3829,7 +3822,7 @@ $("#PaymentMethod").select2();
|
|||||||
<?php
|
<?php
|
||||||
if(!empty($getlogpodtl))
|
if(!empty($getlogpodtl))
|
||||||
{
|
{
|
||||||
//print_r($getlogpodtl); die;
|
|
||||||
$inde = 0;
|
$inde = 0;
|
||||||
foreach($getlogpodtl as $oldpo)
|
foreach($getlogpodtl as $oldpo)
|
||||||
{
|
{
|
||||||
@ -3842,14 +3835,14 @@ $("#PaymentMethod").select2();
|
|||||||
|
|
||||||
<td><?php echo $oldpo->LineItemNo;?></td>
|
<td><?php echo $oldpo->LineItemNo;?></td>
|
||||||
<td><?php echo $oldpo->Entity?></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));
|
$oldValue = date('d-m-Y',strtotime($oldpo->OldValue));
|
||||||
}else{
|
}else{
|
||||||
$oldValue = $oldpo->OldValue;
|
$oldValue = $oldpo->OldValue;
|
||||||
}?>
|
}?>
|
||||||
<td><?php if(!empty($oldpo->SupplierName)){echo $oldValue.'-'.$oldpo->SupplierName;}else{echo $oldValue;} ?></td>
|
<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));
|
$newValue = date('d-m-Y',strtotime($oldpo->NewValue));
|
||||||
}else{
|
}else{
|
||||||
$newValue = $oldpo->NewValue;
|
$newValue = $oldpo->NewValue;
|
||||||
|
|||||||
@ -103,28 +103,19 @@ $otherPayment = $Req->PaymentOtherDescription;
|
|||||||
$insurencestatus = $Req->InsuranceStatus;
|
$insurencestatus = $Req->InsuranceStatus;
|
||||||
$insurenceno = $Req->InsuranceNumber;
|
$insurenceno = $Req->InsuranceNumber;
|
||||||
$BudgetType = $Req->BudgetType;
|
$BudgetType = $Req->BudgetType;
|
||||||
|
$IGRNO = $Req->IGRNO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//echo $BudgetType;
|
|
||||||
if(!empty($RequistionDetails))
|
if(!empty($RequistionDetails))
|
||||||
{
|
{
|
||||||
foreach ($RequistionDetails as $ReqDet)
|
foreach ($RequistionDetails as $ReqDet)
|
||||||
{
|
{
|
||||||
$Reqonn=new DateTime($ReqDet->ReqDate);
|
$Reqonn=new DateTime($ReqDet->ReqDate);
|
||||||
$Reqon=$Reqonn->format('d-m-Y');
|
$Reqon=$Reqonn->format('d-m-Y');
|
||||||
|
|
||||||
// $Pdt = new DateTime($Req->PODate);
|
|
||||||
// $PODate = $Pdt->format('Y-m-d');
|
|
||||||
$Requestedby=$ReqDet->Requestedby;
|
$Requestedby=$ReqDet->Requestedby;
|
||||||
$RequesterName=$ReqDet->FirstName;
|
$RequesterName=$ReqDet->FirstName;
|
||||||
//$Status=$ReqDet->Status;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// foreach ($POSTATUS as $PST )
|
|
||||||
// {
|
|
||||||
// $POStatus=$PST->StatusName;
|
|
||||||
// }
|
|
||||||
if(!empty($getlogpodtl ))
|
if(!empty($getlogpodtl ))
|
||||||
{
|
{
|
||||||
foreach ($getlogpodtl as $values )
|
foreach ($getlogpodtl as $values )
|
||||||
@ -135,7 +126,7 @@ $update=$values->FirstName;
|
|||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
#packagingcalmodel {
|
#packagingcalmodel {
|
||||||
margin-top:200px;
|
margin-top:200px;
|
||||||
z-index: 1080 !important;
|
z-index: 1080 !important;
|
||||||
}
|
}
|
||||||
@ -200,37 +191,17 @@ var DelDt = '<?php echo $Deliverydt; ?>';
|
|||||||
var insurancestatus = '<?php echo $insurencestatus;?>';
|
var insurancestatus = '<?php echo $insurencestatus;?>';
|
||||||
|
|
||||||
var budgettype='<?php echo $BudgetType;?>';
|
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 insuranceno = '<?php echo $insurenceno;?>';
|
||||||
var statuscheck='<?php echo $PONOStatus;?>';
|
var statuscheck='<?php echo $PONOStatus;?>';
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
if(statuscheck=="<?php echo SPECIAL_PO;?>")
|
if(statuscheck=="<?php echo SPECIAL_PO;?>")
|
||||||
{
|
{
|
||||||
$('#splpodiv').show();
|
$('#splpodiv').show();
|
||||||
// var js_array =<?php echo json_encode($billfile);?>;
|
|
||||||
|
|
||||||
// if(js_array.length === 0) {
|
|
||||||
// $('#table3').hide();
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$('#splpodiv').hide();
|
$('#splpodiv').hide();
|
||||||
}
|
}
|
||||||
/*****************************/
|
|
||||||
var update = '<?php echo json_encode($update)?>';
|
var update = '<?php echo json_encode($update)?>';
|
||||||
if(update !='null')
|
if(update !='null')
|
||||||
{
|
{
|
||||||
@ -2210,8 +2181,7 @@ return tot;
|
|||||||
<div style="border:2px solid #333">
|
<div style="border:2px solid #333">
|
||||||
<div id="content"></div>
|
<div id="content"></div>
|
||||||
<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></div>
|
||||||
<center><b><h2><?php echo $pageTitle . '-' . $PONO;?></h2></b></center>
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -3828,7 +3798,7 @@ return tot;
|
|||||||
{
|
{
|
||||||
$index = $index + 1;
|
$index = $index + 1;
|
||||||
?>
|
?>
|
||||||
<tr id="<?php echo $index ; ?>">
|
<tr id="<?php echo $index ; ?>">
|
||||||
<td align="left"><?php echo $index ; ?></td>
|
<td align="left"><?php echo $index ; ?></td>
|
||||||
<td><?php echo $record->ReqNo ?></td>
|
<td><?php echo $record->ReqNo ?></td>
|
||||||
<td><?php echo $record->MaterialCode ?></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" id="splpodiv">
|
||||||
<div class="col-md-12"><label>Special po Table List</label>
|
<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">
|
<table id="table2" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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>
|
|
||||||
<thead style="background-color:#ddf">
|
<thead style="background-color:#ddf">
|
||||||
<tr>
|
<tr>
|
||||||
<!-- <th>Bill No </th> -->
|
<!-- <th>Bill No </th> -->
|
||||||
@ -4096,6 +4046,17 @@ return tot;
|
|||||||
<div class="col-md-12"><!-- <label>Special po Table List</label> -->
|
<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;" >
|
<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">
|
<thead style="background-color:#ddf">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Bill No </th>
|
<th>Bill No </th>
|
||||||
@ -4118,7 +4079,7 @@ return tot;
|
|||||||
<td><?php echo $gd->BillNo ?></td>
|
<td><?php echo $gd->BillNo ?></td>
|
||||||
|
|
||||||
<td ><?php echo (!empty($gd->FilePath))?$gd->FilePath:"No File"; ?></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="billnos<?=$index?>" value="<?= $gd->BillNo?>">
|
||||||
<input type="hidden" id="file<?=$index?>" name ='file' value="<?=$gd->FilePath?>">
|
<input type="hidden" id="file<?=$index?>" name ='file' value="<?=$gd->FilePath?>">
|
||||||
|
|
||||||
@ -4191,7 +4152,7 @@ return tot;
|
|||||||
$oldValue = $oldpo->OldValue;
|
$oldValue = $oldpo->OldValue;
|
||||||
}?>
|
}?>
|
||||||
<td><?php if(!empty($oldpo->SupplierName)){echo $oldValue.'-'.$oldpo->SupplierName;}else{echo $oldValue;} ?></td>
|
<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));
|
$newValue = date('d-m-Y',strtotime($oldpo->NewValue));
|
||||||
}else{
|
}else{
|
||||||
$newValue = $oldpo->NewValue;
|
$newValue = $oldpo->NewValue;
|
||||||
@ -4623,8 +4584,8 @@ return tot;
|
|||||||
$('#RevenueSgst'+userid).val(0);
|
$('#RevenueSgst'+userid).val(0);
|
||||||
}
|
}
|
||||||
$('#RevenueAfterCgst'+userid).val(AfterCgst);
|
$('#RevenueAfterCgst'+userid).val(AfterCgst);
|
||||||
//$('#RevenueAfterSgst'+userid).val(AfterSgst);
|
$('#RevenueAfterSgst'+userid).val(AfterSgst);
|
||||||
//$('#RevenueSgst'+userid).val(Sgst);
|
$('#RevenueSgst'+userid).val(Sgst);
|
||||||
$('#RevenueIgst'+userid).val(Igst);
|
$('#RevenueIgst'+userid).val(Igst);
|
||||||
$('#RevenueAfterIgst'+userid).val(AfterIgst);
|
$('#RevenueAfterIgst'+userid).val(AfterIgst);
|
||||||
$('#FreightType'+userid).val(FreightType);
|
$('#FreightType'+userid).val(FreightType);
|
||||||
@ -5704,7 +5665,7 @@ return tot;
|
|||||||
|
|
||||||
|
|
||||||
var PONO =$('#txtPONO').val();
|
var PONO =$('#txtPONO').val();
|
||||||
var igr =$('#hiddenigrno').val();
|
var igr =$('#hiddenIGRNO').val();
|
||||||
|
|
||||||
formData.append('file',file);
|
formData.append('file',file);
|
||||||
formData.append('PONO',PONO);
|
formData.append('PONO',PONO);
|
||||||
@ -5763,10 +5724,9 @@ return tot;
|
|||||||
|
|
||||||
|
|
||||||
var bill = <?php echo json_encode($billfile)?>;
|
var bill = <?php echo json_encode($billfile)?>;
|
||||||
|
|
||||||
if(bill.length>=5){
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -5815,7 +5775,8 @@ else{
|
|||||||
//var file = $('#imag').val();
|
//var file = $('#imag').val();
|
||||||
|
|
||||||
var file = $('#images').val();
|
var file = $('#images').val();
|
||||||
if (file=='')
|
|
||||||
|
if (file == '')
|
||||||
{
|
{
|
||||||
swal('File not found');
|
swal('File not found');
|
||||||
|
|
||||||
|
|||||||
@ -63,10 +63,6 @@ if(!empty($INRSYMBOL))
|
|||||||
$INR=$INR->FontCode2000;
|
$INR=$INR->FontCode2000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//echo $INR;
|
|
||||||
//echo "$CompanyAddress";
|
|
||||||
//$Exchangerate=$ExchangeRate;
|
|
||||||
|
|
||||||
|
|
||||||
$index = 0;
|
$index = 0;
|
||||||
$SupId = '';
|
$SupId = '';
|
||||||
@ -364,13 +360,7 @@ else
|
|||||||
<div style="border:2px solid #333">
|
<div style="border:2px solid #333">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-11">
|
<div class="col-md-11">
|
||||||
<?php if ($parentPO == '') { ?>
|
<center><b><h2><?php echo $pageTitle . '-' . $PONO;?></h2></b></center>
|
||||||
<!-- <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 } ?>
|
|
||||||
</div>
|
</div>
|
||||||
<!--<div class="col-md-1"><br/>
|
<!--<div class="col-md-1"><br/>
|
||||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>purchaseorder/CreateimportPOPrint" target="_blank">Print</a>
|
<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>
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
if(!empty($getlogpodtl))
|
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>
|
<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));
|
$newValue = date('d-m-Y',strtotime($oldpo->NewValue));
|
||||||
}else{
|
}else{
|
||||||
$newValue = $oldpo->NewValue;
|
$newValue = $oldpo->NewValue;
|
||||||
|
|||||||
@ -346,7 +346,7 @@ if(!empty($ReqPOType))
|
|||||||
|
|
||||||
<!-- Modal content-->
|
<!-- Modal content-->
|
||||||
<div class="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>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<center><h4>Edit Line Item </h4></center>
|
<center><h4>Edit Line Item </h4></center>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -38,27 +38,20 @@ if(!empty($INRSYMBOL))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//echo "$INRSYM";
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
#packagingcalmodel {
|
#packagingcalmodel {
|
||||||
margin-top:200px;
|
margin-top:200px;
|
||||||
z-index: 1080 !important;
|
z-index: 1080 !important;
|
||||||
}
|
}
|
||||||
#freightcalmodel {
|
#freightcalmodel {
|
||||||
margin-top:200px;
|
margin-top:200px;
|
||||||
z-index: 1080 !important;
|
z-index: 1080 !important;
|
||||||
}
|
}
|
||||||
#ExciseDutyCalModel {
|
#ExciseDutyCalModel {
|
||||||
margin-top:200px;
|
margin-top:200px;
|
||||||
z-index: 1080 !important;
|
z-index: 1080 !important;
|
||||||
}
|
}
|
||||||
@ -75,7 +68,7 @@ if(!empty($INRSYMBOL))
|
|||||||
padding-right:30% ! important;
|
padding-right:30% ! important;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Rich text -->
|
<!-- Rich text -->
|
||||||
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
|
<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())
|
if(vaildateBeforeOpenModal())
|
||||||
{
|
{
|
||||||
@ -173,21 +166,18 @@ function vaildateBeforeOpenModal()
|
|||||||
$('#Deliverydate').focus();
|
$('#Deliverydate').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else if($('#PoTypeOptions').val()=="0")
|
||||||
else if($('#PoTypeOptions').val()==0)
|
|
||||||
{
|
{
|
||||||
swal('Please Select POType');
|
swal('Please Select POType');
|
||||||
$('#PoTypeOptions').focus();
|
$('#PoTypeOptions').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if($('#BudgetType').val()=="0")
|
else if($('#BudgetType').val()=="0")
|
||||||
{
|
{
|
||||||
swal('Please Select Budget Type');
|
swal('Please Select Budget Type');
|
||||||
$('#BudgetType').focus();
|
$('#BudgetType').focus();
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
@ -219,16 +209,14 @@ $(function()
|
|||||||
minDate : d,
|
minDate : d,
|
||||||
maxDate : 'now',
|
maxDate : 'now',
|
||||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||||
});
|
});
|
||||||
$("#Deliverydt").datepicker({
|
$("#Deliverydt").datepicker({
|
||||||
minDate : 'now',
|
minDate : 'now',
|
||||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#PoTypeOptions').change(function()
|
||||||
|
{
|
||||||
$('#PoTypeOptions').change(function()
|
|
||||||
{
|
|
||||||
var potypeval=$('#PoTypeOptions').val();
|
var potypeval=$('#PoTypeOptions').val();
|
||||||
var poopt= <?php echo json_encode($PoTypeOptions, JSON_PRETTY_PRINT) ?>;
|
var poopt= <?php echo json_encode($PoTypeOptions, JSON_PRETTY_PRINT) ?>;
|
||||||
var config=poopt[0].ConfigValue;
|
var config=poopt[0].ConfigValue;
|
||||||
@ -251,12 +239,7 @@ $('#PoTypeOptions').change(function()
|
|||||||
|
|
||||||
$.each(Payment,function(idx,obj)
|
$.each(Payment,function(idx,obj)
|
||||||
{
|
{
|
||||||
if(obj.PaymentID=='PT05')
|
if(obj.PaymentID=='PT05'){}
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
|
$("#PaymentTerms").append( $('<option></option>').val(obj.PaymentID).html(obj.PaymentTerms));
|
||||||
@ -267,9 +250,6 @@ $('#PoTypeOptions').change(function()
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#drpSupplier').change(function() {
|
$('#drpSupplier').change(function() {
|
||||||
|
|
||||||
var id = $('#drpSupplier').val();
|
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() {
|
$('#txtExciseDuty').change(function() {
|
||||||
|
|
||||||
if($('#Rate').val() != '' && $('#MaterialCode').val() != "0" )
|
if($('#Rate').val() != '' && $('#MaterialCode').val() != "0" )
|
||||||
@ -2129,22 +2038,11 @@ return true;
|
|||||||
|
|
||||||
function validateEditExceedLimit()
|
function validateEditExceedLimit()
|
||||||
{
|
{
|
||||||
//swal(" Edit Budget Check");
|
|
||||||
var avalbudAmt = parseFloat($('#EditAvlBudAmt').val());
|
var avalbudAmt = parseFloat($('#EditAvlBudAmt').val());
|
||||||
var basicAmountRate = parseFloat($('#txtEditBasicValue').val());
|
var basicAmountRate = parseFloat($('#txtEditBasicValue').val());
|
||||||
//swal(basicAmountRate);
|
|
||||||
// var totalAmount = parseFloat($('#txtEditTotalOrderValue').val());
|
|
||||||
|
|
||||||
// if(basicAmountRate > avalbudAmt)// || totalAmount > avalbudAmt)
|
return true;
|
||||||
// {
|
|
||||||
// swal('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
|
|
||||||
// $('#EditRate').focus();
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
function calculateEditTotalValue()
|
function calculateEditTotalValue()
|
||||||
@ -2224,13 +2122,11 @@ function calculateEditTaxValue()
|
|||||||
<div style="border:2px solid #333">
|
<div style="border:2px solid #333">
|
||||||
<div id="content"></div>
|
<div id="content"></div>
|
||||||
<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;">
|
<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>
|
<a href="<?php echo base_url() ?>CreatePO" class="btn btn-primary" id="back" value="Back">Back</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="container-fluid">
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -2292,7 +2188,7 @@ function calculateEditTaxValue()
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" style="padding: 0px;">
|
<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/>
|
<b><u>Select Tax Range</u></b><br/>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@ -2440,8 +2336,7 @@ function calculateEditTaxValue()
|
|||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="col-md-6" style="padding: 0px;">
|
<div class="col-md-6" style="padding: 0px;">
|
||||||
|
|
||||||
<label>Revenue Type Options</label>
|
<label>Revenue Type Options</label>
|
||||||
<!-- <label>Revenue Options<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label> -->
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -2524,18 +2419,18 @@ function calculateEditTaxValue()
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-2" style="padding-right: 0px;">
|
<div class="col-md-2" style="padding-right: 0px;">
|
||||||
<label for="BudgetType">Budget Type</label>
|
<label for="BudgetType">Budget Type</label>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
$optionsnew=array('0'=>'Select','1'=>'REVENUE','2'=>'CAPITAL');
|
$optionsnew=array('0'=>'Select','1'=>'REVENUE','2'=>'CAPITAL');
|
||||||
echo form_dropdown('BudgetType', $optionsnew,set_value('BudgetType'),'id="BudgetType"' ,'required="true"' ,'class="form-control select2');
|
echo form_dropdown('BudgetType', $optionsnew,set_value('BudgetType'),'id="BudgetType"' ,'required="true"' ,'class="form-control select2');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -3660,9 +3555,9 @@ $("#insurance").change(function(){
|
|||||||
});
|
});
|
||||||
$("#BudgetType").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(){
|
$('.AddRevenue').click(function(){
|
||||||
tinyMCE.triggerSave();
|
tinyMCE.triggerSave();
|
||||||
if(validateRevenueTax() && ExceedQuantityCheck())
|
if(validateRevenueTax() && ExceedQuantityCheck())
|
||||||
{
|
{
|
||||||
var temp = index;
|
var temp = index;
|
||||||
var Reqnumber = $('#ReqNo').val();
|
var Reqnumber = $('#ReqNo').val();
|
||||||
@ -4184,7 +4079,6 @@ function validateEditRevenueTax()
|
|||||||
function DeleteRow(rowid)
|
function DeleteRow(rowid)
|
||||||
{
|
{
|
||||||
var DelRows = $('#txtDeletedRow').val();
|
var DelRows = $('#txtDeletedRow').val();
|
||||||
//alertMaterialListrowid);
|
|
||||||
|
|
||||||
var answer = confirm(" Do you want to delete the Item from the List?")
|
var answer = confirm(" Do you want to delete the Item from the List?")
|
||||||
if (answer)
|
if (answer)
|
||||||
@ -4294,65 +4188,55 @@ var AvlBudAmt = '<?php echo $AvlAmount ?>';
|
|||||||
//swal(txtTotBasicAmount+"--"+txtTotalDiscount+"--"+finalBasicAmount+"--"+AvlBudAmt);
|
//swal(txtTotBasicAmount+"--"+txtTotalDiscount+"--"+finalBasicAmount+"--"+AvlBudAmt);
|
||||||
if(validate())
|
if(validate())
|
||||||
{
|
{
|
||||||
if(document.getElementById('revenueTax').rows.length < 3)
|
if(document.getElementById('revenueTax').rows.length < 3)
|
||||||
{
|
{
|
||||||
swal('Please Select Line item to Create PO');
|
swal('Please Select Line item to Create PO');
|
||||||
$('#Deliverydt').focus();
|
$('#Deliverydt').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// else if(parseInt(AvlBudAmt) < parseInt(finalBasicAmount)) {
|
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
|
||||||
// swal('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
swal('Please Enter Payable Terms Description');
|
||||||
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
else if($('#Otherpayment').val()=='' && $('#PaymentTerms').val()=='PT08'){
|
|
||||||
swal('Please Enter Payable Terms Description');
|
|
||||||
$('#Otherpayment').focus();
|
$('#Otherpayment').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if($('#insurance').val() == 1 && $('#insuranceno').val() == ''){
|
else if($('#insurance').val() == 1 && $('#insuranceno').val() == ''){
|
||||||
swal('Please Enter Insurance No..!');
|
swal('Please Enter Insurance No..!');
|
||||||
$('#insurance').focus();
|
$('#insurance').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else if($('#PoTypeOptions').val()=="0")
|
||||||
|
{
|
||||||
else if($('#PoTypeOptions').val()=="0")
|
swal('Please Select POType');
|
||||||
{
|
$('#PoTypeOptions').focus();
|
||||||
alert('Please Select POType');
|
return false;
|
||||||
$('#PoTypeOptions').focus();
|
}
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
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');
|
||||||
|
swal(data);
|
||||||
|
$('#txtRowCount').val('');
|
||||||
|
$('#txtDeletedRow').val('');
|
||||||
|
//$('#SpcialInstruction').val('');
|
||||||
|
//$('#txtDeliveryAddress').val('');
|
||||||
|
window.location = "purchaseorderListing";
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
swal("Error");
|
||||||
|
}
|
||||||
|
|
||||||
$('#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";
|
|
||||||
|
|
||||||
}
|
});
|
||||||
else
|
|
||||||
{
|
|
||||||
alert("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()));
|
$('#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()!=''){
|
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()));
|
$('#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)
|
function calculateCgstTax(varBasicValue,Cgst,discount,pack,freight)
|
||||||
{
|
{
|
||||||
//alert('hai');
|
|
||||||
var discount = discount;
|
var discount = discount;
|
||||||
var packaging = pack;
|
var packaging = pack;
|
||||||
var freight = freight;
|
var freight = freight;
|
||||||
var packfreight =parseFloat(packaging)+parseFloat(freight);
|
var packfreight =parseFloat(packaging)+parseFloat(freight);
|
||||||
// alert( packfreight);
|
|
||||||
var basicValue1 = parseFloat(varBasicValue-discount);
|
var basicValue1 = parseFloat(varBasicValue-discount);
|
||||||
// alert("basicValue1:"+basicValue1);
|
|
||||||
var basicValue =parseFloat(basicValue1+packfreight);
|
var basicValue =parseFloat(basicValue1+packfreight);
|
||||||
var Cgst = parseFloat(Cgst);
|
var Cgst = parseFloat(Cgst);
|
||||||
// alert("Cgst:"+Cgst);
|
|
||||||
// alert ("basicValue:"+basicValue);
|
|
||||||
var ServiceTaxValue = 0.0;
|
var ServiceTaxValue = 0.0;
|
||||||
|
|
||||||
|
|
||||||
@ -4499,7 +4380,7 @@ function calculateTotalValue()
|
|||||||
var packaging = pack;
|
var packaging = pack;
|
||||||
var freight = freight;
|
var freight = freight;
|
||||||
var packfreight =parseFloat(packaging)+parseFloat(freight);
|
var packfreight =parseFloat(packaging)+parseFloat(freight);
|
||||||
// alert( packfreight);
|
|
||||||
var basicValue1 = parseFloat(varBasicValue-discount);
|
var basicValue1 = parseFloat(varBasicValue-discount);
|
||||||
var basicValue =parseFloat(basicValue1+packfreight)
|
var basicValue =parseFloat(basicValue1+packfreight)
|
||||||
var Sgst = parseFloat(Sgst);
|
var Sgst = parseFloat(Sgst);
|
||||||
@ -4515,19 +4396,19 @@ function calculateTotalValue()
|
|||||||
function calculateIgstTax(varBasicValue,Igst,discount,pack1,freight1)
|
function calculateIgstTax(varBasicValue,Igst,discount,pack1,freight1)
|
||||||
{
|
{
|
||||||
var discount = discount;
|
var discount = discount;
|
||||||
// alert(discount);
|
|
||||||
var packaging=parseFloat(pack1);
|
var packaging=parseFloat(pack1);
|
||||||
//alert(packaging);
|
|
||||||
var freight=parseFloat(freight1);
|
var freight=parseFloat(freight1);
|
||||||
//alert(freight);
|
|
||||||
var packfreight=parseFloat(packaging)+parseFloat(freight);
|
var packfreight=parseFloat(packaging)+parseFloat(freight);
|
||||||
//alert(packfreight);
|
|
||||||
var basicValue1 = parseFloat(varBasicValue-discount);
|
var basicValue1 = parseFloat(varBasicValue-discount);
|
||||||
// alert(basicValue1);
|
|
||||||
var basicValue =parseFloat(basicValue1+packfreight)
|
var basicValue =parseFloat(basicValue1+packfreight)
|
||||||
// alert(basicValue);
|
|
||||||
var Igst = parseFloat(Igst);
|
var Igst = parseFloat(Igst);
|
||||||
//alert(Igst);
|
|
||||||
var ServiceTaxValue = 0.0;
|
var ServiceTaxValue = 0.0;
|
||||||
|
|
||||||
ServiceTaxValue = <?php echo SERVICETAX_IGST; ?>;
|
ServiceTaxValue = <?php echo SERVICETAX_IGST; ?>;
|
||||||
@ -4554,7 +4435,7 @@ function calculateTotalValue()
|
|||||||
var totvalue = parseFloat(AfterCgst)+ parseFloat(AfterSgst) + parseFloat(AfterIgst) ;
|
var totvalue = parseFloat(AfterCgst)+ parseFloat(AfterSgst) + parseFloat(AfterIgst) ;
|
||||||
|
|
||||||
var tot = parseFloat(totvalue).toFixed(2);
|
var tot = parseFloat(totvalue).toFixed(2);
|
||||||
//alert('tot:'+tot);
|
|
||||||
return tot;
|
return tot;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4592,6 +4473,3 @@ location.reload();
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -289,7 +289,7 @@ if(!empty($Emp))
|
|||||||
|
|
||||||
<!-- Modal content-->
|
<!-- Modal content-->
|
||||||
<div class="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>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<center><h4>Edit Line Item </h4></center>
|
<center><h4>Edit Line Item </h4></center>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user