enquiry form
This commit is contained in:
parent
e8efd970e2
commit
548a8b1e6c
@ -283,6 +283,11 @@ $route['nissaninprocess'] = "inprocess/addNewNissanInprocessInspection";
|
||||
//this route path productionsalary details
|
||||
$route['productionsalary']="monthlypay/productionsalary";
|
||||
|
||||
//Customer Enquiry
|
||||
|
||||
|
||||
$route['Editenquiry'] = "purchaseorder/Editenquiry";
|
||||
$route['enquirylisting'] = "purchaseorder/enquirylist";
|
||||
|
||||
/* End of file routes.php */
|
||||
/* Location: ./application/config/routes.php */
|
||||
|
||||
@ -3196,6 +3196,105 @@ if($advance > 0)
|
||||
|
||||
|
||||
|
||||
function SaveEnquiry()
|
||||
{
|
||||
|
||||
$client_id=$this->input->post('client_id');
|
||||
$date= $this->input->post('date');
|
||||
$contact_person = $this->input->post('contact_person');
|
||||
$requirement= $this->input->post('requirement');
|
||||
$feasible = $this->input->post('feasible');
|
||||
$orderno = $this->input->post('orderno');
|
||||
$reqqty =$this->input->post('reqqty');
|
||||
$supqty = $this->input->post('supqty');
|
||||
$remarks= $this->input->post('remarks');
|
||||
|
||||
$save=array('client_id'=>$client_id,'Created_Date'=>$date,'Contact_Person'=>$contact_person,'Requirement'=>$requirement,'Feasible'=>$feasible,'OrderNo'=>$orderno,'Requested_Qty'=>$reqqty,'Supplied_Qty'=>$supqty,'Remarks'=>$remarks);
|
||||
|
||||
$save_result = $this->purchaseorder_model->SaveEnquiry($save);
|
||||
|
||||
if($save_result>0)
|
||||
{
|
||||
//echo "<script>alert('Saved successfully!');</script>";
|
||||
echo "Saved Successfully";
|
||||
//redirect('purchaseorder/addenquiry','refresh');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function UpdateEnquiry()
|
||||
{
|
||||
|
||||
$client_id=$this->input->post('client_id');
|
||||
$date= $this->input->post('date');
|
||||
$contact_person = $this->input->post('contact_person');
|
||||
$requirement= $this->input->post('requirement');
|
||||
$feasible = $this->input->post('feasible');
|
||||
$orderno = $this->input->post('orderno');
|
||||
$reqqty =$this->input->post('reqqty');
|
||||
$supqty = $this->input->post('supqty');
|
||||
$remarks= $this->input->post('remarks');
|
||||
$Id = $this->input->post('id');
|
||||
|
||||
$save=array('client_id'=>$client_id,'Created_Date'=>$date,'Contact_Person'=>$contact_person,'Requirement'=>$requirement,'Feasible'=>$feasible,'OrderNo'=>$orderno,'Requested_Qty'=>$reqqty,'Supplied_Qty'=>$supqty,'Remarks'=>$remarks);
|
||||
|
||||
//print_r($save);
|
||||
|
||||
$save_result = $this->purchaseorder_model->UpdateEnquiry($save,$Id);
|
||||
|
||||
if(($save_result ==0)||($save_result == 1))
|
||||
{
|
||||
echo "Saved Successfully";
|
||||
//echo "<script>alert('Saved successfully!');</script>";
|
||||
// redirect('purchaseorder/addenquiry','refresh');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function enquiry()
|
||||
{
|
||||
|
||||
$data['Customer'] = $this->purchaseorder_model->GetClients();
|
||||
//$dt = date('yyyy-mm-dd');
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$createddt = $dt->format('Y-m-d');
|
||||
|
||||
$data['enquirycount']=$this->purchaseorder_model->GetEnquiryCount($createddt);
|
||||
$this->global['pageTitle'] = 'Siddharth : Enquiry Form';
|
||||
|
||||
$this->loadViews("addenquiry", $this->global, $data , NULL);
|
||||
|
||||
}
|
||||
|
||||
public function Editenquiry()
|
||||
{
|
||||
$Id = $_GET['Id'];
|
||||
//echo $Id;
|
||||
$data['EnquiryDetails'] = $this->purchaseorder_model->GetEnquiry($Id);
|
||||
$data['Customer'] = $this->purchaseorder_model->GetClients();
|
||||
//print_r($data['EnquiryDetails']);
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Enquiry Form';
|
||||
|
||||
$this->loadViews("editenquiry", $this->global, $data , NULL);
|
||||
|
||||
}
|
||||
|
||||
public function enquirylist()
|
||||
{
|
||||
|
||||
$data['Customer_Order'] = $this->purchaseorder_model->GetEnquiryDetails();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Enquiry List';
|
||||
|
||||
$this->loadViews("enquirylist", $this->global, $data , NULL);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -1768,5 +1768,72 @@ function amendpdf($PONO='')
|
||||
|
||||
return $amendment->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function GetClients()
|
||||
{
|
||||
$this->db->select('client_id,client_name');
|
||||
$this->db->from('ip_clients');
|
||||
$query = $this->db->get();
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
|
||||
function SaveEnquiry($save)
|
||||
{
|
||||
$this->db->trans_start();
|
||||
$this->db->insert('T_Enquiry', $save);
|
||||
$insert_id = $this->db->affected_rows();
|
||||
$this->db->trans_complete();
|
||||
return $insert_id;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function UpdateEnquiry($save,$Id)
|
||||
{
|
||||
|
||||
$this->db->where('Id',$Id);
|
||||
$this->db->update('T_Enquiry',$save);
|
||||
$insert_id = $this->db->affected_rows();
|
||||
return $insert_id;
|
||||
}
|
||||
|
||||
|
||||
function GetEnquiryDetails()
|
||||
{
|
||||
$this->db->select('T_Enquiry.*,client_name');
|
||||
$this->db->from('T_Enquiry');
|
||||
$this->db->join('ip_clients','ip_clients.client_id=T_Enquiry.client_id');
|
||||
$this->db->order_by('Id','desc');
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function GetEnquiry($Id)
|
||||
{
|
||||
$this->db->select('T_Enquiry.*,client_name');
|
||||
$this->db->from('T_Enquiry');
|
||||
$this->db->join('ip_clients','ip_clients.client_id=T_Enquiry.client_id');
|
||||
$this->db->where('Id',$Id);
|
||||
$this->db->order_by('Id','desc');
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function GetEnquiryCount($createddt)
|
||||
{
|
||||
|
||||
$this->db->select('count(Id) as Countnumber');
|
||||
$this->db->from('T_Enquiry');
|
||||
$this->db->where('Created_Date',$createddt);
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
309
application/views/addenquiry.php
Normal file
309
application/views/addenquiry.php
Normal file
@ -0,0 +1,309 @@
|
||||
|
||||
<?php
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('d-m-Y');
|
||||
$count='';
|
||||
if(!empty($enquirycount))
|
||||
{
|
||||
foreach($enquirycount as $enc)
|
||||
{
|
||||
$count= $enc->Countnumber;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$actcount=$count+1;
|
||||
//echo $actcount;
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
//Initialize Select2 Elements
|
||||
$("#Customer").select2();
|
||||
|
||||
|
||||
var MaxDate = '<?php echo $MaxPoDate;?>';
|
||||
var d = new Date(MaxDate);
|
||||
var t='<?php echo $CurrentDate;?>';
|
||||
var m=new Date(t);
|
||||
|
||||
$("#Date").datepicker({
|
||||
minDate : d,
|
||||
//maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.num{
|
||||
text-align:right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper" style="min-height:537">
|
||||
<!-- Content Header (Page header) -->
|
||||
|
||||
|
||||
<section class="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<center><h3 class="box-title">Siddharth Industries - Enquiry Form</h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div id="content"></div>
|
||||
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left advancerequest','name' => 'enquiry','id' => 'enquiry');
|
||||
|
||||
// echo form_open($this->config->base_url().'purchaseorder/addadvancerequest',$attributes);
|
||||
?>
|
||||
<div class="row" style="padding:0% 2%">
|
||||
<div class="col-md-12" >
|
||||
<div class="col-md-3">
|
||||
<label>Customer Name</label>
|
||||
|
||||
|
||||
<?php
|
||||
$opt = array("0"=>'Customer Name');
|
||||
|
||||
if(!empty($Customer))
|
||||
{ //print_r($Currency);
|
||||
foreach ($Customer as $Cu):
|
||||
// print_r($Cu['client_id']);
|
||||
|
||||
$opt[$Cu['client_id']] = $Cu['client_id'].' '.' - '.' '.$Cu['client_name'];
|
||||
|
||||
endforeach;
|
||||
}
|
||||
|
||||
|
||||
// print_r($opt);
|
||||
|
||||
echo form_dropdown('Customer', $opt,set_value('Customer'),'id="Customer"' ,'required="true"' ,'class="form-control select2');
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Date</label>
|
||||
<?php
|
||||
$data = array('name' => 'Date','value' => set_value('Date',$CurrentDate),'id'=>'Date', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Contact Person</label>
|
||||
<?php
|
||||
$data = array('name' => 'Contact','value' => set_value('Contact'),'id'=>'Contact' ,'class' => 'form-control num' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Requirement</label>
|
||||
<?php
|
||||
$data = array('name' => 'requirement','value' => set_value('requirement'),'id'=>'requirement' ,'class' => 'form-control num' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Feasible</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$optionsnew=array('0'=>'Select','1'=>'YES','2'=>'NO');
|
||||
echo form_dropdown('Feasible', $optionsnew,set_value('Feasible'),'id="Feasible"' ,'required="true"' ,'class="form-control select2');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3">
|
||||
<label for="selectmonth">Customer Order No</label>
|
||||
<?php
|
||||
$data = array('name' => 'Corder','value' => set_value('Corder'),'id'=>'Corder', 'class' => 'form-control num' ,'required' => 'true','style'=>'text-align:left;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Requested Quantity</label>
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ReqQty','value' => set_value('ReqQty'),'id'=>'ReqQty' ,'class' => 'form-control num' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Supplied Quantity</label>
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'SupQty','value' => set_value('SupQty'),'id'=>'SupQty' ,'class' => 'form-control' ,'style'=>'text-align:left;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Remarks</label>
|
||||
<div class="form-group">
|
||||
|
||||
<!-- <?php
|
||||
$data = array('name' => 'Remarks','value' => set_value('Remarks'),'id'=>'Remarks' ,'class' => 'form-control' ,'style'=>'text-align:left;');
|
||||
echo form_input($data);
|
||||
?> -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Remark','value' => set_value('Remark'),'id'=>'Remark', 'class' => 'form-control' ,'rows' => '10', 'cols' => '100','maxlength' => '500');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-md-offset-11">
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save()" > <span class="bold">Save</span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var today = new Date();
|
||||
var dd = today.getDate();
|
||||
var mm = today.getMonth()+1; //January is 0!
|
||||
var yyyy = today.getFullYear();
|
||||
|
||||
if(dd<10) {
|
||||
dd = '0'+dd
|
||||
}
|
||||
|
||||
if(mm<10) {
|
||||
mm = '0'+mm
|
||||
}
|
||||
|
||||
today = yyyy+mm+dd;
|
||||
//alert(today);
|
||||
var count=<?php echo json_encode($actcount, JSON_PRETTY_PRINT) ?>;
|
||||
//alert(count)
|
||||
|
||||
var customerorderno=today+'/'+count;
|
||||
//alert(customerorderno)
|
||||
|
||||
$('#Corder').val(customerorderno);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function Save()
|
||||
{
|
||||
|
||||
if(validate())
|
||||
{
|
||||
var client_id=$('#Customer').val();
|
||||
var date= $('#Date').val();
|
||||
// $createddt = $date->format('Y-m-d');
|
||||
|
||||
var newdate = date.split("-").reverse().join("-");
|
||||
//alert(newdate)
|
||||
var contact_person = $('#Contact').val();
|
||||
var requirement= $('#requirement').val();
|
||||
var feasible = $("#Feasible :selected").text();
|
||||
var orderno = $('#Corder').val();
|
||||
var reqqty = $('#ReqQty').val();
|
||||
var supqty = $('#SupQty').val();
|
||||
var remarks= $('#Remark').val();
|
||||
$('#content').loader('show');
|
||||
$.ajax(
|
||||
{
|
||||
|
||||
data:{client_id:client_id,date:newdate,contact_person:contact_person,requirement:requirement,feasible:feasible,orderno:orderno,reqqty:reqqty,supqty,remarks:remarks},
|
||||
//dataType:'json',
|
||||
type:"POST",
|
||||
url:"<?php echo base_url();?>purchaseorder/SaveEnquiry",
|
||||
success:function(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
|
||||
|
||||
|
||||
if(data)
|
||||
{
|
||||
alert(data);
|
||||
window.location = "enquirylist";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function validate()
|
||||
{
|
||||
|
||||
if($("#Customer").val()=="0")
|
||||
{
|
||||
alert('Please Select Customer');
|
||||
$("#Customer").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>>
|
||||
313
application/views/editenquiry.php
Normal file
313
application/views/editenquiry.php
Normal file
@ -0,0 +1,313 @@
|
||||
|
||||
<?php
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$CurrentDate = $dt->format('d-m-Y');
|
||||
$customer='';
|
||||
$date='';
|
||||
$contact_person='';
|
||||
$requirement='';
|
||||
$feasible='';
|
||||
$corderno='';
|
||||
$requestedqty='';
|
||||
$suppliedqty='';
|
||||
$remark='';
|
||||
|
||||
|
||||
if(!empty($EnquiryDetails))
|
||||
{
|
||||
foreach($EnquiryDetails as $enq)
|
||||
{
|
||||
$Id=$enq->Id;
|
||||
$customerId=$enq->client_id;
|
||||
$customer=$enq->client_name;
|
||||
$date=$enq->Created_Date;
|
||||
$contact_person=$enq->Contact_Person;
|
||||
$requirement=$enq->Requirement;
|
||||
$feasible=$enq->Feasible;
|
||||
$corderno=$enq->OrderNo;
|
||||
$requestedqty=$enq->Requested_Qty;
|
||||
$suppliedqty=$enq->Supplied_Qty;
|
||||
$remark=$enq->Remarks;
|
||||
}
|
||||
}
|
||||
//echo $Id;
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
//Initialize Select2 Elements
|
||||
$("#Customer").select2();
|
||||
|
||||
|
||||
var MaxDate = '<?php echo $MaxPoDate;?>';
|
||||
var d = new Date(MaxDate);
|
||||
var t='<?php echo $CurrentDate;?>';
|
||||
var m=new Date(t);
|
||||
|
||||
$("#Date").datepicker({
|
||||
minDate : d,
|
||||
//maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.num{
|
||||
text-align:right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper" style="min-height:537"s>
|
||||
<!-- Content Header (Page header) -->
|
||||
|
||||
<section class="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<center><h3 class="box-title">Siddharth Industries - Enquiry Form</h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<div id="content"></div>
|
||||
<?php
|
||||
$attributes = array('class' => 'form-label-left advancerequest','name' => 'enquiry','id' => 'enquiry');
|
||||
|
||||
// echo form_open($this->config->base_url().'purchaseorder/addadvancerequest',$attributes);
|
||||
?>
|
||||
<div class="row" style="padding:0% 2%">
|
||||
<div class="col-md-12" >
|
||||
<div class="col-md-3">
|
||||
<label>Customer Name</label>
|
||||
<!-- <?php
|
||||
|
||||
$data = array('name' => 'Customer','value' => set_value('Customer',$customer),'id'=>'Customer' ,'class' => 'form-control num' ,'required' => 'true','readonly'=>'true');
|
||||
echo form_input($data);
|
||||
?> -->
|
||||
|
||||
<?php
|
||||
if(!empty($Customer))
|
||||
{
|
||||
|
||||
foreach ($Customer as $Cu):
|
||||
if($customerId==$Cu['client_id'])
|
||||
{
|
||||
$options1[$Cu['client_id']] = $Cu['client_id'].' '.' - '.' '.$Cu['client_name'];
|
||||
|
||||
}
|
||||
|
||||
endforeach;
|
||||
|
||||
|
||||
foreach ($Customer as $Cu):
|
||||
if($customerId!=$Cu['client_id'])
|
||||
{
|
||||
$options1[$Cu['client_id']] = $Cu['client_id'].' '.' - '.' '.$Cu['client_name'];
|
||||
|
||||
}
|
||||
|
||||
endforeach;
|
||||
}
|
||||
|
||||
echo form_dropdown('Customer', $options1,set_value('Customer',$Currency_Type),'id="Customer"','class="form-control select2"' , 'required="true"');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="enqid" value="<?php echo $Id;?>">
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Date</label>
|
||||
<?php
|
||||
$data = array('name' => 'Date','value' => set_value('Date',$CurrentDate),'id'=>'Date', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Contact Person</label>
|
||||
<?php
|
||||
$data = array('name' => 'Contact','value' => set_value('Contact',$contact_person),'id'=>'Contact' ,'class' => 'form-control num' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label>Requirement</label>
|
||||
<?php
|
||||
$data = array('name' => 'requirement','value' => set_value('requirement',$requirement),'id'=>'requirement' ,'class' => 'form-control num' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Feasible</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
if($feasible =='YES')
|
||||
{
|
||||
$optionsnew=array('0'=>'YES','1'=>'NO');
|
||||
}
|
||||
|
||||
else if($feasible == 'NO')
|
||||
{
|
||||
$optionsnew=array('0'=>'NO','1'=>'YES');
|
||||
}
|
||||
|
||||
|
||||
echo form_dropdown('Feasible', $optionsnew,set_value('Feasible'),'id="Feasible"' ,'required="true"' ,'class="form-control select2');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3">
|
||||
<label for="selectmonth">Customer Order No</label>
|
||||
<?php
|
||||
$data = array('name' => 'Corder','value' => set_value('Corder',$corderno),'id'=>'Corder', 'class' => 'form-control num' ,'required' => 'true','style'=>'text-align:left;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Requested Quantity</label>
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'ReqQty','value' => set_value('ReqQty',$requestedqty),'id'=>'ReqQty' ,'class' => 'form-control num' ,'required' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Supplied Quantity</label>
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'SupQty','value' => set_value('SupQty',$suppliedqty),'id'=>'SupQty' ,'class' => 'form-control' ,'style'=>'text-align:left;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Remarks</label>
|
||||
<div class="form-group">
|
||||
|
||||
<!-- <?php
|
||||
$data = array('name' => 'Remarks','value' => set_value('Remarks'),'id'=>'Remarks' ,'class' => 'form-control' ,'style'=>'text-align:left;');
|
||||
echo form_input($data);
|
||||
?> -->
|
||||
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Remark','value' => set_value('Remark',$remark),'id'=>'Remark', 'class' => 'form-control' ,'rows' => '10', 'cols' => '100','maxlength' => '500');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-md-offset-11">
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save()" > <span class="bold">Save</span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function Save()
|
||||
{
|
||||
|
||||
|
||||
var client_id=$('#Customer').val();
|
||||
var date= $('#Date').val();
|
||||
// $createddt = $date->format('Y-m-d');
|
||||
|
||||
var newdate = date.split("-").reverse().join("-");
|
||||
//alert(newdate)
|
||||
var contact_person = $('#Contact').val();
|
||||
var requirement= $('#requirement').val();
|
||||
var feasible = $("#Feasible :selected").text();
|
||||
var orderno = $('#Corder').val();
|
||||
var reqqty = $('#ReqQty').val();
|
||||
var supqty = $('#SupQty').val();
|
||||
var remarks= $('#Remark').val();
|
||||
var id= $('#enqid').val();
|
||||
//alert(id)
|
||||
$('#content').loader('show');
|
||||
$.ajax(
|
||||
{
|
||||
|
||||
data:{client_id:client_id,date:newdate,contact_person:contact_person,requirement:requirement,feasible:feasible,orderno:orderno,reqqty:reqqty,supqty,remarks:remarks,id:id},
|
||||
// dataType:'json',
|
||||
type:"POST",
|
||||
url:"<?php echo base_url();?>purchaseorder/UpdateEnquiry",
|
||||
success:function(data)
|
||||
{
|
||||
|
||||
$('#content').loader('hide');
|
||||
|
||||
if(data)
|
||||
{
|
||||
alert(data);
|
||||
window.location ="enquirylisting";
|
||||
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>>
|
||||
105
application/views/enquirylist.php
Normal file
105
application/views/enquirylist.php
Normal file
@ -0,0 +1,105 @@
|
||||
|
||||
<style>
|
||||
.pagination {
|
||||
margin:0px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<center><h3 class="box-title">Siddharth Industries - Enquiry List</h3></center>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<table id="example1" class="table table-bordered table-hover editableTable" style="font-size:12px;">
|
||||
<thead>
|
||||
<tr style="background-color:#ddf">
|
||||
<th>#</th>
|
||||
<th>Date</th>
|
||||
<th>Customer Name</th>
|
||||
<th>Contact Person</th>
|
||||
<th>Requirement</th>
|
||||
<th>Customer Order No</th>
|
||||
<th>Requested Qty</th>
|
||||
<th>Delivered Qty</th>
|
||||
<th>Balance Qty</th>
|
||||
<th>Feasibility</th>
|
||||
<th>Remarks</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><?php
|
||||
if(!empty($Customer_Order))
|
||||
{
|
||||
$index = 0;
|
||||
foreach($Customer_Order as $record)
|
||||
{
|
||||
$index = $index + 1;
|
||||
$supplied= $record->Supplied_Qty;
|
||||
|
||||
if($supplied =='')
|
||||
{
|
||||
$Suppliedquantity=0;
|
||||
// echo $Suppliedquantity;
|
||||
}
|
||||
else
|
||||
{
|
||||
$Suppliedquantity=$supplied;
|
||||
//echo $Suppliedquantity;
|
||||
}
|
||||
|
||||
?>
|
||||
<tr id="<?php echo $index ; ?>">
|
||||
<td align="left"><?php echo $index ; ?></td>
|
||||
<td><?php echo $record->Created_Date;?></td>
|
||||
<td><?php echo $record->client_name;?></td>
|
||||
<td><?php echo $record->Contact_Person;?></td>
|
||||
<td><?php echo $record->Requirement;?></td>
|
||||
<td><?php echo $record->OrderNo;?></td>
|
||||
<td><?php echo $record->Requested_Qty;?></td>
|
||||
<td><?php echo $Suppliedquantity;?></td>
|
||||
<td><?php echo ($record->Requested_Qty)-($record->Supplied_Qty);?></td>
|
||||
<td><?php echo $record->Feasible;?></td>
|
||||
<td><?php echo $record->Remarks;?></td>
|
||||
<td><a data-toggle="tooltip" href="<?php echo base_url().'Editenquiry?Id='.$record->Id; ?>"><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->Id; ?> - Click here to Edit Enquiry details"></i> </a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#example1').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -178,6 +178,30 @@ $(function() {
|
||||
|
||||
else{echo "non empty";}?> -->
|
||||
|
||||
<li>
|
||||
<span id="menu" data-toggle="dropdown" ><i class="fa fa-thumb-tack"></i>Enquiry and Order<span class="caret"></span></span>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="menu2">
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>purchaseorder/enquiry">
|
||||
<i class="fa fa-arrow-circle-up"></i>
|
||||
<span>Add Order Enquiry </span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>purchaseorder/enquirylist">
|
||||
<i class="fa fa-arrow-circle-up"></i>
|
||||
<span>View Order Enquiry List</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if($DEPCode != HR){?>
|
||||
|
||||
<?php if($DEPCode != SECURITY){?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user