AMEND REVENUE AND SERVICE
This commit is contained in:
parent
c9571be6d3
commit
875cde5325
@ -62,6 +62,8 @@ class amendmentpurchaseorder extends BaseController
|
|||||||
endforeach;
|
endforeach;
|
||||||
$data['MaterialList'] = $result;//$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray);
|
$data['MaterialList'] = $result;//$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray);
|
||||||
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
|
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
|
||||||
|
$data['Payment']=$this->purchaseorder_model->getSupplierPayment();
|
||||||
|
//print_r($data['Payment']);
|
||||||
/* Cost code from Requisition - Client Review Fix
|
/* Cost code from Requisition - Client Review Fix
|
||||||
Start here */
|
Start here */
|
||||||
$ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
|
$ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
|
||||||
@ -92,13 +94,19 @@ class amendmentpurchaseorder extends BaseController
|
|||||||
{
|
{
|
||||||
|
|
||||||
$data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetails($PONO);
|
$data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetails($PONO);
|
||||||
|
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||||
|
$data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019');
|
||||||
$this->global['pageTitle'] = 'Siddharth : Edit Service Purchase order form';
|
$this->global['pageTitle'] = 'Siddharth : Edit Service Purchase order form';
|
||||||
$this->loadViews("editServiceAmendPO", $this->global, $data, NULL);
|
$this->loadViews("editServiceAmendPO", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
else if($ReqType == REVENUE)
|
else if($ReqType == REVENUE)
|
||||||
{
|
{
|
||||||
|
//$data['Payment']=$this->purchaseorder_model->getSupplierPayment();
|
||||||
|
$data['POSTATUS']=$this->purchaseorder_model->GetPOStatus($PONO);
|
||||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
|
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
|
||||||
|
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||||
|
echo "FROM CON";
|
||||||
|
//print_r($data['Payment']);
|
||||||
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
|
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
|
||||||
$this->loadViews("editRevenueAmendPO", $this->global, $data, NULL);
|
$this->loadViews("editRevenueAmendPO", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
@ -157,7 +165,7 @@ class amendmentpurchaseorder extends BaseController
|
|||||||
{
|
{
|
||||||
$NewPO='0';
|
$NewPO='0';
|
||||||
$PONO =$this->input->post('txtPONO');
|
$PONO =$this->input->post('txtPONO');
|
||||||
echo "OLD PO IS" . $PONO;
|
// echo "OLD PO IS" . $PONO;
|
||||||
|
|
||||||
$POdt =$this->input->post('PODate');
|
$POdt =$this->input->post('PODate');
|
||||||
$PODate = $this->getDateformat($POdt);
|
$PODate = $this->getDateformat($POdt);
|
||||||
@ -176,6 +184,22 @@ class amendmentpurchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
$POType = $this->input->post('POType');
|
$POType = $this->input->post('POType');
|
||||||
$PoRange = $this->input->post('txtPoRange');
|
$PoRange = $this->input->post('txtPoRange');
|
||||||
|
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||||
|
$PayableAT=$this->input->post('PayableAT');
|
||||||
|
$PaymentDate=$this->input->post('Payment');
|
||||||
|
|
||||||
|
if($PaymentDate==1)
|
||||||
|
{
|
||||||
|
$PaymentDays='After';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$PaymentDays='Before';
|
||||||
|
}
|
||||||
|
// echo $PaymentTerms;
|
||||||
|
// echo $PayableAT;
|
||||||
|
// echo $PaymentDays;
|
||||||
|
// echo "FINAL";
|
||||||
|
|
||||||
$SpcialInstruction = $this->input->post('SpcialInstruction');
|
$SpcialInstruction = $this->input->post('SpcialInstruction');
|
||||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||||
@ -193,15 +217,15 @@ class amendmentpurchaseorder extends BaseController
|
|||||||
$updateddt = $dt->format('Y-m-d H:i:s');
|
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||||
// PO Master
|
// PO Master
|
||||||
// PO Master
|
// PO Master
|
||||||
$POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>'ST015','DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt );
|
$POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID,'PaymentTerms'=> $PaymentTerms,'PayableAT'=>$PayableAT,'PaymentDays'=>$PaymentDays,'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>'ST015','DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt );
|
||||||
|
|
||||||
//$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
//$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||||
$LastPO = $this->purchaseorder_model->addPOMaster($POMaster);
|
$LastPO = $this->purchaseorder_model->addPOMaster($POMaster);
|
||||||
foreach($LastPO as $PO):
|
foreach($LastPO as $PO):
|
||||||
$NewPO=$PO->PONO;
|
$NewPO=$PO['PONO'];
|
||||||
endforeach;
|
endforeach;
|
||||||
echo "NEW PO IS " . $NewPO;
|
//echo "NEW PO IS " . $NewPO;
|
||||||
echo "";
|
//echo "";
|
||||||
//change old po status as Amendment
|
//change old po status as Amendment
|
||||||
$PODetail=array('Status'=>"ST030");//TO SET PARENT PO AS AMENDMENT STATUS
|
$PODetail=array('Status'=>"ST030");//TO SET PARENT PO AS AMENDMENT STATUS
|
||||||
print_r($PODetail);
|
print_r($PODetail);
|
||||||
@ -215,7 +239,7 @@ class amendmentpurchaseorder extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo 'before for loop';
|
//echo 'before for loop';
|
||||||
echo $RowCount;
|
echo $RowCount;
|
||||||
|
|
||||||
for ($i = 1; $i <= $RowCount; $i++)
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
@ -277,13 +301,15 @@ class amendmentpurchaseorder extends BaseController
|
|||||||
// {
|
// {
|
||||||
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter);
|
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter);
|
||||||
print_r($POLineItemList);
|
print_r($POLineItemList);
|
||||||
|
//die();
|
||||||
|
|
||||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||||
// if(count($POLineItem)>0)
|
// if(count($POLineItem)>0)
|
||||||
// {
|
// {
|
||||||
foreach($POLineItem as $line):
|
foreach($POLineItem as $line):
|
||||||
$LineItemNo = $line->LineItemNo;
|
$LineItemNo = $line->LineItemNo;
|
||||||
endforeach;
|
endforeach;
|
||||||
echo "Lineitem no is" . $LineItemNo;
|
//echo "Lineitem no is" . $LineItemNo;
|
||||||
//print_r($LineItemNo);
|
//print_r($LineItemNo);
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@ -303,6 +329,7 @@ class amendmentpurchaseorder extends BaseController
|
|||||||
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'ExciseDuty'=>$ExciseValue,'ExciseDutyCalulatedOn'=>$ExciseOption,'AfterExciseDuty'=>$AfterExciseValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'VatCalulatedOn'=>$VatOption, 'CST'=>$CSTValue,'AfterCST'=>$AfterCSTValue,'CSTCalulatedOn'=>$CSTOption,'GST'=>$GSTValue,'AfterGST'=>$AfterGSTValue,'OtherTaxes'=>$OtherTaxValue,'AfterOtherTaxes'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt);
|
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'ExciseDuty'=>$ExciseValue,'ExciseDutyCalulatedOn'=>$ExciseOption,'AfterExciseDuty'=>$AfterExciseValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'VatCalulatedOn'=>$VatOption, 'CST'=>$CSTValue,'AfterCST'=>$AfterCSTValue,'CSTCalulatedOn'=>$CSTOption,'GST'=>$GSTValue,'AfterGST'=>$AfterGSTValue,'OtherTaxes'=>$OtherTaxValue,'AfterOtherTaxes'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt);
|
||||||
|
|
||||||
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
|
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
|
||||||
|
echo "DONE ALL";
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
@ -319,6 +346,179 @@ class amendmentpurchaseorder extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function UpdateAmendServicePurchaseOrder()
|
||||||
|
{
|
||||||
|
$PONO =$this->input->post('txtPONO');
|
||||||
|
$NewPO='0';
|
||||||
|
//echo $PONO;
|
||||||
|
$POdt =$this->input->post('PODate');
|
||||||
|
$PODate = $this->getDateformat($POdt);
|
||||||
|
|
||||||
|
$SupplierID = $this->input->post('drpSupplier');
|
||||||
|
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||||
|
$dt = $this->input->post('Deliverydt');
|
||||||
|
$DeliveryOption = $this->input->post('DateRange');
|
||||||
|
if($DeliveryOption==1){
|
||||||
|
$Deliverydt = '';
|
||||||
|
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$Deliverydt = $this->getDateformat($dt);
|
||||||
|
$DeliverySchedule = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$PaymentDate=$this->input->post('Payment');
|
||||||
|
if($PaymentDate==1)
|
||||||
|
{
|
||||||
|
$PaymentDays='After';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$PaymentDays='Before';
|
||||||
|
}
|
||||||
|
|
||||||
|
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||||
|
$Payableat=$this->input->post('PayableAT');
|
||||||
|
|
||||||
|
$POType = $this->input->post('POType');
|
||||||
|
|
||||||
|
$SpcialInstruction = $this->input->post('SpcialInstruction');
|
||||||
|
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||||
|
$POStatus = $this->input->post('txtStatus');
|
||||||
|
|
||||||
|
$updatedBy = $this->session->userdata ( 'userId' );
|
||||||
|
$RowCount = $this->input->post('txtRowCount');
|
||||||
|
// echo "ROw Count is" . $RowCount;
|
||||||
|
|
||||||
|
// $DeletedRow = $this->input->post('txtDeletedRow');
|
||||||
|
|
||||||
|
//$comma_separated = explode(':', $DeletedRow);
|
||||||
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
|
$updateddt = $dt->format('Y-m-d H:i:s');
|
||||||
|
$WorkStatus=$this->input->post('workstatus');
|
||||||
|
|
||||||
|
|
||||||
|
// PO Master
|
||||||
|
$POMaster = array('ParentPO'=>$PONO,'POType'=>$POType,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'PayableAT'=>$Payableat,'PaymentDays'=>$PaymentDays,'ServiceWorkStatus'=>$WorkStatus );
|
||||||
|
//print_r($POMaster);
|
||||||
|
$LastPO = $this->purchaseorder_model->addPOMaster($POMaster);
|
||||||
|
//print_r($LastPO);
|
||||||
|
foreach($LastPO as $PO):
|
||||||
|
$NewPO=$PO['PONO'];
|
||||||
|
endforeach;
|
||||||
|
//echo "NEW PO IS " . $NewPO;
|
||||||
|
//echo "";
|
||||||
|
|
||||||
|
$PODetail=array('Status'=>"ST030");//TO SET PARENT PO AS AMENDMENT STATUS
|
||||||
|
//print_r($PODetail);
|
||||||
|
$APO=$this->purchaseorder_model->updateAmendPOMaster($PONO,$PODetail);
|
||||||
|
//echo $APO."Affected";
|
||||||
|
|
||||||
|
$LineItemStatus = REQITEM_NEW;
|
||||||
|
//echo "Before For Loop" ;
|
||||||
|
//echo $RowCount;
|
||||||
|
|
||||||
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
//echo "Inside Loop";
|
||||||
|
|
||||||
|
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||||
|
$Quantity = $this->input->post('quantity'.$i);
|
||||||
|
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||||
|
$itemRate = $this->input->post('itemRate'.$i);
|
||||||
|
$ServiceTax = $this->input->post('ServiceTax'.$i);
|
||||||
|
$EduCess = $this->input->post('EduCess'.$i);
|
||||||
|
$SecHighTax = $this->input->post('SecHighTax'.$i);
|
||||||
|
$KrishiTax = $this->input->post('KrishiTax'.$i);
|
||||||
|
$SwachhTax = $this->input->post('SwachhTax'.$i);
|
||||||
|
$CostCenter = $this->input->post('costCode'.$i);
|
||||||
|
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||||
|
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
||||||
|
$ServiceFrequency=$this->input->post('Frequency'.$i);
|
||||||
|
// echo $MaterialCode;
|
||||||
|
//$POLineItem = array();
|
||||||
|
$LineItemNo = '';
|
||||||
|
//echo "LineItem is". $LineItemNo;
|
||||||
|
// $SkipInsert = "False";
|
||||||
|
// if( count($comma_separated) > 0)
|
||||||
|
// {
|
||||||
|
// for($j = 1; $j < count($comma_separated); $j++)
|
||||||
|
// {
|
||||||
|
// $deletedRow = $comma_separated[$j] ;
|
||||||
|
|
||||||
|
// if($deletedRow == $i )
|
||||||
|
// {
|
||||||
|
// $SkipInsert = "True";
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if($SkipInsert == "False")
|
||||||
|
// {
|
||||||
|
// if(strlen($POLineItemNo) == 0)
|
||||||
|
// {
|
||||||
|
|
||||||
|
$POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency);
|
||||||
|
//print_r($POLineItemList);
|
||||||
|
|
||||||
|
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||||
|
// if(count($POLineItem)>0)
|
||||||
|
// {
|
||||||
|
foreach($POLineItem as $line):
|
||||||
|
$LineItemNo = $line->LineItemNo;
|
||||||
|
endforeach;
|
||||||
|
// echo " Last Lineitem no is" . $LineItemNo;
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
|
// //}
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// $LineItemNo = $POLineItemNo;
|
||||||
|
|
||||||
|
// $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter);
|
||||||
|
// $POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$POLineItemNo,$POLineItemList);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// if(trim($POType) == SERVICE )
|
||||||
|
// {
|
||||||
|
// $isExists = $this->purchaseorder_model->LineItemExists($LineItemNo);
|
||||||
|
|
||||||
|
// if(count($isExists) == 0)
|
||||||
|
// {
|
||||||
|
$ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'ServiceTax'=>$ServiceTax,'EducessTax'=>$EduCess,'SecHigherEducessTax'=>$SecHighTax,'KrishiKalyantax'=>$KrishiTax,'SwachhBharattax'=>$SwachhTax,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt);
|
||||||
|
//echo "Service to be stored";
|
||||||
|
|
||||||
|
//print_r($ServiceTaxList);
|
||||||
|
$ServiceList =$this->purchaseorder_model->addServiceTax($ServiceTaxList);
|
||||||
|
//echo "final";
|
||||||
|
//print_r($ServiceList);
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// $ServiceTaxList1 = array('ServiceTax'=>$ServiceTax,'EducessTax'=>$EduCess,'SecHigherEducessTax'=>$SecHighTax,'KrishiKalyantax'=>$KrishiTax,'SwachhBharattax'=>$SwachhTax,'TotalValue'=>$TotalOrderValue, 'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||||
|
|
||||||
|
// $this->purchaseorder_model->updateServiceTax($LineItemNo,$ServiceTaxList1);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
echo 'PO Number'.$PONO . ' Amended Successfully! - New PO Number is'.$NewPO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getDateformat($Val)
|
function getDateformat($Val)
|
||||||
@ -327,71 +527,5 @@ class amendmentpurchaseorder extends BaseController
|
|||||||
$retDate = $date->format('Y-m-d H:i:s');
|
$retDate = $date->format('Y-m-d H:i:s');
|
||||||
return $retDate;
|
return $retDate;
|
||||||
}
|
}
|
||||||
/* ---------------------------------OLD AMENDPO FUNCTION-----------------------------------------------*/
|
|
||||||
function getpodetails()
|
|
||||||
{
|
|
||||||
$PONO=$this->input->post('pono');
|
|
||||||
//$PONO='PO0001';
|
|
||||||
$result = $this->amendment_model->getPODetails($PONO);
|
|
||||||
// print_r($result);
|
|
||||||
$obj=json_encode($result);
|
|
||||||
echo $obj;
|
|
||||||
//print_r($obj);
|
|
||||||
//die();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function updatepo(){
|
|
||||||
$someArray = $_GET['jsondata'];
|
|
||||||
//$PONO = $_GET['pono'];
|
|
||||||
$PONO = $this->input->get('PONO');
|
|
||||||
$rowsaffected=0;
|
|
||||||
$porow=0;
|
|
||||||
|
|
||||||
//echo $PONO."</br>";
|
|
||||||
// print_r($someArray);
|
|
||||||
$d=json_decode($someArray);
|
|
||||||
////print_r( $d);
|
|
||||||
foreach($d as $d1){
|
|
||||||
$MaterialCode=$d1->ItemCode;
|
|
||||||
$Quantity=$d1->Ordered_Quantity;
|
|
||||||
$ReceivedQuantity=$d1->Additional_Quantity_Received;
|
|
||||||
$Remarks=$d1->Remarks;
|
|
||||||
$Status='ST031';
|
|
||||||
$POstatus='ST030';
|
|
||||||
$store=array('Quantity'=>$Quantity,'AmendmentQuantity'=>$ReceivedQuantity,'AmendmentRemarks'=>$Remarks,'Status'=>$Status);
|
|
||||||
//print_r($store);
|
|
||||||
$result=$this->amendment_model->updatePODetails($PONO,$MaterialCode,$store,$POstatus);
|
|
||||||
$rowsaffected++;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
echo "<script>alert($rowsaffected+'--Rows Affected')</script>";
|
|
||||||
$data['PODetails']=$this->amendment_model->getPONO();
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : Amendment Purchase Order';
|
|
||||||
|
|
||||||
$this->loadviews('amendmentpo',$this->global, NULL);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
function amendmentpolisting()
|
|
||||||
{
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : Amendment Purchase Order';
|
|
||||||
|
|
||||||
$data['POlisiting']=$this->amendment_model->getPOlist();
|
|
||||||
//echo "From CON.</br>";
|
|
||||||
//print_r($data);
|
|
||||||
$this->loadviews('amendmentpolisting',$this->global,$data);
|
|
||||||
}
|
|
||||||
|
|
||||||
function pageNotFound()
|
|
||||||
{
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found';
|
|
||||||
|
|
||||||
$this->loadViews("404", $this->global, NULL, NULL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -30,7 +30,7 @@ class purchaseorder_model extends CI_Model
|
|||||||
* @return array $result : This is result
|
* @return array $result : This is result
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function purchaseorderListing()
|
function purchaseorderListing($forwhat='')
|
||||||
{
|
{
|
||||||
$this->db->distinct();
|
$this->db->distinct();
|
||||||
$this->db->select('POMast.PONO,supp.SupplierName,TotalOrderValue,PODate,Stat.StatusName,Stat.StatusCode,POMast.POType as ReqType,DeliveryDate,DeliverySchedule,DeliveryOption');
|
$this->db->select('POMast.PONO,supp.SupplierName,TotalOrderValue,PODate,Stat.StatusName,Stat.StatusCode,POMast.POType as ReqType,DeliveryDate,DeliverySchedule,DeliveryOption');
|
||||||
@ -39,7 +39,10 @@ function purchaseorderListing()
|
|||||||
$this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status');
|
$this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status');
|
||||||
$this->db->join('T_PurchaseOrder_LineItem LineItem', 'POMast.PONO = LineItem.PONO');
|
$this->db->join('T_PurchaseOrder_LineItem LineItem', 'POMast.PONO = LineItem.PONO');
|
||||||
$this->db->join('T_Requestion_Master Req', 'Req.ReqNo = LineItem.ReqNo');
|
$this->db->join('T_Requestion_Master Req', 'Req.ReqNo = LineItem.ReqNo');
|
||||||
|
if($forwhat=='amendment')
|
||||||
|
{
|
||||||
|
$this->db->where('POMast.Status',PO_RELEASED);
|
||||||
|
}
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
//print_r( $this->db->last_query());
|
//print_r( $this->db->last_query());
|
||||||
$result = $query->result();
|
$result = $query->result();
|
||||||
|
|||||||
@ -27,6 +27,10 @@ if(!empty($AvlBudAmt))
|
|||||||
|
|
||||||
$AvlAmount = $AvlBudAmt;
|
$AvlAmount = $AvlBudAmt;
|
||||||
|
|
||||||
|
}
|
||||||
|
foreach ($PaymentTerms as $TER)
|
||||||
|
{
|
||||||
|
$Terms=$TER->PaymentTerms;
|
||||||
}
|
}
|
||||||
|
|
||||||
$SupId = '';
|
$SupId = '';
|
||||||
@ -71,8 +75,27 @@ if(!empty($POMaster))
|
|||||||
$POStatus = $Req->StatusCode;
|
$POStatus = $Req->StatusCode;
|
||||||
$PONO = $Req->PONO;
|
$PONO = $Req->PONO;
|
||||||
$ServiceDescription = $Req->ServiceDescription;
|
$ServiceDescription = $Req->ServiceDescription;
|
||||||
|
$PayableAT=$Req->PayableAT;
|
||||||
|
$PaymentDays=$Req->PaymentDays;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!empty($RequistionDetails))
|
||||||
|
{
|
||||||
|
|
||||||
|
foreach ($RequistionDetails as $ReqDet)
|
||||||
|
{
|
||||||
|
$Reqon=$ReqDet->ReqDate;
|
||||||
|
$Requestedby=$ReqDet->Requestedby;
|
||||||
|
//$Status=$ReqDet->Status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($POSTATUS as $PST )
|
||||||
|
{
|
||||||
|
$POStatus=$PST->StatusName;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
@ -149,6 +172,25 @@ $(function() {
|
|||||||
minDate : 'now',
|
minDate : 'now',
|
||||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||||
});
|
});
|
||||||
|
$("#Requeston").datepicker({
|
||||||
|
//minDate : d,
|
||||||
|
maxDate : 'now',
|
||||||
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var paymentday=<?php echo json_encode($PaymentDays,JSON_PRETTY_PRINT)?>;
|
||||||
|
if (paymentday=="After")
|
||||||
|
{
|
||||||
|
//alert();
|
||||||
|
document.getElementById("After").checked = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById("Before").checked = true;
|
||||||
|
}
|
||||||
|
|
||||||
$('#drpSupplier').change(function() {
|
$('#drpSupplier').change(function() {
|
||||||
|
|
||||||
@ -1844,6 +1886,49 @@ body {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<legend>Payment Details</legend>
|
||||||
|
<!-- Text input-->
|
||||||
|
<div class="col-md-3">
|
||||||
|
<span for="payablefrom">Payable Terms</span>
|
||||||
|
<select class="form-control required" id="PaymentTerms" name="PaymentTerms">
|
||||||
|
<option value="" ><?php echo $Terms;?></option>
|
||||||
|
<?php
|
||||||
|
if(!empty($payment))
|
||||||
|
{
|
||||||
|
foreach ($payment as $rl)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $rl->PaymentTerms ?>"><?php echo $rl->PaymentTerms ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<span>Payable AT</span>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'PayableAT','value' => set_value('PayableAT',$PayableAT),'id'=>'PayableAT', 'class' => 'form-control' ,'required' => 'true');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
Payment Date <br/>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php echo form_label('Before', 'Before') ." ". form_radio(array("name"=>"Payment", "id"=>"Before", "value"=>"0", 'checked'=>set_radio('Payment', '0', TRUE))); ?> </td>
|
||||||
|
<td>
|
||||||
|
<?php echo form_label('After', 'After') ." ". form_radio(array("name"=>"Payment", "id"=>"After", "value"=>"1", 'checked'=>set_radio('Payment', '1', FALSE))); ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Modal for Packing Calculation -->
|
<!-- Modal for Packing Calculation -->
|
||||||
@ -3010,14 +3095,37 @@ body {
|
|||||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||||
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
||||||
|
|
||||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a>
|
<!-- <a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> -->
|
||||||
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||||
<input type="reset" class="btn btn-primary" value="Reset">
|
<input type="reset" class="btn btn-primary" value="Reset">
|
||||||
|
|
||||||
<input type="reset" class="btn btn-primary" value = "OK">
|
<!-- <input type="reset" class="btn btn-primary" value = "OK"> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div><br/>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span>Request On</span>
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span>Request By</span>
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'RequestBy','value' => set_value('RequestBy',$Requestedby),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span>Status</span>
|
||||||
|
<?php
|
||||||
|
$options = array("0"=>$POStatus);
|
||||||
|
echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
||||||
|
?>
|
||||||
</div><br/>
|
</div><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -3783,6 +3891,19 @@ function populateValueMainFormForDeleteItem(rowid)
|
|||||||
$('#txtTotalVat').val(parseFloat(totVATAmt).toFixed(2) );
|
$('#txtTotalVat').val(parseFloat(totVATAmt).toFixed(2) );
|
||||||
$('#txtTotCST').val(parseFloat(totCSTAmt).toFixed(2) );
|
$('#txtTotCST').val(parseFloat(totCSTAmt).toFixed(2) );
|
||||||
$('#txtTotalGST').val(parseFloat(totGSTAmt).toFixed(2) );
|
$('#txtTotalGST').val(parseFloat(totGSTAmt).toFixed(2) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var Detail = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
||||||
|
//console.log(Detail);
|
||||||
|
|
||||||
|
$.each(Detail, function (index, value)
|
||||||
|
{
|
||||||
|
$("#PaymentTerms").append( $('<option></option>').val(value.PaymentTerms).html(value.PaymentTerms) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} );
|
||||||
$('#txtTotalOtherTaxes').val(parseFloat(totOtherTaxAmt).toFixed(2) );
|
$('#txtTotalOtherTaxes').val(parseFloat(totOtherTaxAmt).toFixed(2) );
|
||||||
$('#txtTotalFreight').val(parseFloat(totFreightAmt).toFixed(2) );
|
$('#txtTotalFreight').val(parseFloat(totFreightAmt).toFixed(2) );
|
||||||
$('#txtTotalInsurance').val(parseFloat(totInsuranceAmt).toFixed(2) );
|
$('#txtTotalInsurance').val(parseFloat(totInsuranceAmt).toFixed(2) );
|
||||||
@ -3888,4 +4009,14 @@ $('#Scheduleby').change(function(){
|
|||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
var Detail = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
||||||
|
//console.log(Detail);
|
||||||
|
|
||||||
|
$.each(Detail, function (index, value)
|
||||||
|
{
|
||||||
|
$("#PaymentTerms").append( $('<option></option>').val(value.PaymentTerms).html(value.PaymentTerms) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} );
|
||||||
</script>
|
</script>
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$DeliverOption='';
|
$DeliverOption='';
|
||||||
$SupId = '';
|
$SupId = '';
|
||||||
@ -22,6 +22,8 @@ $Deliverydt='';
|
|||||||
$DeliverSchedule='';
|
$DeliverSchedule='';
|
||||||
$MaxPoDate = '';
|
$MaxPoDate = '';
|
||||||
$AvlAmount = 0;
|
$AvlAmount = 0;
|
||||||
|
$Value="₹";
|
||||||
|
$RowCount = '';
|
||||||
if(!empty($MaxPODate))
|
if(!empty($MaxPODate))
|
||||||
{
|
{
|
||||||
foreach ($MaxPODate as $date)
|
foreach ($MaxPODate as $date)
|
||||||
@ -49,15 +51,46 @@ if(!empty($POMaster))
|
|||||||
$POStatus = $Req->StatusCode;
|
$POStatus = $Req->StatusCode;
|
||||||
$PONO = $Req->PONO;
|
$PONO = $Req->PONO;
|
||||||
$ServiceDescription = $Req->ServiceDescription;
|
$ServiceDescription = $Req->ServiceDescription;
|
||||||
|
//$PaymentTerms=$Req->PaymentTerms;
|
||||||
|
$PayableAT=$Req->PayableAT;
|
||||||
|
$PaymentDays=$Req->PaymentDays;
|
||||||
|
$WrkStatus=$Req->ServiceWorkStatus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!empty($RequistionDetails))
|
||||||
|
{
|
||||||
|
|
||||||
|
foreach ($RequistionDetails as $ReqDet)
|
||||||
|
{
|
||||||
|
$Reqon=$ReqDet->ReqDate;
|
||||||
|
$Requestedby=$ReqDet->Requestedby;
|
||||||
|
//$Status=$ReqDet->Status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//echo "$WrkStatus";
|
||||||
|
|
||||||
if(!empty($AvlBudAmt))
|
if(!empty($AvlBudAmt))
|
||||||
{
|
{
|
||||||
|
|
||||||
$AvlAmount = $AvlBudAmt;
|
$AvlAmount = $AvlBudAmt;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($PaymentTerms as $TER)
|
||||||
|
{
|
||||||
|
$Terms=$TER->PaymentTerms;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// foreach ($POSTATUS as $PST )
|
||||||
|
// {
|
||||||
|
// $POStatus=$PST->StatusName;
|
||||||
|
// }
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
<script src="<?php echo base_url(); ?>assets/js/CreatePOValidation.js" type="text/javascript"></script>
|
||||||
@ -102,7 +135,11 @@ $("#PODate").datepicker({
|
|||||||
minDate : 'now',
|
minDate : 'now',
|
||||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||||
});
|
});
|
||||||
|
$("#Requeston").datepicker({
|
||||||
|
//minDate : d,
|
||||||
|
maxDate : 'now',
|
||||||
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||||
|
});
|
||||||
$('#drpSupplier').change(function() {
|
$('#drpSupplier').change(function() {
|
||||||
|
|
||||||
var id = $('#drpSupplier').val();
|
var id = $('#drpSupplier').val();
|
||||||
@ -118,6 +155,17 @@ $('#drpSupplier').change(function() {
|
|||||||
if(obj.SupplierID === id)
|
if(obj.SupplierID === id)
|
||||||
{
|
{
|
||||||
$("#SupAddress").val(obj.Address);
|
$("#SupAddress").val(obj.Address);
|
||||||
|
$("#PayableAT").val(obj.PayableAT);
|
||||||
|
var a=obj.PaymentDays;
|
||||||
|
console.log(a);
|
||||||
|
if (a=="After")
|
||||||
|
{
|
||||||
|
//alert();
|
||||||
|
document.getElementById("After").checked = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
document.getElementById("Before").checked = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,20 +442,20 @@ function ExceedQuantityCheck()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function EditExceedQuantityCheck()
|
// function EditExceedQuantityCheck()
|
||||||
{
|
// {
|
||||||
// RequistQuantity
|
// // RequistQuantity
|
||||||
var EnterQuantity = $("#EditQuantity").val()== '' ? "0.00" : parseFloat($("#EditQuantity").val());
|
// var EnterQuantity = $("#EditQuantity").val()== '' ? "0.00" : parseFloat($("#EditQuantity").val());
|
||||||
var ReqQuantity = parseFloat(RequistQuantity);
|
// var ReqQuantity = parseFloat(RequistQuantity);
|
||||||
//alert(ReqQuantity);
|
// //alert(ReqQuantity);
|
||||||
if(EnterQuantity > ReqQuantity)
|
// if(EnterQuantity > ReqQuantity)
|
||||||
{
|
// {
|
||||||
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||||
|
|
||||||
$('#EditQuantity').focus();
|
// $('#EditQuantity').focus();
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
function ExceedBudget(ValuetoCheck,budgetAmount)
|
function ExceedBudget(ValuetoCheck,budgetAmount)
|
||||||
{
|
{
|
||||||
@ -593,10 +641,8 @@ $(document).ready(function () {
|
|||||||
<section class="content">
|
<section class="content">
|
||||||
<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>Siddharth Industries - Edit Service Purchase Order for Amendment- <?php echo $PONO;?></h2></b></center></div>
|
||||||
<center><b><h2>Siddharth Industries - Edit Service Purchase Order for Amendment - <?php echo $PONO;?></h2></b></center></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">
|
||||||
@ -685,20 +731,39 @@ $(document).ready(function () {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="col-md-12">
|
<div class="col-md-6">
|
||||||
<b><u>Select Delivery By</u></b><br/>
|
<b><u>Select Delivery By</u></b><br/>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php echo form_label('Date', 'Date') . " ". form_radio(array('name' => 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?>
|
<?php echo form_label('Date', 'Date') . " ". form_radio(array('name' => 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<?php echo form_label('Schedule', 'Schedule') . form_radio(array('name' => 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
|
<?php echo form_label('Schedule', 'Schedule') . " ". form_radio(array('name' => 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
|
||||||
|
|
||||||
|
|
||||||
</td>
|
|
||||||
|
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label>Work Status</label>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$options = array("0"=>$WrkStatus);
|
||||||
|
//print_r( $options);
|
||||||
|
|
||||||
|
if(!empty($WorkStatus))
|
||||||
|
{
|
||||||
|
foreach ($WorkStatus as $SID):
|
||||||
|
|
||||||
|
$options[$SID->ConfigValue] = $SID->ConfigValue;
|
||||||
|
|
||||||
|
endforeach;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo form_dropdown('workstatus', $options,set_value('workstatus'),'id="workstatus"' ,'required="true"' ,'class="form-control select2');
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
<div class="col-md-12" id="Deliverydtdiv"><br/>
|
<div class="col-md-12" id="Deliverydtdiv"><br/>
|
||||||
<label>Delivery Date</label>
|
<label>Delivery Date</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -719,18 +784,57 @@ $(document).ready(function () {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-md-12">
|
||||||
|
<legend>Payment Details</legend>
|
||||||
|
<!-- Text input-->
|
||||||
|
<div class="col-md-3">
|
||||||
|
<span for="payablefrom">Payable Terms</span>
|
||||||
|
<select class="form-control required" id="PaymentTerms" name="PaymentTerms">
|
||||||
|
<option value="" ><?php echo $Terms;?></option>
|
||||||
|
<?php
|
||||||
|
if(!empty($payment))
|
||||||
|
{
|
||||||
|
foreach ($payment as $rl)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<span>Payable AT</span>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'PayableAT','value' => set_value('PayableAT',$PayableAT),'id'=>'PayableAT', 'class' => 'form-control' ,'required' => 'true');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
Payment Date <br/>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php echo form_label('Before', 'Before') ." ". form_radio(array("name"=>"Payment", "id"=>"Before", "value"=>"0", 'checked'=>set_radio('Payment', '0', TRUE))); ?> </td>
|
||||||
|
<td>
|
||||||
|
<?php echo form_label('After', 'After') ." ". form_radio(array("name"=>"Payment", "id"=>"After", "value"=>"1", 'checked'=>set_radio('Payment', '1', FALSE))); ?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
<div style="padding-right:10px">
|
||||||
<div style="padding-right:10px">
|
<div align="right">
|
||||||
<div align="right">
|
|
||||||
<!-- <a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-primary" id="abcd" >Select Line Item</button> </a> -->
|
<!-- <a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-primary" id="abcd" >Select Line Item</button> </a> -->
|
||||||
|
|
||||||
|
<!-- Model for servicepo -->
|
||||||
|
|
||||||
<!-- Model for servicepo -->
|
|
||||||
<div class="modal fade" id="SERVICE" role="dialog">
|
<div class="modal fade" id="SERVICE" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<!-- Modal content-->
|
<!-- Modal content-->
|
||||||
@ -790,7 +894,7 @@ $(document).ready(function () {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-2">
|
<div class="col-md-3">
|
||||||
<label>Item Code</label>
|
<label>Item Code</label>
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
@ -804,8 +908,7 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
<div class="col-md-2">
|
|
||||||
<label>Item Name</label>
|
<label>Item Name</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -814,7 +917,7 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-3">
|
||||||
<label>UOM</label>
|
<label>UOM</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -823,7 +926,18 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-3">
|
||||||
|
<label>Frequency</label>
|
||||||
|
<div>
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'Frequency','value' => set_value('Frequency'),'id'=>'Frequency', 'class' => 'form-control' );
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
<label>Quantity</label>
|
<label>Quantity</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -832,8 +946,8 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-3">
|
||||||
<label>Rate</label>
|
<label><?php echo "Rate ($Value)";?></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'Rate','value' => set_value('Rate'),'id'=>'Rate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'Ratechange()' );
|
$data = array('name' => 'Rate','value' => set_value('Rate'),'id'=>'Rate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'Ratechange()' );
|
||||||
@ -841,8 +955,8 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-3">
|
||||||
<label>Basic Amount</label>
|
<label><?php echo "Basic Amount ($Value);"?></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'txtBasicValue','value' => set_value('txtBasicValue'),'id'=>'txtBasicValue', 'class' => 'form-control num' ,'readonly' => 'true');
|
$data = array('name' => 'txtBasicValue','value' => set_value('txtBasicValue'),'id'=>'txtBasicValue', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||||
@ -850,6 +964,7 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -940,7 +1055,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-5 col-md-offset-4" align="right">
|
<div class="col-md-5 col-md-offset-4" align="right">
|
||||||
Total Order value :
|
<label><?php echo "Total Order Value ($Value)";?></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1022,7 +1137,7 @@ $(document).ready(function () {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-2">
|
<div class="col-md-3">
|
||||||
<label>Item Code</label>
|
<label>Item Code</label>
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
@ -1034,8 +1149,7 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
<div class="col-md-2">
|
|
||||||
<label>Item Name</label>
|
<label>Item Name</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -1044,7 +1158,7 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-3">
|
||||||
<label>UOM</label>
|
<label>UOM</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -1053,7 +1167,18 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-3">
|
||||||
|
<label>Frequency</label>
|
||||||
|
<div>
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'EditFrequency','value' => set_value('EditFrequency'),'id'=>'EditFrequency', 'class' => 'form-control' );
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
<label>Quantity</label>
|
<label>Quantity</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
@ -1062,8 +1187,8 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-3">
|
||||||
<label>Rate</label>
|
<label><?php echo "Rate ($Value)";?></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'EditRate','value' => set_value('EditRate'),'id'=>'EditRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'EditRatechange()' );
|
$data = array('name' => 'EditRate','value' => set_value('EditRate'),'id'=>'EditRate', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event);' ,'onchange'=>'EditRatechange()' );
|
||||||
@ -1071,8 +1196,8 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-3">
|
||||||
<label>Basic Amount</label>
|
<label><?php echo "Basic Amount ($Value)";?></label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'txtEditBasicValue','value' => set_value('txtEditBasicValue'),'id'=>'txtEditBasicValue', 'class' => 'form-control num' ,'readonly' => 'true');
|
$data = array('name' => 'txtEditBasicValue','value' => set_value('txtEditBasicValue'),'id'=>'txtEditBasicValue', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||||
@ -1080,6 +1205,7 @@ $(document).ready(function () {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -1170,7 +1296,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-5 col-md-offset-4" align="right">
|
<div class="col-md-5 col-md-offset-4" align="right">
|
||||||
Total Order value :
|
<label><?php echo "Total Order Value ($Value)";?></label>>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1188,7 +1314,7 @@ $(document).ready(function () {
|
|||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a class="btn btn-primary font EditService" ID="Edit" style="margin-top: -24px;"> <span class="bold">Update Service</span></a>
|
<a class="btn btn-primary font EditService" ID="Edit"> <span class="bold">Update Service</span></a>
|
||||||
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -1199,10 +1325,7 @@ $(document).ready(function () {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<div class="box-body" style="margin-top: -2%;">
|
<div class="box-body" style="margin-top: -2%;">
|
||||||
<table id="ServiceTable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<table id="ServiceTable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
@ -1260,16 +1383,17 @@ $(document).ready(function () {
|
|||||||
<input type="hidden" name="<?php echo 'KrishiTax'.$index ?>" id="<?php echo 'KrishiTax'.$index ?>" value="<?php echo $record->KrishiKalyantax ; ?>" />
|
<input type="hidden" name="<?php echo 'KrishiTax'.$index ?>" id="<?php echo 'KrishiTax'.$index ?>" value="<?php echo $record->KrishiKalyantax ; ?>" />
|
||||||
<input type="hidden" name="<?php echo 'SwachhTax'.$index ?>" id="<?php echo 'SwachhTax'.$index ?>" value="<?php echo $record->SwachhBharattax ; ?>" />
|
<input type="hidden" name="<?php echo 'SwachhTax'.$index ?>" id="<?php echo 'SwachhTax'.$index ?>" value="<?php echo $record->SwachhBharattax ; ?>" />
|
||||||
<input type="hidden" name="<?php echo 'TotalOrderValue'.$index ?>" id="<?php echo 'TotalOrderValue'.$index ?>" value="<?php echo $record->TotalValue ; ?>" />
|
<input type="hidden" name="<?php echo 'TotalOrderValue'.$index ?>" id="<?php echo 'TotalOrderValue'.$index ?>" value="<?php echo $record->TotalValue ; ?>" />
|
||||||
|
<input type="hidden" name="<?php echo 'ServiceFrequency'.$index ?>" id="<?php echo 'ServiceFrequency'.$index ?>" value="<?php echo $record->ServiceFrequency ; ?>" />
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
//if($POStatus == PO_DRAFT)
|
// if($POStatus == PO_DRAFT)
|
||||||
//{?>
|
// {?>
|
||||||
<td> <a data-target='#EDITSERVICE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITSERVICE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <!-- <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>-->
|
<td> <a data-target='#EDITSERVICE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITSERVICE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <!-- <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a> -->
|
||||||
<?php
|
<?php
|
||||||
// } else {?>
|
//} else {?>
|
||||||
<!-- <td> <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i> </a> </td> -->
|
<!-- <td> <a data-toggle="tooltip" href="#"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->ReqNo; ?> - Click here to view Requistion details"></i> </a> </td> -->
|
||||||
<?php
|
<?php
|
||||||
}?>
|
//}?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$TotalServiceTax = $TotalServiceTax + $record->ServiceTax;
|
$TotalServiceTax = $TotalServiceTax + $record->ServiceTax;
|
||||||
@ -1283,10 +1407,10 @@ $(document).ready(function () {
|
|||||||
$TotalBasicAmount = $TotalBasicAmount + $record->BasicValue;
|
$TotalBasicAmount = $TotalBasicAmount + $record->BasicValue;
|
||||||
|
|
||||||
}
|
}
|
||||||
?> <input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $index;?>">
|
$RowCount = $index;?>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// }
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -1298,7 +1422,7 @@ $(document).ready(function () {
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label>Basic Amount :</label>
|
<label>Basic Amount :</label>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount',number_format($TotalBasicAmount,2)),'id'=>'txtTotBasicAmount', 'class' => 'form-control num' ,'readonly' => 'true');
|
$data = array('name' => 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount',$TotalBasicAmount),'id'=>'txtTotBasicAmount', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -1353,8 +1477,8 @@ $(document).ready(function () {
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<label>Comments Of Special Instructions :</label> <?php
|
<label>Special Instructions :</label> <?php
|
||||||
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '4', 'cols' => '40' );
|
$data = array('name' => 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40' );
|
||||||
echo form_textarea($data);
|
echo form_textarea($data);
|
||||||
?> <input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="<?php echo $ServiceDescription;?>">
|
?> <input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="<?php echo $ServiceDescription;?>">
|
||||||
</div>
|
</div>
|
||||||
@ -1365,23 +1489,50 @@ $(document).ready(function () {
|
|||||||
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>"/>
|
||||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||||
|
<input type="hidden" name="txtRowCount" id="txtRowCount" value="<?php echo $RowCount;?>">
|
||||||
<?php //if($POStatus == PO_DRAFT) {?>
|
<?php //if($POStatus == PO_DRAFT) {?>
|
||||||
<!-- <a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> -->
|
<!--<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> -->
|
||||||
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||||
<input type="reset" class="btn btn-primary" value="Reset">
|
<input type="reset" class="btn btn-primary" value="Reset">
|
||||||
<?php //}else {?>
|
<?php //}else {?>
|
||||||
<!-- <input type="reset" class="btn btn-primary" value = "OK"> <?php// } ?> -->
|
<!-- <input type="reset" class="btn btn-primary" value = "OK"> <?php //} ?>-->
|
||||||
</div><br/>
|
</div><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
</div><br/>
|
</div><br/>
|
||||||
</div>
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span>Request On</span>
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span>Request By</span>
|
||||||
|
<?php
|
||||||
|
$data = array('name' => 'RequestBy','value' => set_value('RequestBy',$Requestedby),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true');
|
||||||
|
echo form_input($data);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<span>Status</span>
|
||||||
|
<?php
|
||||||
|
// $options = array("0"=>'Select Status');
|
||||||
|
// echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
||||||
|
$options = array("0"=>$POStatus);
|
||||||
|
echo form_dropdown('Status', $options,set_value('Status',$POStatus),'id="Status"' ,'required="true"' ,'class="form-control select2')
|
||||||
|
?>
|
||||||
|
</div><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div></section></div>
|
|
||||||
<script type="text/html" id="ServiceList">
|
<script type="text/html" id="ServiceList">
|
||||||
<tr id="<%=index%>">
|
<tr id="<%=index%>">
|
||||||
<td align="left"><%=index%></td>
|
<td align="left"><%=index%></td>
|
||||||
@ -1412,6 +1563,18 @@ var userid = '';
|
|||||||
Mat: []
|
Mat: []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var paymentday=<?php echo json_encode($PaymentDays,JSON_PRETTY_PRINT)?>;
|
||||||
|
if (paymentday=="After")
|
||||||
|
{
|
||||||
|
//alert();
|
||||||
|
document.getElementById("After").checked = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById("Before").checked = true;
|
||||||
|
}
|
||||||
|
|
||||||
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||||
userid = $(e.relatedTarget).data('userid');
|
userid = $(e.relatedTarget).data('userid');
|
||||||
|
|
||||||
@ -1435,6 +1598,8 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
|||||||
$('#EditAfterSecHighTax').val($('#SecHighTax'+userid).val());
|
$('#EditAfterSecHighTax').val($('#SecHighTax'+userid).val());
|
||||||
$('#EditAfterKrishiTax').val($('#KrishiTax'+userid).val());
|
$('#EditAfterKrishiTax').val($('#KrishiTax'+userid).val());
|
||||||
$('#EditAfterSwachhTax').val($('#SwachhTax'+userid).val());
|
$('#EditAfterSwachhTax').val($('#SwachhTax'+userid).val());
|
||||||
|
$('#EditFrequency').val($('#ServiceFrequency'+userid).val());
|
||||||
|
|
||||||
$('#EditTotalOrderValue').val(cellval[8].innerHTML);
|
$('#EditTotalOrderValue').val(cellval[8].innerHTML);
|
||||||
|
|
||||||
RequistQuantity = $('#quantity'+userid).val();
|
RequistQuantity = $('#quantity'+userid).val();
|
||||||
@ -1656,6 +1821,8 @@ $('.AddService').click(function(){
|
|||||||
|
|
||||||
function populateValueMainFormForServiceTax()
|
function populateValueMainFormForServiceTax()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//alert('Worked');
|
||||||
var AfterServiceTax = $('#AfterServiceTax').val() == '' ? '0.00' : $('#AfterServiceTax').val();
|
var AfterServiceTax = $('#AfterServiceTax').val() == '' ? '0.00' : $('#AfterServiceTax').val();
|
||||||
var AfterEduCess = $('#AfterEduCess').val() == '' ? '0.00' : $('#AfterEduCess').val();
|
var AfterEduCess = $('#AfterEduCess').val() == '' ? '0.00' : $('#AfterEduCess').val();
|
||||||
var AfterSecHighTax = $('#AfterSecHighTax').val() == '' ? '0.00' : $('#AfterSecHighTax').val();
|
var AfterSecHighTax = $('#AfterSecHighTax').val() == '' ? '0.00' : $('#AfterSecHighTax').val();
|
||||||
@ -2015,10 +2182,10 @@ function validateServiceTax()
|
|||||||
$('#EditRate').focus();
|
$('#EditRate').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if(EditExceedQuantityCheck() == false)
|
// else if(EditExceedQuantityCheck() == false)
|
||||||
{
|
// {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
else if(ExceedBudget($('#EditTotalOrderValue').val(),$('#EditAvlBudAmt').val()) == false)
|
else if(ExceedBudget($('#EditTotalOrderValue').val(),$('#EditAvlBudAmt').val()) == false)
|
||||||
{
|
{
|
||||||
$('#EditRate').focus();
|
$('#EditRate').focus();
|
||||||
@ -2032,17 +2199,21 @@ function validateServiceTax()
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script type="text/javascript">
|
||||||
|
|
||||||
function Save(status)
|
function Save(status)
|
||||||
{
|
{
|
||||||
|
//alert(status);
|
||||||
|
var stat='';
|
||||||
if(status == '0')
|
if(status == '0')
|
||||||
{
|
{
|
||||||
stat = '<?php echo PO_DRAFT; ?>';
|
stat = '<?php echo PO_DRAFT; ?>';
|
||||||
|
alert(stat);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stat = '<?php echo PO_CREATED; ?>';
|
stat = '<?php echo PO_CREATED; ?>';
|
||||||
|
alert(stat);
|
||||||
}
|
}
|
||||||
var splinstr = $('#txtSpcialInstruction').val();
|
var splinstr = $('#txtSpcialInstruction').val();
|
||||||
var deladd = $('#DeliveryAddr').val();
|
var deladd = $('#DeliveryAddr').val();
|
||||||
@ -2052,8 +2223,10 @@ $('#txtStatus').val(stat);
|
|||||||
$('#SpcialInstruction').val(splinstr);
|
$('#SpcialInstruction').val(splinstr);
|
||||||
$('#txtDeliveryAddress').val(deladd);
|
$('#txtDeliveryAddress').val(deladd);
|
||||||
|
|
||||||
|
// alert("Before Validate");
|
||||||
if(validate())
|
if(validate())
|
||||||
{
|
{
|
||||||
|
//alert("Inside Validate");
|
||||||
if(document.getElementById('ServiceTable').rows.length < 2)
|
if(document.getElementById('ServiceTable').rows.length < 2)
|
||||||
{
|
{
|
||||||
alert('Please Select Line item to Create PO');
|
alert('Please Select Line item to Create PO');
|
||||||
@ -2066,7 +2239,7 @@ $('#txtDeliveryAddress').val(deladd);
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
data:$('.ServicePO').serialize(),
|
data:$('.ServicePO').serialize(),
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url:"<?php echo base_url() ?>servicepurchaseorder/UpdateServicePurchaseOrder",
|
url:"<?php echo base_url() ?>amendmentpurchaseorder/UpdateAmendServicePurchaseOrder",
|
||||||
success:function(data) {
|
success:function(data) {
|
||||||
if(data)
|
if(data)
|
||||||
{
|
{
|
||||||
@ -2077,7 +2250,7 @@ $('#txtDeliveryAddress').val(deladd);
|
|||||||
$('#txtStatus').val('');
|
$('#txtStatus').val('');
|
||||||
$('#SpcialInstruction').val('');
|
$('#SpcialInstruction').val('');
|
||||||
$('#txtDeliveryAddress').val('')
|
$('#txtDeliveryAddress').val('')
|
||||||
window.location = "purchaseorderListing";
|
//window.location = "purchaseorderListing";
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2101,6 +2274,7 @@ $('#Scheduleby').change(function(){
|
|||||||
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
$('#Deliverydt').change(function(){
|
$('#Deliverydt').change(function(){
|
||||||
|
|
||||||
@ -2109,4 +2283,17 @@ $('#Scheduleby').change(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var Detail = <?php echo json_encode($Payment, JSON_PRETTY_PRINT) ?>;
|
||||||
|
//console.log(Detail);
|
||||||
|
|
||||||
|
$.each(Detail, function (index, value)
|
||||||
|
{
|
||||||
|
$("#PaymentTerms").append( $('<option></option>').val(value.PaymentTerms).html(value.PaymentTerms) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user