From f57b3c8b0fe3429dc6240eb9b8d0d43e76f91dce Mon Sep 17 00:00:00 2001 From: velz2020 Date: Wed, 2 Aug 2017 11:29:20 +0530 Subject: [PATCH] AMENDMENT --- .../controllers/amendmentpurchaseorder.php | 241 +++++++----- application/models/purchaseorder_model.php | 10 +- application/views/Amendervicepopdf.php | 39 +- application/views/Amendrevenuepopdf.php | 26 +- application/views/amendcapitalpopdf.php | 41 ++- application/views/editCapitalAmendPO.php | 243 ++++++++---- application/views/editRevenueAmendPO.php | 346 ++++++++++-------- application/views/editServiceAmendPO.php | 115 +++--- 8 files changed, 623 insertions(+), 438 deletions(-) diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php index d08af77a..087feaaf 100755 --- a/application/controllers/amendmentpurchaseorder.php +++ b/application/controllers/amendmentpurchaseorder.php @@ -63,9 +63,21 @@ class amendmentpurchaseorder extends BaseController Start here */ $ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray); $data['RequistionDetails'] = $ReqDetails; + // $data['RequistionDetails'] = $ReqDetails; + foreach ($data['RequistionDetails'] as $ReqDet) + { + + $Status=$ReqDet->Status; + } + + $data['POSTATUS']=$this->purchaseorder_model->GetPOStatus($Status); + + foreach ($data['POSTATUS'] as $POST) + { + $Status=$POST->StatusName; + } $CostCode = ''; - - $this->load->model('costcenter_model'); + $this->load->model('costcenter_model'); $FYStart = ''; $FYEnd = ''; $FiscalYear = $this->costcenter_model->getFiscalYear(); @@ -80,19 +92,10 @@ class amendmentpurchaseorder extends BaseController } $FYdt = $FYStart." - ".$FYEnd ; - - - - $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); - $currencycode = ''; - $Year = $dt->format('Y'); - - foreach ($ReqDetails as $Rs): - $CostCode = $Rs->CostCenterCode; - endforeach; - - $AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType); - + foreach ($ReqDetails as $Rs): + $CostCode = $Rs->CostCenterCode; + endforeach; + $AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType); if(count($AvlBudget)>0) { @@ -130,8 +133,6 @@ class amendmentpurchaseorder extends BaseController $AvlBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode,$FYdt,$ReqType); - - //print_r($AvlBudget); if(count($AvlBudget)>0) @@ -177,7 +178,7 @@ class amendmentpurchaseorder extends BaseController { $CapitalRange = $_GET['CapitalRange']; - $AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType); + $AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType); if(count($AvlBudget)>0) @@ -265,11 +266,11 @@ class amendmentpurchaseorder extends BaseController $predeliverydate=$this->input->post('beforeDeliverydt'); $preschedule=$this->input->post('beforeScheduleby'); //$Deliverydt = $this->getDateformat($dt); - $DeliverySchedule = $this->input->post('Scheduleby'); + $DeliverySchedule1 = $this->input->post('Scheduleby'); $DeliveryOption = $this->input->post('DateRange'); if($DeliveryOption==1){ - $Deliverydt = ''; + $Deliverydt=null; $DeliverySchedule = $this->input->post('Scheduleby'); } else{ @@ -277,35 +278,36 @@ class amendmentpurchaseorder extends BaseController $DeliverySchedule = ''; } - //$predeliverydate=$this->getDateformat($predeliverydate); + $POType = $this->input->post('POType'); $PoRange = $this->input->post('txtPoRange'); $PaymentTermsText=$this->input->post('beforePaymentTermsText'); $PaymentTerms=$this->input->post('PaymentTerms'); + $Otherpayment=$this->input->post('Otherpayment'); + $Otherpaymentamend=$this->input->post('Otherpayment'); + //echo $Otherpayment; $prePaymentTerms=$this->input->post('beforePaymentTerms'); + $preTotalOdervalue=$this->input->post('preTotalOdervalue'); + $MAD.="Amended Total Order Value:  :" . $preTotalOdervalue ."
"; $testdate=date("Y-m-d"); if($PaymentTerms!=$prePaymentTerms) { - $MAD.="Amended PaymentTerms :  ". $PaymentTermsText ."
"; + if($prePaymentTerms != 'PT08'){ $Otherpaymentamend='';} + $MAD.="Amended PaymentTerms :  ". $PaymentTermsText . $Otherpaymentamend ."
"; } - if(($predeliverydate != $testdate)&&($dt) != ($predeliverydate)) + if((($predeliverydate != $testdate)&&($dt != $predeliverydate))|| ($DeliverySchedule1 != $preschedule)) { - //$predeliverydate = $this->getDateformat($dt); - $MAD.='Amended Delivery Date :    ' . $predeliverydate . '
' ; + + $MAD.='Amended Delivery Option :    ' . $predeliverydate . $preschedule . '
' ; } - if($DeliverySchedule != $preschedule) - { - $MAD.="Amended Schedule :  " . $preschedule."
"; - } - // echo "MAD is:" . $MAD; - // die(); + $SpecialInstruction = $this->input->post('txtSpcialInstruction');//$_POST['txtSpcialInstruction'];//$this->input->post('txtSpcialInstruction');//t->post('txtSpcialInstruction')); - // echo $SpecialInstruction; + $TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary'); $POStatus = $this->input->post('txtStatus'); @@ -313,15 +315,21 @@ class amendmentpurchaseorder extends BaseController $updatedBy = $this->session->userdata ( 'userId' ); $RowCount = $this->input->post('txtRowCount'); - //echo "Rowcount is" . $RowCount; - //die(); + $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $updateddt = $dt->format('Y-m-d H:i:s'); - // PO Master - // PO Master - $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID,'POType'=>$POType,'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'PaymentTerms'=>$PaymentTerms,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpecialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'AmendedDetails'=>$MAD); - // print_r($POMaster); - // die(); + if(empty($Deliverydt)) + { + $Deliverydt=null; + } + + if($PaymentTerms != 'PT08'){ + $Otherpayment=''; + + } + + $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID,'POType'=>$POType,'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpecialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'AmendedDetails'=>$MAD); + //print_r($POMaster); $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster,$updatedBy,$PONO); @@ -381,6 +389,7 @@ class amendmentpurchaseorder extends BaseController $FreightValue = $this->input->post('FreightVal'.$i); $preFreightValue = $this->input->post('beforeFreightVal'.$i); $AfterFreightValue = $this->input->post('AfterFreightVal'.$i); + $NoofTrips = $this->input->post('Nooftrips'.$i); $InsuranceValue = $this->input->post('Insval'.$i); $preInsuranceValue = $this->input->post('beforeInsval'.$i); $TotalOrderValue = $this->input->post('TotalOrderValue'.$i); @@ -467,7 +476,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,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'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,'NoOfTrip'=>$NoofTrips,'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'SGST'=>$VatValue,'AfterSGST'=>$AfterVatValue,'CGST'=>$GSTValue,'AfterCGST'=>$AfterGSTValue,'IGST'=>$OtherTaxValue,'AfterIGST'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt); // print_r($RevenueTaxList); $RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList); @@ -492,52 +501,47 @@ function UpdateAmendServicePurchaseOrder() $DeliveryOption = $this->input->post('DateRange'); if($DeliveryOption==1){ - $Deliverydt = ''; + $Deliverydt =null; $DeliverySchedule = $this->input->post('Scheduleby'); } else{ $Deliverydt = $this->getDateformat($dt); + // echo "IF" . $Deliverydt; $DeliverySchedule = ''; } $ddate=$this->input->post('Deliverydt'); - //echo "current Date is:-" . $ddate . "
"; + $beforeddate=$this->input->post('beforeDeliverydt'); - //echo $beforeddate."
"; + $testdate=date("Y-m-d"); - //echo "Today date:-" . $testdate ."
"; + $dschedule=$this->input->post('Scheduleby'); - //echo "$dschedule"; + $beforedschedule=$this->input->post('beforeScheduleby'); - //echo "beforedate is:-" . $beforeddate; - if(($beforeddate != $testdate) && ($ddate != $beforeddate)) + $preTotalordervalue=$this->input->post('preTotalordervalue'); + + $MAD.="Amended Total OrderValue:  " . $preTotalordervalue . "
"; + if((($beforeddate != $testdate) && ($ddate != $beforeddate))||($dschedule != $beforedschedule)) { - $MAD.="Amended Delivery Date :  " . $beforeddate . "
"; + $MAD.="Amended DeliveryOption :  " . $beforeddate . $beforedschedule."
"; } - if($dschedule != $beforedschedule) - { - $MAD.="Amended Delivery Schedule :  " . $beforedschedule . "
"; - } - // echo "MAD IS:-".$MAD; - // die(); - // if(($ddate != $beforeddate) || ($dschedule != $beforedschedule) ) + // if($dschedule != $beforedschedule) // { - // $beforeddate2=new DateTime($beforeddate, new DateTimeZone('Asia/Kolkata')); - // $beforeddate3 = $beforeddate2->format('d-m-Y'); - // echo $beforeddate3; - - // //die(); - // $MAD.="Amended Delivery Option :  " . $beforeddate ."".$beforedschedule. "
"; + // $MAD.="Amended DeliveryOption :  " . $beforedschedule . $beforeddate."
"; // } - + $PaymentTermsText=$this->input->post('beforePaymentTermsText'); $PaymentTerms=$this->input->post('PaymentTerms'); + $Otherpayment=$this->input->post('Otherpayment'); + $Otherpaymentamend=$this->input->post('Otherpayment'); $beforePaymentTerms=$this->input->post('beforePaymentTerms'); if($PaymentTerms != $beforePaymentTerms) { - $MAD.="Amended PaymentTerms :  ". $PaymentTermsText ."
"; + if($beforePaymentTerms != 'PT08'){ $Otherpaymentamend='';} + $MAD.="Amended PaymentTerms :  ". $PaymentTermsText . $Otherpaymentamend."
"; } //echo "MAD IS" . $MAD . "
"; @@ -553,13 +557,18 @@ function UpdateAmendServicePurchaseOrder() $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'=>PO_RELEASED,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$scopeofwork,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'ServiceWorkStatus'=>$WorkStatus,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD); + if(empty($Deliverydt)) + { + $Deliverydt=null; + } + if($PaymentTerms != 'PT08'){ + $Otherpayment=''; + + } + $POMaster = array('ParentPO'=>$PONO,'POType'=>$POType,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$scopeofwork,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'ServiceWorkStatus'=>$WorkStatus,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD); - // print_r($POMaster); - // die(); + //print_r($POMaster); $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster,$updatedBy,$PONO); //print_r($LastPO); @@ -583,6 +592,7 @@ function UpdateAmendServicePurchaseOrder() //echo "Inside Loop"; $CAD=''; $MaterialCode = $this->input->post('materialCode'.$i); + $MaterialName=$this->input->post('materialName'.$i); $Quantity = $this->input->post('quantity'.$i); $beforeQuantity = $this->input->post('beforequantity'.$i); $Reqnumber = $this->input->post('Reqnumber'.$i); @@ -628,7 +638,8 @@ function UpdateAmendServicePurchaseOrder() $rowspanvalue++; $CAD.="Amended Rate : " . $beforeitemRate ."Current Rate : " . $itemRate . ""; } - if(($SGST != $beforeSGST) && ($AfterSGST != $beforeSGSTvalue)) + + if(($SGST != $beforeSGST) && ($AfterSGST != $beforeSGSTvalue)) { $rowspanvalue+=2; $CAD.="Amended SGST% : " . $beforeSGST ."Current SGST% : " . $SGST . "Amended SGST value : " . $beforeSGSTvalue ."Current SGST value: " . $AfterSGST . ""; @@ -654,12 +665,12 @@ function UpdateAmendServicePurchaseOrder() $CAD2=''; $CAD2=$CAD; $CAD=''; - $CAD="".$MaterialCode.""; + $CAD="".$MaterialCode."-".$MaterialName.""; $CAD.=$CAD2; } - // echo "
CAD IS" . $CAD . "
"; - + //echo "
CAD IS" . $CAD . "
"; + $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'ServiceMaterialDescription'=>$servicematerialdescription,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency,'ReceivedQuantity'=>$RecQtyvalue,'AmendedDetails'=>$CAD); //print_r($POLineItemList); @@ -689,24 +700,28 @@ function UpdateAmendServicePurchaseOrder() $PONO =$this->input->post('txtPONO'); //echo $PONO."--"; $MAD=''; - + $DeliverySchedule = ''; $POdt =$this->input->post('PODate'); $PODate = $this->getDateformat($POdt); $SupplierID = $this->input->post('drpSupplier'); $DeliveryAddr = $this->input->post('DeliveryAddr'); - $dt = $this->input->post('Deliverydt'); - + $dt = $this->input->post('Deliverydate'); + //echo $dt . "-"; + //die(); $POType = $this->input->post('POType'); $PoRange = $this->input->post('capitalType'); $DeliveryOption = $this->input->post('DateRange'); $Deliverydt = ''; - if($DeliveryOption==1){ - $Deliverydt = ''; - $DeliverySchedule = $this->input->post('Scheduleby'); + if(($DeliveryOption==1)||($DeliveryOption==2)){ + $Deliverydt = null; + + if($DeliveryOption==1){ + $DeliverySchedule = $this->input->post('Scheduleby');} } else{ $Deliverydt = $this->getDateformat($dt); + $DeliverySchedule = ''; } @@ -716,23 +731,45 @@ function UpdateAmendServicePurchaseOrder() $prePaymentmethod=$this->input->post('beforePaymentmethod'); $prePaymentmethodtext=$this->input->post('beforePaymentTermsText'); - $DeliverySchedule = $this->input->post('Scheduleby'); + $DeliverySchedule1 = $this->input->post('Scheduleby'); $preDeliverySchedule = $this->input->post('beforeSchedule'); $PlaceOforigin = $this->input->post('PlaceOforigin'); + $preDate = $this->input->post('beforeDate'); + $Date = $this->input->post('Deliverydate'); + $Otherpayment=$this->input->post('Otherpayment'); + $Otherpaymentamend=$this->input->post('Otherpayment'); + $PreServiceTotalorder = $this->input->post('preServiceTotalorderValue');//For Domestic Pre Total Value + $Totalserviceorder = $this->input->post('Totalservicesummary');//For Domestic Current Total value + //echo "Tjb" . $Totalserviceorder."--" . $PreServiceTotalorder;die(); + $TotalCapitalorder= $this->input->post('CapitalToatlOrder');//For International total CapitalOrder + $preTotalCapitalorder= $this->input->post('preinterTotalorderValue');//For International pre total CapitalOrder + //echo $TotalCapitalorder . "-" . $preTotalCapitalorder; + if($PoRange==1){ + $MAD.="Amended TotalOrder Vale:  " . $PreServiceTotalorder . "
"; + }else if($PoRange==0){ + $MAD.="Amended TotalOrder Vale:  " . $preTotalCapitalorder . "
"; + } + if($PaymentMethod != $prePaymentmethod) { + if($prePaymentmethod != 'PT08'){ $Otherpaymentamend='';} $MAD.="Amended Paymemnt Terms :  " .$prePaymentmethodtext."
"; } if($predispatch != $curdispatch) { - $MAD.="Amended Dispatch Instruction :  " .$predispatch."
"; + $MAD.="Amended Delivery Option :  " .$predispatch.$preDeliverySchedule.$preDate."
"; } - if($DeliverySchedule != $preDeliverySchedule) + if($DeliverySchedule1!= $preDeliverySchedule) { - $MAD.="Amended Schedule :  " .$preDeliverySchedule."
"; + $MAD.="Amended DeliveyOption :  " .$preDeliverySchedule.$preDate.$predispatch."
"; + } + if($preDate != $Date) + { + $MAD.="Amended DeliveyOption :  " .$preDate.$preDeliverySchedule."
"; } //echo "

" . $MAD; + //die(); $capitalType = $this->input->post('capitalType'); $currencytypeID = $this->input->post('currencytype'); @@ -749,12 +786,15 @@ function UpdateAmendServicePurchaseOrder() $ExchangeRate=$this->input->post('ExchangeRt'); } - // $PayableAT = $this->input->post('PayableAT'); - - - //$PaymentDate=$this->input->post('PaymentDate'); + $SpcialInstruction = $this->input->post('txtSpcialInstruction'); - $TotalOrder = $this->input->post('CapitalToatlOrder'); + + if($PoRange==1){ + $FinalTotalOrder = $Totalserviceorder; + }else if($PoRange==0) + { + $FinalTotalOrder=$TotalCapitalorder; + } $POStatus = $this->input->post('txtStatus'); @@ -765,10 +805,18 @@ function UpdateAmendServicePurchaseOrder() $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $createddt = $dt->format('Y-m-d H:i:s'); $updateddt = $dt->format('Y-m-d H:i:s'); - - $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'POType'=>$POType,'PODate'=>$PODate,'Status'=>PO_RELEASED,'CapitalRange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'AmendedDetails'=>$MAD,'Import_DispatchDetails'=>$curdispatch,'Import_PlaceofOrgin'=>$PlaceOforigin); + //echo "FINAL-".$Deliverydt; + if(empty($Deliverydt)){ + $Deliverydt=null; + //echo "*INSIDE IF" .$Deliverydt; + } + // echo "*" .$Deliverydt; + if($PaymentMethod != 'PT08'){ + $Otherpayment=''; + } + $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$FinalTotalOrder,'POType'=>$POType,'PODate'=>$PODate,'Status'=>PO_RELEASED,'CapitalRange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'PaymentOtherDescription'=>$Otherpayment,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'AmendedDetails'=>$MAD,'Import_DispatchDetails'=>$curdispatch,'Import_PlaceofOrgin'=>$PlaceOforigin); // print_r($POMaster); - // die(); + $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster,$CreateBy,$PONO); foreach($LastPO as $PO): @@ -871,7 +919,9 @@ function UpdateAmendServicePurchaseOrder() $rowspanvalue++; $CAD.="Amended Rate : " . $preitemRate ."Current Rate : " . $itemRate . ""; } - if(($SGST != $preSGST) && ($SGSTvalue != $preSGSTvalue)) + + if($PoRange==1){ + if(($SGST != $preSGST) && ($SGSTvalue != $preSGSTvalue)) { $rowspanvalue+=2; $CAD.="Amended SGST% : " . $preSGST ."Current SGST% : " . $SGST . "Amended SGST value : " . $preSGSTvalue ."Current SGST value: " . $SGSTvalue . ""; @@ -891,6 +941,7 @@ function UpdateAmendServicePurchaseOrder() $rowspanvalue++; $CAD.="Amended OtherAllowances : " . $preotherallowance ."Current OtherAllowances : " . $otherallowance . ""; } + } if($rowspanvalue>0) { $rowspanvalue++; @@ -901,10 +952,10 @@ function UpdateAmendServicePurchaseOrder() $CAD.=$CAD2; } - + //echo $CAD; $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'AmendedDetails'=>$CAD); - //print_r($POLineItemList); + // print_r($POLineItemList); $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); @@ -918,12 +969,12 @@ function UpdateAmendServicePurchaseOrder() if(trim($POType) == CAPITAL ) { $ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$CGST,'After_CGST'=>$CGSTvalue,'SGST'=>$SGST,'After_SGST'=>$SGSTvalue,'IGST'=>$IGST,'After_IGST'=>$IGSTvalue, 'otherallowance'=>$otherallowance,'TotalValue'=>$TotalServiceOrderValue,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt); - //print_r($ServiceTaxList); + // print_r($ServiceTaxList); $ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList); //echo "Service"; //print_r($ServiceTax); $ImportTaxList = array('LineItemNo'=>$LineItemNo, 'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'AfterHighSeasSalesCharge'=>$AfterHighSeas,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'ExciseDuty'=>$ExciseDuty,'AfterExciseDuty'=>$AfterExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd,'AfterExciseDutyEdCess'=>$AfterExciseDutyEd,'ExciseDutySHCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'AfterExciseDutySHCess'=>$AfterExciseDutySH,'AfterAddlExciseDuty'=>$AfterAddAdtional,'Grossdutypayable'=>$Grossdutypayable,'AvailableModvat'=>$AvailableModvat,'Grossexpensesduetocustomduty'=>$Grossexpensesduetocustomduty,'purchaseratePerKG'=>$purchaseratePerKG,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'RMCIncludingCustomersPerKG'=>$RMCIncludingCustomersPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem); - //print_r($ImportTaxList); + print_r($ImportTaxList); //die(); diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index 7e68d149..d206b163 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -568,7 +568,7 @@ function purchaseorderListing($forwhat='') function GetServicePurchaseOrder($PONO = '') { $this->db->distinct(); - $this->db->select('ReqNo,POMast.PONO,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*'); + $this->db->select('ReqNo,POMast.PONO,POMast.PaymentTerms,POMast.PaymentOtherDescription,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,POMast.PaymentTerms,POMast.ExchangeRate,POMast.UpdatedOn,Stat.StatusCode,POMast.ServiceWorkStatus,POMast.*'); $this->db->from('T_PurchaseOrder_Master POMast'); $this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID'); $this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status'); @@ -634,7 +634,7 @@ function purchaseorderListing($forwhat='') $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,LineItem.ServiceMaterialDescription,Mat.MaterialCode,Mat.MaterialName, Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue,POMaster.AmendedDetails,LineItem.AmendedDetails as lineamenddetails, - ROUND(( Tax.After_SGST + Tax.After_CGST + Tax.After_IGST + Tax.otherallowance) ,2)as Taxamount,ReqMat.NumberOfService, + ROUND(( Tax.After_SGST + Tax.After_CGST + Tax.After_IGST ) ,2)as Taxamount,ReqMat.NumberOfService, TotalValue,Tax.*,LineItem.CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address,Payment.PaymentTerms FROM T_PurchaseOrder_LineItem LineItem join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode @@ -702,7 +702,7 @@ function purchaseorderListing($forwhat='') function GetRevenuePurchaseOrderDetailsForAmendPDF($PONO = '') { - $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName, + $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,POMaster.PaymentOtherDescription, Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue , ROUND(((AfterPackagingValue + AfterFreightValue + AfterSGST + AfterCGST + AfterIGST + Insurance)) ,2)as Taxamount, @@ -882,8 +882,8 @@ QuantityRejected,ROUND(ReceivedQuantity-QuantityRejected)as PendingQty, { //echo $PONO; - $subQuery ='SELECT distinct LineItem.PONO,LineItem.AmendedDetails as lineamd,LineItem.LineItemNo,SUP.SupplierName,SUP.Address,POMast.DeliveryAddress,POMast.DeliveryDate,POMast.PODate,POMast.DeliveryOption,POMast.ServiceDescription,POMast.Import_PlaceofOrgin,POMast.AmendedDetails,POMast.PaymentDays,POMast.DeliverySchedule,POMast.TotalOrderValue,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,LineItem.ServiceMaterialDescription,LineItem.ServiceFrequency, -Mat.UOM,Quantity,Rate,Req.Status,POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,POMast.CurrencyType,Payment.PaymentTerms, + $subQuery ='SELECT distinct LineItem.PONO,LineItem.AmendedDetails as lineamd,LineItem.LineItemNo,SUP.SupplierName,SUP.Address,POMast.DeliveryAddress,POMast.DeliveryDate,POMast.PODate,POMast.DeliveryOption,POMast.ServiceDescription,POMast.ServiceDescription,POMast.Import_DispatchDetails,POMast.Import_PlaceofOrgin,POMast.AmendedDetails,POMast.DeliverySchedule,POMast.TotalOrderValue,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,LineItem.ServiceMaterialDescription,LineItem.ServiceFrequency, +Mat.UOM,Quantity,Rate,POMast.Status,POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.PaymentOtherDescription,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,POMast.CurrencyType,Payment.PaymentTerms, Req.CostCenterCode FROM T_PurchaseOrder_LineItem LineItem join T_PurchaseOrder_Master POMast on POMast.PONO = LineItem.PONO join T_SupplierDetailsN SUP on SUP.SupplierID=POMast.SupplierID diff --git a/application/views/Amendervicepopdf.php b/application/views/Amendervicepopdf.php index 7b544129..3659857f 100755 --- a/application/views/Amendervicepopdf.php +++ b/application/views/Amendervicepopdf.php @@ -21,10 +21,9 @@ $TaxAmount =0.00; $BasicAmount = 0.00; $ServiceDescription = ''; - $PaymentTerms=''; - $totaltaxamount=0.0; - /* $PaymentDays=''; - $PayableAT=''; */ + $totaltaxamount=0.00; + $PaymentOtherDescription=''; + if(!empty($CompanyDetails)) { @@ -67,15 +66,27 @@ $DeliveryAddress = $PO->DeliveryAddress; $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); $Podt = $dt->format('d-m-Y'); + if($PO->DeliveryOption==1){ + $DeliverySchedule=$PO->DeliverySchedule; + $DeliveryDate=null; + + }else if($PO->DeliveryOption==0) + { + + if(!empty($PO->DeliveryDate)){ $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - if($DeliveryDate == '30-11--0001' || $DeliveryDate == '0001-11-30'){$DeliveryDate='';} + $DeliverySchedule=''; + } + } + // if($DeliveryDate == '30-11--0001' || $DeliveryDate == '0001-11-30'){$DeliveryDate='';} $ServiceDescription =$PO->ServiceDescription; $PaymentTerms = $PO->PaymentTerms; - $PaymentDays=$PO->PaymentDays; - $PayableAT=$PO->PayableAT; - $DeliverySchedule=$PO->DeliverySchedule; + if($PaymentTerms=='Others'){ + $PaymentOtherDescription=$PO->PaymentOtherDescription; + } + + } } @@ -193,7 +204,7 @@ foreach($POItem as $record) { $index = $index + 1; - $TotalAmount = ($record->BasicValue*$record->NumberOfService) + $record->Taxamount + $record->otherallowance; + $TotalAmount = ($record->BasicValue*$record->NumberOfService) + $record->Taxamount ;//+ $record->otherallowance; ?> @@ -202,7 +213,7 @@ Quantity ; ?> UOM ; ?> Rate ; ?> - BasicValue * $record->NumberOfService) ; ?> + BasicValue * $record->NumberOfService),2); ?> After_SGST ; ?> After_CGST ; ?> After_IGST ; ?> @@ -212,7 +223,7 @@ BasicValue; + $SubTotalAmount = $SubTotalAmount + $TotalAmount; $AfterSGST =$AfterSGST + $record->After_SGST; $AfterCGST =$AfterCGST + $record->After_CGST; $AfterIGST = $AfterIGST + $record->After_IGST; @@ -220,7 +231,7 @@ $totaltaxamount=$totaltaxamount+$record->Taxamount; } - $OrderValue = $SubTotalAmount + $AfterSGST + $AfterCGST+$AfterIGST+$otherallowances; + $OrderValue = $SubTotalAmount ; } ?> @@ -280,7 +291,7 @@

Payment Terms

-

+

Certified that the particulars given above are true and correct

diff --git a/application/views/Amendrevenuepopdf.php b/application/views/Amendrevenuepopdf.php index d19b4b6a..59feea73 100755 --- a/application/views/Amendrevenuepopdf.php +++ b/application/views/Amendrevenuepopdf.php @@ -13,6 +13,7 @@ $postatus=''; $ServiceDescription = ''; $PaymentTerms = ''; + $PaymentOtherDescription=''; /* $PaymentDays=''; $PayableAT=''; */ $totaltaxonly=0; @@ -51,8 +52,10 @@ $ServiceDescription =$PO->ServiceDescription; $PaymentTerms = $PO->PaymentTerms; - $PaymentDays=$PO->PaymentDays; - $PayableAT=$PO->PayableAT; + if($PaymentTerms=='Others'){ + $PaymentOtherDescription=$PO->PaymentOtherDescription; + } + @@ -249,11 +252,12 @@ $AfterCGST =$AfterCGST + $record->AfterCGST; $AfterSGST =$AfterSGST + $record->AfterSGST; $AfterIGST =$AfterIGST + $record->AfterIGST; - $totaltaxonly=($AfterCGST+$AfterSGST+$AfterIGST); + $Insurance =$Insurance + $record->Insurance; $AfterFreightValue =$AfterFreightValue + $record->AfterFreightValue; $AfterDiscount = $AfterDiscount + $record->AfterDiscount ; - $AfterPackaging=$AfterPackaging+$record->AfterPackagingValue; + $AfterPackaging=$AfterPackaging+$record->AfterPackagingValue; + $totaltaxonly=($AfterCGST+$AfterSGST+$AfterIGST+$Insurance+$AfterFreightValue+$AfterPackaging); } @@ -266,7 +270,7 @@
@@ -324,7 +328,7 @@ $OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insuranc

Payment Terms :

-

+

 Certified that the particulars given above are true and correct

@@ -348,7 +352,7 @@ $OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insuranc ?> - + +

 

+
Released By : FirstName;?>
+
Released On : format('d-m-Y');?>
- + + \ No newline at end of file diff --git a/application/views/amendcapitalpopdf.php b/application/views/amendcapitalpopdf.php index 94ec13ff..75c56a20 100755 --- a/application/views/amendcapitalpopdf.php +++ b/application/views/amendcapitalpopdf.php @@ -13,9 +13,11 @@ $DeliveryDate =''; $ServiceDescription = ''; $index=0; + $dispatch=""; $PaymentDays=''; $PayableAT=''; $PaymentTerms=''; + $PaymentOtherDescription=''; $DeliverySchedule=''; if(!empty($CompanyDetails)) { @@ -32,9 +34,11 @@ foreach ($POItem as $PO) { + $ReqNo=$PO->ReqNo; $PONO = $PO->PONO; $postatus= $PO->Status; + $SuplierName = $PO->SupplierName; $SuplierAddress = $PO->Address; $DeliveryAddress = $PO->DeliveryAddress; @@ -42,20 +46,28 @@ $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); $Podt = $dt->format('d-m-Y'); if($PO->DeliveryOption=='1'){ - $DeliveryDate = ''; + $DeliveryDate = ''; $DeliverySchedule = $PO->DeliverySchedule; + $dispatch=""; } - else{ + else if($PO->DeliveryOption=='0'){ + $dispatch=""; $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); - $DeliveryDate = $dtDe->format('d-m-Y'); - $DeliverySchedule = ''; - } + $DeliveryDate = $dtDe->format('d-m-Y'); + $DeliverySchedule = ''; + }else if($PO->DeliveryOption=='2'){ + $DeliveryDate=''; + $DeliverySchedule = ''; + $dispatch=$PO->Import_DispatchDetails; + } $ServiceDescription =$PO->ServiceDescription; $CostCenterCode=$PO->CostCenterCode; $PaymentTerms=$PO->PaymentTerms; - $PaymentDays=$PO->PaymentDays; - $PayableAT=$PO->PaymentTerms; + if($PaymentTerms=='Others'){ + $PaymentOtherDescription=$PO->PaymentOtherDescription; + } + } } @@ -92,7 +104,7 @@
- + @@ -206,7 +218,7 @@ - + @@ -237,8 +249,11 @@ foreach($POItem as $v) { + if(!empty($v->AmendedDetails)) + { echo "" . $v->AmendedDetails . ""; break; + } } }?> @@ -254,7 +269,9 @@ { foreach($POItem as $record) { - echo $record->lineamd ; + if(!empty($record->lineamd)){ + echo $record->lineamd ; + } } } ?> @@ -273,7 +290,7 @@
PO DATE :DELIVERY DATE / SCHEDULE BY :DELIVERY DATE / SCHEDULE BY :
MaterialName ; ?>MaterialCode;?> - MaterialName ; ?> Quantity ; ?> Rate ; ?>

Payment Terms

-

+

Certified that the particulars given above are true and correct

diff --git a/application/views/editCapitalAmendPO.php b/application/views/editCapitalAmendPO.php index d66f7d6e..2d636fcf 100755 --- a/application/views/editCapitalAmendPO.php +++ b/application/views/editCapitalAmendPO.php @@ -1,8 +1,8 @@ FirstName; - $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); - $CurrentDate = $dt->format('Y-m-d'); + // $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); + // $CurrentDate = $dt->format('Y-m-d'); $res_arr_values = array(); $DeliverOption=''; $SupId = ''; @@ -15,7 +15,7 @@ $DeliveryAddress =''; $POStatus = ''; $PONO = ''; - + $PaymentOtherDescription=''; $TotalSGST = 0.0; $TotalCGST = 0.0; $TotalIGST = 0.0; @@ -90,7 +90,7 @@ if(!empty($POItem)) } if(!empty($POMaster)) { - +//print_r($POMaster); foreach ($POMaster as $Req) { @@ -104,19 +104,26 @@ if(!empty($POMaster)) $DeliverOption = $Req->DeliveryOption; $DeliverSchedule = $Req->DeliverySchedule; + // $Deliverydt=$Req->DeliveryDate; + if(!empty($Req->DeliveryDate)) + { $Ddt = new DateTime($Req->DeliveryDate); $Deliverydt = $Ddt->format('Y-m-d'); + }else{ + $Deliverydt=null; + } + $DeliveryAddress =$Req->DeliveryAddress; $POStatus = $Req->StatusCode; $PoStatusName=$Req->StatusName; $PONO = $Req->PONO; $scopeofwork = $Req->ServiceDescription; - $PayableAT=$Req->PayableAT; + //$PayableAT=$Req->PayableAT; $ExchangeRateOn1=new DateTime($Req->ExchangeRateCalculatedon); $ExchangeRateOn=$ExchangeRateOn1->format('Y-m-d'); - $PaymentDays=$Req->PaymentDays; - + // $PaymentDays=$Req->PaymentDays; + $PaymentOtherDescription=$Req->PaymentOtherDescription; $PaymentTerms=$Req->PaymentTerms; //echo $PaymentTerms; $UpdatedOn=$Req->UpdatedOn; @@ -166,6 +173,7 @@ if(!empty($AvlBudAmt)) var DelOpt = ''; var SchName = ; + var others =''; var DelDt = ''; $(document).ready(function () { if(DelOpt=="0"){ @@ -177,9 +185,18 @@ $('#Deliverydt').val(DelDt); else if(DelOpt=="1"){ $('#Deliverydtdiv').hide(); $('#Schedulediv').show(); -$('#Deliverydt').val(''); +//$('#Deliverydt').val(''); +$('#Deliverydt').hide(); $('#Scheduleby').val(SchName); +} + +if($('#PaymentMethod').val()== 'PT08') +{ + +$('#otheroptiondiv').show(); +$('#Otherpayment').val(others); + } }); @@ -195,13 +212,19 @@ window.onload = function() document.getElementById('ExchangeRateOnDiv').style.display = 'none'; document.getElementById('ExchangeRateDiv').style.display = 'none'; document.getElementById('currencyTypeDiv').style.display = 'none'; - document.getElementById('ExchangeRateModalDiv').style.display = 'none'; + //document.getElementById('ExchangeRateModalDiv').style.display = 'none'; document.getElementById('ExchangeRateModalEditDiv').style.display = 'none'; document.getElementById('HideImportTaxTotal').style.display = 'none'; - document.getElementById('ModalImportTaxHide').style.display = 'none'; - document.getElementById('EditModalImportTaxHide').style.display = 'none'; - document.getElementById('ExchangeRateModalViewDiv').style.display = 'none'; - document.getElementById('ViewModalImportTaxHide').style.display = 'none'; + // document.getElementById('ModalImportTaxHide').style.display = 'none'; + document.getElementById('EditModalImportTaxHide').style.display = 'none'; + // document.getElementById('ExchangeRateModalViewDiv').style.display = 'none'; + //document.getElementById('ViewModalImportTaxHide').style.display = 'none'; + //document.getElementById('ExchangeRateModalViewDiv').style.display = 'none'; + document.getElementById('Deliverydtdiv').style.display = 'none'; + document.getElementById('dispatchinternational').style.display = 'none'; + document.getElementById('placeoforgin').style.display = 'none'; + document.getElementById('datedomestic').style.display = 'block'; + document.getElementById('deliverydateby').style.display = 'none'; capitalType='Domestic'; @@ -218,10 +241,10 @@ document.getElementById('ExchangeRateModalEditDiv').style.display = 'block'; //document.getElementById('ExchangeRateModalViewDiv').style.display = 'block'; capitalType='International'; document.getElementById('currencyTypeDiv').style.display = 'block'; +document.getElementById('dispatchinternational').style.display = 'block'; +//document.getElementById('deliverydateby').style.display = 'block'; //document.getElementById('ViewModalImportTaxHide').style.display = 'block'; - - - } + } } @@ -231,6 +254,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; diff --git a/application/views/editRevenueAmendPO.php b/application/views/editRevenueAmendPO.php index 018067c3..494a6534 100755 --- a/application/views/editRevenueAmendPO.php +++ b/application/views/editRevenueAmendPO.php @@ -25,18 +25,10 @@ if(!empty($CompanyDetails)) if(!empty($AvlBudAmt)) { - $AvlAmount = $AvlBudAmt; + $AvlAmount = $AvlBudAmt; +//echo $AvlAmount; } -if(!empty($INRSYMBOL)) -{ - - foreach($INRSYMBOL as $INRS) - { - $INRSYM=$INRS->FontCode2000; - - } -} foreach ($PaymentTerms as $TER) { $Terms=$TER->PaymentTerms; @@ -62,7 +54,7 @@ foreach ($PaymentTerms as $TER) $totFreightAmt = 0.0; $totInsuranceAmt = 0.0; $totOrderSummaryAmt = 0.0; - + $PaymentOtherDescription=''; $ServiceDescription = ''; if(!empty($POMaster)) @@ -83,12 +75,13 @@ if(!empty($POMaster)) $DeliverOption = $Req->DeliveryOption; $DeliverSchedule = $Req->DeliverySchedule; $Ddt = new DateTime($Req->DeliveryDate); - echo $Req->DeliveryDate."
"; + //echo $Req->DeliveryDate."
"; $Deliverydt = $Ddt->format('Y-m-d'); - echo $Deliverydt; - + //echo $Deliverydt; + $PaymentOtherDescription=$Req->PaymentOtherDescription; + //echo $PaymentOtherDescription; $DeliveryAddress =$Req->DeliveryAddress; - $POStatus = $Req->StatusCode; + $POStatus = $Req->StatusName; $PONO = $Req->PONO; $ServiceDescription = $Req->ServiceDescription; @@ -100,8 +93,8 @@ if(!empty($RequistionDetails)) foreach ($RequistionDetails as $ReqDet) { $Reqon=$ReqDet->ReqDate; - $Requestedby=$ReqDet->Requestedby; - //$Status=$ReqDet->Status; + $Requestedby=$ReqDet->FirstName; + $Status=$ReqDet->Status; } } //echo $ServiceDescription; @@ -112,7 +105,31 @@ foreach ($POSTATUS as $PST ) } ?> - + + @@ -131,11 +148,13 @@ foreach ($POSTATUS as $PST ) @@ -566,9 +579,7 @@ function clearEditTaxField() } $(document).ready(function () { - - $("#PaymentTerms").select2(); - + $("#PaymentTerms").select2(); $('#Date').click(function () { //for Date range selection $('#Schedulediv').hide(); @@ -798,12 +809,13 @@ $(document).ready(function () { - - - +
- +
'EditCostCenter','value' => set_value('EditCostCenter'),'id'=>'EditCostCenter', 'class' => 'form-control' ,'readonly' => 'true'); @@ -1214,38 +1226,7 @@ $(document).ready(function () {
- -
- -
+
@@ -1289,7 +1270,7 @@ $(document).ready(function () {
- + 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary',number_format($TotalSummary, 2, '.', '')),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control num' ,'readonly' => 'true'); echo form_input($data); @@ -1321,46 +1302,42 @@ $(document).ready(function () { -
+

-
-
-
-
+
+

+
- + Request On 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true','readonly' => 'true'); - echo form_input($data); - ?> + $data = array('name' => 'Requeston','value' => set_value('Requeston',$Reqon),'id'=>'Requeston', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;'); + echo form_input($data); + ?>
-

-
-
-
+
+ Request By 'RequestBy','value' => set_value('RequestBy', $RequesterName),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true','readonly' => 'true'); + $data = array('name' => 'RequestBy','value' => set_value('RequestBy',$RequesterName),'id'=>'RequestBy', 'class' => 'form-control' ,'required' => 'true'); echo form_input($data); ?>
-

- -
-
+
+ Status 'Select Status'); + // echo form_dropdown('Status', $options,set_value('Status'),'id="Status"' ,'required="true"' ,'class="form-control select2') + // $options = array("0"=>$PONOStatus); + // echo form_dropdown('Status', $options,set_value('Status',$StatusName),'id="Status"' ,'required="true"' ,'class="form-control select2') + + $data = array('name' => 'Status','value' => set_value('Status',$StatusName),'id'=>'Status', 'class' => 'form-control' ,'readonly' => 'true'); echo form_input($data); ?> -

+
-
- -
-
- + @@ -1906,12 +1883,11 @@ function validateServiceTax() } // -