diff --git a/application/config/constants.php b/application/config/constants.php
index d2c80519..c06a3056 100755
--- a/application/config/constants.php
+++ b/application/config/constants.php
@@ -135,7 +135,8 @@ define('VAT_ONEXICSEVALUE', '(((basicValue - discou
//CST
define('CST_ONBASICVALUE', '((CSTValue/100) * basicValue)');
-define('CST_ONEXICSEVALUE', '((CSTValue/100) * (basicValue+ExciseDuty))');
+//define('CST_ONEXICSEVALUE', '((CSTValue/100) * (basicValue+ExciseDuty))');
+define('CST_ONEXICSEVALUE', '(((basicValue - discountValue) + (packageValue + ExciseDuty)) * (CSTValue/100))');
//GST
define('GSTTAX', '((GSTValue/100) * basicValue)');
//Other Tax
diff --git a/application/controllers/emergencypurchaseorder.php b/application/controllers/emergencypurchaseorder.php
index 7b6a2a02..565be555 100755
--- a/application/controllers/emergencypurchaseorder.php
+++ b/application/controllers/emergencypurchaseorder.php
@@ -52,7 +52,7 @@ class emergencypurchaseorder extends BaseController
$this->global['pageTitle'] = 'Siddharth : Create Emergency Purchase Order';
$data['RequestType'] = $this->requistion_model->getConfigValue('C004');
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
- $data['DeptList'] = $this->purchaseorder_model->getDepartmentListForAllReq();
+ $data['DeptList'] = $this->purchaseorder_model->getDepartmentAllList();
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
$data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
@@ -84,13 +84,25 @@ class emergencypurchaseorder extends BaseController
//This used to Create Service Purchase Order
function addNewServicePurchaseOrder()
{
+
+
$POdt =$this->input->post('PODate');
$PODate = $this->getDateformat($POdt);
$SupplierID = $this->input->post('drpSupplier');
$DeliveryAddr = $this->input->post('DeliveryAddr');
$dt = $this->input->post('Deliverydt');
$CostCenterName = $this->input->post('CostCenterName');
- $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');
$SpcialInstruction = $this->input->post('TextSpcialInstruction');
@@ -99,6 +111,7 @@ class emergencypurchaseorder extends BaseController
$POStatus = $this->input->post('TextStatus');
$CreateBy = $this->session->userdata ('userId');
$RequestedBy = $this->session->userdata ('EmpID');
+
$ReqStatus = REQITEM_Emergency_PO_CREATED;
$RowCount = $this->input->post('TextRowCount');
@@ -123,7 +136,7 @@ class emergencypurchaseorder extends BaseController
// PO Master
- $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'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 );
$POMaster = $this->purchaseorder_model->addPOMaster($POList);
$PONO = '';
@@ -228,7 +241,15 @@ class emergencypurchaseorder extends BaseController
$SupplierID = $this->input->post('drpSupplier');
$DeliveryAddr = $this->input->post('DeliveryAddr');
$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 = '';
+ }
$CostCenterName = $this->input->post('CostCenterName');
$POType = $this->input->post('POType');
$PoRange = $this->input->post('txtPoRange');
@@ -260,7 +281,7 @@ class emergencypurchaseorder extends BaseController
$RegNo = $Req[0]['ReqNo'];
}
// PO Master
- $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'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 );
$POMaster = $this->purchaseorder_model->addPOMaster($POList);
diff --git a/application/controllers/emergencypurchaseorder.php~ b/application/controllers/emergencypurchaseorder.php~
new file mode 100755
index 00000000..565be555
--- /dev/null
+++ b/application/controllers/emergencypurchaseorder.php~
@@ -0,0 +1,1086 @@
+load->model('purchaseorder_model');
+
+ $this->load->library('session');
+ $this->load->library('form_validation');
+ $this->load->model('requistion_model');
+ $this->isLoggedIn();
+ }
+
+ /**
+ * This function used to load the first screen of the user
+ */
+ public function index()
+ {
+ $this->global['pageTitle'] = 'Siddharth : AddPO';
+
+ $this->loadViews("addPO", $this->global, NULL , NULL);
+ }
+
+ function requisition()
+ {
+ $data['DeptList'] = $this->purchaseorder_model->getDepartmentListForAllReq();
+
+ $data['stList'] = $this->purchaseorder_model->getStatusListforAllReq();
+
+ $data['ReqList'] = $this->purchaseorder_model->getRequistionListbySearch();
+ $this->global['pageTitle'] = 'Siddharth : Create PO from Requisition List';
+
+ $this->loadViews("createPOfromRequistion", $this->global, $data,Null);
+ }
+
+ function CreateEmergencyPO()
+ {
+ $this->global['pageTitle'] = 'Siddharth : Create Emergency Purchase Order';
+ $data['RequestType'] = $this->requistion_model->getConfigValue('C004');
+ $data['Suplist'] = $this->purchaseorder_model->getSupplierName();
+ $data['DeptList'] = $this->purchaseorder_model->getDepartmentAllList();
+ $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
+ $data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
+ $data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
+ $data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
+
+ $this->loadViews("alterpurchaseorder", $this->global, $data, Null);
+
+ }
+ /**
+ * this function used for get all material code using request type
+ */
+ function getMaterialCode(){
+ $reqType = $this->input->post('input');
+ $materialList = $this->requistion_model->GetMaterialCode($reqType);
+ echo json_encode($materialList);
+
+ }
+
+ /*This function is used for get cost center list using department code*/
+ function getCostCenterName(){
+ $CostList='';
+ $DeptCode = $this->input->post('id');
+ $CostList = $this->requistion_model->GetCostCenterByDept($DeptCode);
+ // print_r($CostList);
+ echo json_encode($CostList);
+
+ }
+
+ //This used to Create Service Purchase Order
+ function addNewServicePurchaseOrder()
+ {
+
+
+ $POdt =$this->input->post('PODate');
+ $PODate = $this->getDateformat($POdt);
+ $SupplierID = $this->input->post('drpSupplier');
+ $DeliveryAddr = $this->input->post('DeliveryAddr');
+ $dt = $this->input->post('Deliverydt');
+ $CostCenterName = $this->input->post('CostCenterName');
+ $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');
+
+ $SpcialInstruction = $this->input->post('TextSpcialInstruction');
+ $TotalOrderValueSummary = $this->input->post('TextTotalOrderValueSummaryService');
+
+ $POStatus = $this->input->post('TextStatus');
+ $CreateBy = $this->session->userdata ('userId');
+ $RequestedBy = $this->session->userdata ('EmpID');
+
+ $ReqStatus = REQITEM_Emergency_PO_CREATED;
+
+ $RowCount = $this->input->post('TextRowCount');
+
+ $DeletedRow = $this->input->post('TextDeletedRowCount');
+
+ $comma_separated = explode(':', $DeletedRow);
+
+ $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
+
+ $createddt = $dt->format('Y-m-d H:i:s');
+ //create T_Requestion_Master
+ $Request = array('ReqType'=>$POType, 'Requestedby'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$SpcialInstruction,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
+
+ $Req = $this->requistion_model->addRequistion($Request);
+
+ $RegNo='';
+ if(count($Req)>0)
+ {
+ $RegNo = $Req[0]['ReqNo'];
+ }
+
+
+ // 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 );
+
+ $POMaster = $this->purchaseorder_model->addPOMaster($POList);
+ $PONO = '';
+ if(count($POMaster)>0)
+ {
+ $PONO = $POMaster[0]['PONO'];
+ }
+
+ $RegDetailsStatus=REQITEM_POCREATED;
+
+ // PO Line Items
+ $LineItemStatus = REQITEM_NEW;
+
+ for ($i = 1; $i <= $RowCount; $i++)
+ {
+
+ $MaterialCode = $this->input->post('materialCode'.$i);
+ $Quantity = $this->input->post('quantity'.$i);
+ $Reqnumber = $this->input->post('Reqnumber'.$i);
+ $itemRate = $this->input->post('itemRate'.$i);
+ $ServiceTax = $this->input->post('ServiceTax'.$i);
+ $EduCess = $this->input->post('EduCess'.$i);
+ $SecHighTax = $this->input->post('SecHighTax'.$i);
+ $KrishiTax = $this->input->post('KrishiTax'.$i);
+ $SwachhTax = $this->input->post('SwachhTax'.$i);
+ $CostCenter = $this->input->post('costCode'.$i);
+
+ $TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
+ $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")
+ {
+
+ //add requistion details
+ $ReqDetails = array('ReqNo'=>$RegNo, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Status'=>$RegDetailsStatus,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$createddt);
+
+
+ $ReqDetQuery = $this->requistion_model->addRequistionDetails($ReqDetails);
+
+
+
+ $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter);
+ $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
+ $LineItemNo = '';
+ if(count($POLineItem)>0)
+ {
+ $LineItemNo = $POLineItem[0]['LineItemNo'];
+ }
+
+
+ if(trim($POType) == SERVICE )
+ {
+ // echo 'Success';
+
+ $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);
+
+ }
+ }
+ else {
+
+ }
+
+ }
+
+ if($POStatus == REQ_DRAFT)
+ {
+ echo 'Emergency Service Purchase Order Saved Successfully!The PO NO Is: '.$PONO;
+
+ }
+ else
+ {
+ echo 'Emergency Service Purchase Order Created Successfully!The PO NO Is: '.$PONO;
+
+ }
+
+
+ }
+
+
+
+ //This used to Create Revenue Emergency Purchase Order
+ function addNewRevenuePurchaseOrder()
+ {
+
+ $POdt =$this->input->post('PODate');
+ $PODate = $this->getDateformat($POdt);
+ $SupplierID = $this->input->post('drpSupplier');
+ $DeliveryAddr = $this->input->post('DeliveryAddr');
+ $dt = $this->input->post('Deliverydt');
+ $DeliveryOption = $this->input->post('DateRange');
+ if($DeliveryOption==1){
+ $Deliverydt = '';
+ $DeliverySchedule = $this->input->post('Scheduleby');
+ }
+ else{
+ $Deliverydt = $this->getDateformat($dt);
+ $DeliverySchedule = '';
+ }
+ $CostCenterName = $this->input->post('CostCenterName');
+ $POType = $this->input->post('POType');
+ $PoRange = $this->input->post('txtPoRange');
+
+ $SpcialInstruction = $this->input->post('TextSpcialInstruction');
+ $TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
+ $POStatus = $this->input->post('TextStatus');
+
+ $CreateBy = $this->session->userdata ( 'userId' );
+ $RowCount = $this->input->post('TextRowCount');
+ $DeletedRow = $this->input->post('TextDeletedRowCount');
+ $RequestedBy = $this->session->userdata ('EmpID');
+ $ReqStatus = REQITEM_Emergency_PO_CREATED;
+
+
+ $comma_separated = explode(':', $DeletedRow);
+
+ $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
+ $createddt = $dt->format('Y-m-d H:i:s');
+
+ //add requistion
+ $Request = array('ReqType'=>$POType, 'Requestedby'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$SpcialInstruction,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
+
+ $Req = $this->requistion_model->addRequistion($Request);
+
+ $RegNo='';
+ if(count($Req)>0)
+ {
+ $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 );
+
+ $POMaster = $this->purchaseorder_model->addPOMaster($POList);
+
+ $PONO = '';
+ if(count($POMaster)>0)
+ {
+ $PONO = $POMaster[0]['PONO'];
+ }
+
+ // PO Line Items
+ $RegDetailsStatus=REQITEM_POCREATED;
+ $LineItemStatus = REQITEM_NEW;
+
+ for ($i = 1; $i <= $RowCount; $i++)
+ {
+
+ $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);
+ $CostCenter = $this->input->post('costCode'.$i);
+
+ $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")
+ {
+ //add requistion details
+ $ReqDetails = array('ReqNo'=>$RegNo, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Status'=>$RegDetailsStatus,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$createddt);
+
+
+ $ReqDetQuery = $this->requistion_model->addRequistionDetails($ReqDetails);
+
+ $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter);
+
+ $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
+
+ $LineItemNo = '';
+ if(count($POLineItem)>0)
+ {
+ $LineItemNo = $POLineItem[0]['LineItemNo'];
+ }
+ //echo $LineItemNo;
+
+ if(trim($POType) == REVENUE )
+ {
+ // echo 'Success';
+ $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'=>$CreateBy,'CreatedDate'=>$createddt);
+
+ $RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
+ //echo 'Revenue tax Success';
+ }
+ }
+
+ }
+ echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ;
+
+ }
+
+
+ /**
+ * This function is used to load the purchaseorder list
+ */
+ function PurchaseOrderList()
+ {
+
+ $this->load->library('pagination');
+
+ $count = $this->purchaseorder_model->purchaseorderListingCount('');
+
+ $returns = $this->paginationCompress ( "purchaseorderListing/", $count, 5 );
+
+ //$this->purchaseorder_model->UpdateRequistItemStatus();
+ $this->purchaseorder_model->UpdateRequistionStatus();
+ $data['POData'] = $this->purchaseorder_model->purchaseorderListing();
+
+ $this->global['pageTitle'] = 'Siddharth : Purchase Orders';
+
+ $this->loadViews("POlist", $this->global, $data, NULL);
+
+ }
+ function Req_validate($selectValue)
+ {
+ //echo 'select_validate method called';
+ // 'none' is the first option and the text says something like "-Choose one-"
+ if(strlen($selectValue) == 0)
+ {
+ $this->form_validation->set_message('Req_validate', 'Please Select Requisition Number to Create PO.');
+ return false;
+ }
+ else // user picked something
+ {
+ return true;
+ }
+ }
+
+ /**
+ * This function used to show the Purchase Order Screen
+ */
+
+ function CreatePurchaseOrder()
+ {
+
+
+ $this->load->library('form_validation');
+
+ $this->form_validation->set_rules('txtReqNo', 'txtReqNo', 'callback_Req_validate');
+
+ if($this->form_validation->run() == FALSE)
+ {
+ $this->requisition();
+ //echo 'Validate method called';
+ }
+ else
+ {
+
+ $this->global['pageTitle'] = 'Siddharth : Purchase order form';
+ $data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
+ $data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
+ $data['Suplist'] = $this->purchaseorder_model->getSupplierName();
+ $SelectedReq = json_decode($this->input->post('txtReqNo'));
+ $Req = $SelectedReq->Req;
+ $data['ReqList'] = $Req ;
+ $ReqArray = array();
+ $ReqType = '';
+ $result = array();
+
+ foreach ($Req as $SID):
+ $ReqArray[] = $SID->ReqNo ;
+ $result[] = $this->purchaseorder_model->getRawPOMaterialList($SID->ReqNo);
+ $ReqType = $SID->ReqType;
+ //echo $SID->ReqNo;
+
+ endforeach;
+ //print_r ($result);
+ $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
+ $Year = $dt->format('Y');
+ $data['CostList'] = $this->purchaseorder_model->getCostCenterbyRequist('',$Year,$ReqType);
+ $data['MaterialList'] = $result; //$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray);
+ //print_r ($data['MaterialList']);
+ $data['RequistionDetails'] = $this->purchaseorder_model->getRequistDetails($ReqArray);
+ $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
+ $data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate();
+
+ $ViewName = '';
+ if($ReqType == REVENUE)
+ {
+ $ViewName = 'Purchaseorder';
+ }
+ else if($ReqType == SERVICE)
+ {
+ $ViewName = 'servicePurchaseorder';
+ }
+ $this->loadViews($ViewName, $this->global,$data, NULL);
+ }
+ }
+
+ function CreatePOPrint()
+ {
+ $PONO = $_GET['PONO'];
+ $ReqType = $_GET['ReqType'];
+
+ if($ReqType == SERVICE)
+ {
+ $this ->servicepoprint($PONO);
+
+ }
+ else if($ReqType == REVENUE)
+ {
+ $this ->revenuepoprint($PONO);
+
+ }
+ }
+ //To View/Update Purchase Order
+ function EditPurchaseOrder()
+ {
+ $PONO = $_GET['PONO'];
+ $ReqType = $_GET['ReqType'];
+ $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
+ $Year = $dt->format('Y');
+ $data['CostList'] = $this->purchaseorder_model->getCostCenterbyRequist('',$Year,$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();
+ $data['RequistionDetails'] = $this->purchaseorder_model->getRequistDetails($ReqArray);
+ $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("EditservicePurchaseorder", $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("editRevenuepurchaseorder", $this->global, $data, NULL);
+ }
+
+ }
+
+ // To get the Material value based on the MaterialCode
+ function getDetailsforReq()
+ {
+
+
+ $SearchFilter= $this->input->post('id');
+ // $reqDate= $this->input->post('ReqDate');
+ $DeptCode = $SearchFilter[0];
+ $MatType = $SearchFilter[1];
+ $ReqNo = $SearchFilter[2];
+ // $ReqDetai = $this->purchaseorder_model->getRequistDetails( $EmpID );
+
+ $CostList = $this->requistion_model->GetCostCenterByDept( $DeptCode);
+
+ $HTML = "";
+ $BudAmount = "";
+ if(count($CostList) > 0)
+ {
+ for ($j = 0; $j < count($CostList); $j++)
+ {
+ $Code = $CostList[$j]['CostCenterCode'];
+ $Name = $CostList[$j]['CostCenterName'];
+ $HTML .="";
+ }
+ }
+ $MaterialDetails = $this->purchaseorder_model->getRawMaterialListForPO($MatType,$ReqNo);
+
+ $HTML1 = "";
+
+ if(count($MaterialDetails) > 0)
+ {
+ for ($j = 0; $j < count($MaterialDetails); $j++)
+ {
+ $Code = $MaterialDetails[$j]['MaterialCode'];
+ $Name = $MaterialDetails[$j]['MaterialName'];
+ $HTML1 .="";
+
+ }
+
+ }
+ // print_r($HTML1);
+
+ die(json_encode(array('MatDetail' =>$HTML1,'Cost'=> $HTML)));
+ }
+ /* This method to get the status based on the Department selection in th
+ */
+ function getStatusByDepartment()
+ {
+ $DepId = $this->input->post('id');
+
+ $data = $this->purchaseorder_model->getStatusByDepartment($DepId);
+
+ $HTML = "";
+ if(count($data) > 0)
+ {
+ for ($j = 0; $j < count($data); $j++)
+ {
+ $Code = $data[$j]['StatusCode'];
+ $Name = $data[$j]['StatusName'];
+ $HTML .="";
+ }
+ }
+ //echo $HTML;
+ die(json_encode(array('depStaus' => $HTML)));
+ }
+
+ // To get the available Budget Amount
+ function AvilBudgetAmount()
+ {
+ $SearchFilter= $this->input->post('id');
+ // $reqDate= $this->input->post('ReqDate');
+ $CostCode = $SearchFilter[0];
+ $ReqType = $SearchFilter[1];
+ print_r($SearchFilter);
+ $CostCode= $this->input->post('id');
+ $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
+
+ $Year = $dt->format('Y');
+ $this->load->model('purchaseorder_model');
+ $result = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
+ //print_r($result);
+ $AvilBudAmt = '';
+ if(count($result)>0)
+ {
+ $AvilBudAmt = $result[0]['BudgetAmount'] - $result[0]['Totalvalue'];
+ }
+
+ // echo 'Test';
+ print_r($AvilBudAmt);
+ //die(json_encode(array('Cost' => $AvilBudAmt)));
+ }
+
+
+ function getDateformat($Val)
+ {
+ $date = new DateTime($Val,new DateTimeZone('Asia/Kolkata'));
+ // print_r($date);
+ $retDate = $date->format('Y-m-d H:i:s');
+ return $retDate;
+ }
+ /* Method to get the Requistion list based on the search filter*/
+
+ function SearchListofRequistion()
+ {
+ $SearchFilter= $this->input->post('id');
+ // $reqDate= $this->input->post('ReqDate');
+ $DEPCode = $SearchFilter[0];
+ $Status = $SearchFilter[1];
+ $rng = $SearchFilter[2];
+ // $ToDate = $SearchFilter[3];
+ $FromDate ='';
+ $ToDate = '';
+ // echo $rng;
+ $Dt = explode("-",$rng);
+ // print_r( $Dt);
+ if(count( $Dt)>1)
+ {
+ $FDate = $Dt[0];
+ $TDate = $Dt[1];
+ $FromDate = $this->getDateformat($FDate);
+ $ToDate = $this->getDateformat($TDate);
+ }
+ //echo $FromDate;
+ // print_r($Dt);
+ $result = $this->purchaseorder_model->getRequistionListbySearch($DEPCode,$Status,$FromDate,$ToDate);
+
+
+ $HTML="";
+ for ($i = 0; $i < count($result); $i++)
+ {
+ $SNo = $i + 1;
+ $ReqNo = $result[$i]['ReqNo'];
+ $ReqType = $result[$i]['ReqType'];
+ $Reqedby = $result[$i]['FirstName'];
+ $ReqDate = $result[$i]['ReqDate'];
+ $Status = $result[$i]['StatusName'];
+ $Department = $result[$i]['DepartmentName'];
+ $Designation = $result[$i]['Designation'];
+
+ $HTML.="
+ |
+ ". $ReqNo." |
+
+ ".$ReqType." |
+
+ ".$Reqedby." |
+ ".$ReqDate." |
+ ".$Status." |
+ ".$Department." |
+ ".$Designation." |
+
";
+ }
+ //print_r( $HTML);
+ die(json_encode(array('ReqList' =>$HTML)));
+ }
+
+
+ /* To View the request details*/
+ function ListPORequistion()
+ {
+ $ReqNo= $this->input->post('id');
+ $result = $this->requistion_model->getRequistItemList($ReqNo);
+ $ReqList = $this->requistion_model->getRequistDetails($ReqNo);
+ $DepNo = $ReqList[0]['DEPCode'];
+ $CostList = $this->requistion_model->GetCostCenterByDept($DepNo);
+ $HTML="";
+ for ($i = 0; $i < count($result); $i++)
+ {
+ $SNo = $i + 1;
+ $MaterialCode = $result[$i]['MaterialCode'];
+ $MaterialName = $result[$i]['MaterialName'];
+ $UOM = $result[$i]['UOM'];
+ $Quantity = $result[$i]['Quantity'];
+ $HTML.="
+ | ".$SNo." |
+ ". $MaterialCode." |
+
+ ".$MaterialName." |
+
+ ".$UOM." |
+ ".$Quantity." |
+
";
+
+ //$index = $index + 1;
+
+ }
+
+ $CostCenter = "";
+ if(count($CostList) > 0)
+ {
+ for ($j = 0; $j < count($CostList); $j++)
+ {
+ $Code = $CostList[$j]['CostCenterCode'];
+ $Name = $CostList[$j]['CostCenterName'];
+ $CostCenter .="";
+ }
+ }
+ //echo $HTML;
+ //echo $CostCenter;
+ die(json_encode(array('Items' =>$HTML,'Requist'=>$ReqList,'Cost'=>$CostCenter)));
+ }
+
+ //This used to Create Revenue Purchase Order
+ function addNewPurchaseOrder()
+ {
+ $POdt =$this->input->post('PODate');
+ $PODate = $this->getDateformat($POdt);
+ $SupplierID = $this->input->post('drpSupplier');
+ $DeliveryAddr = $this->input->post('DeliveryAddr');
+ $dt = $this->input->post('Deliverydt');
+ $Deliverydt = $this->getDateformat($dt);
+ $POType = $this->input->post('POType');
+ $PoRange = $this->input->post('txtPoRange');
+
+ $SpcialInstruction = $this->input->post('txtSpcialInstruction');
+ $TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
+ $POStatus = $this->input->post('txtStatus');
+
+ $CreateBy = $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'));
+ $createddt = $dt->format('Y-m-d H:i:s');
+ // PO Master
+ $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt );
+
+ $POMaster = $this->purchaseorder_model->addPOMaster($POList);
+
+ $PONO = '';
+ if(count($POMaster)>0)
+ {
+ $PONO = $POMaster[0]['PONO'];
+ }
+ //echo $PONO;
+ //echo $POType;
+ // PO Line Items
+ $LineItemStatus = REQITEM_NEW;
+ //echo ' test:'.REVENUE;
+ //echo $RowCount;
+ for ($i = 1; $i <= $RowCount; $i++)
+ {
+
+ $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);
+ $CostCenter = $this->input->post('costCode'.$i);
+
+ $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")
+ {
+ $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter);
+
+ $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
+
+ $LineItemNo = '';
+ if(count($POLineItem)>0)
+ {
+ $LineItemNo = $POLineItem[0]['LineItemNo'];
+ }
+ //echo $LineItemNo;
+
+ if(trim($POType) == REVENUE )
+ {
+ // echo 'Success';
+ $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'=>$CreateBy,'CreatedDate'=>$createddt);
+
+ $RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
+ //echo 'Revenue tax Success';
+ }
+ }
+
+ }
+ echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ;
+
+ }
+ //This used to Edit the Revenue Purchase Order
+ function EditRevenuePurchaseOrder()
+ {
+ $PONO =$this->input->post('txtPONO');
+ $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);
+ $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
+ $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt );
+
+ $POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
+
+ $LineItemStatus = REQITEM_NEW;
+
+
+
+ //echo $RowCount;
+ for ($i = 1; $i <= $RowCount; $i++)
+ {
+
+ $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'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter);
+ $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
+ if(count($POLineItem)>0)
+ {
+ $LineItemNo = $POLineItem[0]['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 Updated Successfully! PO Number Is: '.$PONO ;
+ }
+ function pageNotFound()
+ {
+ $this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
+
+ $this->loadViews("404", $this->global, NULL, NULL);
+ }
+
+ public function revenuepoprint($PONO)
+ {
+ // Load all views as normal
+
+
+ //$PONO = $_GET['PO'];
+
+ $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
+ $data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetailsForPDF($PONO);
+
+
+ // Add header to pdf
+ //$this->load->view('includes/pdfheader');
+
+ // Load the pdf page with multiviews
+ $this->load->View("revenuepopdf", $data);
+
+ // Add header to pdf
+ //$this->load->view('includes/pdffooter');
+
+ // Get output html
+ $php = $this->output->get_output();
+
+ // Load library
+ $this->load->library('dompdf_gen');
+
+ // Convert to PDF
+ $this->dompdf->load_html($php);
+ $this->dompdf->render();
+ $data['Attachment'] = FALSE;
+ $this->dompdf->stream("RevenuePOReport.pdf",$data,$php);
+
+ }
+ public function servicepoprint($PONO)
+ {
+
+ // $this->load->view('includes/pdfheader');
+
+ // Load the pdf page with multiviews
+ $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
+ $data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetailsForPrint($PONO);
+
+ $this->load->View("servicepopdf", $data);
+
+ // Add header to pdf
+ //$this->load->view('includes/pdffooter');
+
+ // Get output html
+ $php = $this->output->get_output();
+
+ // Load library
+ $this->load->library('dompdf_gen');
+
+ // Convert to PDF
+ $this->dompdf->load_html($php);
+ $this->dompdf->render();
+ $data['Attachment'] = FALSE;
+ $this->dompdf->stream("ServicePOReport.pdf",$data,$php);
+
+ }
+ /**
+ * This function used to load the Delete the Requistion Items
+ */
+ function DeletePODetails()
+ {
+
+ $ReqList= $this->input->post('id');
+ $LineItemNo = '';
+ $ReqNo ='';
+ $MaterialCode = '';
+ $POType = '';
+ if(count($ReqList) > 0)
+ {
+ $LineItemNo = $ReqList[0];
+ $ReqNo = $ReqList[1];
+ $MaterialCode = $ReqList[2];
+ $POType = $ReqList[3];
+ }
+ // print_r($ReqList);
+
+
+ If($POType == REVENUE)
+ {
+ $this->purchaseorder_model->DeletePORevenueTax($LineItemNo);
+ }
+ else If($POType == SERVICE)
+ {
+ $this->purchaseorder_model->DeletePOServiceTax($LineItemNo);
+ }
+ $this->purchaseorder_model->DeletePOLineItem($LineItemNo , $ReqNo,$MaterialCode);
+ echo "Successfully Deleted the Line item".$LineItemNo;
+
+ }
+}
+
+?>
diff --git a/application/controllers/inwardgateregister.php b/application/controllers/inwardgateregister.php
old mode 100644
new mode 100755
diff --git a/application/controllers/login.php b/application/controllers/login.php
index 3f4e9766..9a0b7b2c 100755
--- a/application/controllers/login.php
+++ b/application/controllers/login.php
@@ -78,6 +78,7 @@ class Login extends CI_Controller
'DEPCode'=>$res->DEPCode,
'HeadDept'=>$res->HeadDept,
'DepartmentName'=>$res->DepartmentName,
+ 'EmpID' => $res->EmpID,
'isLoggedIn' => TRUE
);
diff --git a/application/libraries/BaseController.php b/application/libraries/BaseController.php
index fa1575cf..99b8cce0 100755
--- a/application/libraries/BaseController.php
+++ b/application/libraries/BaseController.php
@@ -48,6 +48,7 @@ class BaseController extends CI_Controller {
$this->DEPCode = $this->session->userdata ( 'DEPCode' );
$this->HeadDept = $this->session->userdata ( 'HeadDept' );
$this->DepartmentName = $this->session->userdata ( 'DepartmentName' );
+ $this->EmpID = $this->session->userdata ( 'EmpID' );
$this->global ['name'] = $this->name;
$this->global ['role'] = $this->role;
$this->global ['role_text'] = $this->roleText;
@@ -155,4 +156,4 @@ class BaseController extends CI_Controller {
"segment" => $segment
);
}
-}
\ No newline at end of file
+}
diff --git a/application/logs/log-2017-06-14.php b/application/logs/log-2017-06-14.php
new file mode 100644
index 00000000..e86ec190
--- /dev/null
+++ b/application/logs/log-2017-06-14.php
@@ -0,0 +1,88 @@
+
+
+ERROR - 2017-06-14 16:45:01 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 16:45:01 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 16:45:01 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 141
+ERROR - 2017-06-14 16:45:01 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 187
+ERROR - 2017-06-14 16:45:01 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 215
+ERROR - 2017-06-14 16:46:09 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 16:46:09 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 16:46:09 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 141
+ERROR - 2017-06-14 16:46:09 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 187
+ERROR - 2017-06-14 16:46:09 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 215
+ERROR - 2017-06-14 16:54:24 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 16:54:24 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 16:54:24 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 16:54:24 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 16:54:24 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 16:59:24 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 16:59:24 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 16:59:24 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 16:59:24 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 16:59:24 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 16:59:26 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 16:59:26 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 16:59:26 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 16:59:26 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 16:59:26 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:03:59 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:03:59 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:03:59 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:03:59 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:03:59 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:22:59 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:22:59 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:22:59 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:22:59 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:22:59 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:24:27 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:24:27 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:24:27 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:24:27 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:24:27 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:25:43 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:25:44 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:26:22 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-14 17:26:22 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-14 17:26:22 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-14 17:26:22 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-14 17:26:22 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-14 17:26:59 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given /opt/lampp/htdocs/Git_Server/siddharth_application/system/database/drivers/mysqli/mysqli_result.php 38
diff --git a/application/logs/log-2017-06-15.php b/application/logs/log-2017-06-15.php
new file mode 100644
index 00000000..60c0652c
--- /dev/null
+++ b/application/logs/log-2017-06-15.php
@@ -0,0 +1,145 @@
+
+
+ERROR - 2017-06-15 06:39:59 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 06:39:59 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 06:39:59 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 06:39:59 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 06:39:59 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 08:03:27 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 08:03:27 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 08:03:27 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 08:03:27 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 08:03:27 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 09:24:09 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 09:24:09 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 09:24:09 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 09:24:09 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 09:24:09 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 09:24:10 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 09:24:10 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 09:24:10 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 09:24:10 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 09:24:10 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 09:38:37 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 09:38:37 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 09:38:37 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 09:38:37 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 09:38:37 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 09:39:31 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given /opt/lampp/htdocs/Git_Server/siddharth_application/system/database/drivers/mysqli/mysqli_result.php 38
+ERROR - 2017-06-15 09:40:17 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 09:40:17 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 09:40:17 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 09:40:17 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 09:40:17 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 10:31:56 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 10:31:56 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 10:31:56 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 10:31:56 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 10:31:56 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 10:32:57 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 10:32:57 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 10:32:57 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 10:32:57 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 10:32:57 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 10:34:21 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given /opt/lampp/htdocs/Git_Server/siddharth_application/system/database/drivers/mysqli/mysqli_result.php 38
+ERROR - 2017-06-15 10:37:47 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 10:37:47 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 10:37:47 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 10:37:47 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 10:37:47 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 10:38:48 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 10:38:48 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 10:38:48 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 10:38:48 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 10:38:48 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 10:39:18 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 10:39:18 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 10:39:18 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 10:39:18 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 10:39:18 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 10:45:31 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 10:45:31 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 10:45:31 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 10:45:31 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 10:45:31 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 10:45:32 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 10:45:32 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 10:45:32 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 10:45:32 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 10:45:32 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 10:45:49 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 10:45:49 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 10:45:49 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 10:45:49 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 10:45:49 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:23:48 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:23:48 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:23:48 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:23:48 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:23:48 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:25:21 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:25:21 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:25:21 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:25:21 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:25:21 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:26:02 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:26:02 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:26:02 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:26:02 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:26:02 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:29:09 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:29:09 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:29:09 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:29:09 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:29:09 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:30:40 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:30:40 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:30:40 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:30:40 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:30:40 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:32:05 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:32:05 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:32:05 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:32:05 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:32:05 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:47:07 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:47:07 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:47:07 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:47:07 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:47:07 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:52:57 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:52:57 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:52:57 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:52:57 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:52:57 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:53:16 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:53:16 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:53:16 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:53:16 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:53:16 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:53:58 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:53:58 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:53:58 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:53:58 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:53:58 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:54:49 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:54:49 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:54:49 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:54:49 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:54:49 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:55:15 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:55:15 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:55:15 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:55:15 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:55:15 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 11:56:35 --> Severity: Warning --> mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given /opt/lampp/htdocs/Git_Server/siddharth_application/system/database/drivers/mysqli/mysqli_result.php 38
+ERROR - 2017-06-15 11:57:28 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 11:57:28 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 11:57:28 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 11:57:28 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 11:57:28 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
+ERROR - 2017-06-15 12:08:51 --> Severity: Notice --> Undefined variable: RequistionDetails /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 138
+ERROR - 2017-06-15 12:08:51 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 139
+ERROR - 2017-06-15 12:08:51 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 140
+ERROR - 2017-06-15 12:08:51 --> Severity: Notice --> Undefined variable: MaterialList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 186
+ERROR - 2017-06-15 12:08:51 --> Severity: Notice --> Undefined variable: CostList /opt/lampp/htdocs/Git_Server/siddharth_application/application/views/alterpurchaseorder.php 214
diff --git a/application/models/login_model.php b/application/models/login_model.php
index b7afc93f..d6ccf023 100755
--- a/application/models/login_model.php
+++ b/application/models/login_model.php
@@ -10,7 +10,7 @@ class Login_model extends CI_Model
*/
function loginMe($email, $password)
{
- $this->db->select('BaseTbl.userId, BaseTbl.password, Emp.FirstName,Emp.Designation, BaseTbl.roleId, Roles.role,DEPT.DEPCode,DEPT.DepartmentName,DEPT.HeadDept');
+ $this->db->select('BaseTbl.userId, BaseTbl.password, Emp.EmpID,Emp.FirstName,Emp.Designation, BaseTbl.roleId, Roles.role,DEPT.DEPCode,DEPT.DepartmentName,DEPT.HeadDept');
$this->db->from('tbl_users as BaseTbl');
$this->db->join('tbl_roles as Roles','Roles.roleId = BaseTbl.roleId');
$this->db->join('T_Employee_Details as Emp','BaseTbl.EmpID = Emp.EmpID');
@@ -34,4 +34,4 @@ class Login_model extends CI_Model
}
}
-?>
\ No newline at end of file
+?>
diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php
index 39de822e..73609251 100755
--- a/application/models/purchaseorder_model.php
+++ b/application/models/purchaseorder_model.php
@@ -621,6 +621,18 @@ class purchaseorder_model extends CI_Model
//print_r($query);
return $query->result();
}
+ /*
+ This Method to get all department list
+ */
+ function getDepartmentAllList()
+ {
+ $subQuery ='SELECT DISTINCT DEPCode,DepartmentName FROM T_DepartmentDetails';
+
+ $query = $this->db->query($subQuery);
+ //print_r($query);
+ return $query->result();
+ }
+
function getStatusListforAllReq()
{
@@ -780,4 +792,4 @@ class purchaseorder_model extends CI_Model
}
-
\ No newline at end of file
+
diff --git a/application/views/alterpurchaseorder.php b/application/views/alterpurchaseorder.php
index 6ff240da..021008dc 100755
--- a/application/views/alterpurchaseorder.php
+++ b/application/views/alterpurchaseorder.php
@@ -1,4 +1,3 @@
-
;
+
var Vatval = parseFloat(AfterVat).toFixed(2);
@@ -956,6 +956,7 @@ function calculatePackaging(isEdit)
{
if(isEdit == '0')
{
+
if($('#MaterialCode').val() == "0")
{
alert('Please Select the Material Code');
@@ -974,6 +975,8 @@ function calculatePackaging(isEdit)
else
{
var basicValue = parseFloat($('#txtBasicValue').val());
+ var discountValue = parseFloat($('#txtAfterDiscount').val());
+ var packageValue = parseFloat($('#txtAfterPackaging').val());
var AfterCST = 0.0;
if(CSTCalculation != 0 && $('#txtCST').val() != '' )
{
@@ -989,7 +992,8 @@ function calculatePackaging(isEdit)
{
var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
var CSTValue= parseFloat($('#txtCST').val());
- AfterCST = ;
+ AfterCST = ;
+
var Vatval = parseFloat(AfterCST).toFixed(2);
$('#txtAfterCST').val(Vatval);
@@ -997,10 +1001,13 @@ function calculatePackaging(isEdit)
}
else if(CSTCalculation == 0 && $('#txtCST').val() != '')
{
+
+ var ExciseDuty = parseFloat($('#txtAfterExciseDuty').val());
var CSTValue= parseFloat($('#txtCST').val());
- AfterCST = ;
+
+ AfterCST = ;
var Vatval = parseFloat(AfterCST).toFixed(2);
-
+
$('#txtAfterCST').val(Vatval);
}
@@ -1033,6 +1040,8 @@ function calculatePackaging(isEdit)
{
var basicValue = parseFloat($('#txtEditRevenueBasicValue').val());
+ var discountValue = parseFloat($('#txtEditAfterDiscount').val());
+ var packageValue = parseFloat($('#txtEditAfterPackaging').val());
var AfterCST = 0.0;
if(CSTCalculation != 0 && $('#txtEditCST').val() != '' )
{
@@ -1048,7 +1057,7 @@ function calculatePackaging(isEdit)
{
var ExciseDuty = parseFloat($('#txtEditAfterExciseDuty').val());
var CSTValue= parseFloat($('#txtEditCST').val());
- AfterCST = ;
+ AfterCST = ;
var Vatval = parseFloat(AfterCST).toFixed(2);
$('#txtEditAfterCST').val(Vatval);
@@ -1056,8 +1065,9 @@ function calculatePackaging(isEdit)
}
else if(CSTCalculation == 0 && $('#txtEditCST').val() != '')
{
+ var ExciseDuty = parseFloat($('#txtEditAfterExciseDuty').val());
var CSTValue= parseFloat($('#txtEditCST').val());
- AfterCST = ;
+ AfterCST = ;
var Vatval = parseFloat(AfterCST).toFixed(2);
$('#txtEditAfterCST').val(Vatval);
@@ -1262,6 +1272,7 @@ function calculatePackaging(isEdit)
{
var basicValue = parseFloat($('#txtBasicValue').val());
var FreightType =$("#drpFreight").val();
+
if(FreightType == "0")
{
alert('Please select Freight Type');
@@ -1294,6 +1305,9 @@ function calculatePackaging(isEdit)
else if(FreightType == '')
{
AfterFreight = ;
+ }
+ else {
+ AfterFreight = $("#txtFreight").val();
}
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
@@ -1359,7 +1373,10 @@ function calculatePackaging(isEdit)
else if(FreightType == '')
{
AfterFreight = ;
- }
+ }
+ else {
+ AfterFreight = $("#txtEditFreight").val();
+ }
var AfterFreightval = parseFloat(AfterFreight).toFixed(2);
$('#txtEditAfterFreight').val(AfterFreightval);
@@ -1442,7 +1459,7 @@ function calculatePackaging(isEdit)
calculateOtherTaxes(isEdit);
calculateFreight(isEdit)
calculateEditVatValue();
- calculateEditTotalValue($('#isEdit').val());
+ calculateEditTotalValue();
}
@@ -1526,7 +1543,7 @@ function calculatePackaging(isEdit)
var Freight = $('#txtEditAfterFreight').val() == '' ? '0.00' : $('#txtEditAfterFreight').val();
var Insurance = $('#txtEditInsurance').val() == '' ? '0.00' : $('#txtEditInsurance').val();
var Discount = $('#txtEditAfterDiscount').val() == '' ? '0.00' : $('#txtEditAfterDiscount').val();
- var BasicVal = $('#txtEditBasicValue').val() == '' ? '0.00' : $('#txtEditBasicValue').val();
+ var BasicVal = $('#txtEditRevenueBasicValue').val() == '' ? '0.00' : $('#txtEditRevenueBasicValue').val();
var totvalue = ( parseFloat(BasicVal) + parseFloat(Packaging)+ parseFloat(ExciseDuty)+ parseFloat(Vat) + parseFloat(CST)+ parseFloat(GST) + parseFloat(OtherTax) + parseFloat(Freight) + parseFloat(Insurance)) - parseFloat(Discount);
@@ -1651,19 +1668,20 @@ function calculatePackaging(isEdit)
{
var td = document.getElementById(rowid);
td.parentNode.removeChild(td);
-
+ var materialCode = $('#materialCode'+rowid).val();
var removeItem = $('#materialCode'+rowid).val();
+
+ //This function is used to add material list after delete
+ $.each(JSON.parse(materialData), function (index, value) {
+ if (value.MaterialCode==materialCode) {
+ $("#MaterialCode").append( $('').val(value.MaterialCode).html(value.MaterialCode + "-" + value.MaterialName) );
+ }
+ });
+
+ SelectedMaterialCode.splice( SelectedMaterialCode.indexOf('removeItem'), 1 );
+
-
- SelectedMaterialCode.splice( SelectedMaterialCode.indexOf('removeItem'), 1 );
- // $.each(SelectedMaterialList.Mat, function(i, el){
-
- //if (this.materialCode == removeItem){//Type = '';
- // SelectedMaterialList.Mat.splice(i, 1);
- // }
- // });
- // alert(SelectedMaterialCode);
if(DelRows != '')
{
DelRows = DelRows + ":" + rowid;
@@ -1673,7 +1691,7 @@ function calculatePackaging(isEdit)
DelRows= "0" + ":" + rowid;
}
- $('#txtDeletedRow').val(DelRows);
+ $('#txtDeletedRow1').val(DelRows);
populateValueMainFormForDeleteItem(rowid);
}
@@ -1794,56 +1812,25 @@ function populateValueMainFormForDeleteItem(rowid)
echo form_input($data);
?>
-
-
-
-
-
-
-
-
-
- 'txtcurrencytype','value' => set_value('txtcurrencytype'),'id'=>'txtcurrencytype', 'class' => 'form-control' ,'required' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtexachangerate','value' => set_value('txtexachangerate'),'id'=>'txtexachangerate', 'class' => 'form-control' ,'required' => 'true');
- echo form_input($data);
- ?>
-
-
-
+
+
-
-
- Select Tax Range
+ Select Delivery By
|
- "Range", "id"=>"Local", "value"=>"0", 'checked'=>set_radio('Range', '0', TRUE))); ?> |
+ "DateRange", "id"=>"Date", "value"=>"0", 'checked'=>set_radio('DateRange', '0', TRUE))); ?>
- "Range", "id"=>"Inter_state", "value"=>"1", 'checked'=>set_radio('Range', '1', FALSE))); ?>
+ "DateRange", "id"=>"Schedule", "value"=>"1", 'checked'=>set_radio('DateRange', '1', FALSE))); ?>
|
-
-
-
-
-
+
@@ -1886,15 +1873,29 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
+
+
+
+
+ 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
-
+
'Deliverydt','value' => set_value('Deliverydt'),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true');
+ $data = array('name' => 'Deliverydt','value' => set_value('Deliverydt'),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true');
echo form_input($data);
?>
-
+
+
+
+
@@ -1916,10 +1917,7 @@ function populateValueMainFormForDeleteItem(rowid)
echo form_dropdown('drpDepartment', $options,set_value('drpDepartment'),'id="DepartmentName"' ,'class = "form-control select2"','required="true"');
?>
-
-
-
-
+
@@ -1953,12 +1951,53 @@ function populateValueMainFormForDeleteItem(rowid)
?>
-
+
+
+
+ Select Tax Range
+
+ |
+ "Range", "id"=>"Local", "value"=>"0", 'checked'=>set_radio('Range', '0', TRUE))); ?> |
+
+ "Range", "id"=>"Inter_state", "value"=>"1", 'checked'=>set_radio('Range', '1', FALSE))); ?>
+
+ |
+
+
+
+
+
+
+
+
+ 'txtcurrencytype','value' => set_value('txtcurrencytype'),'id'=>'txtcurrencytype', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtexachangerate','value' => set_value('txtexachangerate'),'id'=>'txtexachangerate', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
-
-
+
@@ -2319,7 +2358,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
@@ -2433,7 +2472,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtAfterDiscount','value' => set_value('txtAfterDiscount'),'id'=>'txtAfterDiscount', 'class' => 'form-control' ,'readonly' => 'true');
@@ -2452,7 +2491,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtAfterVat','value' => set_value('txtAfterVat'),'id'=>'txtAfterVat', 'class' => 'form-control' ,'readonly' => 'true','onkeypress'=>'return isNumberKey(event);');
@@ -2472,7 +2511,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtAfterCST','value' => set_value('txtAfterCST'),'id'=>'txtAfterCST', 'class' => 'form-control' ,'readonly' => 'true');
@@ -2517,7 +2556,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtAfterPackaging','value' => set_value('txtAfterPackaging'),'id'=>'txtAfterPackaging', 'class' => 'form-control' ,'readonly' => 'true');
@@ -2535,7 +2574,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtAfterGST','value' => set_value('txtAfterGST'),'id'=>'txtAfterGST', 'class' => 'form-control' ,'readonly' => 'true');
@@ -2558,7 +2597,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtAfterExciseDuty','value' => set_value('txtAfterExciseDuty'),'id'=>'txtAfterExciseDuty', 'class' => 'form-control' ,'readonly' => 'true');
@@ -2576,7 +2615,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtAfterOtherTax','value' => set_value('txtAfterOtherTax'),'id'=>'txtAfterOtherTax', 'class' => 'form-control' ,'readonly' => 'true');
@@ -2622,7 +2661,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtAfterFreight','value' => set_value('txtAfterFreight'),'id'=>'txtAfterFreight', 'class' => 'form-control' ,'readonly' => 'true');
@@ -3998,7 +4037,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtEditAfterDiscount','value' => set_value('txtEditAfterDiscount'),'id'=>'txtEditAfterDiscount', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
@@ -4018,7 +4057,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtEditAfterVat','value' => set_value('txtEditAfterVat'),'id'=>'txtEditAfterVat', 'class' => 'form-control' ,'readonly' => 'true','onkeypress'=>'return isNumberKey(event);','style'=>'text-align:right;');
@@ -4039,7 +4078,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtEditAfterCST','value' => set_value('txtEditAfterCST'),'id'=>'txtEditAfterCST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
@@ -4086,7 +4125,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtEditAfterPackaging','value' => set_value('txtEditAfterPackaging'),'id'=>'txtEditAfterPackaging', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
@@ -4104,7 +4143,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtEditAfterGST','value' => set_value('txtEditAfterGST'),'id'=>'txtEditAfterGST', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
@@ -4127,7 +4166,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtEditAfterExciseDuty','value' => set_value('txtEditAfterExciseDuty'),'id'=>'txtEditAfterExciseDuty', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
@@ -4145,7 +4184,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtEditAfterOtherTax','value' => set_value('txtEditAfterOtherTax'),'id'=>'txtEditAfterOtherTax', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
@@ -4191,7 +4230,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtEditAfterFreight','value' => set_value('txtEditAfterFreight'),'id'=>'txtEditAfterFreight', 'class' => 'form-control' ,'readonly' => 'true','style'=>'text-align:right;');
@@ -4355,21 +4394,15 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
'txtTotalFreight','value' => set_value('txtTotalFreight'),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
-
-
- 'revenueTax','value' => set_value('revenueTax'),'id'=>'revenueTax', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
+
+
'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary'),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control' ,'readonly' => 'true');
@@ -4377,6 +4410,7 @@ function populateValueMainFormForDeleteItem(rowid)
?>
+
+
@@ -4486,7 +4521,7 @@ function populateValueMainFormForDeleteItem(rowid)
-
+
diff --git a/application/views/alterpurchaseorder.php~ b/application/views/alterpurchaseorder.php~
new file mode 100755
index 00000000..021008dc
--- /dev/null
+++ b/application/views/alterpurchaseorder.php~
@@ -0,0 +1,6430 @@
+
+format('Y-m-d');
+$MaxPoDate = '';
+if(!empty($MaxPODate))
+{
+ foreach ($MaxPODate as $date)
+ {
+ $MaxPoDate = $date->PODate;
+ }
+}
+if(!empty($CompanyDetails))
+{
+ foreach ($CompanyDetails as $Req)
+ {
+ $CompanyAddress = $Req->Address;
+ }
+}
+?>
+
+
+
+
+
+ 'form-label-left CreatealterPO ','name' => 'CreatealterPO','id' => 'CreatealterPO');
+
+ echo form_open($this->config->base_url().'/purchaseorder/addalterPO/',$attributes); ?>
+
+
+
+
+
Siddharth Industries - Emergency Purchase Order
+
+
+
+
+
+
+
+ 'Select Request Type');
+
+ if(!empty($RequestType))
+ {
+ foreach ($RequestType as $RID):
+
+
+ $options[$RID->ConfigValue] = $RID->ConfigValue;
+
+ endforeach;
+ }
+
+ echo form_dropdown('RequestType', $options,set_value('ConfigValue'),'id="purpose"' ,'class = "form-control select2"','required="true"');
+
+ ?>
+
+
+
+
+
+ 'PODate','value' => set_value('PODate'),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'POType','value' => set_value('POType',$ReqType),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ Select Delivery By
+
+ |
+ "DateRange", "id"=>"Date", "value"=>"0", 'checked'=>set_radio('DateRange', '0', TRUE))); ?> |
+
+ "DateRange", "id"=>"Schedule", "value"=>"1", 'checked'=>set_radio('DateRange', '1', FALSE))); ?>
+
+ |
+
+
+
+
+
+
+
+
+
+ 'Select Supplier');
+ //print_r( $options);
+
+ if(!empty($Suplist))
+ {
+ foreach ($Suplist as $SID):
+
+
+ $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
+
+ endforeach;
+ }
+
+ echo form_dropdown('drpSupplier', $options,set_value('drpSupplier'),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2"');
+
+ ?>
+
+
+
+
+
+
+ 'SupAddress','value' => set_value('SupAddress'),'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'DeliveryAddr','value' => set_value('DeliveryAddr',$CompanyAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+ 'Scheduleby','value' => set_value('Scheduleby'),'id'=>'Scheduleby', 'class' => 'form-control' ,'required' => 'true' ,'rows' => '3', 'cols' => '40');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'Deliverydt','value' => set_value('Deliverydt'),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+ 'Select Department Name');
+
+ if(!empty($DeptList))
+ {
+ foreach ($DeptList as $DID):
+
+
+ $options[$DID->DEPCode] = $DID->DEPCode.' '.' - '.' '.$DID->DepartmentName;
+
+ endforeach;
+ }
+
+ echo form_dropdown('drpDepartment', $options,set_value('drpDepartment'),'id="DepartmentName"' ,'class = "form-control select2"','required="true"');
+
+ ?>
+
+
+
+
+
+
+ 'Cost Center Name');
+ //print_r( $options);
+
+ if(!empty($POType))
+ {
+ foreach ($SupplierName as $SID):
+
+
+ $options[$SID->SupplierID] = $SID->SupplierID.' '.' - '.' '.$SID->SupplierName;
+
+ endforeach;
+ }
+
+ echo form_dropdown('CostCenterName', $options,set_value('CostCenterName'),'id="CostCenterName"','class="form-control select2"' , 'required="true"' ,'multiple="true"');
+
+ ?>
+
+
+
+
; ?>assets/dist/img/red.png)
+
+ 'AvalBuget','value' => set_value('AvalBuget'),'id'=>'AvalBuget', 'class' => 'form-control' ,'required' => 'true' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ Select Tax Range
+
+ |
+ "Range", "id"=>"Local", "value"=>"0", 'checked'=>set_radio('Range', '0', TRUE))); ?> |
+
+ "Range", "id"=>"Inter_state", "value"=>"1", 'checked'=>set_radio('Range', '1', FALSE))); ?>
+
+ |
+
+
+
+
+
+
+
+
+ 'txtcurrencytype','value' => set_value('txtcurrencytype'),'id'=>'txtcurrencytype', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtexachangerate','value' => set_value('txtexachangerate'),'id'=>'txtexachangerate', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | SNo |
+ Requisition No |
+ Item Name |
+ Quantity |
+ UOM |
+ Rate |
+ Basic Amount |
+ Tax Amount |
+ Total Order Amount |
+ Action |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'txtTotBasicAmountRevenue','value' => set_value('txtTotBasicAmountRevenue'),'id'=>'txtTotBasicAmountRevenue', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalDiscount','value' => set_value('txtTotalDiscount'),'id'=>'txtTotalDiscount', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalVat','value' => set_value('txtTotalVat'),'id'=>'txtTotalVat', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+ 'txtTotCST','value' => set_value('txtTotCST'),'id'=>'txtTotCST', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotExciseDuty','value' => set_value('txtTotExciseDuty'),'id'=>'txtTotExciseDuty', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalGST','value' => set_value('txtTotalGST'),'id'=>'txtTotalGST', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalPackaing','value' => set_value('txtTotalPackaing'),'id'=>'txtTotalPackaing', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalInsurance','value' => set_value('txtTotalInsurance'),'id'=>'txtTotalInsurance', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+ 'txtTotalOtherTaxes','value' => set_value('txtTotalOtherTaxes'),'id'=>'txtTotalOtherTaxes', 'class' => 'form-control','readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txtTotalFreight','value' => set_value('txtTotalFreight'),'id'=>'txtTotalFreight', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary'),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '4', 'cols' => '40' );
+ echo form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
Submit
+
+
+
+
+
+
+
+
+
+
+
+
+ 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount'),'id'=>'txtTotBasicAmount', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+ 'txtTotalServiceTax','value' => set_value('txtTotalServiceTax'),'id'=>'txtTotalServiceTax', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+ 'txtTotalEducess','value' => set_value('txtTotalEducess'),'id'=>'txtTotalEducess', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotHigherEdu','value' => set_value('txtTotHigherEdu'),'id'=>'txtTotHigherEdu', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+ 'txtTotalKrishiKalyan','value' => set_value('txtTotalKrishiKalyan'),'id'=>'txtTotalKrishiKalyan', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+ 'txtTotSwachhBharat','value' => set_value('txtTotSwachhBharat'),'id'=>'txtTotSwachhBharat', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txtTotalOrderValueSummaryService','value' => set_value('txtTotalOrderValueSummaryService'),'id'=>'txtTotalOrderValueSummaryService', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'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 f59e0045..a5a03d54 100755
--- a/application/views/includes/header.php
+++ b/application/views/includes/header.php
@@ -79,8 +79,6 @@
-
-
+
+
+ Siddharth Industries
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/views/inwardgateregister.php b/application/views/inwardgateregister.php
old mode 100644
new mode 100755
diff --git a/application/views/materialinspectionreport.php b/application/views/materialinspectionreport.php
old mode 100644
new mode 100755
diff --git a/assets/js/CreatePOValidation.js b/assets/js/CreatePOValidation.js
index f5609b64..28597352 100755
--- a/assets/js/CreatePOValidation.js
+++ b/assets/js/CreatePOValidation.js
@@ -47,7 +47,7 @@ function validate()
$('#DeliveryAddr').focus();
return false;
}
- else if($('#Deliverydt').val() == '')
+ else if($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '')
{
alert('Please Enter the Delivery Date');
$('#Deliverydt').focus();
diff --git a/assets/js/CreatePOValidation.js~ b/assets/js/CreatePOValidation.js~
new file mode 100755
index 00000000..28597352
--- /dev/null
+++ b/assets/js/CreatePOValidation.js~
@@ -0,0 +1,184 @@
+/**
+/**
+ * File : CreatePOValidation.js
+ *
+ * This file contain the validation of edit Create Po
+ *
+ * @author Gandhimathi
+ */
+$(document).ready(function(){
+
+
+
+
+ //Initialize Select2 Elements
+ $("#drpSupplier").select2();
+
+
+});
+function myFunction() {
+
+ if(validate())
+ {
+ var input = $('#POType').val();
+
+ $('#' + input).modal('show');
+ }
+
+}
+function validate()
+{
+
+ if($('#PODate').val() == '')
+ {
+ alert('Please Enter the Purchase Order date');
+ $('#PODate').focus();
+ return false;
+ }
+ else if($('#drpSupplier').val() == "0")
+ {
+ alert('Please Select the Supplier details');
+ $('#drpSupplier').focus();
+ return false;
+ }
+ else if($('#DeliveryAddr').val() == '')
+ {
+ alert('Please Enter the Delivery Address');
+ $('#DeliveryAddr').focus();
+ return false;
+ }
+ else if($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '')
+ {
+ alert('Please Enter the Delivery Date');
+ $('#Deliverydt').focus();
+ return false;
+ }
+
+ else
+ {
+ return true;
+ }
+}
+
+
+function validateRevenueTax()
+ {
+ if($('#ReqNo').val() == "0")
+ {
+ alert('Please select the Requisition Number');
+ $('#ReqNo').focus();
+ return false;
+ }
+ else if($('#CostCenter').val() == "0")
+ {
+ alert('Please select the Cost center');
+ $('#CostCenter').focus();
+ return false;
+ }
+ else if($('#MaterialCode').val() == "0")
+ {
+ alert('Please select the Material Code');
+ $('#MaterialCode').focus();
+ return false;
+ }
+ else if($('#Quantity').val() == '')
+ {
+ alert('Please Enter the Quantity value');
+ $('#Quantity').focus();
+ return false;
+ }
+ else if($('#Rate').val() == '')
+ {
+ alert('Please Enter the Rate of the Item');
+ $('#Rate').focus();
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+function calculateTotalValue()
+ {
+ var Packaging = $('#txtAfterPackaging').val() == '' ? '0.00' : $('#txtAfterPackaging').val();
+ var ExciseDuty = $('#txtAfterExciseDuty').val() == '' ? '0.00' : $('#txtAfterExciseDuty').val();
+ var Vat = $('#txtAfterVat').val() == '' ? '0.00' : $('#txtAfterVat').val();
+ var CST = $('#txtAfterCST').val() == '' ? '0.00' : $('#txtAfterCST').val();
+ var GST = $('#txtAfterGST').val() == '' ? '0.00' : $('#txtAfterGST').val();
+ var OtherTax = $('#txtAfterOtherTax').val() == '' ? '0.00' : $('#txtAfterOtherTax').val();
+ var Freight = $('#txtAfterFreight').val() == '' ? '0.00' : $('#txtAfterFreight').val();
+ var Insurance = $('#txtInsurance').val() == '' ? '0.00' : $('#txtInsurance').val();
+ var Discount = $('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val();
+ var BasicVal = $('#txtBasicValue').val() == '' ? '0.00' : $('#txtBasicValue').val();
+
+ var totvalue = ( parseFloat(BasicVal) + parseFloat(Packaging)+ parseFloat(ExciseDuty)+ parseFloat(Vat) + parseFloat(CST)+ parseFloat(GST) + parseFloat(OtherTax) + parseFloat(Freight) + parseFloat(Insurance)) - parseFloat(Discount);
+
+ var tot = parseFloat(totvalue).toFixed(2);
+
+ $('#txtTotalOrderValue').val(tot);
+ validateExceedLimit();
+ }
+function calculateTaxValue()
+ {
+ var Packaging = $('#txtAfterPackaging').val() == '' ? '0.00' : $('#txtAfterPackaging').val();
+ var ExciseDuty = $('#txtAfterExciseDuty').val() == '' ? '0.00' : $('#txtAfterExciseDuty').val();
+ var Vat = $('#txtAfterVat').val() == '' ? '0.00' : $('#txtAfterVat').val();
+ var CST = $('#txtAfterCST').val() == '' ? '0.00' : $('#txtAfterCST').val();
+ var GST = $('#txtAfterGST').val() == '' ? '0.00' : $('#txtAfterGST').val();
+ var OtherTax = $('#txtAfterOtherTax').val() == '' ? '0.00' : $('#txtAfterOtherTax').val();
+ var Freight = $('#txtAfterFreight').val() == '' ? '0.00' : $('#txtAfterFreight').val();
+ var Insurance = $('#txtInsurance').val() == '' ? '0.00' : $('#txtInsurance').val();
+ var Discount = $('#txtAfterDiscount').val() == '' ? '0.00' : $('#txtAfterDiscount').val();
+
+
+ var totvalue = ( parseFloat(Packaging)+ parseFloat(ExciseDuty)+ parseFloat(Vat) + parseFloat(CST)+ parseFloat(GST) + parseFloat(OtherTax) + parseFloat(Freight) + parseFloat(Insurance)) - parseFloat(Discount) ;
+
+ var tot = parseFloat(totvalue).toFixed(2);
+ //alert('tot:'+tot);
+ return tot;
+ }
+
+
+ function validateExceedLimit()
+ {
+ var avalbudAmt = parseFloat($('#AvlBudAmt').val());
+ var basicAmountRate = parseFloat($('#txtBasicValue').val());
+ var totalAmount = parseFloat($('#txtTotalOrderValue').val());
+
+ if(basicAmountRate > avalbudAmt || totalAmount > avalbudAmt)
+ {
+ alert('Basic amount is exceeding the Budget Limit.Please adjust the product value.');
+ $('#Rate').focus();
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+
+ }
+
+
+function isNumberKey(evt)
+ {
+ var charCode = (evt.which) ? evt.which : evt.keyCode;
+ if (charCode != 46 && charCode > 31
+ && (charCode < 48 || charCode > 57))
+ return false;
+
+ return true;
+ }
+function change(){
+ ExceedQuantityCheck();
+ if($('#Quantity').val() != '' && $('#Rate').val() != '')
+ {
+ var txtQuantity = parseFloat( $('#Quantity').val());
+ var txtUnitPrice = parseFloat($('#Rate').val());
+ var Tot = txtQuantity * txtUnitPrice
+ $('#txtBasicValue').val(Tot);
+ calculateTotalValue();
+
+ }
+
+}