emergency po

This commit is contained in:
venbatechnologies@gmail.com 2017-11-20 16:21:07 +05:30
parent 392122fb64
commit 58ce7e23bb
10 changed files with 8729 additions and 7775 deletions

View File

@ -104,6 +104,8 @@ define('PO_AWAITING_RELEASE', 'ST025');
define('PO_APPROVED', 'ST025'); define('PO_APPROVED', 'ST025');
define('PO_APPROVER_ONHOLD', 'ST051'); define('PO_APPROVER_ONHOLD', 'ST051');
define('PO_RELEASER_ONHOLD', 'ST052'); define('PO_RELEASER_ONHOLD', 'ST052');
define('SPECIAL_PO', 'ST056');
/*store Status*/ /*store Status*/
define('STORE_DRAFT', 'ST043'); define('STORE_DRAFT', 'ST043');

262
application/controllers/emergencypurchaseorder.php Executable file → Normal file
View File

@ -22,6 +22,7 @@ class emergencypurchaseorder extends BaseController
$this->load->library('session'); $this->load->library('session');
$this->load->library('form_validation'); $this->load->library('form_validation');
$this->load->model('requistion_model'); $this->load->model('requistion_model');
$this->load->model('inwardgateregister_model');
$this->isLoggedIn(); $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 //This used to Create Service Purchase Order
function addNewServicePurchaseOrder() function addNewServicePurchaseOrder()
{ {
@ -133,7 +174,15 @@ class emergencypurchaseorder extends BaseController
$OtherPayment=$this->input->post('Otherpayment'); $OtherPayment=$this->input->post('Otherpayment');
if($POStatus==SPECIAL_PO)
{
$ServiceWorkStatus=SERVICE_COMPLETED;
}
else
{
$ServiceWorkStatus=$this->input->post('workStatus'); $ServiceWorkStatus=$this->input->post('workStatus');
}
$ServiceScheduleType = $this->input->post('ScheduleType'); $ServiceScheduleType = $this->input->post('ScheduleType');
$ServiceScheduleOptions = $this->input->post('ScheduleType'); $ServiceScheduleOptions = $this->input->post('ScheduleType');
//$ServiceServiceNo = $this->input->post('ServiceNo'); //$ServiceServiceNo = $this->input->post('ServiceNo');
@ -272,6 +321,9 @@ class emergencypurchaseorder extends BaseController
function addNewRevenuePurchaseOrder() function addNewRevenuePurchaseOrder()
{ {
$txtspl=$this->input->post('txtSpecial');
//echo "Emergency Revenue PO"; //echo "Emergency Revenue PO";
$POdt =$this->input->post('PODate'); $POdt =$this->input->post('PODate');
$PODate = $this->getDateformat($POdt); $PODate = $this->getDateformat($POdt);
@ -307,12 +359,33 @@ class emergencypurchaseorder extends BaseController
$SpcialInstruction = $this->input->post('txtSpcialInstruction'); $SpcialInstruction = $this->input->post('txtSpcialInstruction');
$RequistionComments = "Created Emergency Revenue PO"; $RequistionComments = "Created Emergency Revenue PO";
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary'); $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'); $RequestedBy = $this->input->post('drpDepartment');
$CreateBy = $this->session->userdata ( 'userId' ); $CreateBy = $this->session->userdata ( 'userId' );
$RowCount = $this->input->post('TextRowCount'); // $RowCount = $this->input->post('TextRowCount');
$RowCount=$this->input->post('txtRowCount1');
//echo $RowCount; //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; $ReqStatus = REQITEM_Emergency_PO_CREATED;
$Local_Interstate=$this->input->post('Range'); $Local_Interstate=$this->input->post('Range');
@ -322,7 +395,18 @@ $RequestedBy = $this->input->post('drpDepartment');
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s'); $createddt = $dt->format('Y-m-d H:i:s');
$PaymentTerms=$this->input->post('PaymentMethod'); $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 //add requistion
@ -336,7 +420,7 @@ $RequestedBy = $this->input->post('drpDepartment');
$RegNo = $Req[0]['ReqNo']; $RegNo = $Req[0]['ReqNo'];
} }
// PO Master // 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); //print_r($POList);
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype); $POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype);
@ -375,12 +459,12 @@ $RequestedBy = $this->input->post('drpDepartment');
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i); $TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
$revenuedescription = $this->input->post('service_description'.$i); $revenuedescription = $this->input->post('service_description'.$i);
$CostCenter = $this->input->post('costCode'.$i); $CostCenter = $this->input->post('costCode'.$i);
$Cgst = $this->input->post('RevenueCgst'.$i); $Cgst = $this->input->post('RevenueCgst'.$i);
$Sgst = $this->input->post('RevenueSgst'.$i); $Sgst = $this->input->post('RevenueSgst'.$i);
$Igst = $this->input->post('RevenueIgst'.$i); $Igst = $this->input->post('RevenueIgst'.$i);
$AfterCgst = $this->input->post('RevenueAfterCgst'.$i); $AfterCgst = $this->input->post('RevenueAfterCgst'.$i);
$AfterSgst = $this->input->post('RevenueAfterSgst'.$i); $AfterSgst = $this->input->post('RevenueAfterSgst'.$i);
$AfterIgst = $this->input->post('RevenueAfterIgst'.$i); $AfterIgst = $this->input->post('RevenueAfterIgst'.$i);
$SkipInsert = "False"; $SkipInsert = "False";
if( count($comma_separated) > 0) if( count($comma_separated) > 0)
{ {
@ -426,7 +510,161 @@ $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 "<script>alert('You Have Successfully created the Purchase order! $PONO');</script>";
redirect('purchaseorder/PurchaseOrderList','refresh');
// }
} }

View File

@ -395,6 +395,8 @@ class purchaseorder extends BaseController
} }
$data['getdata'] = $this->purchaseorder_model->getfunction($PONO);
$data['MaxPODate'] = $this->purchaseorder_model->getLastReleasedPODate(); $data['MaxPODate'] = $this->purchaseorder_model->getLastReleasedPODate();
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006'); $data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018'); $data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
@ -908,7 +910,7 @@ class purchaseorder extends BaseController
$DeliveryAddr = $this->input->post('DeliveryAddr'); $DeliveryAddr = $this->input->post('DeliveryAddr');
$dt = $this->input->post('Deliverydt'); $dt = $this->input->post('Deliverydt');
$POType = $this->input->post('POType'); $POType = $this->input->post('POType');
$DeliveryOption = $this->input->post('DateRange'); $DeliveryOption = $this->input->post('DateRange');
if($DeliveryOption==1){ if($DeliveryOption==1){
$Deliverydt = ''; $Deliverydt = '';
$DeliverySchedule = $this->input->post('Scheduleby'); $DeliverySchedule = $this->input->post('Scheduleby');
@ -950,8 +952,10 @@ class purchaseorder extends BaseController
$PaymentTerms=$this->input->post('PaymentTerms'); $PaymentTerms=$this->input->post('PaymentTerms');
$OtherPayment=$this->input->post('Otherpayment'); $OtherPayment=$this->input->post('Otherpayment');
$Local_Interstate=$this->input->post('Range'); $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,'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); // print_r($POList);
// die(); // die();
@ -1097,9 +1101,11 @@ class purchaseorder extends BaseController
$PaymentTerms=$this->input->post('PaymentTerms'); $PaymentTerms=$this->input->post('PaymentTerms');
$OtherPayment=$this->input->post('Otherpayment'); $OtherPayment=$this->input->post('Otherpayment');
$Local_Interstate=$this->input->post('Range'); $Local_Interstate=$this->input->post('Range');
$Qualitycheck=1;
// PO Master // PO Master
// 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); //print_r($POList);
//die(); //die();
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList); $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); // $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); //print_r($POList);
//die(); //die();
@ -1940,10 +1947,10 @@ function addNewImportPurchaseOrder()
// PO Master // PO Master
// 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); // $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,'IsQualityChkReqired'=>$Qualitycheck);
$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);
//echo $PONO; //echo $PONO;
//echo $TotalOrder; //echo $TotalOrder;
//print_r($POList); //print_r($POList);
@ -2327,7 +2334,9 @@ function addNewImportPurchaseOrder()
$createddt = $dt->format('Y-m-d H:i:s'); $createddt = $dt->format('Y-m-d H:i:s');
$currencytypeID = $this->input->post('currencytype'); $currencytypeID = $this->input->post('currencytype');
$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); $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,'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); // $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')); $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s'); $createddt = $dt->format('Y-m-d H:i:s');
$updateddt = $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); $POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);

View File

@ -29,7 +29,8 @@ class mrir_model extends CI_Model
$this->db->from('T_IGR_Master igr'); $this->db->from('T_IGR_Master igr');
$this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO'); $this->db->join('T_PurchaseOrder_Master PO','igr.PONO = PO.PONO');
$this->db->join('T_SupplierDetailsN` sup','PO.SupplierID = sup.SupplierID'); $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"); $this->db->order_by("CreatedDate","desc");
$query = $this->db->get(); $query = $this->db->get();
$result = $query->result(); $result = $query->result();
@ -37,7 +38,7 @@ class mrir_model extends CI_Model
return $result; return $result;
} }
/* This function is used to get the igr value (button link)*/ /* This function is used to get the igr value (button link)*/
function get_IGR($IgrNo) function get_IGR($IgrNo)
{ {
$this->db->distinct(); $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'); $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('T_PurchaseOrder_AdvanceRequest PUADV','POM.PONO=PUADV.PONO','left');
$this->db->join ('tbl_users user','user.userid=TMD.UpdateBY'); $this->db->join ('tbl_users user','user.userid=TMD.UpdateBY');
$this->db->join ('T_Employee_Details ED','ED.EmpID = user.EmpID'); $this->db->join ('T_Employee_Details ED','ED.EmpID = user.EmpID');
$this->db->join ('tbl_users user1','user1.userid = POM.ReleasedBy'); $this->db->join ('tbl_users user1','user1.userid = POM.ReleasedBy','left');
$this->db->join ('T_Employee_Details ED1','ED1.EmpID = user1.EmpID'); $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 ('tbl_users user2','user2.userid=TMD.StoreInchargeID');
$this->db->join ('T_Employee_Details ED2','ED2.EmpID = user2.EmpID'); $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'); $this->db->join ('T_MaterialMaster MM','MM.MaterialCode = IGRD.MaterialCode and POL.MaterialCode = MM.MaterialCode');

View File

@ -21,6 +21,38 @@ class purchaseorder_model extends CI_Model
return $query->result(); 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) function GetPODetailforBillingServicePO($PONO)
{ {

660
application/views/alterpurchaseorder.php Executable file → Normal file
View File

@ -31,12 +31,19 @@ if(!empty($INRSYMBOL))
} }
} }
?> ?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/3.3.4/jquery.inputmask.bundle.min.js"></script>
<style> <style>
#packagingcalmodel { #packagingcalmodel {
margin-top:200px; margin-top:200px;
z-index: 1080 !important; z-index: 1080 !important;
}
#submitmodel {
margin-top:200px;
z-index: 1080 !important;
} }
#freightmodel { #freightmodel {
margin-top:200px; margin-top:200px;
@ -69,6 +76,8 @@ if(!empty($INRSYMBOL))
width:100% ! important; width:100% ! important;
} }
</style> </style>
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
<script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script> <script src="<?php echo base_url()?>assets/tinymce/js/tinymce/tinymce.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
@ -172,6 +181,14 @@ if(!empty($INRSYMBOL))
}); });
$("#Date1").datepicker({
// minDate : 'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
});
var SelectedMaterialList = { var SelectedMaterialList = {
Mat: [] Mat: []
}; };
@ -1711,7 +1728,154 @@ function calculatePackaging(isEdit)
} }
} }
function SpecialPOcheck()
{
$('#content').loader('show');
POcheck=$("input:radio[name='Quality']:checked").val();
console.log(POcheck);
var splrow=$('#splrow').val();
var row=$('#txtRowCount1').val();
var PO=$('#POType').val();
if(splrow!=row)
{
alert("You havent add all the material details")
return false;
}
else
{
if(PO=='REVENUE')
{
if(POcheck==0)
{
$('#txtSpecial').val(1);
$('#txtQuality').val(1);
//addtable();
RevenueSave(3);
}
else if(POcheck==1)
{
$('#txtSpecial').val(2);
$('#txtQuality').val(0);
RevenueSave(4);
}
}
else if(PO='SERVICE')
{
$('#txtSpecialservice').val(1);
Save(2)
}
}
}
/* Set the Packaging calculation option for calculating Packaging */ /* Set the Packaging calculation option for calculating Packaging */
function submitoption()
{
submitoptionvalue = $("input:radio[name='optsubmit']:checked").val();
//alert(submitoptionvalue);
var PO=$('#POType').val();
if(PO=='REVENUE')
{
$('#submitmodel').modal('hide');
if(submitoptionvalue==0)
{
//alert('normalemergency');
$('#txtSpecial').val(0);
RevenueSave(1)
}
else
{
//window.location.href ="<?php echo base_url() ?>purchaseorder/addNewPurchaseOrder";
$('#filemodel').modal('show');
}
}
else if(PO=='SERVICE')
{
$('#submitmodel').modal('hide');
if(submitoptionvalue==0)
{
///alert('normal SERVICE emergency');
$('#txtSpecialservice').val(0);
Save(1)
}
else
{
//window.location.href ="<?php echo base_url() ?>purchaseorder/addNewPurchaseOrder";
$('#filemodel').modal('show');
//$('#txtSpecialservice').val(1);
//Save(2)
}
}
}
// function ServiceCheck()
// {
// submitoptionvalue = $("input:radio[name='optsubmit']:checked").val();
// //alert(submitoptionvalue);
// $('#submitmodel').modal('hide');
// if(submitoptionvalue==0)
// {
// alert('normal Service emergency');
// $('#txtSpecialservice').val(0);
// Save(1)
// }
// else
// {
// //window.location.href ="<?php echo base_url() ?>purchaseorder/addNewPurchaseOrder";
// $('#filemodel').modal('show');
// }
// }
function qualitycheckoption()
{
qualityoptionvalue = $("input:radio[name='Quality']:checked").val();
//alert(submitoptionvalue);
$('#submitmodel').modal('hide');
if(qualityoptionvalue==0)
{
alert('Igr');
}
else
{
//window.location.href ="<?php echo base_url() ?>purchaseorder/addNewPurchaseOrder";
alert('Billing');
}
}
function SetPackagingOption() function SetPackagingOption()
{ {
PackagingCalculation = $("input:radio[name='optPackaging']:checked").val(); PackagingCalculation = $("input:radio[name='optPackaging']:checked").val();
@ -2004,6 +2168,15 @@ Editchange();
VatCalculation = ''; VatCalculation = '';
CSTCalculation = ''; CSTCalculation = '';
} }
function showsubmit()
{
$('#submitmodel').modal('show');
}
function showmodel() { function showmodel() {
@ -2080,6 +2253,15 @@ Editchange();
$("#MaterialCode").select2(); $("#MaterialCode").select2();
$("#ServiceMaterialCode").select2(); $("#ServiceMaterialCode").select2();
}); });
$("#emergency_itemcode").select2();
function DeleteRevenueRow(rowid) function DeleteRevenueRow(rowid)
{ {
var DelRows = $('#txtDeletedRow1').val(); var DelRows = $('#txtDeletedRow1').val();
@ -2187,6 +2369,7 @@ function populateValueMainFormForDeleteItem(rowid)
text-align:right; text-align:right;
} }
</style> </style>
<div class="content-wrapper"> <div class="content-wrapper">
<?php <?php
$attributes = array('class' => 'form-label-left CreatealterPO ','name' => 'CreatealterPO','id' => 'CreatealterPO'); $attributes = array('class' => 'form-label-left CreatealterPO ','name' => 'CreatealterPO','id' => 'CreatealterPO');
@ -2226,6 +2409,7 @@ function populateValueMainFormForDeleteItem(rowid)
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label>Purchase Order Date</label> <label>Purchase Order Date</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true'); $data = array('name' => 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true');
@ -2706,6 +2890,35 @@ function populateValueMainFormForDeleteItem(rowid)
</div> </div>
<!-- Modal for Packing Calculation --> <!-- Modal for Packing Calculation -->
<div id="packagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Packing Calculation On</h4>
</div>
<div class="modal-body">
<form>
<div class="radio">
<label><input type="radio" name="optPackaging" checked="checked" value='0' id="optPackaging"> Basic Amount</label>
</div>
<div class="radio">
<label><input type="radio" name="optPackaging" id="optPackaging" value='1' > After Discount Amount</label>
</div>
</form>
</div>
<div class="modal-footer">
<a class="btn btn-primary" ID="PackagingOption" onclick="SetPackagingOption();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
</div>
</div>
</div>
</div>
<div id="packagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" > <div id="packagingcalmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
<div class="modal-dialog"> <div class="modal-dialog">
@ -2735,6 +2948,151 @@ function populateValueMainFormForDeleteItem(rowid)
</div> </div>
</div> </div>
<div id="submitmodel" class="modal fade" data-backdrop-limit="1" role="dialog" aria-labelledby="myModalLabel" >
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Material Has been Received</h4>
</div>
<div class="modal-body">
<form>
<div class="radio">
<label><input type="radio" name="optsubmit" checked="checked" value='0' id="optsubmit">NO</label>
</div>
<div class="radio">
<label><input type="radio" name="optsubmit" id="optsubmit" value='1' >YES</label>
</div>
<div class="modal-footer">
<a class="btn btn-primary" ID="PackagingOption" onclick="submitoption();dropdownselect();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
</div>
</form>
</div>
</div>
</div>
</div>
<div id="filemodel" class="modal fade" data-backdrop-limit="1" role="dialog" aria-labelledby="myModalLabel" >
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content" style="width:950px;">
<div class="modal-header">
<h4 class="modal-title">Add Bill Details</h4>
</div>
<div class="modal-body" style="padding:0px;">
<div class="col-md-12">
<div class="col-md-4 pad"><strong>Select Item Code</strong>
<select id="emergencyitemcode" name="emergencyitemcode" class = "form-control select2">
<!-- <option value="1"> select material code</option> -->
</select>
</div>
<div class="col-md-4 pad"><strong>Delivery Challan /Inv No</strong>
<input type="text" name="ChallanInvNo" id="ChallanInvNo" maxlength="12" class="form-control" value="" required onkeypress="return isNumberKey(event)">
</div>
<div class="col-md-4 pad"><strong>Delivery Challan /Inv Date</strong>
<!-- <input type="Date" name="Date1" onkeypress="return onlyAlphabets(event);" maxlength="100" id="Date1" class="form-control" required value="2"> -->
<?php
$data = array('name' => 'Date1','value' => set_value('Date1',$CurrentDate),'id'=>'Date1', 'class' => 'form-control num' ,'required' => 'true');
echo form_input($data);?>
</div>
</div>
<div class="col-md-12">
<div class="col-md-4 pad"><strong>Advise Quantity</strong>
<input type="text" name="AQuantity" id="AQuantity" maxlength="12" class="form-control" value="" required>
</div>
<input type="hidden" id="tablevalues" value="sample" name="tablevalues"/>
<input type="hidden" id="splrow" value="sample" name="splrow"/>
<div class="col-md-4 pad"><strong>Vehicle No</strong>
<input type="text" name="VehicleNo" id="VehicleNo" maxlength="12" class="form-control" value="" required>
</div>
<div class="col-md-4 pad"><strong>Courier No</strong>
<input type="text" name="CourierNo" id="CourierNo" maxlength="12" class="form-control" value="" required>
</div>
</div>
<div class="col-md-12">
<div class="col-md-5">
<input type = "file" size = "20" input accept=".docx,.pdx,.doc.JPG,.PNG" id="images" name="images"/>
<label for="images">Select Company file<br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
</div>
<div class="col-md-5" id="QualityChecked"><strong>Is Quality Check Required</strong>
<div class="radio">
<label><input type="radio" name="Quality" checked="checked" value='0' id="Quality">Yes</label>
</div>
<div class="radio">
<label><input type="radio" name="Quality" id="Quality" value='1' >No</label>
</div>
</div>
</div>
<div class="col-md-12 text-right" style="padding-bottom:1%;">
<div class="col-md-4" style="margin-left: 64%;">
<a class="btn btn-primary Add" onclick="addtable();"><span class="bold">Add LineItem</span></a>
</div>
</div>
</div>
<!-- <div class="col-md-12 text-right">
// <a class="btn btn-primary font Add" id="addtable"><span class="bold">Add table</span></a>
// </div>-->
<div class="col-md-12">
<table id="specialtable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
<thead style="background-color:#ddf">
<tr>
<th>MaterialCode1</th>
<th>DeliveryChallanDate</th>
<th>DeliveryChallanNo</th>
<th>VehicleNo</th>
<th>CourierNo</th>
<th>Quantity12</th>
<th>File</th>
</tr>
</thead>
<tbody id="specialappend">
</tbody>
</table>
</div>
<div class="modal-footer">
<div class="col-md-12 text-right">
<!-- <div class="col-md-4">
<a class="btn btn-primary Add" onclick="addtable();"><span class="bold">Add table</span></a>
</div> -->
<div class="col-md-4 col-md-offset-8">
<a class="btn btn-primary ok" ID="ExciseOption12" onclick="SpecialPOcheck();" >&nbsp;&nbsp;<span class="bold">Submit</span></a>
<a class="btn btn-primary" data-dismiss="modal" onclick="SetExciseCalculationCancel();" value="Cancel">Cancel</a>
</div>
</div>
</div>
</div>
</div>
<!-- </form> -->
</div>
<div id="freightmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" > <div id="freightmodel" class="modal fade" data-backdrop-limit="1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
<div class="modal-dialog"> <div class="modal-dialog">
@ -3184,7 +3542,7 @@ function populateValueMainFormForDeleteItem(rowid)
</div> </div>
</div> </div>
<!-- Edit Revenue Modal --> <!-- Edit Revenue Modal -->
<div id="EDITREVENUE" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y:scroll !important"> <div id="EDITREVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="overflow-y:scroll !important">
<div class="modal-dialog" > <div class="modal-dialog" >
<!-- Modal content--> <!-- Modal content-->
<form> <form>
@ -3557,7 +3915,7 @@ function populateValueMainFormForDeleteItem(rowid)
<div align="right" style="padding-right:10px"> <div align="right" style="padding-right:10px">
<!-- Model for revenue PO --> <!-- Model for revenue PO -->
<div id="REVENUE" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div id="REVENUE" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<!-- Modal content--> <!-- Modal content-->
<form> <form>
@ -5294,9 +5652,14 @@ function populateValueMainFormForDeleteItem(rowid)
<input type="hidden" name="txtRowCount1" id="txtRowCount1" /> <input type="hidden" name="txtRowCount1" id="txtRowCount1" />
<input type="hidden" name="txtDeletedRow1" id="txtDeletedRow1" /> <input type="hidden" name="txtDeletedRow1" id="txtDeletedRow1" />
<input type="hidden" name="CheckLocalInter" id="CheckLocalInter" /> <input type="hidden" name="CheckLocalInter" id="CheckLocalInter" />
<input type="hidden" name="txtSpecial" id="txtSpecial" />
<input type="hidden" name="txtQuality" id="txtQuality" />
<!-- <a class="btn btn-primary Save" ID="Save" onclick="Save()" >&nbsp;&nbsp;<span class="bold">Save</span></a> --> <!-- <a class="btn btn-primary Save" ID="Save" onclick="Save()" >&nbsp;&nbsp;<span class="bold">Save</span></a> -->
<a class="btn btn-primary Submit" ID="Submit" onclick="RevenueSave(1)" >&nbsp;&nbsp;<span class="bold">Submit</span></a> <a class="btn btn-primary Submit" ID="Submit" onclick="showsubmit()" >&nbsp;&nbsp;<span class="bold">Submit</span></a>
<a class="btn btn-primary Save" ID="Cancel" href="<?php echo base_url().'EmergencyPO'; ?>">&nbsp;&nbsp;<span class="bold">Reset</span></a> <a class="btn btn-primary Save" ID="Cancel" href="<?php echo base_url().'EmergencyPO'; ?>">&nbsp;&nbsp;<span class="bold">Reset</span></a>
@ -5389,7 +5752,10 @@ function populateValueMainFormForDeleteItem(rowid)
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" > <input type="hidden" name="SpcialInstruction" id="SpcialInstruction" >
<input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress" > <input type="hidden" name="txtDeliveryAddress" id="txtDeliveryAddress" >
<a class="btn btn-primary Submit" ID="Submit" onclick="Save(1)" >&nbsp;&nbsp;<span class="bold">Submit</span></a>
<input type="hidden" name="txtSpecialservice" id="txtSpecialservice" />
<a class="btn btn-primary Submit" ID="Submit" onclick="showsubmit()" >&nbsp;&nbsp;<span class="bold">Submit</span></a>
<a class="btn btn-primary Save" ID="Cancel" href="<?php echo base_url().'EmergencyPO'; ?>">&nbsp;&nbsp;<span class="bold">Reset</span></a> <a class="btn btn-primary Save" ID="Cancel" href="<?php echo base_url().'EmergencyPO'; ?>">&nbsp;&nbsp;<span class="bold">Reset</span></a>
</div><br/> </div><br/>
</div> </div>
@ -5688,10 +6054,26 @@ function populateValueMainFormForDeleteItem(rowid)
$(document).ready(function(){ $(document).ready(function(){
Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
$("#ChallanInvDate").datepicker({
maxDate : 'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
});
$('#purpose').on('change', function() { $('#purpose').on('change', function() {
if ( this.value == 'REVENUE') //Revenue po if ( this.value == 'REVENUE') //Revenue po
{ {
$("#QualityChecked").show();
$("#revenuepotaxes").show(); $("#revenuepotaxes").show();
$("#currencyexchange").hide(); $("#currencyexchange").hide();
$("#servicepotaxes").hide(); $("#servicepotaxes").hide();
@ -5708,6 +6090,7 @@ function populateValueMainFormForDeleteItem(rowid)
} }
else if ( this.value == 'SERVICE') // Service po else if ( this.value == 'SERVICE') // Service po
{ {
$("#QualityChecked").hide();
$("#servicepotaxes").show(); $("#servicepotaxes").show();
$("#Deliveryby").hide(); $("#Deliveryby").hide();
$("#workstatus").show(); $("#workstatus").show();
@ -6902,15 +7285,22 @@ $('#content').loader('hide');
function Save(status) function Save(status)
{ {
if(status == '0') if(status == '0')
{ {
stat = '<?php echo PO_DRAFT; ?>'; stat = '<?php echo PO_DRAFT; ?>';
} }
else else if(status == '1')
{ {
stat = '<?php echo REQITEM_Emergency_PO_CREATED; ?>'; stat = '<?php echo REQITEM_Emergency_PO_CREATED; ?>';
} }
else if(status=='2')
{
stat = '<?php echo SPECIAL_PO; ?>';
}
tinyMCE.triggerSave(); tinyMCE.triggerSave();
var splinstr = $('#ScopeOfWork').val(); var splinstr = $('#ScopeOfWork').val();
$('#ScopeOfWork').val(splinstr); $('#ScopeOfWork').val(splinstr);
@ -6999,6 +7389,16 @@ $('#content').loader('hide');
{ {
stat = '<?php echo PO_DRAFT; ?>'; stat = '<?php echo PO_DRAFT; ?>';
} }
else if(status == '3')
{
stat = '<?php echo SPECIAL_PO; ?>';
}
else if(status == '4')
{
stat = '<?php echo SPECIAL_PO; ?>';
}
else else
{ {
stat = '<?php echo REQITEM_Emergency_PO_CREATED; ?>'; stat = '<?php echo REQITEM_Emergency_PO_CREATED; ?>';
@ -7047,32 +7447,40 @@ $('#SpcialInstruction').val(splinstr);
} }
else else
{ {
$('#content').loader('show'); // $('#content').loader('show');
$.ajax({ // $.ajax({
data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeletedRowCount="+TextDeletedRowCount+"&TextStatus="+TextStatus, // data:$('.CreatealterPO').serialize()+"&TextRowCount="+TextRowCount+"&TextDeletedRowCount="+TextDeletedRowCount+"&TextStatus="+TextStatus,
type:"POST", // type:"POST",
url:"<?php echo base_url() ?>emergencypurchaseorder/addNewRevenuePurchaseOrder", // url:"<?php echo base_url() ?>emergencypurchaseorder/addNewRevenuePurchaseOrder",
success:function(data) { // success:function(data) {
if(data) // if(data)
{ // {
$('#content').loader('hide'); // $('#content').loader('hide');
alert(data); // alert(data);
$('#txtRowCount').val(''); // $('#txtRowCount').val('');
$('#txtDeletedRow').val(''); // $('#txtDeletedRow').val('');
$('#SpcialInstruction').val(''); // $('#SpcialInstruction').val('');
$('#txtDeliveryAddress').val(''); // $('#txtDeliveryAddress').val('');
window.location = "purchaseorderListing"; // window.location = "purchaseorderListing";
} // }
else // else
{ // {
$('#content').loader('hide'); // $('#content').loader('hide');
alert("Error"); // alert("Error");
} // }
} // }
}); // });
//alert("else");
var tablevalue = $('#specialtable').tableToJSON(); // Convert the table into a javascript object
var jsondata = JSON.stringify(tablevalue);
$('#tablevalues').val(jsondata);
$("#CreatealterPO").attr("method", "post");
$("#CreatealterPO").attr("enctype", "multipart/form-data");
$("#CreatealterPO").attr("action", "emergencypurchaseorder/addNewRevenuePurchaseOrder");
$('#CreatealterPO').submit();
} }
} }
@ -7739,7 +8147,201 @@ $("#PaymentMethod").change(function() {
$('#insuranceNo').val(''); $('#insuranceNo').val('');
} }
}); });
</script>
function dropdownselect(){
var itemvalue = new Array();
var itemname = new Array();
var reqType = $('#purpose').val();
var x = 0;
var y = 0;
var z = $('#RevenueAppend tr').length;
var options='';
// alert(z);
// var values = array(0,15,30,45);
// var name =array(zero,five,three,four);
// for(var j=1;j<x;j++)
// {
// options += '<option value="' + itemvalue[j] + '">' + itemvalue[j] + '-' + itemname[j] + '</option>';
// }
if( reqType == 'REVENUE')
{
$("#serviceTax tr:gt(0) td:nth-child(3)").each(function(){
var temp=$(this).html();
if($.inArray(temp, itemvalue) < 0)
{
itemvalue[x]=temp;
x++;
}
});
$("#serviceTax tr:gt(0) td:nth-child(4)").each(function(){
var temp2=$(this).html();
if($.inArray(temp2, itemname) < 0)
{
itemname[y]=temp2;
y++;
}
});
//alert(x);
for(var i=0;i<z;i++)
{
options += '<option value="' + itemvalue[i] + '">' + itemvalue[i] + ' - ' + itemname[i] + '</option>';
}
//$("#emergency_itemcode").append( $('<option></option>').val(options).html(option));
$("#emergencyitemcode").html(options);
}
// else
// {
// option = "select materials code kjjh "
// $("#emergency_itemcode").html('sdfsdf');
// }
}
</script>
<script type="text/html" id="addList">
<tr id="<%=index%>">
<td style="width: 15%;" align="left"><%=MaterialCode1%></td>
<td style="width: 15%;" align="left"><%=DeliveryChallanDate%></td>
<td style="width: 15%;" align="left"><%=DeliveryChallanNo%></td>
<td style="width: 15%;" align="left"><%=VehicleNo%></td>
<td style="width: 15%;" align="left"><%=CourierNo%></td>
<td style="width: 15%;" align="left"><%=AdvisedQuantity%></td>
<td style="width: 15%;" align="left"><%=File%></td>
</tr>
</script>
<script>
//table append for file uploading
var index = '1';
var specialrow=0;
function addtable()
{
//alert("addonclick");
var temp = index;
var emergencyitemcode = $('#emergencyitemcode').val();
var ChallanInvno = $('#ChallanInvNo').val();
var ChallanInvDate = $('#Date1').val();
var VehicleNo1 = $('#VehicleNo').val();
var CourierNo1 = $('#CourierNo').val();
var Quantity123 = $('#AQuantity').val();
var images = $('#images').val();
// var actqty=$('#quantity'+temp);
// console.log(actqty);
if(emergencyitemcode != '' || ChallanInvno != '' || ChallanInvDate != '' || VehicleNo1 != '' ||CourierNo1 != ''|| Quantity123 !='' ||images !='')
{
//alert('hai'+Quantity123+CourierNo1);
//alert('both insert and update operation evaluated');
if(emergencyitemcode == ''){
alert("Please Enter Material Code");
$("#emergencyitemcode").focus();
return false;
}
else if (ChallanInvno == ''){
alert("Please Enter Challan No");
$('#ChallanInvNo').focus();
return false;
}
else if (ChallanInvDate == ''){
alert("Please Enter Invoice Date");
$('#ChallanInvDate').focus();
return false;
}
// else if (VehicleNo1 == ''){
// alert("Please Enter Vehicle No");
// $('#VehicleNo').focus();
// return false;
// }
// else if (CourierNo1 == ''){
// alert("Please Enter Courier No");
// $('#CourierNo').focus();
// return false;
// }
else if (AQuantity == ''){
alert("Please Enter Advised Quantity");
$('#AQuantity').focus();
return false;
}
else if (images == ''){
alert("Please Upload File to be saved");
$('#images').focus();
return false;
}
else
{
var template = jQuery("#addList").html();
index = parseInt(index)+1;
$('#specialappend').append(_.template(template,{index:temp,MaterialCode1:emergencyitemcode,DeliveryChallanDate:ChallanInvDate,DeliveryChallanNo:ChallanInvno,VehicleNo:VehicleNo1,CourierNo:CourierNo1,AdvisedQuantity:Quantity123,File:images}));
var theForm=$(".CreatealterPO");
addHidden(theForm,"emergencyitemcode"+temp,emergencyitemcode );
addHidden(theForm,"images"+temp,images );
// var a=$('#emergencyitemcode'+temp).val();
// var b=$('#images'+temp).val();
//console.log(a);
// console.log(b);
// addHidden(theForm,"VehicleNo"+temp,Reqnumber );
// addHidden(theForm,"CourierNo"+temp,Reqnumber );
// addHidden(theForm,"AQuantity"+temp,Reqnumber );
//$('#emergencyitemcode').val('');
// $('#ChallanInvNo').val('');
// $('#ChallanInvDate').val('');
// $('#VehicleNo').val('');
// $('#CourierNo').val('');
$('#AQuantity').val('');
specialrow++;
$('#splrow').val(specialrow);
// $('input[name="Quality"]').attr('checked', false);
// $('#images').val('');
}//else closed
}//if closed
// var tablevalue = $('#specialtable').tableToJSON(); // Convert the table into a javascript object
// var jsondata = JSON.stringify(tablevalue);
//alert(jsondata);
// $("#tablevalues").val(jsondata);
// $("#tablevalues").val(jsondata);
}//add click function closed
</script>

View File

@ -205,7 +205,23 @@ if(!empty($RequistionDetails))
var DelDt = '<?php echo $Deliverydt; ?>'; var DelDt = '<?php echo $Deliverydt; ?>';
var insurancestatus = '<?php echo $insurencestatus;?>'; var insurancestatus = '<?php echo $insurencestatus;?>';
var insuranceno = '<?php echo $insurenceno;?>'; var insuranceno = '<?php echo $insurenceno;?>';
var statuscheck='<?php echo $PONOStatus;?>';
$(document).ready(function () { $(document).ready(function () {
if(statuscheck=="<?php echo SPECIAL_PO;?>")
{
$('#splpodiv').show();
}
else
{
$('#splpodiv').hide();
}
$('#PoTypeOptions').attr("style", "pointer-events: none;"); $('#PoTypeOptions').attr("style", "pointer-events: none;");
if(DelOpt=="0"){ if(DelOpt=="0"){
@ -4044,8 +4060,61 @@ function calculateEditTaxValue()
echo form_textarea($data); echo form_textarea($data);
?> ?>
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value=""> <input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value="">
</div> </div>
</div> </div>
<div class="col-md-12" id="splpodiv">
<div class="col-md-12"><label>Special po Table List</label>
<table id="table2" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
<thead style="background-color:#ddf">
<tr>
<th>Bill No </th>
<th>Materials</th>
<th>Delivery Challan No</th>
<th>Delivery Challan Date</th>
<th>Vehicle No</th>
<th>Courier No</th>
<th>Quantity</th>
<th>File</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($getdata))
{
foreach($getdata as $gd)
{
?>
<tr>
<td><?php echo $gd->BillNo ?></td>
<td><?php echo $gd->MaterialCode ?> - <?php echo $gd->MaterialName ?></td>
<td><?php echo $gd->DeliveryChellanOrInvoiceNo?></td>
<td><?php $date = new DateTime($gd->DeliveryChellanDate);
echo $date->format('d-m-Y'); ?></td>
<td><?php echo $gd->VehicleNo?></td>
<td><?php echo $gd->CourierNo?></td>
<td><?php echo $gd->QuantityAsPerInvoice?></td>
<td><?php echo $gd->FilePath?></td>
<td><a href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $gd->FilePath ?>"><i class="fa fa-download" ></i></a></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
<div class="row" style="padding: 2% 0%"> <div class="row" style="padding: 2% 0%">
<div class="col-md-3 col-md-offset-9"><br/> <div class="col-md-3 col-md-offset-9"><br/>
<input type="hidden" name="txtPoRange" id="txtPoRange" /> <input type="hidden" name="txtPoRange" id="txtPoRange" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB