diff --git a/application/config/routes.php b/application/config/routes.php
index 0669b6b3..98c6bde8 100644
--- a/application/config/routes.php
+++ b/application/config/routes.php
@@ -166,6 +166,7 @@ $route['CreatePO'] = "purchaseorder/requisition";
$route['PurchaseOrder'] = "purchaseorder/CreatePurchaseOrder";
$route['purchaseorderListing'] = "purchaseorder/PurchaseOrderList";
$route['EditPO'] = "purchaseorder/EditPurchaseOrder";
+$route['EditAmendPO'] = "amendmentpurchaseorder/EditAmendPurchaseOrder";
$route['EmergencyPO'] = "emergencypurchaseorder/CreateEmergencyPO";
diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php
new file mode 100644
index 00000000..5173e84c
--- /dev/null
+++ b/application/controllers/amendmentpurchaseorder.php
@@ -0,0 +1,397 @@
+load->model('amendment_model');
+ $this->load->model('purchaseorder_model');
+ $this->load->library('session');
+ $this->load->library('form_validation');
+ // $this->load->library('pagination');
+
+ $this->isLoggedIn();
+ }
+ /**
+ * This function used to load the first screen of the user
+ */
+ public function index()
+ {
+
+
+ $this->load->library('pagination');
+
+ // $count = $this->purchaseorder_model->purchaseorderListingCount('');
+
+ //$returns = $this->paginationCompress ( "purchaseorderListing/", $count, 10 );
+
+ //$this->purchaseorder_model->UpdateRequistionStatus(); CONFORM IT
+
+ $forwhat='amendment';
+ $data['POData'] = $this->purchaseorder_model->purchaseorderListing($forwhat);
+ $this->global['pageTitle'] = 'Siddharth : Amendment Purchase Order';
+ $this->loadviews('AmendPOlist',$this->global,$data,NULL);
+ }
+
+
+ function EditAmendPurchaseOrder()
+ {
+ $PONO = $_GET['PONO'];
+ $ReqType = $_GET['ReqType'];
+
+ $Req = $this->purchaseorder_model->getRequistionNoFromPO($PONO);
+ $data['ReqList'] = $Req ;
+ $result = array();
+ $ReqArray = array();
+ foreach ($Req as $SID):
+ $ReqArray[] = $SID->ReqNo ;
+ $result[] = $this->purchaseorder_model->getRawPOMaterialList($SID->ReqNo);
+ endforeach;
+ $data['MaterialList'] = $result;//$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray);
+ $data['Suplist'] = $this->purchaseorder_model->getSupplierName();
+ /* Cost code from Requisition - Client Review Fix
+ Start here */
+ $ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
+ $data['RequistionDetails'] = $ReqDetails;
+ $CostCode = '';
+ $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
+
+ $Year = $dt->format('Y');
+
+ foreach ($ReqDetails as $Rs):
+ $CostCode = $Rs->CostCenterCode;
+ endforeach;
+
+ $AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
+
+
+ if(count($AvlBudget)>0)
+ {
+ $data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
+ }
+ /* End Here */
+
+ $data['POMaster'] = $this->purchaseorder_model->GetServicePurchaseOrder($PONO);
+ $data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
+ $data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
+ $data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
+ if($ReqType == SERVICE)
+ {
+
+ $data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetails($PONO);
+ $this->global['pageTitle'] = 'Siddharth : Edit Service Purchase order form';
+ $this->loadViews("editServiceAmendPO", $this->global, $data, NULL);
+ }
+ else if($ReqType == REVENUE)
+ {
+
+ $data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
+ $this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
+ $this->loadViews("editRevenueAmendPO", $this->global, $data, NULL);
+ }
+
+ else if($ReqType == IMPORT)
+ {
+
+
+ $AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
+
+
+ if(count($AvlBudget)>0)
+ {
+ $data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
+ }
+ // print_r($data);
+ $data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
+ //print_r($data);
+ //$data['ExchangeRate']=$data['POItem']->ExchangeRate;
+
+ //print_r($data['POItem']);
+
+ foreach($data['POItem'] as $Rate)
+ {
+
+ // print_r($Rate->ExchangeRate);
+ $exRate=$Rate->ExchangeRate;
+
+ // $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
+ }
+
+ foreach($data['POItem'] as $CUR)
+ {
+
+ //print_r($CUR->CurrencyType);
+ $Currency=$CUR->CurrencyType;
+
+
+ // $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
+ }
+ //echo "$Currency";
+ $data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency);
+ //print_r($data);
+ $data['ExchangeRate']=$exRate;
+
+ $data['Currency']=$this->purchaseorder_model->GetCurrencytype();
+ //print_r($data);
+ $this->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form';
+ $this->loadViews("editImportAmendPO", $this->global, $data, NULL);
+ }
+
+ }
+
+
+ function EditRevenuePurchaseOrder()
+ {
+ $NewPO='0';
+ $PONO =$this->input->post('txtPONO');
+ echo "OLD PO IS" . $PONO;
+
+ $POdt =$this->input->post('PODate');
+ $PODate = $this->getDateformat($POdt);
+ $SupplierID = $this->input->post('drpSupplier');
+ $DeliveryAddr = $this->input->post('txtDeliveryAddress');
+ $dt = $this->input->post('Deliverydt');
+ //$Deliverydt = $this->getDateformat($dt);
+ $DeliveryOption = $this->input->post('DateRange');
+ if($DeliveryOption==1){
+ $Deliverydt = '';
+ $DeliverySchedule = $this->input->post('Scheduleby');
+ }
+ else{
+ $Deliverydt = $this->getDateformat($dt);
+ $DeliverySchedule = '';
+ }
+ $POType = $this->input->post('POType');
+ $PoRange = $this->input->post('txtPoRange');
+
+ $SpcialInstruction = $this->input->post('SpcialInstruction');
+ $TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
+ $POStatus = $this->input->post('txtStatus');
+
+ $updatedBy = $this->session->userdata ( 'userId' );
+
+ $RowCount = $this->input->post('txtRowCount');
+
+
+ //$DeletedRow = $this->input->post('txtDeletedRow');
+
+ // $comma_separated = explode(':', $DeletedRow);
+ $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
+ $updateddt = $dt->format('Y-m-d H:i:s');
+ // PO Master
+ // PO Master
+ $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>'ST015','DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt );
+
+ //$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
+ $LastPO = $this->purchaseorder_model->addPOMaster($POMaster);
+ foreach($LastPO as $PO):
+ $NewPO=$PO->PONO;
+ endforeach;
+ echo "NEW PO IS " . $NewPO;
+ echo "";
+ //change old po status as Amendment
+ $PODetail=array('Status'=>"ST030");//TO SET PARENT PO AS AMENDMENT STATUS
+ print_r($PODetail);
+ $APO=$this->purchaseorder_model->updateAmendPOMaster($PONO,$PODetail);
+ echo $APO."Affected";
+ //die();
+ //print_r($LastPO);
+
+
+ $LineItemStatus = REQITEM_NEW;
+
+
+
+ echo 'before for loop';
+ echo $RowCount;
+
+ for ($i = 1; $i <= $RowCount; $i++)
+ {
+ echo "inside loop";
+ $MaterialCode = $this->input->post('materialCode'.$i);
+ $Quantity = $this->input->post('quantity'.$i);
+ $Reqnumber = $this->input->post('Reqnumber'.$i);
+ $itemRate = $this->input->post('itemRate'.$i);
+
+ $DiscountType = $this->input->post('DisType'.$i);
+ $DiscountValue = $this->input->post('DisVal'.$i);
+ $AfterDiscount = $this->input->post('AfterDisVal'.$i);
+ $PackagingOption = $this->input->post('PackOption'.$i);
+ $PackagingType = $this->input->post('PackType'.$i);
+ $PackagingValue = $this->input->post('PackVal'.$i);
+ $AfterPackagingValue = $this->input->post('AfterPackVal'.$i);
+ $ExciseOption = $this->input->post('ExciseOption'.$i);
+ $ExciseValue = $this->input->post('ExciseVal'.$i);
+ $AfterExciseValue = $this->input->post('AfterExciseVal'.$i);
+ $VatOption = $this->input->post('VatOption'.$i);
+ $VatValue = $this->input->post('VatVal'.$i);
+ $AfterVatValue = $this->input->post('AfterVatVal'.$i);
+ $CSTOption = $this->input->post('CSTOption'.$i);
+ $CSTValue = $this->input->post('CSTVal'.$i);
+ $AfterCSTValue = $this->input->post('AfterCSTVal'.$i);
+ $GSTValue = $this->input->post('GSTVal'.$i);
+ $AfterGSTValue = $this->input->post('AfterGSTVal'.$i);
+ $OtherTaxValue = $this->input->post('OtherTaxVal'.$i);
+ $AfterOtherTaxValue = $this->input->post('AfterOtherTaxVal'.$i);
+ $FreightType = $this->input->post('FreightType'.$i);
+ $FreightValue = $this->input->post('FreightVal'.$i);
+ $AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
+ $InsuranceValue = $this->input->post('Insval'.$i);
+ $TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
+ $POLineItemNo = $this->input->post('LineItemNo'.$i);
+ $CostCenter = $this->input->post('costCode'.$i);
+ $LineItemNo = '';
+
+
+ // $SkipInsert = "False";
+ // if( count($comma_separated) > 0)
+ // {
+ // for($j = 1; $j < count($comma_separated); $j++)
+ // {
+ // $deletedRow = $comma_separated[$j] ;
+
+ // if($deletedRow == $i )
+ // {
+ // $SkipInsert = "True";
+ // break;
+ // }
+
+ // }
+ // }
+ // if($SkipInsert == "False")
+ // {
+ // if(strlen($POLineItemNo) == 0)
+ // {
+ $POLineItemList = array('PONO'=>$NewPO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter);
+ print_r($POLineItemList);
+ $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
+ // if(count($POLineItem)>0)
+ // {
+ foreach($POLineItem as $line):
+ $LineItemNo = $line->LineItemNo;
+ endforeach;
+ echo "Lineitem no is" . $LineItemNo;
+ //print_r($LineItemNo);
+
+ // }
+
+ //}
+ // else
+ // {
+ // $LineItemNo = $POLineItemNo;
+
+ // $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter);
+ // $POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$POLineItemNo,$POLineItemList);
+
+ // }
+ // $isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo);
+ // if(count($isExists) == 0)
+ // {
+ $RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'ExciseDuty'=>$ExciseValue,'ExciseDutyCalulatedOn'=>$ExciseOption,'AfterExciseDuty'=>$AfterExciseValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'VatCalulatedOn'=>$VatOption, 'CST'=>$CSTValue,'AfterCST'=>$AfterCSTValue,'CSTCalulatedOn'=>$CSTOption,'GST'=>$GSTValue,'AfterGST'=>$AfterGSTValue,'OtherTaxes'=>$OtherTaxValue,'AfterOtherTaxes'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt);
+
+ $RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
+
+ // }
+ // else
+ // {
+ // $RevenueTaxList = array('DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'ExciseDuty'=>$ExciseValue,'ExciseDutyCalulatedOn'=>$ExciseOption,'AfterExciseDuty'=>$AfterExciseValue,'Vat'=>$VatValue,'AfterVAT'=>$AfterVatValue,'VatCalulatedOn'=>$VatOption, 'CST'=>$CSTValue,'AfterCST'=>$AfterCSTValue,'CSTCalulatedOn'=>$CSTOption,'GST'=>$GSTValue,'AfterGST'=>$AfterGSTValue,'OtherTaxes'=>$OtherTaxValue,'AfterOtherTaxes'=>$AfterOtherTaxValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt);
+
+ // $this->purchaseorder_model->updateRevenueTax($LineItemNo,$RevenueTaxList);
+
+ // }
+ }
+
+ echo 'Purchase Order Amended Successfully! PO Number Is: '.$PONO .'- New PO Number is'.$NewPO;
+ }
+
+
+
+
+
+ function getDateformat($Val)
+ {
+ $date = new DateTime($Val,new DateTimeZone('Asia/Kolkata'));
+ $retDate = $date->format('Y-m-d H:i:s');
+ return $retDate;
+ }
+ /* ---------------------------------OLD AMENDPO FUNCTION-----------------------------------------------*/
+ function getpodetails()
+ {
+ $PONO=$this->input->post('pono');
+ //$PONO='PO0001';
+ $result = $this->amendment_model->getPODetails($PONO);
+ // print_r($result);
+ $obj=json_encode($result);
+ echo $obj;
+ //print_r($obj);
+ //die();
+
+
+
+ }
+
+ function updatepo(){
+ $someArray = $_GET['jsondata'];
+ //$PONO = $_GET['pono'];
+ $PONO = $this->input->get('PONO');
+ $rowsaffected=0;
+ $porow=0;
+
+ //echo $PONO."";
+ // print_r($someArray);
+ $d=json_decode($someArray);
+ ////print_r( $d);
+ foreach($d as $d1){
+ $MaterialCode=$d1->ItemCode;
+ $Quantity=$d1->Ordered_Quantity;
+ $ReceivedQuantity=$d1->Additional_Quantity_Received;
+ $Remarks=$d1->Remarks;
+ $Status='ST031';
+ $POstatus='ST030';
+ $store=array('Quantity'=>$Quantity,'AmendmentQuantity'=>$ReceivedQuantity,'AmendmentRemarks'=>$Remarks,'Status'=>$Status);
+ //print_r($store);
+ $result=$this->amendment_model->updatePODetails($PONO,$MaterialCode,$store,$POstatus);
+ $rowsaffected++;
+
+
+
+ }
+ echo "";
+ $data['PODetails']=$this->amendment_model->getPONO();
+ $this->global['pageTitle'] = 'Siddharth : Amendment Purchase Order';
+
+ $this->loadviews('amendmentpo',$this->global, NULL);
+
+
+
+ }
+ function amendmentpolisting()
+ {
+ $this->global['pageTitle'] = 'Siddharth : Amendment Purchase Order';
+
+ $data['POlisiting']=$this->amendment_model->getPOlist();
+ //echo "From CON.";
+ //print_r($data);
+ $this->loadviews('amendmentpolisting',$this->global,$data);
+ }
+
+ function pageNotFound()
+ {
+ $this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found';
+
+ $this->loadViews("404", $this->global, NULL, NULL);
+ }
+}
\ No newline at end of file
diff --git a/application/logs/log-2017-06-30.php b/application/logs/log-2017-06-30.php
index e5462c45..761a563c 100644
--- a/application/logs/log-2017-06-30.php
+++ b/application/logs/log-2017-06-30.php
@@ -1,3 +1,8 @@
ERROR - 2017-06-30 12:34:19 --> Severity: Notice --> Undefined variable: designation C:\xampp\htdocs\sia306\siddharth_application\application\views\includes\header.php 248
+ERROR - 2017-06-30 16:01:46 --> Severity: Notice --> Undefined index: PayOn C:\5.6\xampp\htdocs\SIA\siddharth_application\application\views\payslipgenerate.php 166
+ERROR - 2017-06-30 16:01:46 --> Severity: Notice --> Undefined index: PayOn C:\5.6\xampp\htdocs\SIA\siddharth_application\application\views\payslipgenerate.php 166
+ERROR - 2017-06-30 16:01:46 --> Severity: Notice --> Undefined index: PayOn C:\5.6\xampp\htdocs\SIA\siddharth_application\application\views\payslipgenerate.php 166
+ERROR - 2017-06-30 16:01:46 --> Severity: Notice --> Undefined index: PayOn C:\5.6\xampp\htdocs\SIA\siddharth_application\application\views\payslipgenerate.php 166
+ERROR - 2017-06-30 16:01:46 --> Severity: Notice --> Undefined index: PayOn C:\5.6\xampp\htdocs\SIA\siddharth_application\application\views\payslipgenerate.php 166
diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php
index 7324c63e..36433575 100644
--- a/application/models/purchaseorder_model.php
+++ b/application/models/purchaseorder_model.php
@@ -30,7 +30,7 @@ class purchaseorder_model extends CI_Model
* @return array $result : This is result
*/
-function purchaseorderListing()
+function purchaseorderListing($forwhat='')
{
$this->db->distinct();
$this->db->select('POMast.PONO,supp.SupplierName,TotalOrderValue,PODate,Stat.StatusName,Stat.StatusCode,Req.ReqType,DeliveryDate,DeliverySchedule,DeliveryOption');
@@ -664,6 +664,20 @@ function GetCurrencytype()
return TRUE;
}
+
+
+ // To update Parent PO as Amended PO
+ function updateAmendPOMaster($PONO,$PODetail)
+ {
+ //echo $PONO."from model";
+
+
+ $this->db->where('PONO', $PONO);
+ $this->db->update('T_PurchaseOrder_Master', $PODetail);
+ $insert_id = $this->db->affected_rows();
+
+ return $insert_id;
+ }
/**
* This function is used to check the Line Item is already available in the database
* @return array $result : This is result of the query
@@ -968,6 +982,7 @@ function GetCurrencytype()
$this->db->join('T_Requestion_Master rmast','rmast.ReqNo=req.ReqNo');
$this->db->join('T_CostCenter_Budget bud','bud.CostCenterCode = req.CostCenterCode and bud.BudgetType = rmast.ReqType');
$this->db->join('T_CostCenter_Master ccm','ccm.CostCenterCode = req.CostCenterCode and ccm.CostCenterCode = bud.CostCenterCode');
+ $this->db->where('mast.Status','ST030'); // EMERGENGY PO
if($q=='A'){
$this->db->where('mast.Status','ST015');//PO CREATED
$this->db->or_where('mast.Status','ST020');//ON HOLD
diff --git a/application/third_party/dompdf/lib/fonts/log.htm b/application/third_party/dompdf/lib/fonts/log.htm
index 5dc9a305..bcce59bf 100644
--- a/application/third_party/dompdf/lib/fonts/log.htm
+++ b/application/third_party/dompdf/lib/fonts/log.htm
@@ -1,10 +1 @@
-14,592 KB 244.4260 ms
-
-
A PHP Error was encountered
-
-
Severity: Warning
-
Message: explode() expects parameter 2 to be string, array given
-
Filename: include/style.cls.php
-
Line Number: 948
-
-
\ No newline at end of file
+8,448 KB 660.7060 ms
\ No newline at end of file
diff --git a/application/views/AmendPOlist.php b/application/views/AmendPOlist.php
new file mode 100644
index 00000000..60b4e971
--- /dev/null
+++ b/application/views/AmendPOlist.php
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #
+ PONO#
+ PO Type
+ PO Date
+ Supplier Name
+ Total Order Value
+ PO Status
+ Delivery Option
+ Delivery Date
+ Delivery Schedule
+ Action
+
+
+
+
+
+ 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/editImportAmendPO.php b/application/views/editImportAmendPO.php
new file mode 100644
index 00000000..6c6220c8
--- /dev/null
+++ b/application/views/editImportAmendPO.php
@@ -0,0 +1,3620 @@
+format('Y-m-d');
+
+$MaxPoDate = '';
+if(!empty($MaxPODate))
+{
+ foreach ($MaxPODate as $date)
+ {
+ $MaxPoDate = $date->PODate;
+ }
+}
+
+if(!empty($AvlBudAmt))
+{
+
+ $AvlAmount = $AvlBudAmt;
+
+}
+//echo $AvlAmount;
+
+$CompanyAddress = '';
+if(!empty($CompanyDetails))
+{
+ foreach ($CompanyDetails as $Req)
+ {
+ $CompanyAddress = $Req->Address;
+ }
+}
+
+
+ //$Exchangerate=$ExchangeRate;
+
+
+
+$SupId = '';
+$SupName = '';
+$Address = '';
+$PODate = '';
+$Deliverydt ='';
+$DeliveryAddress ='';
+$POStatus='';
+$PONO = '';
+$ServiceDescription = '';
+$TotalLanding='';
+$tothighseas='';
+$totcustom='';
+$totexciseduty='';
+$totexcisedutyED='';
+$totexciseSH='';
+$totcustomED='';
+$totcustomSH='';
+$totaddtnlexcise='';
+$totgrossduty='';
+$totavlmodvat='';
+$totgrossexpense='';
+$totordervalue='';
+$ExchangeRate='';
+$totorder='';
+//$ExchangeRate
+
+
+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');
+
+ $Ddt = new DateTime($Req->DeliveryDate);
+ $Deliverydt = $Ddt->format('Y-m-d');
+
+ $DeliveryAddress =$Req->DeliveryAddress;
+ $POStatus = $Req->StatusCode;
+ $PONO = $Req->PONO;
+ $ServiceDescription = $Req->ServiceDescription;
+ // $ExchangeRate=$Req->ExchangeRate;
+ }
+}
+?>
+
+
+
+
+
+
+
+
+
+ 'form-label-left ImportPO ','name' => 'ImportPO','id' => 'ImportPO');
+
+ echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
+
+
+
+
+
+
+
+
Siddharth Industries - Edit Import Purchase Order for Amendment
+
+
+
+
+
+
+
+
+
+ Requistion No
+ 'Selected Requisition Numbers');
+ if(!empty($ReqList))
+ {
+ foreach ($ReqList as $SID):
+ $options[$SID->ReqNo] = $SID->ReqNo ;
+ // 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"');
+ echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' );
+
+ ?>
+
+
+
+
+
+
+ Currency Type
+
+ 'Select Currency');
+
+ //print_r( $options);
+ if(!empty($Currency))
+ {
+ foreach ($Currency as $CUR):
+
+
+ $options[$CUR->CurrencyCode] = $CUR->CurrencyCode.' '.' - '.' '.$CUR->CurrencyName;
+
+ endforeach;
+ }
+
+ //echo form_dropdown('drpSupplier', $options,set_value('drpSupplier'),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
+ echo form_dropdown('currencytype', $options,set_value('currencytype'),'id="currencytype"' ,'required="true"' ,'class="form-control select2');
+
+
+
+
+
+
+ ?>
+
+
+
+
+
+
+
+
+ Supplier
+
+ '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');
+
+ echo form_dropdown('drpSupplier', $options,set_value('drpSupplier',$SupId),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
+
+ ?>
+
+
+
+
+
+
Address
+
+ 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true','rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+
+
+
+
+ ?>
+
+
+
+ Exchange Rate :
+
+ 'ExchangeRate','value' => set_value('ExchangeRate',$ExchangeRate),'id'=>'ExchangeRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()');
+
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
Purchase Order Type
+
+
+ 'POType','value' => set_value('POType',IMPORT),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
Delivery Address
+
+ 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true', 'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+
+ ?>
+
+
+
+
+
+
+
Purchase Order Date
+
+ 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
Delivery Date
+
+ 'Deliverydt','value' => set_value('Deliverydt',$Deliverydt),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SNo
+ Requisition No
+ Item Name
+ Quantity
+ UOM
+ Rate
+ Basic Amount
+ Tax Amount
+ Total Order Amount
+ Action
+
+
+
+
+
+
+
+ ReqNo ?>
+ MaterialName?>
+ Quantity ?>
+ UOM ?>
+ Rate ?>
+ BasicValue ?>
+ Taxamount?>
+ TotalOrderValue?>
+
+
+
+
+
+ " />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AfterLandingCharge;
+ $tothighseas = $tothighseas + $record->AfterHighSeasSalesCharge;
+ $totcustom = $totcustom + $record->AfterCustomDuty;
+ $totexciseduty = $totexciseduty + $record->ExciseDuty;
+ $totexcisedutyED = $totexcisedutyED + $record->ExciseDutyEdCess;
+ $totexciseSH = $totexciseSH + $record->AfterExciseDutySHCess;
+ $totcustomED = $totcustomED +$record->AfterCustomEdCess;
+
+ $totcustomSH = $totcustomSH + $record->CustomSHCess;
+ $totaddtnlexcise= $totaddtnlexcise + $record->AddlExciseDuty;
+ $totgrossduty = $totgrossduty + $record->Grossdutypayable;
+ $totavlmodvat = $totavlmodvat +$record->AvailableModvat;
+ $totgrossduty=$totgrossduty+$record->Grossdutypayable;
+ $totavlmodvat=$totavlmodvat+$record->AvailableModvat;
+ $totgrossexpense=$totgrossexpense+$record->Grossexpensesduetocustomduty;
+ $ExchangeRate=$record->ExchangeRate;
+ $totorder=$totorder+$record->TotalOrderValue;
+
+
+
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+ Total Landing Charge :
+
+ 'txttotallanding','value' => set_value('txttotallanding',$TotalLanding),'id'=>'txttotallanding', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total High seas sales Charge :
+
+ 'txttotalhighseas','value' => set_value('txttotalhighseas',$tothighseas),'id'=>'txttotalhighseas', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total Custom Duty Charge :
+
+ 'txttotalcustom','value' => set_value('txttotalcustom',$totcustom),'id'=>'txttotalcustom', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total Excise duty Charge :
+
+ 'txttotalexcise','value' => set_value('txttotalexcise',$totexciseduty),'id'=>'txttotalexcise', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total Excise duty ED_cess Charge :
+
+ 'txttotalexciseED','value' => set_value('txttotalexciseED', $totexcisedutyED),'id'=>'txttotalexciseED', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ Total Excise duty S & H cess Charge :
+
+ 'txttotalexciseSH','value' => set_value('txttotalexciseSH',$totexciseSH),'id'=>'txttotalexciseSH', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total Custom ED_cess Charge :
+
+ 'txttotalcustomED','value' => set_value('txttotalcustomED',$totcustomED),'id'=>'txttotalcustomED', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total Custom S & H cess Charge :
+
+ 'txttotalcustomSH','value' => set_value('txttotalcustomSH',$totcustomSH),'id'=>'txttotalcustomSH', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total Additional Excise duty Charge :
+
+ 'txttotalAdditionalExciseduty','value' => set_value('txttotalAdditionalExciseduty',$totaddtnlexcise),'id'=>'txttotalAdditionalExciseduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ Total Gross duty payable Charge :
+
+ 'txttotalgrossduty','value' => set_value('txttotalgrossduty',$totgrossduty),'id'=>'txttotalgrossduty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total Available Modvat set-off on import Charge :
+
+ 'txttotalavlmodvat','value' => set_value('txttotalavlmodvat',$totavlmodvat),'id'=>'txttotalavlmodvat', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ Total Gross expenses due to custom duty Charge :
+
+ 'txttotalgrossexpense','value' => set_value('txttotalgrossexpense',$totgrossexpense),'id'=>'txttotalgrossexpense', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ Total Order Value : 'txtToatlOrder','value' => set_value('txtToatlOrder',$totorder),'id'=>'txtToatlOrder', 'class' => 'form-control' ,'required' => 'true','readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+ Comments for Special Instructions : 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '3', 'cols' => '40' );
+ echo form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/views/editRevenueAmendPO.php b/application/views/editRevenueAmendPO.php
new file mode 100644
index 00000000..f40880e8
--- /dev/null
+++ b/application/views/editRevenueAmendPO.php
@@ -0,0 +1,3891 @@
+
+format('Y-m-d');
+$MaxPoDate = '';
+$AvlAmount = 0;
+$DeliverSchedule='';
+$DeliverOption='';
+
+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;
+
+}
+
+ $SupId = '';
+ $SupName = '';
+ $Address = '';
+ $PODate = '';
+ $Deliverydt ='';
+ $DeliveryAddress ='';
+ $POStatus = '';
+ $PONO = '';
+ $totBasicAmt = 0;
+ $totDiscountAmt = 0.0;
+ $totPackagingAmt = 0.0;
+ $totExciseAmt = 0.0;
+ $totVATAmt = 0.0;
+ $totCSTAmt = 0.0;
+ $totGSTAmt = 0.0;
+
+ $totOtherTaxAmt = 0.0;
+ $totFreightAmt = 0.0;
+ $totInsuranceAmt = 0.0;
+ $totOrderSummaryAmt = 0.0;
+
+ $ServiceDescription = '';
+
+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;
+ $POStatus = $Req->StatusCode;
+ $PONO = $Req->PONO;
+ $ServiceDescription = $Req->ServiceDescription;
+ }
+}
+?>
+
+
+
+
+
+
+
+ 'form-label-left CreatePO ','name' => 'CreatePO','id' => 'CreatePO');
+
+ echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
+
+
+
+
+
Siddharth Industries - Edit Revenue Purchase Order for Amendment -
+
+
+
+
+
+ Requistion No
+ 'Selected Requisition Numbers');
+ if(!empty($ReqList))
+ {
+ foreach ($ReqList as $SID):
+
+ $options[$SID->ReqNo] = $SID->ReqNo ;
+ //$ReqType = $SID->ReqType;
+ endforeach;
+ }
+ echo form_multiselect('RequistionNo', $options,set_value('RequistionNo'),'id="RequistionNo"' ,'required="true"' , 'height="400px"' );
+ ?>
+
+
+
Purchase Order Date
+
+ 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ Select Supplier
+ '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');
+
+ ?>
+
+
+
Purchase Order Type
+
+
+ 'POType','value' => set_value('POType',REVENUE),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ Select Tax Range
+
+
+ "Range","id"=>"Local","value"=>"0", 'checked'=>set_radio('Range', '0', TRUE),'onchange'=>'SetVatorCST();')); ?>
+ "Range","id"=>"Inter_state","value"=>"1", 'checked'=>set_radio('Range', '1', FALSE),'onchange'=>'SetVatorCST();')); ?>
+
+
+
+
+
+
+
+
+
+
+ Select Delivery By
+
+
+ 'DateRange', 'value' => '0', 'checked' => ('0' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Date')); ?>
+
+
+ 'DateRange', 'value' => '1', 'checked' => ('1' == $DeliverOption) ? TRUE : FALSE, 'id' => 'Schedule')); ?>
+
+
+
+
+
+
+
+
+
Supplier Address
+
+ 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
Delivery Address
+
+ 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
Delivery Date
+
+ 'Deliverydt','value' => set_value('Deliverydt',$Deliverydt),'id'=>'Deliverydt', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ Schedule
+ 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SNo
+ Requisition No
+ Item Name
+ Quantity
+ UOM
+ Rate
+ Basic Amount
+ Tax Amount
+ Total Order Amount
+ Action
+
+
+
+
+
+
+
+ ReqNo ?>
+ MaterialName ?>
+ Quantity ?>
+ UOM ?>
+ Rate ?>
+
+ BasicValue ?>
+
+ Taxamount ?>
+ TotalValue ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BasicValue;
+ $totDiscountAmt = $totDiscountAmt + $record->AfterDiscount;
+ $totPackagingAmt = $totPackagingAmt + $record->AfterPackagingValue;
+ $totExciseAmt = $totExciseAmt + $record->AfterExciseDuty;
+ $totVATAmt = $totVATAmt + $record->AfterVAT;
+ $totCSTAmt = $totCSTAmt + $record->AfterCST;
+ $totGSTAmt = $totGSTAmt +$record->AfterGST;
+
+ $totOtherTaxAmt = $totOtherTaxAmt + $record->AfterOtherTaxes;
+ $totFreightAmt = $totFreightAmt + $record->AfterFreightValue;
+ $totInsuranceAmt = $totInsuranceAmt + $record->Insurance;
+ $totOrderSummaryAmt = $totOrderSummaryAmt +$record->TotalValue;
+
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Basic Amount :
+
+ 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount',$totBasicAmt),'id'=>'txtTotBasicAmount', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ Total Discount Amount :
+
+ 'txtTotalDiscount','value' => set_value('txtTotalDiscount',$totDiscountAmt),'id'=>'txtTotalDiscount', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total Vat Amount :
+
+ 'txtTotalVat','value' => set_value('txtTotalVat',$totVATAmt),'id'=>'txtTotalVat', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total CST Amount :
+
+ 'txtTotCST','value' => set_value('txtTotCST',$totCSTAmt),'id'=>'txtTotCST', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total Packaging Amount :
+
+ 'txtTotalPackaing','value' => set_value('txtTotalPackaing',$totPackagingAmt),'id'=>'txtTotalPackaing', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ Total Excise Duty Amount :
+
+ 'txtTotExciseDuty','value' => set_value('txtTotExciseDuty',$totExciseAmt),'id'=>'txtTotExciseDuty', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total GST Rate :
+
+ 'txtTotalGST','value' => set_value('txtTotalGST',$totCSTAmt),'id'=>'txtTotalGST', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total Insurance Amount :
+
+ 'txtTotalInsurance','value' => set_value('txtTotalInsurance',$totInsuranceAmt),'id'=>'txtTotalInsurance', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+ Total Freight Amount :
+
+ 'txtTotalFreight','value' => set_value('txtTotalFreight',$totFreightAmt),'id'=>'txtTotalFreight', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ Other Taxes Amount :
+ 'txtTotalOtherTaxes','value' => set_value('txtTotalOtherTaxes',$totOtherTaxAmt),'id'=>'txtTotalOtherTaxes', 'class' => 'form-control num','readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
Total Order Amount :
+
+ 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary',$totOrderSummaryAmt),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control num' ,'readonly' => 'true','style'=>'text-align:right;');
+ echo form_input($data);
+ ?>
+
+
+
+
+ Comments for Special Instructions : 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '3', 'cols' => '40' );
+ echo form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/views/editServiceAmendPO.php b/application/views/editServiceAmendPO.php
new file mode 100644
index 00000000..04e7f3b1
--- /dev/null
+++ b/application/views/editServiceAmendPO.php
@@ -0,0 +1,2112 @@
+ 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;
+ $POStatus = $Req->StatusCode;
+ $PONO = $Req->PONO;
+ $ServiceDescription = $Req->ServiceDescription;
+ }
+}
+
+if(!empty($AvlBudAmt))
+{
+
+ $AvlAmount = $AvlBudAmt;
+
+}
+?>
+
+
+
+
+
+
+
+ 'form-label-left ServicePO ','name' => 'ServicePO','id' => 'ServicePO');
+
+ echo form_open($this->config->base_url().'/purchaseorder/addPO/',$attributes); ?>
+
+
+
+
+
+
Siddharth Industries - Edit Service Purchase Order for Amendment -
+
+
+
+
+
+
+ Requistion No
+
+
+ '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"');
+
+ ?>
+
+
+
Purchase Order Date
+
+ 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+ Supplier
+ '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');
+
+ ?>
+
+
+
+
Address
+
+ 'SupAddress','value' => set_value('SupAddress',$Address),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true','rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
Purchase Order Type
+
+
+ 'POType','value' => set_value('POType',SERVICE),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
Delivery Address
+
+ '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')); ?>
+
+
+
+
+
+
+
+
Delivery Date
+
+ 'Deliverydt','value' => set_value('Deliverydt',$Deliverydt),'id'=>'Deliverydt', 'class' => 'form-control num' ,'required' => 'true', 'onkeypress'=>'return false;');
+ echo form_input($data);
+ ?>
+
+
+
+ Schedule :
+ 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SNo
+ Requisition No
+ Item Name
+ Quantity
+ UOM
+ Rate
+ Basic Amount
+ Tax Amount
+ Total Order Amount
+ Action
+
+
+
+
+
+
+
+ ReqNo ?>
+ MaterialName ?>
+ Quantity ?>
+ UOM ?>
+ Rate ?>
+
+ BasicValue ?>
+
+ Taxamount ?>
+ TotalValue ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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;
+
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+ Basic Amount :
+ 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount',number_format($TotalBasicAmount,2)),'id'=>'txtTotBasicAmount', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+ Total Service Tax @14% :
+ 'txtTotalServiceTax','value' => set_value('txtTotalServiceTax',$TotalServiceTax),'id'=>'txtTotalServiceTax', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+ Total Edu. cess @2% on service Tax :
+ 'txtTotalEducess','value' => set_value('txtTotalEducess',$TotalEducessTax),'id'=>'txtTotalEducess', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ Total Sec. & Higher Edu. cess @1 % on service Tax :
+ 'txtTotHigherEdu','value' => set_value('txtTotHigherEdu',$TotalSecHigherEducessTax),'id'=>'txtTotHigherEdu', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+ Total Krishi Kalyan tax @.5 % on Basic Amount :
+ 'txtTotalKrishiKalyan','value' => set_value('txtTotalKrishiKalyan',$TotalKrishiKalyantax),'id'=>'txtTotalKrishiKalyan', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+ Total Swachh Bharat tax @.5 % on Basic Amount:
+ 'txtTotSwachhBharat','value' => set_value('txtTotSwachhBharat',$TotalSwachhBharattax),'id'=>'txtTotSwachhBharat', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
Total Order Value :
+
+ 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary',$TotalSummary),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ Comments Of Special Instructions : 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction',$ServiceDescription),'id'=>'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '4', 'cols' => '40' );
+ echo form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/views/includes/header.php b/application/views/includes/header.php
index 5f6cbd26..884740c2 100644
--- a/application/views/includes/header.php
+++ b/application/views/includes/header.php
@@ -310,6 +310,12 @@
Emergency Purchase Order
+
+
+
+
+ Amendment Purchase Order
+
BasicPlusDA;
$HRA = $Pay->HRA;
$OTWage = $Pay->OTWages;
+ $OtherDeductions=$Pay->OtherDeductions;
+ $LoanAdvance=$Pay->Advance;
if($OTWage == '')
{
$OTWages = '0.00';
@@ -101,9 +106,10 @@ if(!empty($PayDetails))
$GrosssSalary = $Pay->ESIGrossSalary;
$ESI = $Pay->EmployeeESI;
$PF = $Pay->PF;
- $ESIAndPF = $Pay->TotalDeduction;
+ $ESIAndPF = $PF+$ESI+$OtherDeductions+$LoanAdvance;
$SalaryAsPerPF = $Pay->SalaryAsPerPF;
$Food =$Pay->FoodAllowance;
+ $Otherallowances=$Pay->Other_allowances;
if($Food == '')
{
$FoodAllowance = '0.00';
@@ -121,7 +127,7 @@ if(!empty($PayDetails))
{
$Incentive = $IncenAmt;
}
- $TotalSalary = $Pay->TotalSalary;
+ $TotalSalary = $BasicAndDA+$HRA+$Food+$IncenAmt+$OTSal+$Otherallowances;
$Adv = $Pay->Advance;
if($Adv == '')
{
@@ -164,25 +170,27 @@ if($RecCount > 0)
?>
-
+
-
-
+
+
- Siddharth Industries Survey No: 168/1C3,Pennalur Pet Road,Goonipalyam village, Uthukottai Taluk,Tiruvallur Dist, Chennai,Tamilnadu,Pin code : 602026. PaySlip for the month -
+ Siddharth Industries Survey No: 168/1C3,Pennalur Pet Road,Goonipalyam village, Uthukottai Taluk,Tiruvallur Dist, Chennai,Tamilnadu,Pin code : 602026. PaySlip for the month -
+
+
-
+
Name :
-
+
Employee ID :
-
+
Desigination :
@@ -205,7 +213,7 @@ if($RecCount > 0)
PF Account Number :
-Balance Advance :
+Loan Balance :
@@ -223,25 +231,25 @@ if($RecCount > 0)
Bank Account Number :
-Loss Of Pay :
-
+UAN Number :
+101033275864
PAN Number :
QWERS3423E
-UAN Number :
-101033275864
+
+
Earnings Amount Deductions Amount
-Basic Plus DA
-
-Provident Fund
-
+Basic Plus DA
+
+Provident Fund
+
House Rent Allowance
@@ -252,28 +260,35 @@ if($RecCount > 0)
Food Allowance
-Advance
-
+Loan Recovery
+
+
+
+Other Allowance
+
+Other Deduction
+
Incentive
-
+
+
OT Salary
-
-
+
+
Total Earning (Rounded) (TE)
-
+
Total Deduction (Rounded)(TD)
-
+
Net Pay (Rounded) :
-
+
This is a computer generated document. This document does not require signature.
diff --git a/application/views/poapproval_view.php b/application/views/poapproval_view.php
index 1d536282..e5a6af58 100644
--- a/application/views/poapproval_view.php
+++ b/application/views/poapproval_view.php
@@ -88,15 +88,15 @@ if(empty($Status))
-
+ -
StatusName == 'ON HOLD' or $record->StatusName == 'PO CREATED' or $record->StatusName == 'EMERGENCY PO'){
+ }elseif($record->StatusName == 'ON HOLD' or $record->StatusName == 'PO CREATED' or $record->StatusName == 'EMERGENCY PO' or $record->StatusName == 'AMENDMENT PO' or $record->StatusName == 'AWAITING RELEASE'){
?>
@@ -108,7 +108,13 @@ if(empty($Status))
-
+
@@ -124,17 +130,35 @@ if(empty($Status))