Siddharth Industries - Edit Service Purchase Order -
+ +
+
+ +
+
+
+
+
+
+
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
Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/table_cell_frame_reflower.cls.php
-Line Number: 131
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -Severity: Warning
-Message: A non-numeric value encountered
-Filename: include/page_frame_decorator.cls.php
-Line Number: 464
- -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
-
.
| Vendor Address . |
-Delivery To . |
-Delivery Date : | -
Payment Terms :
Payable At:
Payment Days:
Delivery Date :
|
+ Vendor Address : + |
+
+ Delivery To : + |
+
+
| # | Item and Description | Qty | -Rate per unit | +Rate Per Unit in | -Total Amount(INR) | +Total Amount in |
|---|
| Total Amount In Words: | @@ -138,16 +176,78 @@ Purchase Order Date :
| Requition Number : |
- Requested by : |
- Requisted Department : |
- Cost center : |
-
+
| ReleasedBy: | +ReleasedOn: | +
| FirstName;?> | +ReleasedOn;?> | +
| Till Release State: | + +
-
.
| Vendor Address . |
-Delivery To . |
-Delivery Date : | -
Payment Terms :
Payable At:
Payment Days:
Delivery Date :
|
+ Vendor Address : + |
+
+ Delivery To : + |
+
+
| # | Item and Description | Qty | -Rate per unit | +Rate Per Unit in | -Total Amount(INR) | +Total Amount in |
|---|
| Total Amount In Words: | @@ -138,16 +176,78 @@ Purchase Order Date :
| Requition Number : |
- Requested by : |
- Requisted Department : |
- Cost center : |
-
+
| ReleasedBy: | +ReleasedOn: | +
| FirstName;?> | +ReleasedOn;?> | +
| Till Release State: | + +
-
+
+REVENUE PURCHASE ORDERPO NO:
+ This is Draft Version For Internal Purpose ';
+ }
+
+ ?>
+
+
+Payment Terms : + - Delivery Date :
-
-
++ +
+
+
Service Description:
-
- Requition Number : |
- Requested by : |
- Requisted Department : |
- Cost center : |
-
REVENUE PURCHASE ORDERPO NO:
+ This is Draft Version For Internal Purpose ';
+ }
+
+ ?>
+
+
+Payment Terms : +
+ + +
+
+
\ 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 Description:
+
+
+
+
+
+
+ SERVICE PURCHASE ORDERPO NO:
+ This is Draft Version For Internal Purpose ';
+ }
+
+ ?>
+
+ Payment Terms :
+ + +
+
+
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
+
+
+
+
+
+ + + + +
+ + + Service Description:
+
+
|