diff --git a/application/config/constants.php b/application/config/constants.php
index 6f621888..2bf8ea01 100755
--- a/application/config/constants.php
+++ b/application/config/constants.php
@@ -104,6 +104,8 @@ define('PO_AWAITING_RELEASE', 'ST025');
define('PO_APPROVED', 'ST025');
define('PO_APPROVER_ONHOLD', 'ST051');
define('PO_RELEASER_ONHOLD', 'ST052');
+define('SPECIAL_PO', 'ST056');
+
/*store Status*/
define('STORE_DRAFT', 'ST043');
diff --git a/application/controllers/emergencypurchaseorder.php b/application/controllers/emergencypurchaseorder.php
old mode 100755
new mode 100644
index 334a5a14..c219ad59
--- a/application/controllers/emergencypurchaseorder.php
+++ b/application/controllers/emergencypurchaseorder.php
@@ -22,6 +22,7 @@ class emergencypurchaseorder extends BaseController
$this->load->library('session');
$this->load->library('form_validation');
$this->load->model('requistion_model');
+ $this->load->model('inwardgateregister_model');
$this->isLoggedIn();
}
@@ -91,6 +92,46 @@ class emergencypurchaseorder extends BaseController
}
+
+ function addfile()
+ {
+
+ $file = '';
+ //Check whether user upload picture
+ if(!empty($_FILES['images']['name']))
+ {
+ //echo 'true';
+ $config['upload_path'] = 'uploads/BillFiles/';
+ $config['allowed_types'] = 'docx|pdf|doc|png|jpg';
+ $config['file_name'] = $_FILES['images']['name'];
+ // print_r($config);die;
+ //Load upload library and initialize configuration
+ $this->load->library('upload',$config);
+ $this->upload->initialize($config);
+
+ if($this->upload->do_upload('images'))
+ {
+ $uploadData = $this->upload->data();
+ //print_r($uploadData);
+ $file = $uploadData['file_name'];
+ }
+ else
+ {
+ $error = array('error' => $this->upload->display_errors());
+ //print_r($error);
+ $file = '';
+ }
+ }
+ else
+ {
+ //echo 'false';
+ $file = '';
+ }
+
+ return $file ;
+ }
+
+
//This used to Create Service Purchase Order
function addNewServicePurchaseOrder()
{
@@ -133,7 +174,15 @@ class emergencypurchaseorder extends BaseController
$OtherPayment=$this->input->post('Otherpayment');
+ if($POStatus==SPECIAL_PO)
+ {
+ $ServiceWorkStatus=SERVICE_COMPLETED;
+ }
+
+ else
+ {
$ServiceWorkStatus=$this->input->post('workStatus');
+ }
$ServiceScheduleType = $this->input->post('ScheduleType');
$ServiceScheduleOptions = $this->input->post('ScheduleType');
//$ServiceServiceNo = $this->input->post('ServiceNo');
@@ -271,6 +320,9 @@ class emergencypurchaseorder extends BaseController
//This used to Create Revenue Emergency Purchase Order
function addNewRevenuePurchaseOrder()
{
+
+
+ $txtspl=$this->input->post('txtSpecial');
//echo "Emergency Revenue PO";
$POdt =$this->input->post('PODate');
@@ -307,12 +359,33 @@ class emergencypurchaseorder extends BaseController
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
$RequistionComments = "Created Emergency Revenue PO";
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
- $POStatus = $this->input->post('TextStatus');
+
+ if($txtspl==0)
+ {
+ $POStatus=REQITEM_Emergency_PO_CREATED;
+ }
+ else
+ {
+ $POStatus=SPECIAL_PO;
+ }
+
+ //$POStatus = $this->input->post('TextStatus');
$RequestedBy = $this->input->post('drpDepartment');
$CreateBy = $this->session->userdata ( 'userId' );
- $RowCount = $this->input->post('TextRowCount');
+ // $RowCount = $this->input->post('TextRowCount');
+
+ $RowCount=$this->input->post('txtRowCount1');
+
//echo $RowCount;
- $DeletedRow = $this->input->post('TextDeletedRowCount');
+ // $DeletedRow = $this->input->post('TextDeletedRowCount');
+
+ $DeletedRow = $this->input->post('txtDeletedRow1');
+
+
+
+ $splRow = $this->input->post('splrow');
+
+ // echo $DeletedRow;
$ReqStatus = REQITEM_Emergency_PO_CREATED;
$Local_Interstate=$this->input->post('Range');
@@ -322,8 +395,19 @@ $RequestedBy = $this->input->post('drpDepartment');
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s');
$PaymentTerms=$this->input->post('PaymentMethod');
- $OtherPayment=$this->input->post('Otherpayment');
-
+ $OtherPayment=$this->input->post('Otherpayment');
+
+ if($POStatus==SPECIAL_PO)
+ {
+ $Qualitycheck=$this->input->post('txtQuality');
+ }
+
+ else
+ {
+ $Qualitycheck=1;
+ }
+
+
//add requistion
$Request = array('ReqType'=>$POType, 'RequestedDept'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
@@ -336,7 +420,7 @@ $RequestedBy = $this->input->post('drpDepartment');
$RegNo = $Req[0]['ReqNo'];
}
// PO Master
- $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype);
+ $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype,'IsQualityChkReqired'=>$Qualitycheck);
//print_r($POList);
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype);
@@ -375,12 +459,12 @@ $RequestedBy = $this->input->post('drpDepartment');
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
$revenuedescription = $this->input->post('service_description'.$i);
$CostCenter = $this->input->post('costCode'.$i);
- $Cgst = $this->input->post('RevenueCgst'.$i);
- $Sgst = $this->input->post('RevenueSgst'.$i);
- $Igst = $this->input->post('RevenueIgst'.$i);
- $AfterCgst = $this->input->post('RevenueAfterCgst'.$i);
- $AfterSgst = $this->input->post('RevenueAfterSgst'.$i);
- $AfterIgst = $this->input->post('RevenueAfterIgst'.$i);
+ $Cgst = $this->input->post('RevenueCgst'.$i);
+ $Sgst = $this->input->post('RevenueSgst'.$i);
+ $Igst = $this->input->post('RevenueIgst'.$i);
+ $AfterCgst = $this->input->post('RevenueAfterCgst'.$i);
+ $AfterSgst = $this->input->post('RevenueAfterSgst'.$i);
+ $AfterIgst = $this->input->post('RevenueAfterIgst'.$i);
$SkipInsert = "False";
if( count($comma_separated) > 0)
{
@@ -425,8 +509,162 @@ $RequestedBy = $this->input->post('drpDepartment');
}
}
- }
- echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ;
+ }
+
+
+ if($txtspl==1 || $txtspl==2)
+ {
+
+ $PONOigr = $PONO;
+
+ //echo $PONOigr;
+ //die();
+ //IGR Data Entry
+ //$DeliveryChellanOrInvoiceNo = $this->input->post('ChallanInvNo');
+
+ $DeliveryChellanInvoiceNo=$this->input->post('ChallanInvNo');
+
+ $DeliveryChellan = $this->input->post('ChallanInvDate');
+ $DeliveryChellanDate = $this->getDateformat($DeliveryChellan);
+
+ $Vehicle = $this->input->post('VehicleNo');
+ $Courier = $this->input->post('CourierNo');
+
+
+ $CreatedBy = $this->session->userdata('userId');
+ //$Remarks = $this->input->post('Remarks');
+ //$RowCount = $this->input->post('TextRowCount');
+ //echo $RowCount;
+ $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
+ $createddt = $dt->format('Y-m-d H:i:s');
+
+ $IGRStatus = IGR_CREATED;
+
+
+
+ $igr = array();
+
+ $igr = array('PONO'=>$PONO,'VehicleNo'=>$Vehicle,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'CourierNo'=>$Courier,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt);
+
+ //print_r($igr);
+
+ $igrM = $this->inwardgateregister_model->addigrM($igr);
+
+
+
+
+ $IGRNO = '';
+ if(count($igrM)>0)
+ {
+ foreach ($igrM as $key )
+ {
+ $IGRNO=$key->IGRNO;
+ }
+ }
+ //echo $IGRNO;
+
+ $IGRItemStatus = REQITEM_NEW;
+
+
+ for ($i = 1; $i <= $RowCount; $i++)
+ {
+
+ $MaterialCode = trim($this->input->post('materialCode'.$i));
+
+ $QuantityAsPerInvoice = $this->input->post('quantity'.$i);
+
+ $OrderedQuantity = $this->input->post('quantity'.$i);
+
+ $ReceivedQty = $this->input->post('AQuantity'.$i);
+
+ $emergencyitemcode = $this->input->post('emergencyitemcode');
+
+ $PendingQty = 0;
+ //echo $QuantityAsPerInvoice;
+ //echo $PendingQty.'ReceivedQty'.$ReceivedQty;
+ //echo ' ';
+
+ if(strlen($QuantityAsPerInvoice)>0 && $QuantityAsPerInvoice != '0')
+ {
+ $Remarks = "Special PO Created";
+ $ItemStatus = '';
+ //if($QuantityAsPerInvoice == $OrderedQuantity)
+
+ if($PendingQty == 0.00 )
+
+ {
+ $ItemStatus = IGR_CREATED;
+ }
+ else
+ {
+ $ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
+ }
+
+ $CreatedBy = $this->session->userdata('userId');
+
+
+ $igrDetails = array('IGRNO'=>$IGRNO,'MaterialCode'=>$MaterialCode,'QuantityAsPerInvoice'=>$QuantityAsPerInvoice,'Remarks'=>$Remarks,'IGRItemStatus'=>$IGRItemStatus,'CreatedBy'=>$CreatedBy,'CreatedDate'=>$createddt);
+
+
+ //print_r($igrDetails);
+
+
+
+ $igrD = $this->inwardgateregister_model->addigrD($igrDetails);
+
+ $Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO,$MaterialCode);
+ $ReceivedQuantity = 0.00;
+ if(count($Recqty)>0)
+ {
+ foreach ($Recqty as $key ) {
+ $ReceivedQuantity=$key->ReceivedQuantity;
+ }
+ }
+ $totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
+
+ //echo '';
+
+ $POLineItem = array('ReceivedQuantity'=>$totalReceivedqty,'Status'=>$ItemStatus,'UpdateBY'=>$CreatedBy,'UpdatedOn'=>$createddt );
+
+ $this->inwardgateregister_model->UpdatePOLineItem($POLineItem,$PONO,$MaterialCode);
+ }
+
+
+ // $file =$this->addfile();
+ // $emergencyitemcode = $this->input->post('emergencyitemcode'.$i);
+ // ($this->input->post('materialCode'.$i));
+ // $myfile = array('FilePath'=>$file,'MaterialCode'=>$emergencyitemcode,'PONO'=>$PONO,'IGRNO'=>$IGRNO);
+ // // print_r($myfile);
+ // $result= $this->purchaseorder_model->fileupload($myfile);
+
+
+
+
+
+
+ }
+
+
+ for ($i = 1; $i <= $splRow; $i++)
+ {
+
+ $file =$this->addfile();
+ $emergencyitemcode = $this->input->post('materialCode'.$i);
+ $myfile = array('FilePath'=>$file,'MaterialCode'=>$emergencyitemcode,'PONO'=>$PONO,'IGRNO'=>$IGRNO);
+ $result= $this->purchaseorder_model->fileupload($myfile);
+
+ }
+
+
+ }
+
+ //if($result > 0)
+ // {
+
+
+ echo "";
+ redirect('purchaseorder/PurchaseOrderList','refresh');
+ // }
}
diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php
index 80f56945..07cfbcf7 100755
--- a/application/controllers/purchaseorder.php
+++ b/application/controllers/purchaseorder.php
@@ -394,6 +394,8 @@ class purchaseorder extends BaseController
$PAYTERM=$TER->PaymentTerms;
}
+
+ $data['getdata'] = $this->purchaseorder_model->getfunction($PONO);
$data['MaxPODate'] = $this->purchaseorder_model->getLastReleasedPODate();
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
@@ -908,7 +910,7 @@ class purchaseorder extends BaseController
$DeliveryAddr = $this->input->post('DeliveryAddr');
$dt = $this->input->post('Deliverydt');
$POType = $this->input->post('POType');
- $DeliveryOption = $this->input->post('DateRange');
+ $DeliveryOption = $this->input->post('DateRange');
if($DeliveryOption==1){
$Deliverydt = '';
$DeliverySchedule = $this->input->post('Scheduleby');
@@ -950,8 +952,10 @@ class purchaseorder extends BaseController
$PaymentTerms=$this->input->post('PaymentTerms');
$OtherPayment=$this->input->post('Otherpayment');
$Local_Interstate=$this->input->post('Range');
+
+ $Qualitycheck=1;
// PO Master
- $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno);
+ $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'IsQualityChkReqired'=>$Qualitycheck);
// print_r($POList);
// die();
@@ -1097,9 +1101,11 @@ class purchaseorder extends BaseController
$PaymentTerms=$this->input->post('PaymentTerms');
$OtherPayment=$this->input->post('Otherpayment');
$Local_Interstate=$this->input->post('Range');
+
+ $Qualitycheck=1;
// PO Master
// PO Master
- $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno);
+ $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'IsQualityChkReqired'=>$Qualitycheck);
//print_r($POList);
//die();
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
@@ -1719,8 +1725,9 @@ function addNewImportPurchaseOrder()
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType);
+ $Qualitycheck=1;
- $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$Insurance,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption);
+ $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$Insurance,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption,'IsQualityChkReqired'=>$Qualitycheck);
//print_r($POList);
//die();
@@ -1940,10 +1947,10 @@ function addNewImportPurchaseOrder()
// PO Master
// PO Master
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms);
+ $Qualitycheck=1;
+
-
-
- $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$insurestatus,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption);
+ $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Shipmentmode,'Supplier_Reference'=>$SupplierRef,'Supplier_Offer_No'=>$SupplierOffer,'Other_Reference'=>$otherRef,'Fincap'=>$finCap,'InsuranceStatus'=>$insurestatus,'InsuranceNumber'=>$Insurancenumber,'POSubType'=>$importoption,'IsQualityChkReqired'=>$Qualitycheck);
//echo $PONO;
//echo $TotalOrder;
//print_r($POList);
@@ -2325,9 +2332,11 @@ function addNewImportPurchaseOrder()
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s');
- $currencytypeID = $this->input->post('currencytype');
+ $currencytypeID = $this->input->post('currencytype');
+
+ $Qualitycheck=1;
- $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'ExchangeRate'=>$ExchangeRate,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CapitalRange'=>$CapitalRange,'POType'=>$POType,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch,'DeliveryDate'=>$Deliverydt,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions);
+ $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'ExchangeRate'=>$ExchangeRate,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CapitalRange'=>$CapitalRange,'POType'=>$POType,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch,'DeliveryDate'=>$Deliverydt,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'IsQualityChkReqired'=>$Qualitycheck);
// $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin);
@@ -2578,9 +2587,10 @@ function addNewImportPurchaseOrder()
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s');
$updateddt = $dt->format('Y-m-d H:i:s');
+ $Qualitycheck=1;
- $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch,'DeliveryDate'=>$Deliverydt,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions);
+ $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'DeliverySchedule'=>$DeliverySchedule,'Import_PlaceofOrgin'=>$Palaceoforigin,'Import_DispatchDetails'=>$Dispatch,'DeliveryDate'=>$Deliverydt,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$SupplierReference,'Mode_Of_Shipment'=>$ModeOfShipment,'Supplier_Offer_No'=>$SuppliersOfferNo,'Other_Reference'=>$OtherReferences,'Fincap'=>$Fincap,'InsuranceStatus'=>$InsuranceOptions,'InsuranceNumber'=>$InsuranceNo,'POSubType'=>$ServiceTypeOptions,'IsQualityChkReqired'=>$Qualitycheck);
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
diff --git a/application/models/mrir_model.php b/application/models/mrir_model.php
index a6608a3b..8dd4d969 100755
--- a/application/models/mrir_model.php
+++ b/application/models/mrir_model.php
@@ -29,7 +29,8 @@ class mrir_model extends CI_Model
$this->db->from('T_IGR_Master igr');
$this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO');
$this->db->join('T_SupplierDetailsN` sup','PO.SupplierID = sup.SupplierID');
- $this->db->where('igr.IGRStatus !=',MRIR_CREATED);
+ // $this->db->where('igr.IGRStatus !=',MRIR_CREATED);
+ $this->db->where('PO.IsQualityChkReqired',1);
$this->db->order_by("CreatedDate","desc");
$query = $this->db->get();
$result = $query->result();
@@ -37,7 +38,7 @@ class mrir_model extends CI_Model
return $result;
}
/* This function is used to get the igr value (button link)*/
- function get_IGR($IgrNo)
+ function get_IGR($IgrNo)
{
$this->db->distinct();
$this->db->select('IGRM.DeliveryChellanDate,IGRM.CreatedDate,IGRM.IGRNO,IGRM.VehicleNo,IGRM.DeliveryChellanOrInvoiceNo,IGRM.CourierNo,IGRM.PONO,IGRD.MaterialCode,IGRD.QuantityAsPerInvoice,POMR.ServiceDescription,POMR.PODate,POMR.DeliveryDate,POMR.CreatedBy,SUPP.SupplierName,SUPP.Address,MM.UOM,MM.MaterialName,POLT.Quantity,POLT.ReceivedQuantity,ED.FirstName');
@@ -131,8 +132,8 @@ TMD.QuantityRejected,ST.StatusName,TMD.Remarks,AdvanceAmount ');
$this->db->join('T_PurchaseOrder_AdvanceRequest PUADV','POM.PONO=PUADV.PONO','left');
$this->db->join ('tbl_users user','user.userid=TMD.UpdateBY');
$this->db->join ('T_Employee_Details ED','ED.EmpID = user.EmpID');
- $this->db->join ('tbl_users user1','user1.userid = POM.ReleasedBy');
- $this->db->join ('T_Employee_Details ED1','ED1.EmpID = user1.EmpID');
+ $this->db->join ('tbl_users user1','user1.userid = POM.ReleasedBy','left');
+ $this->db->join ('T_Employee_Details ED1','ED1.EmpID = user1.EmpID','left');
$this->db->join ('tbl_users user2','user2.userid=TMD.StoreInchargeID');
$this->db->join ('T_Employee_Details ED2','ED2.EmpID = user2.EmpID');
$this->db->join ('T_MaterialMaster MM','MM.MaterialCode = IGRD.MaterialCode and POL.MaterialCode = MM.MaterialCode');
diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php
index bc3bb205..9c2d39b0 100755
--- a/application/models/purchaseorder_model.php
+++ b/application/models/purchaseorder_model.php
@@ -20,6 +20,38 @@ class purchaseorder_model extends CI_Model
return $query->result();
}
+
+
+
+ function fileupload($myfile)
+ {
+ $this->db->insert('T_PurchaseOrder_BillUpload',$myfile);
+ $myfile=$this->db->affected_rows();
+ return $myfile;
+ }
+
+
+
+ function getfunction($pono)
+ {
+ $this->db->distinct();
+ $this->db->select('bill.PONO,mstr.IGRNO,bill.BillNo,bill.MaterialCode,bill.FilePath,mstr.DeliveryChellanOrInvoiceNo,mstr.DeliveryChellanDate,mstr.VehicleNo,mstr.CourierNo,dtl.QuantityAsPerInvoice,pom.POType,mm.MaterialName');
+ $this->db->from('T_PurchaseOrder_BillUpload bill');
+ $this->db->join('T_IGR_Master mstr','bill.IGRNO = mstr.IGRNO');
+ $this->db->join('T_IGR_Details dtl','mstr.IGRNO = dtl.IGRNO');
+ $this->db->join('T_MaterialMaster mm','mm.MaterialCode = bill.MaterialCode');
+ $this->db->join('T_PurchaseOrder_Master pom','pom.PONO = bill.PONO');
+ $this->db->where('bill.PONO',$pono);
+ //$this->db->or_where('pom.status',SPECIAL_PO);
+ //$this->db->group_by('bill.BillNo');
+
+ $query = $this->db->get();
+
+ return $query->result();
+ }
+
+
+
function GetPODetailforBillingServicePO($PONO)
{
diff --git a/application/views/alterpurchaseorder.php b/application/views/alterpurchaseorder.php
old mode 100755
new mode 100644
index d1816b79..476e0785
--- a/application/views/alterpurchaseorder.php
+++ b/application/views/alterpurchaseorder.php
@@ -1,7746 +1,8348 @@
-"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
- );
-$ReqType ='';
-$CompanyAddress = '';
-$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
-$CurrentDate = $dt->format('d-m-Y');
-$MaxPoDate = '';
-if(!empty($MaxPODate))
-{
- foreach ($MaxPODate as $date)
- {
- $MaxPoDate = $date->PODate;
- }
-}
-if(!empty($CompanyDetails))
-{
- foreach ($CompanyDetails as $Req)
- {
- $CompanyAddress = $Req->Address;
- }
-}
-
-if(!empty($INRSYMBOL))
-{
-
- foreach($INRSYMBOL as $INRS)
- {
- $INRSYM=$INRS->FontCode2000;
-
- }
-}
-?>
-
-
-
-
-
-
-
-
-
- '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):
- if($RID->ConfigValue=="SERVICE" || $RID->ConfigValue=="REVENUE")
- {
- $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',$CurrentDate),'id'=>'PODate', 'class' => 'form-control num' ,'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))); ?>
-
- |
-
-
-
-
-
-
- 'Selected Work Status');
- foreach ($WorkStatus as $WSID):
-
-
- $options4[$WSID->StatusCode] = $WSID->StatusName;
-
- endforeach;
- }
-
- echo form_dropdown('workstatus', $options4,set_value('workstatus'),'id="workstatusValue"' ,'required="true"' ,'class="form-control select2');
-
- ?>
-
-
-
-
-
-
-
-
-
- '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','maxlength' => '110');
- echo Form_textarea($data);
- ?>
-
-
-
-
-
- 'Deliverydt','value' => set_value('Deliverydt',$CurrentDate),'id'=>'Deliverydt', 'class' => 'form-control num' ,'required' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
- 'Select Department Name');
-
- if(!empty($DeptList))
- {
-
- foreach ($DeptList as $DID):
-
- $options1[$DID->DEPCode] = $DID->DEPCode.' '.' - '.' '.$DID->DepartmentName;
-
- endforeach;
- }
-
- echo form_dropdown('drpDepartment', $options1,set_value('drpDepartment'),'id="DepartmentName"' ,'class = "form-control select2"','required="true"', 'disabled="disabled"');
-
- ?>
-
-
-
-
-
-
- 'Cost Center Name');
-
-
- if(!empty($CostList))
- {
-
- foreach ($CostList as $cost):
-
-
- $options2[$cost['CostCenterCode']] = $cost['CostCenterCode'].' '.' - '.' '.$cost['CostCenterName'];
-
- endforeach;
- }
-
- echo form_dropdown('CostCenterName', $options2,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 num' ,'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);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ConfigValue] = $SerOption->ConfigValue;
- endforeach;
-
- }
- echo form_dropdown('ServiceOptions', $ServiceOptions,set_value('ServiceOptions'),'id="ServiceOptions"' ,'class = "form-control"');
-
- ?>
-
-
-
-
-
- 'ServiceNo','value' => set_value('ServiceNo',1),'id'=>'ServiceNo', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'emergmodeofshipment','value' => set_value('emergmodeofshipment'),'id'=>'emergmodeofshipment', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
- 'emergsupplierreference','value' => set_value('emergsupplierreference'),'id'=>'emergsupplierreference', 'class' => 'form-control','maxlength'=>'40');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
- 'emergsupplierofferno','value' => set_value('emergsupplierofferno'),'id'=>'emergsupplierofferno', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
- 'emergotherreference','value' => set_value('emergotherreference'),'id'=>'emergotherreference', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
-
-
-
-
- 'emergfincap','value' => set_value('emergfincap'),'id'=>'emergfincap', 'class' => 'form-control');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'Select Work Status');
-
-
- if(!empty($PoTypeOptions))
- {
- foreach ($PoTypeOptions as $POpt):
-
-
- $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue;
-
- endforeach;
- }
-
- echo form_dropdown('PoTypeOptions', $optionsPO,set_value('PoTypeOptions'),'id="PoTypeOptions"' ,'required="true"' ,'class="form-control select2');
-
-
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'insuranceNo','value' => set_value('insuranceNo'),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
- 'Select Payment method');
- //print_r( $options);
- if(!empty($Payment))
- {
- foreach ($Payment as $payment):
-
-
- $options1[$payment->PaymentID] = $payment->PaymentTerms;
-
- endforeach;
- }
- echo form_dropdown('PaymentMethod', $options1,set_value('PaymentMethod'),'id="PaymentMethod"' ,'class="form-control"');
- ?>
-
-
-
-
-
- 'Otherpayment','Otherpayment' => set_value('Otherpayment'),'id'=>'Otherpayment', 'class' => 'form-control' ,'required' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | SNo |
- Requisition No |
- Item Code |
- Item Description |
- Quantity |
- UOM |
- Rate |
- Basic Amount |
- Tax Amount |
- Total Order Amount |
- Action |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'txtTotBasicAmountRevenue','value' => set_value('txtTotBasicAmountRevenue'),'id'=>'txtTotBasicAmountRevenue', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
- 'txtTotalDiscount','value' => set_value('txtTotalDiscount'),'id'=>'txtTotalDiscount', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
- 'txtTotalCGST','value' => set_value('txtTotalCGST'),'id'=>'txtTotalCGST', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
- 'txtTotalSGST','value' => set_value('txtTotalSGST'),'id'=>'txtTotalSGST', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
- 'txtTotalIGST','value' => set_value('txtTotalIGST'),'id'=>'txtTotalIGST', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
- 'txtTotalPackaing','value' => set_value('txtTotalPackaing'),'id'=>'txtTotalPackaing', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtTotalInsurance','value' => set_value('txtTotalInsurance'),'id'=>'txtTotalInsurance', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
- 'txtTotalFreight','value' => set_value('txtTotalFreight'),'id'=>'txtTotalFreight', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
- 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary'),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '8');
- echo form_textarea($data);
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
- 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount'),'id'=>'txtTotBasicAmount', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
- 'txtTotCgst','value' => set_value('txtTotCgst'),'id'=>'txtTotCgst', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
- 'txtTotSgst','value' => set_value('txtTotSgst'),'id'=>'txtTotSgst', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
- 'txtTotIgst','value' => set_value('txtTotIgst'),'id'=>'txtTotIgst', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
- 'txtTotOtherAllo','value' => set_value('txtTotOtherAllo'),'id'=>'txtTotOtherAllo', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
- 'txtTotalOrderValueSummaryService','value' => set_value('txtTotalOrderValueSummaryService'),'id'=>'txtTotalOrderValueSummaryService', 'class' => 'form-control num' ,'readonly' => 'true');
- echo form_input($data);
- ?>
-
-
-
-
-
-
-
-
- 'emergdescofpo','value' => set_value('emergdescofpo'),'id'=>'emergdescofpo', 'class' => 'form-control' ,'rows' => '3', 'cols' => '40' );
- echo form_textarea($data);
- ?>
-
-
-
-
- 'ScopeOfWork','value' => set_value('ScopeOfWork'),'id'=>'ScopeOfWork', 'class' => 'form-control','rows' => '8');
- echo form_textarea($data); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+"NO","value"=>"0"),array("name"=>"YES","value"=>"1")
+ );
+$ReqType ='';
+$CompanyAddress = '';
+$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
+$CurrentDate = $dt->format('d-m-Y');
+$MaxPoDate = '';
+if(!empty($MaxPODate))
+{
+ foreach ($MaxPODate as $date)
+ {
+ $MaxPoDate = $date->PODate;
+ }
+}
+if(!empty($CompanyDetails))
+{
+ foreach ($CompanyDetails as $Req)
+ {
+ $CompanyAddress = $Req->Address;
+ }
+}
+
+if(!empty($INRSYMBOL))
+{
+
+ foreach($INRSYMBOL as $INRS)
+ {
+ $INRSYM=$INRS->FontCode2000;
+
+ }
+}
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ '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):
+ if($RID->ConfigValue=="SERVICE" || $RID->ConfigValue=="REVENUE")
+ {
+ $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',$CurrentDate),'id'=>'PODate', 'class' => 'form-control num' ,'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))); ?>
+
+ |
+
+
+
+
+
+
+ 'Selected Work Status');
+ foreach ($WorkStatus as $WSID):
+
+
+ $options4[$WSID->StatusCode] = $WSID->StatusName;
+
+ endforeach;
+ }
+
+ echo form_dropdown('workstatus', $options4,set_value('workstatus'),'id="workstatusValue"' ,'required="true"' ,'class="form-control select2');
+
+ ?>
+
+
+
+
+
+
+
+
+
+ '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','maxlength' => '110');
+ echo Form_textarea($data);
+ ?>
+
+
+
+
+
+ 'Deliverydt','value' => set_value('Deliverydt',$CurrentDate),'id'=>'Deliverydt', 'class' => 'form-control num' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+ 'Select Department Name');
+
+ if(!empty($DeptList))
+ {
+
+ foreach ($DeptList as $DID):
+
+ $options1[$DID->DEPCode] = $DID->DEPCode.' '.' - '.' '.$DID->DepartmentName;
+
+ endforeach;
+ }
+
+ echo form_dropdown('drpDepartment', $options1,set_value('drpDepartment'),'id="DepartmentName"' ,'class = "form-control select2"','required="true"', 'disabled="disabled"');
+
+ ?>
+
+
+
+
+
+
+ 'Cost Center Name');
+
+
+ if(!empty($CostList))
+ {
+
+ foreach ($CostList as $cost):
+
+
+ $options2[$cost['CostCenterCode']] = $cost['CostCenterCode'].' '.' - '.' '.$cost['CostCenterName'];
+
+ endforeach;
+ }
+
+ echo form_dropdown('CostCenterName', $options2,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 num' ,'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);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ConfigValue] = $SerOption->ConfigValue;
+ endforeach;
+
+ }
+ echo form_dropdown('ServiceOptions', $ServiceOptions,set_value('ServiceOptions'),'id="ServiceOptions"' ,'class = "form-control"');
+
+ ?>
+
+
+
+
+
+ 'ServiceNo','value' => set_value('ServiceNo',1),'id'=>'ServiceNo', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'emergmodeofshipment','value' => set_value('emergmodeofshipment'),'id'=>'emergmodeofshipment', 'class' => 'form-control');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ 'emergsupplierreference','value' => set_value('emergsupplierreference'),'id'=>'emergsupplierreference', 'class' => 'form-control','maxlength'=>'40');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ 'emergsupplierofferno','value' => set_value('emergsupplierofferno'),'id'=>'emergsupplierofferno', 'class' => 'form-control');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+ 'emergotherreference','value' => set_value('emergotherreference'),'id'=>'emergotherreference', 'class' => 'form-control');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'emergfincap','value' => set_value('emergfincap'),'id'=>'emergfincap', 'class' => 'form-control');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'Select Work Status');
+
+
+ if(!empty($PoTypeOptions))
+ {
+ foreach ($PoTypeOptions as $POpt):
+
+
+ $optionsPO[$POpt->ConfigValue] = $POpt->ConfigValue;
+
+ endforeach;
+ }
+
+ echo form_dropdown('PoTypeOptions', $optionsPO,set_value('PoTypeOptions'),'id="PoTypeOptions"' ,'required="true"' ,'class="form-control select2');
+
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'insuranceNo','value' => set_value('insuranceNo'),'id'=>'insuranceNo', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'Select Payment method');
+ //print_r( $options);
+ if(!empty($Payment))
+ {
+ foreach ($Payment as $payment):
+
+
+ $options1[$payment->PaymentID] = $payment->PaymentTerms;
+
+ endforeach;
+ }
+ echo form_dropdown('PaymentMethod', $options1,set_value('PaymentMethod'),'id="PaymentMethod"' ,'class="form-control"');
+ ?>
+
+
+
+
+
+ 'Otherpayment','Otherpayment' => set_value('Otherpayment'),'id'=>'Otherpayment', 'class' => 'form-control' ,'required' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Select Item Code
+
+
+
+
Delivery Challan /Inv No
+
+
+
Delivery Challan /Inv Date
+
+ 'Date1','value' => set_value('Date1',$CurrentDate),'id'=>'Date1', 'class' => 'form-control num' ,'required' => 'true');
+ echo form_input($data);?>
+
+
+
+
+
+
+
Advise Quantity
+
+
+
+
+
+
+
Vehicle No
+
+
+
Courier No
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+| MaterialCode1 |
+DeliveryChallanDate |
+DeliveryChallanNo |
+VehicleNo |
+CourierNo |
+Quantity12 |
+File |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | SNo |
+ Requisition No |
+ Item Code |
+ Item Description |
+ Quantity |
+ UOM |
+ Rate |
+ Basic Amount |
+ Tax Amount |
+ Total Order Amount |
+ Action |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'txtTotBasicAmountRevenue','value' => set_value('txtTotBasicAmountRevenue'),'id'=>'txtTotBasicAmountRevenue', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalDiscount','value' => set_value('txtTotalDiscount'),'id'=>'txtTotalDiscount', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'txtTotalCGST','value' => set_value('txtTotalCGST'),'id'=>'txtTotalCGST', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalSGST','value' => set_value('txtTotalSGST'),'id'=>'txtTotalSGST', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+ 'txtTotalIGST','value' => set_value('txtTotalIGST'),'id'=>'txtTotalIGST', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+ 'txtTotalPackaing','value' => set_value('txtTotalPackaing'),'id'=>'txtTotalPackaing', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotalInsurance','value' => set_value('txtTotalInsurance'),'id'=>'txtTotalInsurance', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+ 'txtTotalFreight','value' => set_value('txtTotalFreight'),'id'=>'txtTotalFreight', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+ 'txtTotalOrderValueSummary','value' => set_value('txtTotalOrderValueSummary'),'id'=>'txtTotalOrderValueSummary', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtSpcialInstruction','value' => set_value('txtSpcialInstruction'),'id'=>'txtSpcialInstruction', 'class' => 'form-control','rows' => '8');
+ echo form_textarea($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'txtTotBasicAmount','value' => set_value('txtTotBasicAmount'),'id'=>'txtTotBasicAmount', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+ 'txtTotCgst','value' => set_value('txtTotCgst'),'id'=>'txtTotCgst', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'txtTotSgst','value' => set_value('txtTotSgst'),'id'=>'txtTotSgst', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+ 'txtTotIgst','value' => set_value('txtTotIgst'),'id'=>'txtTotIgst', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+ 'txtTotOtherAllo','value' => set_value('txtTotOtherAllo'),'id'=>'txtTotOtherAllo', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+ 'txtTotalOrderValueSummaryService','value' => set_value('txtTotalOrderValueSummaryService'),'id'=>'txtTotalOrderValueSummaryService', 'class' => 'form-control num' ,'readonly' => 'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+ 'emergdescofpo','value' => set_value('emergdescofpo'),'id'=>'emergdescofpo', 'class' => 'form-control' ,'rows' => '3', 'cols' => '40' );
+ echo form_textarea($data);
+ ?>
+
+
+
+
+ 'ScopeOfWork','value' => set_value('ScopeOfWork'),'id'=>'ScopeOfWork', 'class' => 'form-control','rows' => '8');
+ echo form_textarea($data); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/views/editRevenuepurchaseorder.php b/application/views/editRevenuepurchaseorder.php
index 54aa51e9..cedd946d 100755
--- a/application/views/editRevenuepurchaseorder.php
+++ b/application/views/editRevenuepurchaseorder.php
@@ -205,7 +205,23 @@ if(!empty($RequistionDetails))
var DelDt = '';
var insurancestatus = '';
var insuranceno = '';
+var statuscheck='';
+
$(document).ready(function () {
+
+
+if(statuscheck=="")
+{
+ $('#splpodiv').show();
+}
+
+else
+{
+ $('#splpodiv').hide();
+}
+
+
+
$('#PoTypeOptions').attr("style", "pointer-events: none;");
if(DelOpt=="0"){
@@ -4044,8 +4060,61 @@ function calculateEditTaxValue()
echo form_textarea($data);
?>
+
-
+
+
+
+
+
+
+
+
+
+ | Bill No |
+ Materials |
+ Delivery Challan No |
+ Delivery Challan Date |
+ Vehicle No |
+ Courier No |
+ Quantity |
+ File |
+
+ Action |
+
+
+
+
+
+
+ | BillNo ?> |
+ MaterialCode ?> - MaterialName ?> |
+ DeliveryChellanOrInvoiceNo?> |
+ DeliveryChellanDate);
+ echo $date->format('d-m-Y'); ?> |
+ VehicleNo?> |
+ CourierNo?> |
+ QuantityAsPerInvoice?> |
+ FilePath?> |
+ |
+
+
+
+
+
+
+
+
+
diff --git a/uploads/BillFiles/importpdf.png b/uploads/BillFiles/importpdf.png
new file mode 100644
index 00000000..e98b60ba
Binary files /dev/null and b/uploads/BillFiles/importpdf.png differ
diff --git a/uploads/BillFiles/phperror.png b/uploads/BillFiles/phperror.png
new file mode 100644
index 00000000..cf779ba5
Binary files /dev/null and b/uploads/BillFiles/phperror.png differ
diff --git a/uploads/BillFiles/phperror1.png b/uploads/BillFiles/phperror1.png
new file mode 100644
index 00000000..cf779ba5
Binary files /dev/null and b/uploads/BillFiles/phperror1.png differ