diff --git a/application/controllers/emergencypurchaseorder.php~ b/application/controllers/emergencypurchaseorder.php~ index b229edd2..ae3048c7 100755 --- a/application/controllers/emergencypurchaseorder.php~ +++ b/application/controllers/emergencypurchaseorder.php~ @@ -64,6 +64,8 @@ class emergencypurchaseorder extends BaseController $data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate(); $data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006'); $data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018'); + $data['Payment']=$this->purchaseorder_model->getSupplierPayment('C009'); + $data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019'); $this->loadViews("alterpurchaseorder", $this->global, $data, Null); @@ -130,6 +132,14 @@ class emergencypurchaseorder extends BaseController $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $createddt = $dt->format('Y-m-d H:i:s'); + $PaymentTerms=$this->input->post('PaymentMethod'); + $PayableAT=$this->input->post('PayableAT'); + + $PaymentDays=$this->input->post('paymentDateOptions'); + $ServiceWorkStatus=$this->input->post('workStatus'); + + + //create T_Requestion_Master $Request = array('ReqType'=>$POType, 'Requestedby'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$SpcialInstruction,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy); @@ -143,7 +153,7 @@ class emergencypurchaseorder extends BaseController // PO Master - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt ); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$PaymentDays,'PayableAT'=>$PayableAT,'ServiceWorkStatus'=>$ServiceWorkStatus,'POType'=>$POType); $POMaster = $this->purchaseorder_model->addPOMaster($POList); $PONO = ''; @@ -172,6 +182,7 @@ class emergencypurchaseorder extends BaseController $CostCenter = $this->input->post('costCode'.$i); $TotalOrderValue = $this->input->post('TotalOrderValue'.$i); + $ServiceFrequency=$this->input->post('Frequency'.$i); $SkipInsert = "False"; if( count($comma_separated) > 0) { @@ -198,7 +209,7 @@ class emergencypurchaseorder extends BaseController - $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter); + $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'ServiceFrequency'=>$ServiceFrequency); $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); $LineItemNo = ''; if(count($POLineItem)>0) @@ -243,6 +254,7 @@ class emergencypurchaseorder extends BaseController function addNewRevenuePurchaseOrder() { + $POdt =$this->input->post('PODate'); $PODate = $this->getDateformat($POdt); $SupplierID = $this->input->post('drpSupplier'); @@ -276,7 +288,10 @@ class emergencypurchaseorder extends BaseController $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $createddt = $dt->format('Y-m-d H:i:s'); - + $PaymentTerms=$this->input->post('PaymentMethod'); + $PayableAT=$this->input->post('PayableAT'); + + $PaymentDays=$this->input->post('paymentDateOptions'); //add requistion $Request = array('ReqType'=>$POType, 'Requestedby'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$SpcialInstruction,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy); @@ -288,7 +303,7 @@ class emergencypurchaseorder extends BaseController $RegNo = $Req[0]['ReqNo']; } // PO Master - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt ); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$PaymentDays,'PayableAT'=>$PayableAT,'POType'=>$POType ); $POMaster = $this->purchaseorder_model->addPOMaster($POList); @@ -1091,3 +1106,4 @@ class emergencypurchaseorder extends BaseController } ?> + diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 4edc4537..79ae72fe 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -406,8 +406,8 @@ class purchaseorder extends BaseController } else if($ReqType == CAPITAL) { - - + $CapitalRange = $_GET['CapitalRange']; + $AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType); @@ -415,57 +415,65 @@ class purchaseorder extends BaseController { $data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue']; } - - $data['POItem'] = $this->purchaseorder_model->getCapitalPurchaseOrderDetails($PONO); - $data['requestedBy'] = $this->purchaseorder_model->GetRequesedByDetails($PONO); + if($CapitalRange=='0'){ + $data['POItem'] = $this->purchaseorder_model->getCapitalPurchaseOrderDetails($PONO); + + } + else if($CapitalRange=='1'){ + $data['POItem'] = $this->purchaseorder_model->getDomesticCapitalPurchaseOrderDetails($PONO); + + } + + + $data['requestedBy'] = $this->purchaseorder_model->GetRequesedByDetails($PONO); - $CapitalRange=''; + $CapitalRange=''; - foreach($data['POItem'] as $Rate) - { - - - $exRate=$Rate->ExchangeRate; - $CapitalRange=$Rate->CapitalRange; + foreach($data['POItem'] as $Rate) + { - - } - - foreach($data['POItem'] as $CUR) - { + + $exRate=$Rate->ExchangeRate; + $CapitalRange=$Rate->CapitalRange; + + + } + + foreach($data['POItem'] as $CUR) + { - $Currency=$CUR->CurrencyType; + $Currency=$CUR->CurrencyType; - - } - if($CapitalRange=='0'){ - - $data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency); - - - $data['ExchangeRate']=$exRate; - - $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); + } - } - else if($CapitalRange=='1'){ - $data['CurrencyDetail']=''; - - $data['ExchangeRate']=$exRate; - - $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); + if($CapitalRange=='0'){ - } + $data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency); + + + $data['ExchangeRate']=$exRate; + + $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); + + } + else if($CapitalRange=='1'){ + $data['CurrencyDetail']=''; + + $data['ExchangeRate']=$exRate; + + $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); + + } - $this->global['pageTitle'] = 'Siddharth : Edit Capital Purchase order form'; - $this->loadViews("editCapitalPo", $this->global, $data, NULL); - } + $this->global['pageTitle'] = 'Siddharth : Edit Capital Purchase order form'; + $this->loadViews("editCapitalPo", $this->global, $data, NULL); + } } @@ -978,32 +986,22 @@ $DeliveryOption = $this->input->post('DateRange'); $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); $data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO); - - foreach ($data['POItem'] as $Reqdby) - { - $Requester=$Reqdby->Requestedby; - - } - - - - $data['Requestername']=$this->purchaseorder_model->GerRequesterName($Requester); - - foreach ($data['Requestername'] as $ReqDep) - { - $Depcode=$ReqDep->Departmentcode; - } - - $data['DEPCODE']=$this->purchaseorder_model->GerRequesterDep($Depcode); - //print_r($data['Requestername']); - $data['Currencytype']=$this->purchaseorder_model->GetINRCurrencytype('INR'); - + $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); + $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); + $Currencycode=''; + + $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; + + $totalAmt=sprintf("%.2f", $TotalOrderValue); + + $data['TotalAmountInWords']= $this->convertNumber($totalAmt); + $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); // Add header to pdf //$this->load->view('includes/pdfheader'); // Load the pdf page with multiviews - $this->load->View("revenuepopdf", $data); + $this->load->View("revenuepopdf", $data); // Add header to pdf //$this->load->view('includes/pdffooter'); @@ -1030,28 +1028,28 @@ $DeliveryOption = $this->input->post('DateRange'); $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); $data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetailsForPrint($PONO); $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); - - foreach ($data['POItem'] as $Reqdby) + + $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); + + //print_r( $data['CurrencySymbol']); + + $TotalOrderValue=0; + $Currencycode=''; + foreach ($data['POItem'] as $POValue) { - $Requester=$Reqdby->Requestedby; + $TotalOrderValue=$TotalOrderValue + $POValue->TotalValue; + } - - - - $data['Requestername']=$this->purchaseorder_model->GerRequesterName($Requester); - - foreach ($data['Requestername'] as $ReqDep) - { - $Depcode=$ReqDep->Departmentcode; - } - - $data['DEPCODE']=$this->purchaseorder_model->GerRequesterDep($Depcode); - //print_r($data['Requestername']); - $data['Currencytype']=$this->purchaseorder_model->GetINRCurrencytype('INR'); - - - $this->load->View("servicepopdf", $data); + + + + $totalAmt=sprintf("%.2f", $TotalOrderValue); + + $data['TotalAmountInWords']= $this->convertNumber($totalAmt); + $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); + + $this->load->View("servicepopdf", $data); // Add header to pdf //$this->load->view('includes/pdffooter'); @@ -1669,8 +1667,8 @@ $createddt=''; $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $createddt = $dt->format('Y-m-d H:i:s'); $currencytypeID = $this->input->post('currencytype'); - - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'ExchangeRate'=>$ExchangeRate,'PaymentTerms'=>$PaymentMethod,'PaymentDays'=>$PaymentDate,'PayableAt'=>$PayableAT,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CapitalRange'=>$CapitalRange,'POType'=>$POType,'CurrencyType'=>currencytypeID); + + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'ExchangeRate'=>$ExchangeRate,'PaymentTerms'=>$PaymentMethod,'PaymentDays'=>$PaymentDate,'PayableAt'=>$PayableAT,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CapitalRange'=>$CapitalRange,'POType'=>$POType,'CurrencyType'=>$currencytypeID); $POMaster = $this->purchaseorder_model->addPOMaster($POList); @@ -1774,12 +1772,13 @@ $createddt=''; $ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'ServiceTax'=>$ServiceTax,'EducessTax'=>$EduCess,'SecHigherEducessTax'=>$SecHighTax,'KrishiKalyantax'=>$KrishiTax,'SwachhBharattax'=>$SwachhTax,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt); $ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList); - $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); - //die(); - + if($CapitalRange=='0'){ + $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); + $ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList); + } + } } @@ -1797,7 +1796,7 @@ $createddt=''; $PONO =$this->input->post('txtPONO'); $POdt =$this->input->post('PODate'); $PODate = $this->getDateformat($POdt); - $SupplierID = $this->input->post('drpSupplier'); + $SupplierID = $this->input->post('drpSupplier'); $DeliveryAddr = $this->input->post('DeliveryAddr'); $dt = $this->input->post('Deliverydt'); @@ -1987,21 +1986,60 @@ $createddt=''; echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ; } - /* capital po print/pdf*/ + /* capital po print/pdf*/ public function CapitalPoPrint($PONO) { - + // Load the pdf page with multiviews $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); + $data['POItem'] = $this->purchaseorder_model->GetCapitalPurchaseOrderDetailsForPDF($PONO); - $totalAmt = $data['POItem'][0]->TotalOrderValue." "."Only"; - $data['requestedBy'] = $this->purchaseorder_model->GetRequesedByDetails($PONO); + $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); + + $CurrencyType=''; + if(!empty($data['POItem'])){ + $CurrencyType=$data['POItem'][0]->CurrencyType; + } + else{ + } - $data['TotalAmountInWords']=$this->convertNumber($totalAmt); + if($CurrencyType==''){ + $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); + + + $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; + + $totalAmt=sprintf("%.2f", $TotalOrderValue); + + $data['TotalAmountInWords']= $this->convertNumber($totalAmt); + } + + + else{ + $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName($CurrencyType); + $SymbolCurrency=$data['CurrencySymbol'][0]->FontCode2000; + $SymbolCurrencyName=$data['CurrencySymbol'][0]->Currency; + $PaiseVal=$data['CurrencySymbol'][0]->PaiseVal; + + $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; + + $totalAmt=sprintf("%.2f", $TotalOrderValue); + + $data['TotalAmountInWords']= $this->convertNumberSymbol($totalAmt,$SymbolCurrency,$SymbolCurrencyName,$PaiseVal); + } + + + + + + + $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); + + + $this->load->View("capitalpopdf", $data); @@ -2132,7 +2170,116 @@ $createddt=''; return $output; } + /* get symbol based amount in words*/ + + public function convertNumberSymbol($number,$symbol,$name,$paise) + +{ + + list($integer, $fraction) = explode(".", (string) $number); + + $output = $name." "; + + if ($integer{0} == "-") + + { + + $output = "negative "; + + $integer = ltrim($integer, "-"); + + } + + else if ($integer{0} == "+") + + { + + $output = "positive "; + + $integer = ltrim($integer, "+"); + + } + + if ($integer{0} == "0") + + { + + $output .= "zero"; + + } + + else + + { + + $integer = str_pad($integer, 36, "0", STR_PAD_LEFT); + + $group = rtrim(chunk_split($integer, 3, " "), " "); + + $groups = explode(" ", $group); + + $groups2 = array(); + + foreach ($groups as $g) + + { + + $groups2[] = $this->convertThreeDigit($g{0}, $g{1}, $g{2}); + + } + + for ($z = 0; $z < count($groups2); $z++) + + { + + if ($groups2[$z] != "") + + { + + $output .= $groups2[$z] . $this->convertGroup(11 - $z) . ( + + $z < 11 + + && !array_search('', array_slice($groups2, $z + 1, -1)) + + && $groups2[11] != '' + + && $groups[11]{0} == '0' + + ? " " + + : ", " + + ); + + } + + } + + $output = rtrim($output, ", "); + + } + + if ($fraction > 0) + + { + + $output .= $paise; + + for ($i = 0; $i < strlen($fraction); $i++) + + { + + $output .= " " . $this->convertDigit($fraction{$i}); + + } + + } + + return $output; + +} public function convertGroup($index) { diff --git a/application/controllers/purchaseorder.php~ b/application/controllers/purchaseorder.php~ index bd792449..79ae72fe 100755 --- a/application/controllers/purchaseorder.php~ +++ b/application/controllers/purchaseorder.php~ @@ -41,7 +41,12 @@ class purchaseorder extends BaseController $this->loadViews("viewfullpurchaseorder", $this->global,Null); } - + function advancerequest() + { + $this->global['pageTitle'] = 'Siddharth : Advance Request'; + + $this->loadViews("Advancerequest", $this->global, NULL , NULL); + } function requisition() { $data['DeptList'] = $this->purchaseorder_model->getDepartmentListForAllReq(); @@ -270,7 +275,7 @@ class purchaseorder extends BaseController endforeach; $data['MaterialList'] = $result;//$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray); $data['Suplist'] = $this->purchaseorder_model->getSupplierName(); - $data['Payment']=$this->purchaseorder_model->getSupplierPayment(); + $data['Payment']=$this->purchaseorder_model->getSupplierPayment('C009'); $data['INRSYMBOL']=$this->purchaseorder_model->GetINRCurrencytype('INR'); /* Cost code from Requisition - Client Review Fix Start here */ @@ -401,8 +406,8 @@ class purchaseorder extends BaseController } else if($ReqType == CAPITAL) { - - + $CapitalRange = $_GET['CapitalRange']; + $AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType); @@ -410,57 +415,65 @@ class purchaseorder extends BaseController { $data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue']; } - - $data['POItem'] = $this->purchaseorder_model->getCapitalPurchaseOrderDetails($PONO); - $data['requestedBy'] = $this->purchaseorder_model->GetRequesedByDetails($PONO); + if($CapitalRange=='0'){ + $data['POItem'] = $this->purchaseorder_model->getCapitalPurchaseOrderDetails($PONO); + + } + else if($CapitalRange=='1'){ + $data['POItem'] = $this->purchaseorder_model->getDomesticCapitalPurchaseOrderDetails($PONO); + + } + + + $data['requestedBy'] = $this->purchaseorder_model->GetRequesedByDetails($PONO); - $CapitalRange=''; + $CapitalRange=''; - foreach($data['POItem'] as $Rate) - { - - - $exRate=$Rate->ExchangeRate; - $CapitalRange=$Rate->CapitalRange; + foreach($data['POItem'] as $Rate) + { - - } - - foreach($data['POItem'] as $CUR) - { + + $exRate=$Rate->ExchangeRate; + $CapitalRange=$Rate->CapitalRange; + + + } + + foreach($data['POItem'] as $CUR) + { - $Currency=$CUR->CurrencyType; + $Currency=$CUR->CurrencyType; - - } - if($CapitalRange=='0'){ - - $data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency); - - - $data['ExchangeRate']=$exRate; - - $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); + } - } - else if($CapitalRange=='1'){ - $data['CurrencyDetail']=''; - - $data['ExchangeRate']=$exRate; - - $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); + if($CapitalRange=='0'){ - } + $data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency); + + + $data['ExchangeRate']=$exRate; + + $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); + + } + else if($CapitalRange=='1'){ + $data['CurrencyDetail']=''; + + $data['ExchangeRate']=$exRate; + + $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); + + } - $this->global['pageTitle'] = 'Siddharth : Edit Capital Purchase order form'; - $this->loadViews("editCapitalPo", $this->global, $data, NULL); - } + $this->global['pageTitle'] = 'Siddharth : Edit Capital Purchase order form'; + $this->loadViews("editCapitalPo", $this->global, $data, NULL); + } } @@ -973,13 +986,22 @@ $DeliveryOption = $this->input->post('DateRange'); $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); $data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO); + $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); + $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); - + $Currencycode=''; + + $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; + + $totalAmt=sprintf("%.2f", $TotalOrderValue); + + $data['TotalAmountInWords']= $this->convertNumber($totalAmt); + $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); // Add header to pdf //$this->load->view('includes/pdfheader'); // Load the pdf page with multiviews - $this->load->View("revenuepopdf", $data); + $this->load->View("revenuepopdf", $data); // Add header to pdf //$this->load->view('includes/pdffooter'); @@ -1006,7 +1028,28 @@ $DeliveryOption = $this->input->post('DateRange'); $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); $data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetailsForPrint($PONO); $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); - $this->load->View("servicepopdf", $data); + + $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); + + //print_r( $data['CurrencySymbol']); + + $TotalOrderValue=0; + $Currencycode=''; + foreach ($data['POItem'] as $POValue) + { + $TotalOrderValue=$TotalOrderValue + $POValue->TotalValue; + + + } + + + + $totalAmt=sprintf("%.2f", $TotalOrderValue); + + $data['TotalAmountInWords']= $this->convertNumber($totalAmt); + $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); + + $this->load->View("servicepopdf", $data); // Add header to pdf //$this->load->view('includes/pdffooter'); @@ -1037,6 +1080,28 @@ public function importpoprint($PONO) $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); $data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetailsForPDF($PONO); + foreach ($data['POItem'] as $Reqdby) + { + $Requester=$Reqdby->Requestedby; + + } + + foreach ($data['POItem'] as $CURTYPE) + { + $Currencycode=$CURTYPE->CurrencyType; + } + + $data['Requestername']=$this->purchaseorder_model->GerRequesterName($Requester); + + foreach ($data['Requestername'] as $ReqDep) + { + $Depcode=$ReqDep->Departmentcode; + } + + $data['DEPCODE']=$this->purchaseorder_model->GerRequesterDep($Depcode); + //print_r($data['Requestername']); + $data['Currencytype']=$this->purchaseorder_model->GerCurrencyCodeName($Currencycode); + $this->load->View("importpopdf", $data); // Add header to pdf @@ -1602,8 +1667,8 @@ $createddt=''; $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $createddt = $dt->format('Y-m-d H:i:s'); $currencytypeID = $this->input->post('currencytype'); - - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'ExchangeRate'=>$ExchangeRate,'PaymentTerms'=>$PaymentMethod,'PaymentDays'=>$PaymentDate,'PayableAt'=>$PayableAT,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CapitalRange'=>$CapitalRange,'POType'=>$POType,'CurrencyType'=>currencytypeID); + + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'ExchangeRate'=>$ExchangeRate,'PaymentTerms'=>$PaymentMethod,'PaymentDays'=>$PaymentDate,'PayableAt'=>$PayableAT,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CapitalRange'=>$CapitalRange,'POType'=>$POType,'CurrencyType'=>$currencytypeID); $POMaster = $this->purchaseorder_model->addPOMaster($POList); @@ -1707,12 +1772,13 @@ $createddt=''; $ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'ServiceTax'=>$ServiceTax,'EducessTax'=>$EduCess,'SecHigherEducessTax'=>$SecHighTax,'KrishiKalyantax'=>$KrishiTax,'SwachhBharattax'=>$SwachhTax,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt); $ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList); - $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); - //die(); - + if($CapitalRange=='0'){ + $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); + $ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList); + } + } } @@ -1730,7 +1796,7 @@ $createddt=''; $PONO =$this->input->post('txtPONO'); $POdt =$this->input->post('PODate'); $PODate = $this->getDateformat($POdt); - $SupplierID = $this->input->post('drpSupplier'); + $SupplierID = $this->input->post('drpSupplier'); $DeliveryAddr = $this->input->post('DeliveryAddr'); $dt = $this->input->post('Deliverydt'); @@ -1920,21 +1986,60 @@ $createddt=''; echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ; } - /* capital po print/pdf*/ + /* capital po print/pdf*/ public function CapitalPoPrint($PONO) { - + // Load the pdf page with multiviews $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); + $data['POItem'] = $this->purchaseorder_model->GetCapitalPurchaseOrderDetailsForPDF($PONO); - $totalAmt = $data['POItem'][0]->TotalOrderValue." "."Only"; - $data['requestedBy'] = $this->purchaseorder_model->GetRequesedByDetails($PONO); + $data['releasedetails'] = $this->purchaseorder_model->GetReleasedDetails($PONO); + + $CurrencyType=''; + if(!empty($data['POItem'])){ + $CurrencyType=$data['POItem'][0]->CurrencyType; + } + else{ + } - $data['TotalAmountInWords']=$this->convertNumber($totalAmt); + if($CurrencyType==''){ + $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName('INR'); + + + $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; + + $totalAmt=sprintf("%.2f", $TotalOrderValue); + + $data['TotalAmountInWords']= $this->convertNumber($totalAmt); + } + + + else{ + $data['CurrencySymbol']=$this->purchaseorder_model->GerCurrencyCodeName($CurrencyType); + $SymbolCurrency=$data['CurrencySymbol'][0]->FontCode2000; + $SymbolCurrencyName=$data['CurrencySymbol'][0]->Currency; + $PaiseVal=$data['CurrencySymbol'][0]->PaiseVal; + + $TotalOrderValue=$data['POItem'][0]->TotalOrderValue; + + $totalAmt=sprintf("%.2f", $TotalOrderValue); + + $data['TotalAmountInWords']= $this->convertNumberSymbol($totalAmt,$SymbolCurrency,$SymbolCurrencyName,$PaiseVal); + } + + + + + + + $data['RequistionDetails'] = $this->purchaseorder_model->GetPdfRequistionDetails($PONO); + + + $this->load->View("capitalpopdf", $data); @@ -2065,7 +2170,116 @@ $createddt=''; return $output; } + /* get symbol based amount in words*/ + + public function convertNumberSymbol($number,$symbol,$name,$paise) + +{ + + list($integer, $fraction) = explode(".", (string) $number); + + $output = $name." "; + + if ($integer{0} == "-") + + { + + $output = "negative "; + + $integer = ltrim($integer, "-"); + + } + + else if ($integer{0} == "+") + + { + + $output = "positive "; + + $integer = ltrim($integer, "+"); + + } + + if ($integer{0} == "0") + + { + + $output .= "zero"; + + } + + else + + { + + $integer = str_pad($integer, 36, "0", STR_PAD_LEFT); + + $group = rtrim(chunk_split($integer, 3, " "), " "); + + $groups = explode(" ", $group); + + $groups2 = array(); + + foreach ($groups as $g) + + { + + $groups2[] = $this->convertThreeDigit($g{0}, $g{1}, $g{2}); + + } + + for ($z = 0; $z < count($groups2); $z++) + + { + + if ($groups2[$z] != "") + + { + + $output .= $groups2[$z] . $this->convertGroup(11 - $z) . ( + + $z < 11 + + && !array_search('', array_slice($groups2, $z + 1, -1)) + + && $groups2[11] != '' + + && $groups[11]{0} == '0' + + ? " " + + : ", " + + ); + + } + + } + + $output = rtrim($output, ", "); + + } + + if ($fraction > 0) + + { + + $output .= $paise; + + for ($i = 0; $i < strlen($fraction); $i++) + + { + + $output .= " " . $this->convertDigit($fraction{$i}); + + } + + } + + return $output; + +} public function convertGroup($index) { diff --git a/application/logs/log-2017-07-07.php b/application/logs/log-2017-07-07.php index 320de2a7..94652a2c 100755 --- a/application/logs/log-2017-07-07.php +++ b/application/logs/log-2017-07-07.php @@ -101,3 +101,49 @@ ERROR - 2017-07-07 08:16:18 --> Severity: Notice --> Undefined variable: Materi ERROR - 2017-07-07 08:23:40 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/webalizer/siddharth_application/application/views/alterpurchaseorder.php 138 ERROR - 2017-07-07 08:23:40 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/webalizer/siddharth_application/application/views/alterpurchaseorder.php 140 ERROR - 2017-07-07 08:23:40 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/webalizer/siddharth_application/application/views/alterpurchaseorder.php 186 +ERROR - 2017-07-07 15:17:45 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given /opt/lampp/htdocs/Direct_Git/siddharth_application/system/database/drivers/mysqli/mysqli_result.php 38 +ERROR - 2017-07-07 15:18:08 --> Severity: Notice --> Undefined property: stdClass::$PaymentTerms /opt/lampp/htdocs/Direct_Git/siddharth_application/application/views/servicepopdf.php 53 +ERROR - 2017-07-07 15:18:08 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 15:51:09 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given /opt/lampp/htdocs/Direct_Git/siddharth_application/system/database/drivers/mysqli/mysqli_result.php 38 +ERROR - 2017-07-07 15:51:23 --> Severity: Notice --> Undefined property: stdClass::$Currency /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2023 +ERROR - 2017-07-07 15:51:23 --> Severity: Notice --> Undefined property: stdClass::$PaiseVal /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2024 +ERROR - 2017-07-07 15:51:23 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 15:51:23 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 15:51:41 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 15:51:41 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 15:52:19 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 15:52:55 --> Severity: Notice --> Undefined property: stdClass::$Currency /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2023 +ERROR - 2017-07-07 15:52:55 --> Severity: Notice --> Undefined property: stdClass::$PaiseVal /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2024 +ERROR - 2017-07-07 15:52:55 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 15:52:55 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 15:54:00 --> Severity: Notice --> Undefined property: stdClass::$Currency /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2023 +ERROR - 2017-07-07 15:54:00 --> Severity: Notice --> Undefined property: stdClass::$PaiseVal /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2024 +ERROR - 2017-07-07 15:54:00 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 15:54:00 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 15:57:40 --> Severity: Notice --> Undefined property: stdClass::$Currency /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2023 +ERROR - 2017-07-07 15:57:40 --> Severity: Notice --> Undefined property: stdClass::$PaiseVal /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2024 +ERROR - 2017-07-07 15:57:40 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 15:57:40 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 16:00:57 --> Severity: Notice --> Undefined property: stdClass::$Currency /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2023 +ERROR - 2017-07-07 16:00:57 --> Severity: Notice --> Undefined property: stdClass::$PaiseVal /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2024 +ERROR - 2017-07-07 16:00:58 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 16:00:58 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 16:03:16 --> Severity: Notice --> Undefined property: stdClass::$Currency /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2023 +ERROR - 2017-07-07 16:03:16 --> Severity: Notice --> Undefined property: stdClass::$PaiseVal /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2024 +ERROR - 2017-07-07 16:05:36 --> Severity: Notice --> Undefined property: stdClass::$Currency /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2024 +ERROR - 2017-07-07 16:05:36 --> Severity: Notice --> Undefined property: stdClass::$PaiseVal /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2025 +ERROR - 2017-07-07 16:28:28 --> Severity: Notice --> Undefined property: stdClass::$Currency /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2024 +ERROR - 2017-07-07 16:28:28 --> Severity: Notice --> Undefined property: stdClass::$PaiseVal /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2025 +ERROR - 2017-07-07 16:30:40 --> Severity: Notice --> Undefined property: stdClass::$Currency /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2024 +ERROR - 2017-07-07 16:30:40 --> Severity: Notice --> Undefined property: stdClass::$PaiseVal /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2025 +ERROR - 2017-07-07 16:30:57 --> Severity: Notice --> Undefined property: stdClass::$Currency /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2024 +ERROR - 2017-07-07 16:30:57 --> Severity: Notice --> Undefined property: stdClass::$PaiseVal /opt/lampp/htdocs/Direct_Git/siddharth_application/application/controllers/purchaseorder.php 2025 +ERROR - 2017-07-07 16:32:05 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 16:32:05 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 16:32:29 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 16:32:29 --> Severity: Warning --> explode() expects parameter 2 to be string, array given /opt/lampp/htdocs/Direct_Git/siddharth_application/application/third_party/dompdf/include/style.cls.php 948 +ERROR - 2017-07-07 16:34:59 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given /opt/lampp/htdocs/Direct_Git/siddharth_application/system/database/drivers/mysqli/mysqli_result.php 38 +ERROR - 2017-07-07 16:35:09 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Direct_Git/siddharth_application/application/views/alterpurchaseorder.php 138 +ERROR - 2017-07-07 16:35:09 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Direct_Git/siddharth_application/application/views/alterpurchaseorder.php 140 +ERROR - 2017-07-07 16:35:09 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Direct_Git/siddharth_application/application/views/alterpurchaseorder.php 186 +ERROR - 2017-07-07 16:36:14 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given /opt/lampp/htdocs/Direct_Git/siddharth_application/system/database/drivers/mysqli/mysqli_result.php 38 diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index d3e62195..e838cfa4 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -33,7 +33,7 @@ class purchaseorder_model extends CI_Model function purchaseorderListing($forwhat='') { $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,POMast.CapitalRange'); $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'); @@ -486,14 +486,13 @@ function purchaseorderListing($forwhat='') } - // This Method to get the Service PO Child Details for Edit the Item +// This Method to get the Service PO Child Details for Edit the Item function GetServicePurchaseOrderDetailsForPrint($PONO = '') { - $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM, + $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM, Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,ROUND((ServiceTax + EducessTax + SecHigherEducessTax + KrishiKalyantax + SwachhBharattax),2)as Taxamount - ,TotalValue,ServiceTax,EducessTax,SecHigherEducessTax,KrishiKalyantax,SwachhBharattax,LineItem.CostCenterCode,sup.SupplierName,sup.Address,POMaster.DeliveryAddress,POMaster.DeliveryDate,POMaster.Status,POMaster.PODate,POMaster.PONO,POMaster.ServiceDescription,ReqMas.Requestedby FROM T_PurchaseOrder_LineItem LineItem - join T_Requestion_Master ReqMas on ReqMas.ReqNo=LineItem.ReqNo + ,TotalValue,ServiceTax,EducessTax,SecHigherEducessTax,KrishiKalyantax,SwachhBharattax,CostCenterCode ,sup.SupplierName,sup.Address,POMaster.DeliveryAddress,POMaster.DeliveryDate,POMaster.Status,POMaster.PODate,POMaster.PONO,POMaster.ServiceDescription,POMaster.PaymentTerms,POMaster.PaymentDays,POMaster.PayableAT FROM T_PurchaseOrder_LineItem LineItem join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode join T_Service_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo join T_PurchaseOrder_Master POMaster on POMaster.PONO = LineItem.PONO @@ -531,18 +530,17 @@ function purchaseorderListing($forwhat='') function GetRevenuePurchaseOrderDetailsForPDF($PONO = '') { - $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,Mat.MaterialCode,Mat.MaterialName, - Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue , - ROUND(((AfterPackagingValue + AfterFreightValue + AfterExciseDuty + AfterVAT + AfterCST + - AfterGST + AfterOtherTaxes + Insurance)) ,2)as Taxamount , - TotalValue,Tax.*,LineItem.CostCenterCode , POMaster.*,sup.SupplierName,sup.Address,ReqMas.Requestedby - FROM T_PurchaseOrder_LineItem LineItem - join T_Requestion_Master ReqMas on ReqMas.ReqNo=LineItem.ReqNo - join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode - join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo - join T_PurchaseOrder_Master POMaster on POMaster.PONO = LineItem.PONO - join T_SupplierDetailsN sup on sup.SupplierID = POMaster.SupplierID - where LineItem.PONO =?'; + $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName, + Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue , + ROUND(((AfterPackagingValue + AfterFreightValue + AfterExciseDuty + AfterVAT + AfterCST + + AfterGST + AfterOtherTaxes + Insurance)) ,2)as Taxamount , + TotalValue,Tax.*,CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address + FROM T_PurchaseOrder_LineItem LineItem + join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode + join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo + join T_PurchaseOrder_Master POMaster on POMaster.PONO = LineItem.PONO + join T_SupplierDetailsN sup on sup.SupplierID = POMaster.SupplierID + where LineItem.PONO =?'; $query = $this->db->query($subQuery,array($PONO)); @@ -577,7 +575,7 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '') function GetCurrencyDetail($Currency='') { - $subQuery='SELECT Currency_Code,Country_and_Currency,FontCode2000 from T_Currency_Details where Currency_Code=?'; + $subQuery='SELECT * from T_Currency_Details where Currency_Code=?'; $query=$this->db->query($subQuery,array($Currency)); //print_r($query); return $query->result(); @@ -606,7 +604,7 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '') function GerCurrencyCodeName($Currencycode='') { - $subQuery='SELECT Currency_Code,FontCode2000 from T_Currency_Details where Currency_Code=?'; + $subQuery='SELECT * from T_Currency_Details where Currency_Code=?'; $query=$this->db->query($subQuery,array($Currencycode)); return $query->result(); } @@ -1087,8 +1085,6 @@ function GetCurrencytype() } //This is get the capital po list for edit - - function getCapitalPurchaseOrderDetails($PONO = '') { @@ -1115,7 +1111,7 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode } - // This Method to get the Capital PO Details for pdf +// This Method to get the Capital PO Details for pdf function GetCapitalPurchaseOrderDetailsForPDF($PONO = '') { @@ -1149,5 +1145,71 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode return $result->result(); + } + + // get domestic capital po list + + + function getDomesticCapitalPurchaseOrderDetails($PONO = '') + { + + $subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName, + Mat.UOM,Quantity,Rate,Req.Status,ROUND((ServiceTax.ServiceTax + ServiceTax.EducessTax + ServiceTax.SecHigherEducessTax + ServiceTax.KrishiKalyantax + ServiceTax.SwachhBharattax),2) as ServiceTaxamount + ,ServiceTax.TotalValue,ServiceTax,EducessTax,ServiceTax.SecHigherEducessTax,ServiceTax.KrishiKalyantax,ServiceTax.SwachhBharattax, + POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,ROUND((POMast.TotalOrderValue),2) as BasicINRValue,POMast.CurrencyType, + + Req.CostCenterCode,Dept.DepartmentName FROM T_PurchaseOrder_LineItem LineItem + join T_PurchaseOrder_Master POMast on POMast.PONO = LineItem.PONO + join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode + join T_Service_Tax ServiceTax on ServiceTax.LineItemNo = LineItem.LineItemNo + join T_Requestion_Master Req on Req.ReqNo = LineItem.ReqNo + join T_Employee_Details emp on Req.Requestedby = emp.EmpID + + join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode where LineItem.PONO =?'; + //print_r($subQuery); + + $query = $this->db->query($subQuery,array($PONO)); + + return $query->result(); + + + } + //get pdf po requistion details + + + function GetPdfRequistionDetails($PONO){ + $this->db->select('LineItem.ReqNo'); + //$this->db->from('T_PurchaseOrder_Master mast'); + $this->db->from('T_PurchaseOrder_LineItem LineItem'); + // $this->db->from('T_Requestion_Master ReqMast','ReqMast.ReqNo=LineItem.ReqNo'); + //$this->db->join('tbl_users tbl','mast.CreatedBy=tbl.userid'); + //$this->db->join('T_Employee_Details re','re.EmpID=ReqMast.Requestedby'); + //$this->db->join('T_DepartmentDetails Dept', 're.Departmentcode = Dept.DEPCode'); + + $this->db->where('LineItem.PONO',$PONO); + $result=$this->db->get(); + //$result->result() + $ReqNo=''; + foreach ($result->result() as $res){ + $ReqNo = $res->ReqNo; + $this->db->select('ReqMast.ReqNo,ReqMast.CostCenterCode,re.FirstName,Dept.DEPCode,Dept.DepartmentName'); + + $this->db->from('T_Requestion_Master ReqMast'); + //$this->db->join('tbl_users tbl','mast.CreatedBy=tbl.userid'); + $this->db->join('T_Employee_Details re','re.EmpID=ReqMast.Requestedby'); + $this->db->join('T_DepartmentDetails Dept', 're.Departmentcode = Dept.DEPCode'); + + $this->db->where('ReqMast.ReqNo',$ReqNo); + $Reqresult=$this->db->get(); + $Details['RequistionNo']= $Reqresult->result()[0]->ReqNo; + $Details['RequestedName']= $Reqresult->result()[0]->FirstName; + $Details['RequestedDept']= $Reqresult->result()[0]->DepartmentName; + $Details['CostCenterCode']= $Reqresult->result()[0]->CostCenterCode; + $ResultArray[]=$Details; + } + $RequistionDetails = $ResultArray; + + return $RequistionDetails; + } } \ No newline at end of file diff --git a/application/models/purchaseorder_model.php~ b/application/models/purchaseorder_model.php~ index b4de241e..e838cfa4 100755 --- a/application/models/purchaseorder_model.php~ +++ b/application/models/purchaseorder_model.php~ @@ -33,7 +33,7 @@ class purchaseorder_model extends CI_Model function purchaseorderListing($forwhat='') { $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,POMast.CapitalRange'); $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'); @@ -486,13 +486,13 @@ function purchaseorderListing($forwhat='') } - // This Method to get the Service PO Child Details for Edit the Item +// This Method to get the Service PO Child Details for Edit the Item function GetServicePurchaseOrderDetailsForPrint($PONO = '') { $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName,Mat.UOM, Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue ,ROUND((ServiceTax + EducessTax + SecHigherEducessTax + KrishiKalyantax + SwachhBharattax),2)as Taxamount - ,TotalValue,ServiceTax,EducessTax,SecHigherEducessTax,KrishiKalyantax,SwachhBharattax,CostCenterCode ,sup.SupplierName,sup.Address,POMaster.DeliveryAddress,POMaster.DeliveryDate,POMaster.Status,POMaster.PODate,POMaster.PONO,POMaster.ServiceDescription FROM T_PurchaseOrder_LineItem LineItem + ,TotalValue,ServiceTax,EducessTax,SecHigherEducessTax,KrishiKalyantax,SwachhBharattax,CostCenterCode ,sup.SupplierName,sup.Address,POMaster.DeliveryAddress,POMaster.DeliveryDate,POMaster.Status,POMaster.PODate,POMaster.PONO,POMaster.ServiceDescription,POMaster.PaymentTerms,POMaster.PaymentDays,POMaster.PayableAT FROM T_PurchaseOrder_LineItem LineItem join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode join T_Service_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo join T_PurchaseOrder_Master POMaster on POMaster.PONO = LineItem.PONO @@ -534,7 +534,7 @@ function purchaseorderListing($forwhat='') Mat.UOM,Quantity,Rate,ROUND((Quantity *Rate),2 ) as BasicValue , ROUND(((AfterPackagingValue + AfterFreightValue + AfterExciseDuty + AfterVAT + AfterCST + AfterGST + AfterOtherTaxes + Insurance)) ,2)as Taxamount , - TotalValue,Tax.*,CostCenterCode , POMaster.*,sup.SupplierName,sup.Address + TotalValue,Tax.*,CostCenterCode ,POMaster.*,sup.SupplierName,sup.Address FROM T_PurchaseOrder_LineItem LineItem join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode join T_Revenue_Tax Tax on Tax.LineItemNo = LineItem.LineItemNo @@ -553,9 +553,9 @@ function purchaseorderListing($forwhat='') function GetImportPurchaseOrderDetailsForPDF($PONO = '') { - $subQuery ='SELECT distinct LineItem.LineItemNo,ReqNo,Mat.MaterialCode,Mat.MaterialName, + $subQuery ='SELECT distinct LineItem.LineItemNo,LineItem.ReqNo,Mat.MaterialCode,Mat.MaterialName, Mat.UOM,Quantity,ReqMas.Requestedby,Rate,ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount , - ProductPrice,Tax.*,CostCenterCode , POMaster.*,sup.SupplierName,sup.Address + ProductPrice,Tax.*,LineItem.CostCenterCode , POMaster.*,sup.SupplierName,sup.Address FROM T_PurchaseOrder_LineItem LineItem join T_Requestion_Master ReqMas on ReqMas.ReqNo=LineItem.ReqNo join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode @@ -575,7 +575,7 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '') function GetCurrencyDetail($Currency='') { - $subQuery='SELECT Currency_Code,Country_and_Currency,FontCode2000 from T_Currency_Details where Currency_Code=?'; + $subQuery='SELECT * from T_Currency_Details where Currency_Code=?'; $query=$this->db->query($subQuery,array($Currency)); //print_r($query); return $query->result(); @@ -585,16 +585,26 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '') function GerRequesterName($Requester='') { - $subQuery='SELECT EmpID,FirstName from T_Employee_Details where EmpID=?'; + $subQuery='SELECT EmpID,FirstName,Departmentcode from T_Employee_Details where EmpID=?'; $query=$this->db->query($subQuery,array($Requester)); return $query->result(); } + + function GerRequesterDep($Depcode='') + { + $subQuery='SELECT DepartmentName from T_DepartmentDetails where DEPCode=?'; + $query=$this->db->query($subQuery,array($Depcode)); + + return $query->result(); + + } + function GerCurrencyCodeName($Currencycode='') { - $subQuery='SELECT Currency_Code,FontCode2000 from T_Currency_Details where Currency_Code=?'; + $subQuery='SELECT * from T_Currency_Details where Currency_Code=?'; $query=$this->db->query($subQuery,array($Currencycode)); return $query->result(); } @@ -1075,8 +1085,6 @@ function GetCurrencytype() } //This is get the capital po list for edit - - function getCapitalPurchaseOrderDetails($PONO = '') { @@ -1103,7 +1111,7 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode } - // This Method to get the Capital PO Details for pdf +// This Method to get the Capital PO Details for pdf function GetCapitalPurchaseOrderDetailsForPDF($PONO = '') { @@ -1137,5 +1145,71 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode return $result->result(); + } + + // get domestic capital po list + + + function getDomesticCapitalPurchaseOrderDetails($PONO = '') + { + + $subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName, + Mat.UOM,Quantity,Rate,Req.Status,ROUND((ServiceTax.ServiceTax + ServiceTax.EducessTax + ServiceTax.SecHigherEducessTax + ServiceTax.KrishiKalyantax + ServiceTax.SwachhBharattax),2) as ServiceTaxamount + ,ServiceTax.TotalValue,ServiceTax,EducessTax,ServiceTax.SecHigherEducessTax,ServiceTax.KrishiKalyantax,ServiceTax.SwachhBharattax, + POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,ROUND((POMast.TotalOrderValue),2) as BasicINRValue,POMast.CurrencyType, + + Req.CostCenterCode,Dept.DepartmentName FROM T_PurchaseOrder_LineItem LineItem + join T_PurchaseOrder_Master POMast on POMast.PONO = LineItem.PONO + join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode + join T_Service_Tax ServiceTax on ServiceTax.LineItemNo = LineItem.LineItemNo + join T_Requestion_Master Req on Req.ReqNo = LineItem.ReqNo + join T_Employee_Details emp on Req.Requestedby = emp.EmpID + + join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode where LineItem.PONO =?'; + //print_r($subQuery); + + $query = $this->db->query($subQuery,array($PONO)); + + return $query->result(); + + + } + //get pdf po requistion details + + + function GetPdfRequistionDetails($PONO){ + $this->db->select('LineItem.ReqNo'); + //$this->db->from('T_PurchaseOrder_Master mast'); + $this->db->from('T_PurchaseOrder_LineItem LineItem'); + // $this->db->from('T_Requestion_Master ReqMast','ReqMast.ReqNo=LineItem.ReqNo'); + //$this->db->join('tbl_users tbl','mast.CreatedBy=tbl.userid'); + //$this->db->join('T_Employee_Details re','re.EmpID=ReqMast.Requestedby'); + //$this->db->join('T_DepartmentDetails Dept', 're.Departmentcode = Dept.DEPCode'); + + $this->db->where('LineItem.PONO',$PONO); + $result=$this->db->get(); + //$result->result() + $ReqNo=''; + foreach ($result->result() as $res){ + $ReqNo = $res->ReqNo; + $this->db->select('ReqMast.ReqNo,ReqMast.CostCenterCode,re.FirstName,Dept.DEPCode,Dept.DepartmentName'); + + $this->db->from('T_Requestion_Master ReqMast'); + //$this->db->join('tbl_users tbl','mast.CreatedBy=tbl.userid'); + $this->db->join('T_Employee_Details re','re.EmpID=ReqMast.Requestedby'); + $this->db->join('T_DepartmentDetails Dept', 're.Departmentcode = Dept.DEPCode'); + + $this->db->where('ReqMast.ReqNo',$ReqNo); + $Reqresult=$this->db->get(); + $Details['RequistionNo']= $Reqresult->result()[0]->ReqNo; + $Details['RequestedName']= $Reqresult->result()[0]->FirstName; + $Details['RequestedDept']= $Reqresult->result()[0]->DepartmentName; + $Details['CostCenterCode']= $Reqresult->result()[0]->CostCenterCode; + $ResultArray[]=$Details; + } + $RequistionDetails = $ResultArray; + + return $RequistionDetails; + } } \ No newline at end of file diff --git a/application/third_party/dompdf/lib/fonts/log.htm b/application/third_party/dompdf/lib/fonts/log.htm index bb51b983..e9188d58 100755 --- a/application/third_party/dompdf/lib/fonts/log.htm +++ b/application/third_party/dompdf/lib/fonts/log.htm @@ -1,4 +1,4 @@ -8,192 KB 126.3251 ms
+13,312 KB 151.9060 ms

A PHP Error was encountered

@@ -12,152 +12,8 @@

A PHP Error was encountered

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/table_cell_frame_reflower.cls.php

-

Line Number: 131

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

- -
- -

A PHP Error was encountered

- -

Severity: Warning

-

Message: A non-numeric value encountered

-

Filename: include/page_frame_decorator.cls.php

-

Line Number: 464

+

Message: explode() expects parameter 2 to be string, array given

+

Filename: include/style.cls.php

+

Line Number: 948

\ No newline at end of file diff --git a/application/views/EditservicePurchaseorder.php b/application/views/EditservicePurchaseorder.php index d9cb9a90..5f83219a 100755 --- a/application/views/EditservicePurchaseorder.php +++ b/application/views/EditservicePurchaseorder.php @@ -1764,10 +1764,10 @@ $('.AddService').click(function(){ $('.EditService').click(function(){ - + if( validateEditServiceTax()) { - // alert('inside Add'); + var CostCode = $("#EditCostCenter").val(); var AvilBudget = $('#EditAvlBudAmt').val(); var editMaterialCode = $("#EditMaterialCode").val(); @@ -1799,7 +1799,7 @@ $('.AddService').click(function(){ var TotalTaxValue = calculateEditTaxValue(); - + var tr= document.getElementById(userid); var cellval = tr.cells; @@ -1875,8 +1875,8 @@ function populateValueMainFormForServiceTax() function populateValueMainFormForEditServiceTax() { - var rows = document.getElementById('serviceTax').rows.length; - + var rows = document.getElementById('ServiceTable').rows.length; + var TotServiceTax = 0; var TotEduCess = 0; var TotSecHighTax = 0; @@ -2094,7 +2094,7 @@ function populateValueMainFormForDeleteItem(rowid) var AfterEduCess = $('#EduCess'+rowid).val() == '' ? '0.00' : $('#EduCess'+rowid).val(); var AfterSecHighTax = $('#SecHighTax'+rowid).val() == '' ? '0.00' : $('#SecHighTax'+rowid).val(); var AfterKrishiTax =$('#KrishiTax'+rowid).val() == '' ? '0.00' : $('#KrishiTax'+rowid).val(); - var AfterSwachhTax = $('#SwachhTax'+rowid).val() == '' ? '0.00' : $('#SwachhTax'+rowid).val(); + var AfterSwachhTax = $('#SwachhTax'+rowid).val() == '' ? '0.00' : $('#SwachhTax'+rowid).val(); var TotalVal =$('#TotalOrderValue'+rowid).val() == '' ? '0.00' : $('#TotalOrderValue'+rowid).val(); var Quantity = $('#quantity'+rowid).val() == '' ? '0.00' : $('#quantity'+rowid).val(); @@ -2109,6 +2109,7 @@ function populateValueMainFormForDeleteItem(rowid) TotSecHighTax = parseFloat(TotSecHighTax) - parseFloat(AfterSecHighTax); TotKrishiTax = parseFloat(TotKrishiTax) - parseFloat(AfterKrishiTax); TotSwachhTax = parseFloat(TotSwachhTax) - parseFloat(AfterSwachhTax); + TotSummary = parseFloat(TotBasicAmout) - parseFloat(TotalVal); TotBasicAmout = parseFloat(TotBasicAmout) - parseFloat(BasicVal); diff --git a/application/views/EditservicePurchaseorder.php~ b/application/views/EditservicePurchaseorder.php~ new file mode 100755 index 00000000..5f83219a --- /dev/null +++ b/application/views/EditservicePurchaseorder.php~ @@ -0,0 +1,2312 @@ +FontCode2000; + + } +} + +if(!empty($MaxPODate)) +{ + foreach ($MaxPODate as $date) + { + $MaxPoDate = $date->PODate; + + } +} +if(!empty($POMaster)) +{ + foreach ($POMaster as $Req) + { + + $SupId = $Req->SupplierID; + $SupName = $Req->SupplierName; + $Address = $Req->Address; + $pdt = new DateTime($Req->PODate); + $PODate = $pdt->format('Y-m-d'); + $DeliverOption = $Req->DeliveryOption; + $DeliverSchedule = $Req->DeliverySchedule; + $Ddt = new DateTime($Req->DeliveryDate); + $Deliverydt = $Ddt->format('Y-m-d'); + + $DeliveryAddress =$Req->DeliveryAddress; + $PONOStatus = $Req->StatusCode; + $PONO = $Req->PONO; + $ServiceDescription = $Req->ServiceDescription; + //$PaymentTerms=$Req->PaymentTerms; + $PayableAT=$Req->PayableAT; + $PaymentDays=$Req->PaymentDays; + $WrkStatus=$Req->ServiceWorkStatus; + $StatusName=$Req->StatusName; + } +} + + +if(!empty($RequistionDetails)) +{ + + foreach ($RequistionDetails as $ReqDet) + { + // $Reqon=$ReqDet->ReqDate; + $Reqonn=new DateTime($ReqDet->ReqDate); + $Reqon=$Reqonn->format('Y-m-d'); + $Requestedby=$ReqDet->Requestedby; + $RequesterName=$ReqDet->FirstName; + //$Status=$ReqDet->Status; + } +} + +//echo "$WrkStatus"; + +if(!empty($AvlBudAmt)) +{ + + $AvlAmount = $AvlBudAmt; + +} + + +foreach ($PaymentTerms as $TER) +{ + $Terms=$TER->PaymentTerms; +} + + + +// foreach ($POSTATUS as $PST ) +// { +// $POStatus=$PST->StatusName; +// } +?> + + + + + + +
+ 'form-label-left ServicePO ','name' => 'ServicePO','id' => 'ServicePO'); + + echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?> + +
+
+
+

Siddharth Industries - Edit Service Purchase Order -

+
+
+
+
+
+ + + + 'Selected Requisition Numbers'); + if(!empty($ReqList)) + { + foreach ($ReqList as $SID): + + $options[$SID->ReqNo] = $SID->ReqNo ; + endforeach; + } + echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' , 'required="true"'); + + ?> +
+
+ +
+ 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;'); + echo form_input($data); + ?> +
+
+ +
+
+
+
+ + 'Select Supplier'); + //print_r( $options); + + if(!empty($Suplist)) + { + foreach ($Suplist as $SID): + + + $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName; + + endforeach; + } + + echo form_dropdown('drpSupplier', $options,set_value('drpSupplier',$SupId ),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2'); + + ?> + +
+

+ +
+ 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true','rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> +
+
+
+
+
+ +
+ + 'POType','value' => set_value('POType',SERVICE),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ +
+ 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true', 'rows' => '3', 'cols' => '40'); + echo Form_textarea($data); + ?> + +
+
+
+
+
+ Select Delivery By
+ + + 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?> + + + + 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?> + + + +
+
+ + $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'); + + ?> +
+

+ +
+ 'Deliverydt','value' => set_value('Deliverydt',$Deliverydt),'id'=>'Deliverydt', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;'); + echo form_input($data); + ?> +
+
+ +
+ +
+
+ Payment Details + +
+ Payable Terms + +
+ +
+ Payable AT + + 'PayableAT','value' => set_value('PayableAT',$PayableAT),'id'=>'PayableAT', 'class' => 'form-control' ,'required' => 'true'); + echo form_input($data); + ?> + +
+ +
+ Payment Date
+ + + "Payment", "id"=>"Before", "value"=>"0", 'checked'=>set_radio('Payment', '0', TRUE))); ?>     + + "Payment", "id"=>"After", "value"=>"1", 'checked'=>set_radio('Payment', '1', FALSE))); ?> + + + +
+
+
+
+
+
+
+ + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ServiceTax; + $TotalEducessTax = $TotalEducessTax + $record->EducessTax; + $TotalSecHigherEducessTax = $TotalSecHigherEducessTax + $record->SecHigherEducessTax; + $TotalKrishiKalyantax = $TotalKrishiKalyantax + $record->KrishiKalyantax; + $TotalSwachhBharattax = $TotalSwachhBharattax + $record->SwachhBharattax; + $TotalSummary = $TotalSummary + $record->TotalValue; + + + $TotalBasicAmount = $TotalBasicAmount + $record->BasicValue; + + } + ?> + + +
SNoRequisition NoItem NameQuantityUOMRateBasic AmountTax AmountTotal Order AmountAction
ReqNo ?>MaterialName ?>Quantity ?>UOM ?>Rate ?>BasicValue ?>Taxamount ?>TotalValue ?>     + +    
+
+ + +
+
+
+ + 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount',number_format($TotalBasicAmount,2)),'id'=>'txtTotBasicAmount', 'class' => 'form-control num' ,'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'txtTotalServiceTax','value' => set_value('txtTotalServiceTax',$TotalServiceTax),'id'=>'txtTotalServiceTax', 'class' => 'form-control num' ,'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'txtTotalEducess','value' => set_value('txtTotalEducess',$TotalEducessTax),'id'=>'txtTotalEducess', 'class' => 'form-control num' ,'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+ + 'txtTotHigherEdu','value' => set_value('txtTotHigherEdu',$TotalSecHigherEducessTax),'id'=>'txtTotHigherEdu', 'class' => 'form-control num' ,'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'txtTotalKrishiKalyan','value' => set_value('txtTotalKrishiKalyan',$TotalKrishiKalyantax),'id'=>'txtTotalKrishiKalyan', 'class' => 'form-control num' ,'readonly' => 'true'); + echo form_input($data); + ?> +
+
+ + 'txtTotSwachhBharat','value' => set_value('txtTotSwachhBharat',$TotalSwachhBharattax),'id'=>'txtTotSwachhBharat', 'class' => 'form-control num' ,'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+
+
+
+ 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary',$TotalSummary),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control num' ,'readonly' => 'true'); + echo form_input($data); + ?> + +
+
+
+
+ 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '10', 'cols' => '40' ); + echo form_textarea($data); + ?> +
+
+
+

+
+ + + + +   Save +   Submit + + + +

+
+
+
+

+
+
+ Request On + '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'); + 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); + ?> +

+
+
+
+ +
+
+
+
+ + + diff --git a/application/views/POlist.php b/application/views/POlist.php index 0fe8784f..5a59b2d7 100755 --- a/application/views/POlist.php +++ b/application/views/POlist.php @@ -71,10 +71,10 @@ if($statusCode == PO_DRAFT) {?> -     +     -             +             diff --git a/application/views/POlist.php~ b/application/views/POlist.php~ new file mode 100755 index 00000000..5a59b2d7 --- /dev/null +++ b/application/views/POlist.php~ @@ -0,0 +1,113 @@ + + + +
+ + + +
+
+
+
+
+

Siddharth Industries - Purchase Order List

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + StatusCode; + + if($statusCode == PO_DRAFT) + {?> + + + + + + + + +
#PONO#PO TypePO DateSupplier NameTotal Order ValuePO StatusDelivery OptionDelivery DateDelivery ScheduleAction
PONO ?>ReqType ?>PODate); + $PODate = $Pdt->format('d-m-Y'); + echo $PODate + ?>SupplierName ?>TotalOrderValue ?>StatusName ?>DeliveryOption == 1){ + $option = "By Schedule" ; } + echo $option ?>DeliveryDate); + $Deliverydt = $Ddt->format('d-m-Y'); + + if($record->DeliveryOption == 1){$Deliverydt = '';} + echo $Deliverydt ?>DeliverySchedule ?>                
+
+ +
+ + +
+ +
+ +
+ +
+ + \ No newline at end of file diff --git a/application/views/alterpurchaseorder.php b/application/views/alterpurchaseorder.php index 5c409885..0e11b813 100755 --- a/application/views/alterpurchaseorder.php +++ b/application/views/alterpurchaseorder.php @@ -2081,8 +2081,8 @@ function populateValueMainFormForDeleteItem(rowid)
-
- Add Line Item +
@@ -2325,7 +2325,7 @@ function populateValueMainFormForDeleteItem(rowid) -
+

@@ -2433,8 +2433,8 @@ function populateValueMainFormForDeleteItem(rowid)

diff --git a/application/views/alterpurchaseorder.php~ b/application/views/alterpurchaseorder.php~ index d4b0b791..0e11b813 100755 --- a/application/views/alterpurchaseorder.php~ +++ b/application/views/alterpurchaseorder.php~ @@ -1975,6 +1975,30 @@ function populateValueMainFormForDeleteItem(rowid)
+ +
+
+ Payment Details + +
+ Payable Terms + 'Select Payment method'); + //print_r( $options); + + if(!empty($payment)) + { + foreach ($payment as $payment): + + + $options1[$rl->ConfigValue] = $rl->ConfigValue.' '.' - '.' '.$rl->ConfigValue; + + endforeach; + } + + echo form_dropdown('PaymentMethod', $options1,set_value('PaymentMethod'),'id="PaymentMethod"' ,'class="form-control"'); + + ?> +
+ +
+ Payable AT + + 'PayableAT','value' => set_value('PayableAT'),'id'=>'PayableAT', 'class' => 'form-control' ,'required' => 'true'); + echo form_input($data); + ?> + +
+ + +
+ Payment Date
+ + + "Payment", "id"=>"Before", "value"=>"0", 'checked'=>set_radio('Payment', '0', TRUE))); ?>     + + "Payment", "id"=>"After", "value"=>"1", 'checked'=>set_radio('Payment', '1', FALSE))); ?> + + + +
+ +
+
+
Add Line Item @@ -2735,7 +2813,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
-
+
-
+
-
+
+ +
+ + 'Frequency','value' => set_value('Frequency'),'id'=>'Frequency', 'class' => 'form-control'); + echo form_input($data); + ?> +
+
+
+
+
-
+
-
+
; + + $.each(paymentList, function(idx1, obj1) { + + + if(obj1.ConfigValue == supPaymentTerms ) + { + $("#PaymentMethod").append( $('').val(obj1.ConfigValue).html(obj1.ConfigValue)); + $("#PayableAT").val(supPaymentAT); + + + + + } + + + }); + + $.each(paymentList, function(idx, obj) { + + + if(obj.ConfigValue != supPaymentTerms ) + { + $("#PaymentMethod").append( $('').val(obj.ConfigValue).html(obj.ConfigValue)); + $("#PayableAT").val(supPaymentAT); + + + + } + + + }); } else @@ -5358,7 +5504,7 @@ function populateValueMainFormForDeleteItem(rowid) var uom = $("#ServiceUOM").val(); var quantity = $("#ServiceQuantity").val(); var itemRate = $("#ServiceRate").val(); - + var AfterServiceTax = $("#AfterServiceTax").val(); @@ -5378,10 +5524,10 @@ function populateValueMainFormForDeleteItem(rowid) var basicval = $("#ServiceBasAmt").val(); - - + var Frequency =$("#Frequency").val(); + var TotalTaxValue = calculateTaxValue(); - + $('#ServiceMaterialCode option[value='+materialCode+']').remove(); SelectedMaterialCode[CollIndex] = materialCode; @@ -5416,6 +5562,7 @@ function populateValueMainFormForDeleteItem(rowid) addHidden(theForm,"KrishiTax"+temp,AfterKrishiTax); addHidden(theForm,"SwachhTax"+temp,AfterSwachhTax); addHidden(theForm,"TotalOrderValue"+temp,TotalOrderValue); + addHidden(theForm,"Frequency"+temp,Frequency); $('#txtRowCount').val(temp); @@ -5560,6 +5707,7 @@ function populateValueMainFormForDeleteItem(rowid) $('#EditAfterKrishiTax').val($('#KrishiTax'+userid).val()); $('#EditAfterSwachhTax').val($('#SwachhTax'+userid).val()); $('#EditTotalOrderValue').val(cellval[8].innerHTML); + @@ -5910,7 +6058,17 @@ $('#content').loader('hide'); var TextTotalOrderValueSummaryService = $('#txtTotalOrderValueSummaryService').val(); var TextSpcialInstruction = $('#txtSpcialInstruction').val(); var TextStatus = stat; - + var PaymentMethod = $('#PaymentMethod').val(); + var PayableAT = $('#PayableAT').val(); + var paymentDateOptions =''; + if($("input:radio[name='Payment']:checked").val=='0'){ + paymentDateOptions="Before"; + } + else{ + paymentDateOptions="After"; + } + var workStatus=$('#workstatusValue').val(); + if(validate()) { @@ -5929,7 +6087,7 @@ $('#content').loader('hide'); { $('#content').loader('show'); $.ajax({ - data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextStatus="+TextStatus, + data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeletedRowCount="+TextDeletedRowCount+"&TextTotalOrderValueSummaryService="+TextTotalOrderValueSummaryService+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextStatus="+TextStatus+"&PaymentMethod="+PaymentMethod+"&PayableAT="+PayableAT+"&paymentDateOptions="+paymentDateOptions+"&workStatus="+workStatus, type:"POST", url:"emergencypurchaseorder/addNewServicePurchaseOrder", success:function(data) { @@ -5984,7 +6142,15 @@ $('#content').loader('hide'); var txtTotalOrderValueSummary = $('#txtTotalOrderValueSummary').val(); var TextSpcialInstruction = $('#txtSpcialInstruction').val(); var TextStatus = stat; - + var PaymentMethod = $('#PaymentMethod').val(); + var PayableAT = $('#PayableAT').val(); + var paymentDateOptions =''; + if($("input:radio[name='Payment']:checked").val=='0'){ + paymentDateOptions="Before"; + } + else{ + paymentDateOptions="After"; + } if(validate()) { if(document.getElementById('serviceTax').rows.length < 2) @@ -6002,7 +6168,7 @@ $('#content').loader('hide'); { $('#content').loader('show'); $.ajax({ - data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeletedRowCount="+TextDeletedRowCount+"&txtTotalOrderValueSummary="+txtTotalOrderValueSummary+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextStatus="+TextStatus, + data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeletedRowCount="+TextDeletedRowCount+"&txtTotalOrderValueSummary="+txtTotalOrderValueSummary+"&TextSpcialInstruction="+TextSpcialInstruction+"&TextStatus="+TextStatus+"&PaymentMethod="+PaymentMethod+"&PayableAT="+PayableAT+"&paymentDateOptions="+paymentDateOptions, type:"POST", url:"emergencypurchaseorder/addNewRevenuePurchaseOrder", success:function(data) { diff --git a/application/views/capitalpopdf.php b/application/views/capitalpopdf.php index 53b3246f..9271f251 100755 --- a/application/views/capitalpopdf.php +++ b/application/views/capitalpopdf.php @@ -1,7 +1,6 @@ FirstName; - $RequestedByDept=$requestedBy[0]->DepartmentName ; + $PONO = ''; $postatus =''; @@ -14,6 +13,9 @@ $DeliveryDate =''; $ServiceDescription = ''; $index=0; + $PaymentDays=''; + $PayableAT=''; + $PaymentTerms=''; if(!empty($CompanyDetails)) { foreach ($CompanyDetails as $CO) @@ -44,10 +46,30 @@ $CostCenterCode=$PO->CostCenterCode; $PaymentTerms=$PO->PaymentTerms; + $PaymentDays=$PO->PaymentDays; + $PayableAT=$PO->PaymentTerms; } } + + $currencyCode =''; + $currencyName=''; + if(!empty($CurrencySymbol)) + { + foreach ($CurrencySymbol as $Curr) + { + + $currencyCode = $Curr->FontCode2000; + $currencyName = $Curr->Currency_Code; + + + } + + } + + + ?> @@ -60,22 +82,38 @@
-
-

CAPITAL PURCHASE ORDER

-
-Purchase Order Date : -
- -

-
.

- - - - - - -
Vendor Address
.
Delivery To
.
Delivery Date :
-
+

CAPITAL PURCHASE ORDER

PO NO:
+
+ This is Draft Version For Internal Purpose
'; + } + + ?> + +
+ + + +


+

Payment Terms :
Payable At:
Payment Days:
Delivery Date :

+ + + + + + +
+ Vendor Address :

+
+ Delivery To :
+
+ +
+
@@ -83,9 +121,9 @@ Purchase Order Date : - + - +

-
-

Sub Total Amount(INR):

-
+ +

Total Order Amount in :

+
# Item and Description QtyRate per unitRate Per Unit in Total Amount(INR)Total Amount in
@@ -138,16 +176,78 @@ Purchase Order Date :
Total Amount In Words:
- - - - - - - -
Requition Number :
Requested by :
Requisted Department :
Cost center :
-
Payment Terms *
-
+ + + Requistion Number + Requested by + Requested Department + Cost center + + + + + + + + + + + + + + + +
+
+ +
+
+

+

Service Description:

+ + + + + + + + + + +
ReleasedBy:ReleasedOn:
FirstName;?>ReleasedOn;?>
+ + + + + + + + + +
Till Release State:
+ +
\ No newline at end of file diff --git a/application/views/capitalpopdf.php~ b/application/views/capitalpopdf.php~ index 53b3246f..9271f251 100755 --- a/application/views/capitalpopdf.php~ +++ b/application/views/capitalpopdf.php~ @@ -1,7 +1,6 @@ FirstName; - $RequestedByDept=$requestedBy[0]->DepartmentName ; + $PONO = ''; $postatus =''; @@ -14,6 +13,9 @@ $DeliveryDate =''; $ServiceDescription = ''; $index=0; + $PaymentDays=''; + $PayableAT=''; + $PaymentTerms=''; if(!empty($CompanyDetails)) { foreach ($CompanyDetails as $CO) @@ -44,10 +46,30 @@ $CostCenterCode=$PO->CostCenterCode; $PaymentTerms=$PO->PaymentTerms; + $PaymentDays=$PO->PaymentDays; + $PayableAT=$PO->PaymentTerms; } } + + $currencyCode =''; + $currencyName=''; + if(!empty($CurrencySymbol)) + { + foreach ($CurrencySymbol as $Curr) + { + + $currencyCode = $Curr->FontCode2000; + $currencyName = $Curr->Currency_Code; + + + } + + } + + + ?> @@ -60,22 +82,38 @@
-
-

CAPITAL PURCHASE ORDER

-
-Purchase Order Date : -
- -

-
.

- - - - - - -
Vendor Address
.
Delivery To
.
Delivery Date :
-
+

CAPITAL PURCHASE ORDER

PO NO:
+
+ This is Draft Version For Internal Purpose
'; + } + + ?> + +
+ + + +


+

Payment Terms :
Payable At:
Payment Days:
Delivery Date :

+ + + + + + +
+ Vendor Address :

+
+ Delivery To :
+
+ +
+
@@ -83,9 +121,9 @@ Purchase Order Date : - + - +

-
-

Sub Total Amount(INR):

-
+ +

Total Order Amount in :

+
# Item and Description QtyRate per unitRate Per Unit in Total Amount(INR)Total Amount in
@@ -138,16 +176,78 @@ Purchase Order Date :
Total Amount In Words:
- - - - - - - -
Requition Number :
Requested by :
Requisted Department :
Cost center :
-
Payment Terms *
-
+ + + Requistion Number + Requested by + Requested Department + Cost center + + + + + + + + + + + + + + + +
+
+ +
+
+

+

Service Description:

+ + + + + + + + + + +
ReleasedBy:ReleasedOn:
FirstName;?>ReleasedOn;?>
+ + + + + + + + + +
Till Release State:
+ +
\ No newline at end of file diff --git a/application/views/capitalpurchaseorder.php b/application/views/capitalpurchaseorder.php index 3e684eaa..74670306 100755 --- a/application/views/capitalpurchaseorder.php +++ b/application/views/capitalpurchaseorder.php @@ -1,3424 +1,3424 @@ -format('Y-m-d'); -$MaxPoDate = ''; -$AvlAmount = 0; -$paymentDate=''; -$paymentCheckDays='Before'; -$paymentCheckDays1='After'; -if(!empty($MaxPODate)) -{ -foreach ($MaxPODate as $date) -{ -$MaxPoDate = $date->PODate; -} -} -if(!empty($CompanyDetails)) -{ -foreach ($CompanyDetails as $Req) -{ -$CompanyAddress = $Req->Address; -} -} -if(!empty($AvlBudAmt)) -{ + format('Y-m-d'); + $MaxPoDate = ''; + $AvlAmount = 0; + $paymentDate=''; + $paymentCheckDays='Before'; + $paymentCheckDays1='After'; + if(!empty($MaxPODate)) + { + foreach ($MaxPODate as $date) + { + $MaxPoDate = $date->PODate; + } + } + if(!empty($CompanyDetails)) + { + foreach ($CompanyDetails as $Req) + { + $CompanyAddress = $Req->Address; + } + } + if(!empty($AvlBudAmt)) + { -$AvlAmount = $AvlBudAmt; + $AvlAmount = $AvlBudAmt; -} - -?> - - - -
- 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO'); - -echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?> - - -
-
-
-
- -

Siddharth Industries - Capital Purchase Order

- - -
-
-
-
-
-
- - 'Selected Requisition Numbers'); - if(!empty($ReqList)) - { - foreach ($ReqList as $SID): - - // print_r($SID->ReqNo); - $options[$SID->ReqNo] = $SID->ReqNo ."-". $SID->ReqBy; - $ReqType = $SID->ReqType; - endforeach; - } - echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' , 'required="true"'); - - ?> -
-
- -
- - - -'Select Currency Type '); - //print_r( $options); - - if(!empty($Currency)) - { - - - foreach ($Currency as $Cur): - - $options[$Cur->Currency_Code] = $Cur->Currency_Code.' '.' - '.' '.$Cur->Country_and_Currency; - - endforeach; - } - - echo form_dropdown('currencytype', $options,set_value('currencytype'),'id="currencytype"','class="form-control select2"' , 'required="true"'); - - ?> - -
-
- -
-
-
-
- - - 'Select Supplier'); - //print_r( $options); - - if(!empty($Suplist)) - { - foreach ($Suplist as $SID): - - - $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName; - - endforeach; - } - - echo form_dropdown('drpSupplier', $options,set_value('drpSupplier'),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2'); - - ?> - -
-

- -
- 'SupAddress','value' => set_value('SupAddress'),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true','rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
- -
-
-
- -
- - 'POType','value' => set_value('POType',CAPITAL),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true'); - echo form_input($data); - ?> -
-
-
- -
- 'DeliveryAddr','value' => set_value('DeliveryAddr',$CompanyAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true', 'rows' => '3', 'cols' => '40'); - echo Form_textarea($data); - ?> -
-
- -
-
-
- - Select Delivery By
- - - "DateRange", "id"=>"Date", "value"=>"0", 'checked'=>'checked')); ?>     - - "DateRange", "id"=>"Schedule", "value"=>"1", 'checked'=>set_radio('DateRange', '1', FALSE))); ?> - - - -
- - -

- - - 'Deliverydt','value' => set_value('Deliverydt',$CurrentDate),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true'); - echo form_input($data); - ?> - -
- -
- -
-
- -
-
- -
- 'Exchangerateon','value' => set_value('Exchangerateon',$CurrentDate),'id'=>'Exchangerateon', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); - echo form_input($data); - ?> -
-
-
- -
- 'ExchangeRt','value' => set_value('ExchangeRt'),'id'=>'ExchangeRt', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);'); - echo form_input($data); - ?> -
- -
-
- -
- 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); - echo form_input($data); - ?> -
-
-
-
-
-Payment Details - -
-Payable Terms - - - - 'Select Payment method'); - //print_r( $options); - - if(!empty($payment)) - { - foreach ($payment as $payment): - - - $options1[$rl->ConfigValue] = $rl->ConfigValue.' '.' - '.' '.$rl->ConfigValue; - - endforeach; - } - - echo form_dropdown('PaymentMethod', $options1,set_value('PaymentMethod'),'id="PaymentMethod"' ,'class="form-control"'); - - ?> - - - - -
- -
-Payable AT - 'PayableAT','value' => set_value('PayableAT'),'id'=>'PayableAT', 'class' => 'form-control' ,'required' => 'true'); -echo form_input($data); -?> - -
- -
-Payment Date
- + } - - "Payment", "id"=>"Before", "value"=>"Before", 'checked'=>set_radio('Payment', 'Before', TRUE))); ?>     - - "Payment", "id"=>"After", "value"=>"After", 'checked'=>set_radio('Payment', 'After', FALSE))); ?> + ?> + - - -
+ +
+ 'form-label-left CapitalPO ','name' => 'CapitalPO','id' => 'ImportPO'); + + echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?> -
- - - - - + + - + + diff --git a/application/views/capitalpurchaseorder.php~ b/application/views/capitalpurchaseorder.php~ index ba7b8f1b..74670306 100755 --- a/application/views/capitalpurchaseorder.php~ +++ b/application/views/capitalpurchaseorder.php~ @@ -5,8 +5,8 @@ $MaxPoDate = ''; $AvlAmount = 0; $paymentDate=''; - $paymentCheckDays='Before'; -$paymentCheckDays1='After'; + $paymentCheckDays='Before'; + $paymentCheckDays1='After'; if(!empty($MaxPODate)) { foreach ($MaxPODate as $date) @@ -82,6 +82,7 @@ $paymentCheckDays1='After'; }); }); +document.getElementById("Date").checked = true;
- +
@@ -215,7 +216,7 @@ $paymentCheckDays1='After'; Select Delivery By
- "DateRange", "id"=>"Date", "value"=>"0", 'checked'=>set_radio('DateRange', '0', TRUE))); ?>     + "DateRange", "id"=>"Date", "value"=>"0", 'checked'=>'checked')); ?>     "DateRange", "id"=>"Schedule", "value"=>"1", 'checked'=>set_radio('DateRange', '1', FALSE))); ?> @@ -326,12 +327,11 @@ $paymentCheckDays1='After';
Payment Date
+ + + "Payment", "id"=>"Before", "value"=>"Before", 'checked'=>set_radio('Payment', 'Before', TRUE))); ?>     - - 'Payment', 'value' => 'Before', 'checked' => ('Before'==$paymentCheckDays) ? TRUE : FALSE, 'id' => 'Before')); ?> - - - 'Payment', 'value' => 'After', 'checked' => ('After'==$paymentCheckDays1) ? TRUE : FALSE, 'id' => 'After')); ?> + "Payment", "id"=>"After", "value"=>"After", 'checked'=>set_radio('Payment', 'After', FALSE))); ?> @@ -491,7 +491,7 @@ $paymentCheckDays1='After';
- +
'CPRate','value' => set_value('CPRate'),'id'=>'CPRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'Ratechange();' ); @@ -563,7 +563,7 @@ $paymentCheckDays1='After';
-
+

@@ -1032,7 +1032,7 @@ $paymentCheckDays1='After';
- +
'EditCPRate','value' => set_value('EditCPRate'),'id'=>'EditCPRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'EditRatechange();' ); @@ -1104,7 +1104,7 @@ $paymentCheckDays1='After';
-
+

@@ -1523,7 +1523,7 @@ $paymentCheckDays1='After';
-
+
@@ -1786,6 +1786,17 @@ $paymentCheckDays1='After'; supPaymentTerms=obj.PaymentTerms; supPaymentAT=obj.PayableAT; subPaymentDate=obj.PaymentDays; + + if (subPaymentDate=="After") + { + //alert(); + document.getElementById("After").checked = true; + + } + else{ + document.getElementById("Before").checked = true; + + } } @@ -1799,9 +1810,9 @@ $paymentCheckDays1='After'; $.each(paymentList, function(idx1, obj1) { - if(obj1.PaymentTerms == supPaymentTerms ) + if(obj1.ConfigValue == supPaymentTerms ) { - $("#PaymentMethod").append( $('').val(obj1.PaymentTerms).html(obj1.PaymentTerms)); + $("#PaymentMethod").append( $('').val(obj1.ConfigValue).html(obj1.ConfigValue)); $("#PayableAT").val(supPaymentAT); @@ -1815,9 +1826,9 @@ $paymentCheckDays1='After'; $.each(paymentList, function(idx, obj) { - if(obj.PaymentTerms != supPaymentTerms ) + if(obj.ConfigValue != supPaymentTerms ) { - $("#PaymentMethod").append( $('').val(obj.PaymentTerms).html(obj.PaymentTerms)); + $("#PaymentMethod").append( $('').val(obj.ConfigValue).html(obj.ConfigValue)); $("#PayableAT").val(supPaymentAT); @@ -2607,7 +2618,7 @@ $paymentCheckDays1='After'; var exchangeRate = $("#ExchangeRtModal").val(); var quantity = $("#CPQuantity").val(); var convertRate = $("#CPRate").val(); - var itemRate = parseFloat(convertRate * exchangeRate).toFixed(2); + var itemRate = parseFloat(convertRate).toFixed(2); var basicval = parseFloat($("#CPTotalAmount").val()).toFixed(2); var AfterServiceTax = $("#AfterServiceTax").val(); @@ -3714,7 +3725,7 @@ function clearAfterAddLineItemAdd(){ var exchangeRate = $("#EditExchangeRtModal").val(); var quantity = $("#EditCPQuantity").val(); var convertRate = $("#EditCPRate").val(); - var itemRate = convertRate * exchangeRate; + var itemRate = convertRate; var basicval = $("#EditCPTotalAmount").val(); var AfterServiceTax = $("#EditAfterServiceTax").val(); var AfterEduCess = $("#EditAfterEduCess").val(); @@ -4106,7 +4117,7 @@ function SetCapitalPo() if(capitalType1 == 0) { capitalType='International'; - $('#DomesticNOT').modal('hide'); + $('#DomesticNOT').modal('hide'); } else @@ -4122,6 +4133,9 @@ function SetCapitalPo() $('#hideModalExchange').hide(); $('#hideModalExchangeEdit').hide(); $('#ExchangeRtModal').val('1'); + $('#HideImportTaxTotal').hide(); + $('#ModalImportTaxHide').hide(); + $('#EditModalImportTaxHide').hide(); @@ -4136,4 +4150,4 @@ function SetCapitalPo() - \ No newline at end of file + diff --git a/application/views/editCapitalPo.php b/application/views/editCapitalPo.php index e59677fb..d91007ff 100755 --- a/application/views/editCapitalPo.php +++ b/application/views/editCapitalPo.php @@ -150,11 +150,16 @@ window.onload = function() document.getElementById('ExchangeRateOnDiv').style.display = 'none'; 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('ExchangeRateModalEditDiv').style.display = 'none'; - + document.getElementById('ExchangeRateDiv').style.display = 'none'; + document.getElementById('currencyTypeDiv').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'; + + + capitalType='Domestic'; @@ -548,23 +553,15 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; - - + + + + + + - - - - - - - - - - - - @@ -605,6 +602,23 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; + + + + + + + + + + + + + + + + + @@ -629,7 +643,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; $TotalSummary = $TotalSummary+$record->ServiceTaxamount; $TotalBasicAmount = $TotalBasicAmount+$record->BasicValue; $ServiceDescription = $ServiceDescription; - + if($CapitalRange=='0'){ $TotalLanding = $TotalLanding + $record->AfterLandingCharge; $tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge; $totcustom = $totcustom + $record->AfterCustomDuty; @@ -646,6 +660,10 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; $totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty; $ExchangeRate=$record->ExchangeRate; + + } + + // $totorder=$totorder+$record->TotalOrderValue; $totalCapitalOrder = $totalCapitalOrder+$record->BasicValue; @@ -857,7 +875,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
-
+

@@ -1395,7 +1413,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
-
+

@@ -1804,7 +1822,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
-
+
@@ -1979,9 +1997,12 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; -   Save -   Submit - + +   Save +   Submit + + +

@@ -2885,7 +2906,7 @@ var myArray = ; var exchangeRate = $("#ExchangeRtModal").val(); var quantity = $("#CPQuantity").val(); var convertRate = $("#CPRate").val(); - var itemRate = parseFloat(convertRate * exchangeRate).toFixed(2); + var itemRate = parseFloat(convertRate).toFixed(2); var basicval = parseFloat($("#CPTotalAmount").val()).toFixed(2); var AfterServiceTax = $("#AfterServiceTax").val(); var AfterEduCess = $("#AfterEduCess").val(); @@ -4057,7 +4078,7 @@ function clearAfterAddLineItemAdd(){ var exchangeRate = $("#EditExchangeRtModal").val(); var quantity = $("#EditCPQuantity").val(); var convertRate = $("#EditCPRate").val(); - var itemRate = convertRate * exchangeRate; + var itemRate = convertRate; var basicval = $("#EditCPTotalAmount").val(); var AfterServiceTax = $("#EditAfterServiceTax").val(); var AfterEduCess = $("#EditAfterEduCess").val(); diff --git a/application/views/editCapitalPo.php~ b/application/views/editCapitalPo.php~ index 7e8a06ef..d91007ff 100755 --- a/application/views/editCapitalPo.php~ +++ b/application/views/editCapitalPo.php~ @@ -150,11 +150,16 @@ window.onload = function() document.getElementById('ExchangeRateOnDiv').style.display = 'none'; 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('ExchangeRateModalEditDiv').style.display = 'none'; - + document.getElementById('ExchangeRateDiv').style.display = 'none'; + document.getElementById('currencyTypeDiv').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'; + + + capitalType='Domestic'; @@ -429,8 +434,8 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; foreach ($Payment as $rl): - if($PaymentTerms==$rl->PaymentTerms){ - $options6[$rl->PaymentTerms] = $rl->PaymentTerms; + if($PaymentTerms==$rl->ConfigValue){ + $options6[$rl->ConfigValue] = $rl->ConfigValue; } @@ -443,8 +448,8 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; foreach ($Payment as $rl2): - if($PaymentTerms!=$rl2->PaymentTerms){ - $options6[$rl2->PaymentTerms] = $rl2->PaymentTerms; + if($PaymentTerms!=$rl2->ConfigValue){ + $options6[$rl2->ConfigValue] = $rl2->ConfigValue; } endforeach; @@ -548,23 +553,15 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; - - + + + + + + - - - - - - - - - - - - @@ -605,6 +602,23 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; + + + + + + + + + + + + + + + + + @@ -629,7 +643,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; $TotalSummary = $TotalSummary+$record->ServiceTaxamount; $TotalBasicAmount = $TotalBasicAmount+$record->BasicValue; $ServiceDescription = $ServiceDescription; - + if($CapitalRange=='0'){ $TotalLanding = $TotalLanding + $record->AfterLandingCharge; $tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge; $totcustom = $totcustom + $record->AfterCustomDuty; @@ -646,6 +660,10 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; $totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty; $ExchangeRate=$record->ExchangeRate; + + } + + // $totorder=$totorder+$record->TotalOrderValue; $totalCapitalOrder = $totalCapitalOrder+$record->BasicValue; @@ -857,7 +875,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
-
+

@@ -1395,7 +1413,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
-
+

@@ -1804,7 +1822,7 @@ document.getElementById('currencyTypeDiv').style.display = 'block';
-
+
@@ -1979,9 +1997,12 @@ document.getElementById('currencyTypeDiv').style.display = 'block'; -   Save -   Submit - + +   Save +   Submit + + +

@@ -2081,9 +2102,9 @@ var myArray = ; $.each(paymentList, function(idx1, obj1) { - if(obj1.PaymentTerms == supPaymentTerms ) + if(obj1.ConfigValue == supPaymentTerms ) { - $("#PaymentMethod").append( $('').val(obj1.PaymentTerms).html(obj1.PaymentTerms)); + $("#PaymentMethod").append( $('').val(obj1.ConfigValue).html(obj1.ConfigValue)); $("#PayableAT").val(supPaymentAT); @@ -2885,7 +2906,7 @@ var myArray = ; var exchangeRate = $("#ExchangeRtModal").val(); var quantity = $("#CPQuantity").val(); var convertRate = $("#CPRate").val(); - var itemRate = parseFloat(convertRate * exchangeRate).toFixed(2); + var itemRate = parseFloat(convertRate).toFixed(2); var basicval = parseFloat($("#CPTotalAmount").val()).toFixed(2); var AfterServiceTax = $("#AfterServiceTax").val(); var AfterEduCess = $("#AfterEduCess").val(); @@ -4057,7 +4078,7 @@ function clearAfterAddLineItemAdd(){ var exchangeRate = $("#EditExchangeRtModal").val(); var quantity = $("#EditCPQuantity").val(); var convertRate = $("#EditCPRate").val(); - var itemRate = convertRate * exchangeRate; + var itemRate = convertRate; var basicval = $("#EditCPTotalAmount").val(); var AfterServiceTax = $("#EditAfterServiceTax").val(); var AfterEduCess = $("#EditAfterEduCess").val(); @@ -4454,4 +4475,4 @@ PaymentDate=$('#After').val(); }); - \ No newline at end of file + diff --git a/application/views/issueStoreRequistion.php b/application/views/issueStoreRequistion.php old mode 100644 new mode 100755 diff --git a/application/views/revenuepopdf.php b/application/views/revenuepopdf.php index c6dfc273..f3920316 100755 --- a/application/views/revenuepopdf.php +++ b/application/views/revenuepopdf.php @@ -8,9 +8,11 @@ $DeliveryAddress = ''; $Podt = ''; $DeliveryDate =''; - $PaymentTerms=''; - + $postatus=''; $ServiceDescription = ''; + $PaymentTerms = ''; + $PaymentDays=''; + $PayableAT=''; if(!empty($CompanyDetails)) { foreach ($CompanyDetails as $CO) @@ -19,7 +21,7 @@ $CompanyAddress = $CO->Address; } -} + } if(!empty($POItem)) { foreach ($POItem as $PO) @@ -28,91 +30,85 @@ $SuplierName = $PO->SupplierName; $SuplierAddress = $PO->Address; $DeliveryAddress = $PO->DeliveryAddress; - + $postatus= $PO->Status; $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); $Podt = $dt->format('d-m-Y'); $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); $DeliveryDate = $dtDe->format('d-m-Y'); $ServiceDescription =$PO->ServiceDescription; - $PaymentTerms=$PO->PaymentTerms; + $PaymentTerms = $PO->PaymentTerms; + $PaymentDays=$PO->PaymentDays; + $PayableAT=$PO->PayableAT; } } + $currencyName='INR'; + $currencyCode =''; + if(!empty($CurrencySymbol)) + { + foreach ($CurrencySymbol as $Curr) + { + + $currencyCode = $Curr->FontCode2000; + //$currencyName = $currencyName; + + } + } - if(!empty($Requestername)) - - { - foreach ($Requestername as $Reqname) - { - $ReqBy=$Reqname->FirstName; - //$ReqDep=$Reqname-> - - } - } - - $CurrencyCode=''; - $CurrencyName=''; - - if(!empty($Currencytype)) - { - foreach ($Currencytype as $CURRE) - { - //$CurrencyCode=$CURRE->Currency_Code; - $CurrencyName=$CURRE->FontCode2000; - } - - } - $DEPNAME=''; - - if(!empty($DEPCODE)) - { - foreach ($DEPCODE as $DEP) - { - $DEPNAME=$DEP->DepartmentName; - } - } - + ?> -
-

PURCHASE ORDER

-
-
-
PO NO:
-
-

-

- - - - - - - +
+ +

REVENUE PURCHASE ORDER

PO NO:
+ +
+ This is Draft Version For Internal Purpose
'; + } + + ?> + + +

+

+

Payment Terms :
Payable At:
Payment Days:
Delivery Date :

+
+

Vendor Address :

Delivery To :

-

-

Delivery Date :

- - +
+
+ - - - - - - - - - - - + + + + + + + + + + + +AfterExciseDuty ; ?> + @@ -159,8 +158,9 @@ echo number_format($TotalAmount,2) ; ?> $Insurance =$Insurance + $record->Insurance; $AfterFreightValue =$AfterFreightValue + $record->AfterFreightValue; $AfterDiscount = $AfterDiscount + $record->AfterDiscount ; + $AfterPackaging=$AfterPackaging+$record->AfterPackagingValue; } - $OrderValue = (( $SubTotalAmount + $AfterVAT + $AfterCST+$AfterGST+$AfterOtherTaxes +$Insurance +$AfterFreightValue+$AfterExciseDuty) - $AfterDiscount ) ; + $OrderValue = (( $SubTotalAmount + $AfterVAT + $AfterCST+$AfterGST+$AfterOtherTaxes +$Insurance +$AfterFreightValue+$AfterExciseDuty+$AfterPackaging) - $AfterDiscount ) ; } ?> @@ -168,59 +168,102 @@ echo number_format($TotalAmount,2) ; ?>
# Item Description QtyRateAmount in Discount in Excise Duty in Vat in CST in GST in Other Taxes in Insurance in Freight in Total Amount in Rate Amount DiscountExcise DutyVatCSTPackagingGSTOther TaxesInsuranceFreightTotal Amount
AfterVAT ; ?> AfterCST ; ?>AfterPackagingValue ; ?> AfterGST ; ?> AfterOtherTaxes ; ?> Insurance ; ?> AfterFreightValue ; ?> BasicValue+$record->AfterExciseDuty - + $record->AfterVAT+$record->AfterCST+$record->AfterGST + $record->AfterOtherTaxes + $record->Insurance+ $record->AfterFreightValue)- $record->AfterDiscount); + + $record->AfterVAT+$record->AfterCST+$record->AfterGST + $record->AfterOtherTaxes + $record->Insurance+ $record->AfterFreightValue+$record->AfterPackagingValue)- $record->AfterDiscount); echo number_format($TotalAmount,2) ; ?>
- - + - +
Sub Total Amount :

Total Order Amount :

Total Order Amount :

+ + + + + + +
Total Amount In Words:


+ + + + + + + + + + + + + + + + + + + + + +
Requistion NumberRequested byRequested DepartmentCost center
+
+

Service Description:

- -
Requition Number :
Requested by :
Requisted Department :
Cost center :
+ } + } + else { + + ?> + + + + + + + + +
Till Release State:
+
\ No newline at end of file diff --git a/application/views/revenuepopdf.php~ b/application/views/revenuepopdf.php~ new file mode 100755 index 00000000..f3920316 --- /dev/null +++ b/application/views/revenuepopdf.php~ @@ -0,0 +1,300 @@ + CompanyName; + $CompanyAddress = $CO->Address; + + } + } + if(!empty($POItem)) + { + foreach ($POItem as $PO) + { + $PONO = $PO->PONO; + $SuplierName = $PO->SupplierName; + $SuplierAddress = $PO->Address; + $DeliveryAddress = $PO->DeliveryAddress; + $postatus= $PO->Status; + $dt = new DateTime($PO->PODate, new DateTimeZone('Asia/Kolkata')); + $Podt = $dt->format('d-m-Y'); + $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); + $DeliveryDate = $dtDe->format('d-m-Y'); + $ServiceDescription =$PO->ServiceDescription; + $PaymentTerms = $PO->PaymentTerms; + $PaymentDays=$PO->PaymentDays; + $PayableAT=$PO->PayableAT; + + } +} + $currencyName='INR'; + $currencyCode =''; + if(!empty($CurrencySymbol)) + { + foreach ($CurrencySymbol as $Curr) + { + + $currencyCode = $Curr->FontCode2000; + //$currencyName = $currencyName; + + + } + + } + + + ?> + +

REVENUE PURCHASE ORDER

PO NO:
+ +
+ This is Draft Version For Internal Purpose
'; + } + + ?> + +
+

+

+

Payment Terms :
Payable At:
Payment Days:
Delivery Date :

+
+ +
+

Vendor Address :

+

Delivery To :

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +BasicValue; + $AfterExciseDuty =$AfterExciseDuty + $record->AfterExciseDuty; + $AfterVAT =$AfterVAT + $record->AfterVAT; + $AfterCST = $AfterCST + $record->AfterCST; + $AfterGST =$AfterGST + $record->AfterGST; + $AfterOtherTaxes =$AfterOtherTaxes + $record->AfterOtherTaxes; + $Insurance =$Insurance + $record->Insurance; + $AfterFreightValue =$AfterFreightValue + $record->AfterFreightValue; + $AfterDiscount = $AfterDiscount + $record->AfterDiscount ; + $AfterPackaging=$AfterPackaging+$record->AfterPackagingValue; + } + $OrderValue = (( $SubTotalAmount + $AfterVAT + $AfterCST+$AfterGST+$AfterOtherTaxes +$Insurance +$AfterFreightValue+$AfterExciseDuty+$AfterPackaging) - $AfterDiscount ) ; + } + + ?> +
#Item DescriptionQtyRate Amount DiscountExcise DutyVatCSTPackagingGSTOther TaxesInsuranceFreightTotal Amount
MaterialName ; ?>Quantity ; ?>Rate ; ?>BasicValue ; ?>AfterDiscount; ?>AfterExciseDuty ; ?>AfterVAT ; ?>AfterCST ; ?>AfterPackagingValue ; ?>AfterGST ; ?>AfterOtherTaxes ; ?>Insurance ; ?>AfterFreightValue ; ?>BasicValue+$record->AfterExciseDuty + + $record->AfterVAT+$record->AfterCST+$record->AfterGST + $record->AfterOtherTaxes + $record->Insurance+ $record->AfterFreightValue+$record->AfterPackagingValue)- $record->AfterDiscount); +echo number_format($TotalAmount,2) ; ?>
+
+ + + + + + + + +

Total Order Amount :

+ + + + + + +
Total Amount In Words:
+
+
+ + + + + + + + + + + + + + + + + + + + + +
Requistion NumberRequested byRequested DepartmentCost center
+
+
+

+

Service Description:

+ + + + + + + + + + +
ReleasedBy:ReleasedOn:
FirstName;?>ReleasedOn;?>
+ + + + + + + + + +
Till Release State:
+ +
\ No newline at end of file diff --git a/application/views/servicepopdf.php b/application/views/servicepopdf.php index bd6923b3..45ae355b 100755 --- a/application/views/servicepopdf.php +++ b/application/views/servicepopdf.php @@ -1,11 +1,10 @@ +Address; } -} + } + + $currencyName='INR'; + $currencyCode =''; + if(!empty($CurrencySymbol)) + { + foreach ($CurrencySymbol as $Curr) + { + + $currencyCode = $Curr->FontCode2000; + //$currencyName = $currencyName; + + + } + + } + + + + if(!empty($POItem)) { - + foreach ($POItem as $PO) { + $PONO = $PO->PONO; $postatus= $PO->Status; $SuplierName = $PO->SupplierName; @@ -49,52 +68,15 @@ $dtDe = new DateTime($PO->DeliveryDate, new DateTimeZone('Asia/Kolkata')); $DeliveryDate = $dtDe->format('d-m-Y'); $ServiceDescription =$PO->ServiceDescription; - $CostCenterCode=$PO->CostCenterCode; - $PaymentTerms=$PO->PaymentTerms; - $ReqNo=$PO->ReqNo; - + $PaymentTerms = $PO->PaymentTerms; + $PaymentDays=$PO->PaymentDays; + $PayableAT=$PO->PayableAT; } - - - if(!empty($Requestername)) - - { - foreach ($Requestername as $Reqname) - { - $ReqBy=$Reqname->FirstName; - //$ReqDep=$Reqname-> - - } - } - - $CurrencyCode=''; - $CurrencyName=''; - - if(!empty($Currencytype)) - { - foreach ($Currencytype as $CURRE) - { - // $CurrencyCode=$CURRE->Currency_Code; - $CurrencyName=$CURRE->FontCode2000; - } - - } - $DEPNAME=''; - - if(!empty($DEPCODE)) - { - foreach ($DEPCODE as $DEP) - { - $DEPNAME=$DEP->DepartmentName; - } - } - - - } ?> + + +
+

SERVICE PURCHASE ORDER

PO NO:
+
+ This is Draft Version For Internal Purpose
'; + } + + ?> + +
+ + + +


+

Payment Terms :
Payable At:
Payment Days:
Delivery Date :

+ + + + + + +
+ Vendor Address :

+
+ Delivery To :
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + BasicValue + $record->Taxamount + ?> + + + + + + + + + + + + + + + BasicValue; + $ServiceTax =$ServiceTax + $record->ServiceTax; + $EducessTax =$EducessTax + $record->EducessTax; + $SecHigherEducessTax = $SecHigherEducessTax + $record->SecHigherEducessTax; + $KrishiKalyantax =$KrishiKalyantax + $record->KrishiKalyantax; + $SwachhBharattax =$SwachhBharattax + $record->SwachhBharattax; + + } + $OrderValue = $SubTotalAmount + $ServiceTax + $EducessTax+$SecHigherEducessTax+$KrishiKalyantax +$SwachhBharattax; + } + + ?> +
#Item DescriptionQtyRate inAmountService TaxEducess TaxSec Higher Educess TaxKrishi Kalyan taxSwachh Bharat taxTotal Amount
MaterialName ; ?>Quantity ; ?>Rate ; ?>BasicValue ; ?>ServiceTax ; ?>EducessTax ; ?>SecHigherEducessTax ; ?>KrishiKalyantax ; ?>SwachhBharattax ; ?>
+
+ + + + + + + + +
+ +
Total Order Amount :
+ + + + + + + +
Total Amount In Words:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Requistion NumberRequested byRequested DepartmentCost center
+ + + + + + +
+
+

+

Service Description:

+ + + + + + + + + + +
ReleasedBy:ReleasedOn:
FirstName;?>ReleasedOn;?>
+ + + + + + + + + +
Till Release State:
+ + +
+
+ diff --git a/application/views/viewIGRDetails.php b/application/views/viewIGRDetails.php old mode 100644 new mode 100755 diff --git a/application/views/viewmrirforbilling.php b/application/views/viewmrirforbilling.php old mode 100644 new mode 100755