po edit file upload
This commit is contained in:
parent
80560ca704
commit
0858dc8e54
@ -517,6 +517,7 @@ function edited(){
|
||||
|
||||
|
||||
$data['getdata'] = $this->purchaseorder_model->getfunctionr($PONO);
|
||||
$data['billfile'] = $this->purchaseorder_model->getbillfiesr($PONO);
|
||||
|
||||
$data['MaxPODate'] = $this->purchaseorder_model->getLastReleasedPODate();
|
||||
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
|
||||
@ -527,6 +528,7 @@ function edited(){
|
||||
$data['POItem'] = $this->purchaseorder_model->GetServicePurchaseOrderDetails($PONO);
|
||||
|
||||
$data['getdata'] = $this->purchaseorder_model->getfunction($PONO);
|
||||
//$data['billfile'] = $this->purchaseorder_model->getbillfiesr($pono);
|
||||
|
||||
//s print_r($data['getdata']);
|
||||
$data['getlogpodtl']=$this->purchaseorder_model->getlogpodtl($PONO);
|
||||
@ -4275,8 +4277,12 @@ function addloadfile()
|
||||
{
|
||||
|
||||
$pono= $this->input->post('PONO');
|
||||
$new_file_name =$_FILES['param1']['name'];
|
||||
//echo $new_file_name;
|
||||
|
||||
$igr= $this->input->post('igr');
|
||||
|
||||
|
||||
$new_file_name =$_FILES['file']['name'];
|
||||
//echo $new_file_name;die;
|
||||
if(!empty($new_file_name))
|
||||
{
|
||||
$Picture = $this->adfile();
|
||||
@ -4286,7 +4292,7 @@ function addloadfile()
|
||||
$Picture ='';
|
||||
}
|
||||
//echo $Picture;die;
|
||||
$filelist =array('PONO'=>$pono,'FilePath'=>$Picture);
|
||||
$filelist =array('PONO'=>$pono,'IGRNO'=>$igr,'FilePath'=>$Picture);
|
||||
|
||||
|
||||
|
||||
@ -4303,18 +4309,26 @@ $filelist =array('PONO'=>$pono,'FilePath'=>$Picture);
|
||||
function adfile()
|
||||
{
|
||||
$picture = '';
|
||||
if(!empty($_FILES['param1']['name']))
|
||||
if(!empty($_FILES['file']['name']))
|
||||
{
|
||||
$config['upload_path'] = 'uploads/BillFiles/';
|
||||
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
|
||||
$config['file_name'] = $_FILES['param1']['name'];
|
||||
// print_r($config) ;
|
||||
$config['file_name'] = $_FILES['file']['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('file'))
|
||||
{
|
||||
$uploadData = $this->upload->data();
|
||||
$picture = $uploadData['file_name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = array('error' => $this->upload->display_errors());
|
||||
$picture = '';
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
@ -4325,26 +4339,21 @@ $filelist =array('PONO'=>$pono,'FilePath'=>$Picture);
|
||||
return $picture ;
|
||||
}
|
||||
|
||||
function uploadfile()
|
||||
{
|
||||
|
||||
//alert();
|
||||
$bill= $this->input->post('param1');
|
||||
$oldfile= $this->input->post('param2');
|
||||
$invno= $this->input->post('param3');
|
||||
$invdate= $this->input->post('param4');
|
||||
$VehicleNo= $this->input->post('param5');
|
||||
$CourierNo= $this->input->post('param6');
|
||||
$MaterialRcvdDate =$this->input->post('param7');
|
||||
|
||||
|
||||
|
||||
// $oldfile = $this->input->post('param2');
|
||||
// $newfile = $this->input->post('param8');
|
||||
$newfile =$this->input->post('param8');
|
||||
function splpodata()
|
||||
{
|
||||
|
||||
$invno= $this->input->post('param1');
|
||||
$invdate= $this->input->post('param2');
|
||||
$VehicleNo= $this->input->post('param3');
|
||||
$CourierNo= $this->input->post('param4');
|
||||
$MaterialRcvdDate =$this->input->post('param5');
|
||||
$PONO =$this->input->post('param6');
|
||||
$IGRNO =$this->input->post('param7');
|
||||
$invdate = date('Y-m-d',strtotime($invdate));
|
||||
|
||||
$invdate = date('Y-m-d',strtotime($invdate));
|
||||
$MaterialRcvdDate =date('Y-m-d',strtotime($MaterialRcvdDate));
|
||||
|
||||
$CreatedBy = $this->session->userdata('userId');
|
||||
@ -4354,40 +4363,61 @@ function uploadfile()
|
||||
$createddt = $dt->format('Y-m-d H:i:s');
|
||||
|
||||
|
||||
$billdetails = $this->purchaseorder_model->getigrno($bill);
|
||||
|
||||
//print_r($billdetails);
|
||||
|
||||
|
||||
$PONO = $billdetails[0]['PONO'];
|
||||
// $billdetails = $this->purchaseorder_model->getigrno($bill);
|
||||
|
||||
// //print_r($billdetails);
|
||||
|
||||
|
||||
$IGRNo = $billdetails[0]['IGRNO'];
|
||||
// $PONO = $billdetails[0]['PONO'];
|
||||
|
||||
|
||||
// $IGRNo = $billdetails[0]['IGRNO'];
|
||||
|
||||
|
||||
|
||||
|
||||
if(!empty($_FILES['param8']['name']))
|
||||
$igrMaster = array('VehicleNo'=>$VehicleNo,'DeliveryChellanOrInvoiceNo'=>$invno,'DeliveryChellanDate'=>$invdate, 'MaterialRcvdDate'=>$MaterialRcvdDate,'CourierNo'=>$CourierNo,'UpdateBY'=>$CreatedBy,'UpdatedOn' =>$createddt);
|
||||
|
||||
|
||||
|
||||
$igrM = $this->purchaseorder_model->updateigrM($PONO,$IGRNO,$igrMaster);
|
||||
|
||||
if($igrM > 0){
|
||||
echo "updated successfully!";
|
||||
}
|
||||
else{
|
||||
echo " not updated successfully!";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function uploadfile()
|
||||
{
|
||||
|
||||
//alert();
|
||||
$bill= $this->input->post('param1');
|
||||
|
||||
$oldfile = $this->input->post('param2');
|
||||
|
||||
$newfile =$this->input->post('file');
|
||||
|
||||
|
||||
|
||||
if(!empty($_FILES['file']['name']))
|
||||
{
|
||||
|
||||
$Picture = $this->add();
|
||||
}else{
|
||||
$Picture = $this->input->post('param2');
|
||||
$Picture = $oldfile ;
|
||||
}
|
||||
//echo $Picture;die;
|
||||
$uploadfile = $this->purchaseorder_model->updatefile($bill,$Picture,$oldfile);
|
||||
|
||||
|
||||
$igrMaster = array('VehicleNo'=>$VehicleNo,'DeliveryChellanOrInvoiceNo'=>$invno,'DeliveryChellanDate'=>$invdate, 'MaterialRcvdDate'=>$MaterialRcvdDate,'CourierNo'=>$CourierNo,'UpdateBY'=>$CreatedBy,'UpdatedOn' =>$createddt);
|
||||
|
||||
// print_r($igrMaster);die;
|
||||
// uploadfile();
|
||||
|
||||
$igrM = $this->purchaseorder_model->updateigrM($PONO,$IGRNo,$igrMaster);
|
||||
|
||||
// $file =$this->purchaseorder_model->fileup($PONO,$IGRNo,$newfile)
|
||||
|
||||
// if($uploadfile > 0){
|
||||
echo "updated successfully!";
|
||||
// }
|
||||
@ -4399,16 +4429,16 @@ function uploadfile()
|
||||
function add()
|
||||
{
|
||||
$picture = '';
|
||||
if(!empty($_FILES['param8']['name']))
|
||||
if(!empty($_FILES['file']['name']))
|
||||
{
|
||||
$config['upload_path'] = 'uploads/BillFiles/';
|
||||
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
|
||||
$config['file_name'] = $_FILES['param8']['name'];
|
||||
// print_r($config) ;
|
||||
$config['file_name'] = $_FILES['file']['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('param8'))
|
||||
if($this->upload->do_upload('file'))
|
||||
{
|
||||
$uploadData = $this->upload->data();
|
||||
$picture = $uploadData['file_name'];
|
||||
|
||||
@ -204,7 +204,41 @@ function getfunctionr($pono)
|
||||
|
||||
$this->db->select('mstr.PONO,mstr.IGRNO,mstr.DeliveryChellanOrInvoiceNo,
|
||||
mstr.DeliveryChellanDate,mstr.VehicleNo,mstr.MaterialRcvdDate,
|
||||
mstr.CourierNo,bill.BillNo,bill.FilePath,pom.Status,pom.POType');
|
||||
mstr.CourierNo,pom.Status,pom.POType'); //,bill.BillNo,bill.FilePath,
|
||||
|
||||
$this->db->from('T_IGR_Master mstr');
|
||||
//$this->db->join('T_PurchaseOrder_BillUpload bill','bill.PONO = mstr.PONO','left');
|
||||
$this->db->join('T_IGR_Details dtl','mstr.IGRNO = dtl.IGRNO','left');
|
||||
// $this->db->join('T_MaterialMaster mm','mm.MaterialCode = bill.MaterialCode');
|
||||
$this->db->join('T_PurchaseOrder_Master pom','pom.PONO = mstr.PONO');
|
||||
$this->db->where('mstr.PONO',$pono);
|
||||
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
function getbillfiesr($pono)
|
||||
{
|
||||
$this->db->distinct();
|
||||
// $this->db->select('bill.PONO,mstr.IGRNO,bill.BillNo,mstr.MaterialRcvdDate,bill.FilePath,mstr.DeliveryChellanOrInvoiceNo,mstr.DeliveryChellanDate,mstr.VehicleNo,mstr.CourierNo,dtl.QuantityAsPerInvoice,pom.POType');
|
||||
// $this->db->from('T_PurchaseOrder_BillUpload bill');
|
||||
// $this->db->join('T_IGR_Master mstr','bill.PONO = mstr.PONO','left');
|
||||
// $this->db->join('T_IGR_Details dtl','mstr.IGRNO = dtl.IGRNO','left');
|
||||
// // $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');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->db->select('mstr.PONO,mstr.IGRNO,mstr.DeliveryChellanOrInvoiceNo,
|
||||
mstr.DeliveryChellanDate,mstr.VehicleNo,mstr.MaterialRcvdDate,
|
||||
mstr.CourierNo,bill.BillNo,bill.FilePath,pom.Status,pom.POType');
|
||||
|
||||
$this->db->from('T_IGR_Master mstr');
|
||||
$this->db->join('T_PurchaseOrder_BillUpload bill','bill.PONO = mstr.PONO','left');
|
||||
@ -219,7 +253,6 @@ mstr.CourierNo,bill.BillNo,bill.FilePath,pom.Status,pom.POType');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function GetPODetailforBillingServicePO($PONO)
|
||||
{
|
||||
|
||||
@ -282,13 +282,13 @@ if(!empty($mms))
|
||||
<td style="text-align:center"><span>
|
||||
<?php
|
||||
if(!empty($rel->file)){ ?>
|
||||
<a target="_blank" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm" id="files<?php echo $rel->pono;?>">Download</button></a>
|
||||
<a target="_blank" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm splpofile" id="files<?php echo $rel->pono;?>">Download</button></a>
|
||||
|
||||
<?php }else if(!empty($rel->ifile)) { ?>
|
||||
<a target="_blank" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><<button class="btn btn-info btn-sm" id="files<?php echo $rel->pono;?>">Download</button></a>
|
||||
|
||||
<?php }else if(!empty($rel->ifile)) { ?>
|
||||
<a target="_blank" href="<?php echo base_url().''. $rel->ifile ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm">Download</button></a>
|
||||
<?php
|
||||
}else
|
||||
{
|
||||
}else {
|
||||
echo 'N/A';
|
||||
}
|
||||
?>
|
||||
@ -354,7 +354,7 @@ if(!empty($mms))
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.btn-sm').click(function() {
|
||||
$('.splpofile').click(function() {
|
||||
var id = $(this).attr('id');
|
||||
$("#Fileshow").modal("show");
|
||||
$.ajax({
|
||||
|
||||
@ -359,10 +359,15 @@ table.dataTable thead > tr > td.sorting {
|
||||
<td id="download<?php echo $key?>" style="text-align:center"><span>
|
||||
<?php
|
||||
if(!empty($rel->file)){ ?><!-- if for Inward po file -->
|
||||
<a target="_blank" class="yourlink" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm" id="files<?php echo $rel->pono;?>">Download</button></a>
|
||||
<a target="_blank" class="yourlink" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm splpofile" id="files<?php echo $rel->pono;?>">Download</button></a>
|
||||
<?php }else if(!empty($rel->ifile)) { ?><!-- else if for igr file -->
|
||||
<a target="_blank" class="yourlink" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View"><button class="btn btn-info btn-sm" id="files<?php echo $rel->pono;?>">Download</button></a>
|
||||
<a target="_blank" href="<?php echo base_url().''.$rel->ifile ?>" data-toggle="tooltip" data-placement="left" title="Attachment Available for Download/View">
|
||||
<button class="btn btn-info btn-sm">Download</button>
|
||||
</a>
|
||||
<?php } else { echo 'N/A'; } ?><!-- both inwardpo file and Igr file empty means -->
|
||||
|
||||
|
||||
|
||||
</span></td>
|
||||
|
||||
</tr>
|
||||
@ -520,7 +525,7 @@ table.dataTable thead > tr > td.sorting {
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.btn-sm').click(function() {
|
||||
$('.splpofile').click(function() {
|
||||
var id = $(this).attr('id');
|
||||
$("#Fileshow").modal("show");
|
||||
$.ajax({
|
||||
|
||||
@ -351,7 +351,7 @@ $(function() {
|
||||
dateFormat: 'dd-mm-yy',changeMonth: false, changeYear: false
|
||||
});
|
||||
|
||||
$("#MaterialRcvdDate").datepicker({
|
||||
$("#MaterialRcvdDate,#InvDate").datepicker({
|
||||
//minDate : d,
|
||||
//maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: false, changeYear: false
|
||||
@ -4169,14 +4169,12 @@ function calculateEditTaxValue()
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- -->
|
||||
|
||||
|
||||
<div class="col-md-12" id="splpodiv">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12"><label>Special po Table List</label>
|
||||
<div class="col-md-12"><label>Special po Table List</label>
|
||||
|
||||
|
||||
|
||||
@ -4200,15 +4198,15 @@ function calculateEditTaxValue()
|
||||
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>Bill No </th>
|
||||
<!-- <th>Bill No </th> -->
|
||||
<!-- <th>Materials</th> -->
|
||||
<th>Delivery Challan No</th>
|
||||
<th>Delivery Challan Date</th>
|
||||
<th>MaterialReceived Date </th>
|
||||
<th>Vehicle No</th>
|
||||
<th>Courier No</th>
|
||||
<!-- <th>Quantity</th> -->
|
||||
<th>File</th>
|
||||
<!-- <th>IGRNO</th> -->
|
||||
<!-- <th>File</th> -->
|
||||
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
@ -4224,9 +4222,7 @@ function calculateEditTaxValue()
|
||||
<tr id="lastvalue">
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
@ -4235,14 +4231,14 @@ function calculateEditTaxValue()
|
||||
|
||||
<td><?php echo $gd->VehicleNo?></td>
|
||||
<td><?php echo $gd->CourierNo?></td>
|
||||
|
||||
|
||||
<td><?php echo (!empty($gd->FilePath))?$gd->FilePath:"No File"; ?></td>
|
||||
|
||||
|
||||
|
||||
|
||||
<input type="hidden" id="igrno" value="<?= $gd->IGRNO?>">
|
||||
<input type="hidden" id="billnos<?=$row?>" value="<?= $gd->BillNo?>">
|
||||
<input type="hidden" id="file<?=$row?>" value="<?=$gd->FilePath?>">
|
||||
|
||||
<input type="hidden" id="deliveryinvoiceno<?=$row?>" value="<?= $gd->DeliveryChellanOrInvoiceNo?>">
|
||||
<input type="hidden" id="deliverydate<?=$row?>" value="<?=$gd->DeliveryChellanDate?>">
|
||||
<input type="hidden" id="vehicleno<?=$row?>" value="<?= $gd->VehicleNo?>">
|
||||
@ -4251,14 +4247,72 @@ function calculateEditTaxValue()
|
||||
|
||||
|
||||
|
||||
<!-- <td><a data-target='#EditRevenueSplPOModel' data-toggle="modal" href="#EditRevenueSplPOModel"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to Edit the Revenue SplPO details"></i></a>
|
||||
<?php if(!empty($gd->FilePath)) { ?>
|
||||
<a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $gd->FilePath ?>"><i class="fa fa-download" ></i></a>
|
||||
<?php } ?>
|
||||
</td> -->
|
||||
|
||||
|
||||
|
||||
<td><span onclick="openmodel(<?=$row?>);"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to Edit the Revenue SplPO details"></i></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</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>File</th>
|
||||
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="spl">
|
||||
<?php
|
||||
if(!empty($billfile))
|
||||
{
|
||||
foreach($billfile as $row=>$gd)
|
||||
{
|
||||
$index = $row+1;
|
||||
?>
|
||||
<tr id="lastvalue">
|
||||
|
||||
|
||||
<td><?php echo $gd->BillNo ?></td>
|
||||
|
||||
|
||||
<td ><?php echo (!empty($gd->FilePath))?$gd->FilePath:"No File"; ?></td>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" id="hiddenigrno" value="<?= $gd->IGRNO?>">
|
||||
<input type="hidden" id="billnos<?=$index?>" value="<?= $gd->BillNo?>">
|
||||
|
||||
<input type="hidden" id="file<?=$index?>" value="<?=$gd->FilePath?>">
|
||||
|
||||
|
||||
|
||||
|
||||
<td><span onclick="openbillmodel(<?php echo $index ?>);"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to Edit the Revenue SplPO details"></i></span>
|
||||
<?php if(!empty($gd->FilePath)) { ?>
|
||||
<a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $gd->FilePath ?>"><i class="fa fa-download" ></i></a>
|
||||
<?php } ?>
|
||||
@ -4272,6 +4326,16 @@ function calculateEditTaxValue()
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--################################################################## -->
|
||||
|
||||
<?php if(!empty($update)){?>
|
||||
@ -4282,8 +4346,7 @@ function calculateEditTaxValue()
|
||||
<tr>
|
||||
<th>Sno</th>
|
||||
<th>PONO</th>
|
||||
<!-- <th>Material</th> -->
|
||||
<!-- <th>Date</th> -->
|
||||
|
||||
<th>LineItemNo</th>
|
||||
<th>Entity</th>
|
||||
<th>OldValue</th>
|
||||
@ -4299,7 +4362,7 @@ function calculateEditTaxValue()
|
||||
<?php
|
||||
if(!empty($getlogpodtl))
|
||||
{
|
||||
//print_r($getlogpodtl); die;
|
||||
|
||||
$inde = 0;
|
||||
foreach($getlogpodtl as $oldpo)
|
||||
{
|
||||
@ -4310,14 +4373,7 @@ function calculateEditTaxValue()
|
||||
<td><?php echo $inde; ?></td>
|
||||
<td><?php echo $oldpo->PONO ?></td>
|
||||
|
||||
<!--
|
||||
<?php if($oldpo->logDate !='-'){
|
||||
$logdate = date('d-m-Y',strtotime($oldpo->logDate));
|
||||
}else{
|
||||
$logdate = '-';
|
||||
}?>
|
||||
|
||||
<td><?=$logdate;?></td> -->
|
||||
|
||||
<td><?php echo $oldpo->LineItemNos;?></td>
|
||||
<td><?php echo $oldpo->entity?></td>
|
||||
<?php if($oldpo->entity =='PO DateChanged'){
|
||||
@ -4374,15 +4430,13 @@ function calculateEditTaxValue()
|
||||
<input type="text" name="ChallanInvNo" id="ChallanInvNo" maxlength="12" class="form-control" value="<?php echo $getdata[0]->DeliveryChellanOrInvoiceNo ?>" onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
<div class="col-md-4 pad"><strong>Delivery Challan /Inv Date</strong>
|
||||
<!-- <?php
|
||||
$data = array('name' => 'Date','value' => set_value('Date',$date),'id'=>'Date', 'class' => 'form-control PODate' ); // ,'readonly' => 'true'
|
||||
echo form_input($data);?> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'Date','value' => set_value('PODate',$date),'id'=>'PODate1', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'');
|
||||
$data = array('name' => 'InvDate','value' => set_value('InvDate',$date),'id'=>'InvDate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -4390,7 +4444,7 @@ function calculateEditTaxValue()
|
||||
|
||||
<div class="col-md-4 pad"> <strong>Material Received Date</strong>
|
||||
<?php
|
||||
$data = array('name' => 'Date','value' => set_value('PODate',$mrcdate),'id'=>'MaterialRcvdDate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'');
|
||||
$data = array('name' => 'MaterialRcvdDate','value' => set_value('MaterialRcvdDate',$mrcdate),'id'=>'MaterialRcvdDate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
@ -4417,47 +4471,9 @@ function calculateEditTaxValue()
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5">
|
||||
<?php if($getdata[0]->FilePath != '') { ?>
|
||||
<label for="oldimagename">Old file Name :</label><?php echo $getdata[0]->FilePath; ?> <br/><?php } ?>
|
||||
<input type = "file" size = "20" input accept=".docx,.pdf,.doc.JPG,.PNG,.jpg" id="imag" name="images" />
|
||||
<label for="images">Select file <br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5">
|
||||
<!-- <?php if($getdata[0]->FilePath != '') { ?>
|
||||
<label for="oldimagename">Old file Name :</label><?php echo $getdata[0]->FilePath; ?> <br/><?php } ?> -->
|
||||
<input type = "file" size = "20" input accept=".docx,.pdf,.doc.JPG,.PNG,.jpg" id="imag" name="images" onChange="filecheck();"/>
|
||||
<label for="images">Select file <br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-md-7">
|
||||
|
||||
|
||||
<div class="col-md-offset-1 col-md-1" >
|
||||
<input type="button" class="btn btn-primary" id ="addmorebutton" value=" + ADD FILES..">
|
||||
</div>
|
||||
|
||||
|
||||
<div id="newdiv"></div>
|
||||
<input type="hidden" name="hidecounter" id="hidecounter" value="0" />
|
||||
<input type="hidden" name="hideconstant" id="hideconstant" value="0" />
|
||||
|
||||
|
||||
</div> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<input type="hidden" name="hideoldfile" id="hideoldfile" value="<?php echo $getdata[0]->FilePath; ?>" class="form-control" readonly>
|
||||
<input type="hidden" name="hidebillno" id="hidebillno" value="<?php echo $getdata[0]->BillNo ?>" class="form-control" readonly>
|
||||
|
||||
|
||||
</div><!-- /.modal body -->
|
||||
|
||||
<div class="modal-footer">
|
||||
@ -4469,10 +4485,8 @@ function calculateEditTaxValue()
|
||||
|
||||
<div class="col-md-4 col-md-offset-8">
|
||||
|
||||
<a class="btn btn-primary" onclick="splpoupdate()" > <span class="bold">Update</span>
|
||||
|
||||
<!-- <input id="tag-form-submit" type="submit" class="btn btn-primary bold" value="Update"> --></a>
|
||||
<!-- <a class="btn btn-primary ok" ID="ExciseOption12" onclick="splpoupdate()" ><span class="bold">Update</span></a> -->
|
||||
<a class="btn btn-primary" onclick="splupdate()" > <span class="bold">Update</span>
|
||||
</a>
|
||||
<a class="btn btn-primary" data-dismiss="modal" onclick="SetExciseCalculationCancel();" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -4485,7 +4499,57 @@ function calculateEditTaxValue()
|
||||
|
||||
|
||||
|
||||
<div class="row" style="padding: 2% 0%">
|
||||
|
||||
|
||||
|
||||
<!-- Revenue bill Modal Starts Here -->
|
||||
<div id="billModel" class="modal fade" data-backdrop-limit="1" role="dialog" aria-labelledby="myModalLabel" >
|
||||
<div class="modal-dialog">
|
||||
|
||||
|
||||
|
||||
<div class="modal-content" style="width:950px;">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Update Bill Details</h4>
|
||||
</div>
|
||||
<form class="tagForm" id="tag-form" method="post" enctype="multipart/form-data" >
|
||||
<div class="modal-body" style="padding:0px;">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5">
|
||||
|
||||
|
||||
<input type = "file" size = "20" input accept=".docx,.pdf,.doc.JPG,.PNG,.jpg" id="billimag" name="images" onChange="filecheck();"/>
|
||||
<label for="images">Select file <br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" name="hideoldfile" id="hideoldfile" class="form-control" readonly>
|
||||
<input type="hidden" name="hidebillno" id="hidebillno" class="form-control" readonly>
|
||||
</div><!-- /.modal body -->
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="col-md-12 text-right">
|
||||
<div class="col-md-4 col-md-offset-8">
|
||||
<a class="btn btn-primary" onclick="splpoupdate()" > <span class="bold">Update</span>
|
||||
|
||||
|
||||
<a class="btn btn-primary" data-dismiss="modal" onclick="SetExciseCalculationCancel();" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal footer -->
|
||||
</form>
|
||||
</div><!-- /.modal content -->
|
||||
</div><!-- /.modal dialog -->
|
||||
</div><!-- /#filemodal -->
|
||||
<!-- Revenue Special PO Modal Ends Here -->
|
||||
|
||||
<div class="row" style="padding: 2% 0%">
|
||||
<div class="col-md-3 col-md-offset-9"><br/>
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||
@ -4509,11 +4573,11 @@ function calculateEditTaxValue()
|
||||
|
||||
else if($PONOStatus == SPECIAL_PO) {?>
|
||||
<a class="btn btn-primary" ID="Viewsave" onclick="Save(2)"> <span class="bold">Submit</span></a>
|
||||
<!-- <a class="btn btn-primary" ID="OK" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">OK</span></a> --> <?php }
|
||||
<?php }
|
||||
|
||||
|
||||
else {?>
|
||||
<!-- <a class="btn btn-primary" ID="Viewsave" onclick="Save(2)"> <span class="bold">Submit</span></a> -->
|
||||
|
||||
<a class="btn btn-primary" ID="OK" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">OK</span></a> <?php } ?>
|
||||
|
||||
|
||||
@ -4573,21 +4637,39 @@ $("#BudgetType").change(function(){
|
||||
|
||||
|
||||
function openmodel(i){
|
||||
//alert(i);
|
||||
var file = $("#file"+i).val();
|
||||
|
||||
|
||||
var Billno = $("#billnos"+i).val();
|
||||
var deliveryinvoiceno = $("#deliveryinvoiceno"+i).val();
|
||||
var deliverydate = $("#deliverydate"+i).val();
|
||||
|
||||
var vehicleno = $("#vehicleno"+i).val();
|
||||
var courierno = $("#courierno"+i).val();
|
||||
//alert(Billno +'-'+file +'-'+deliveryinvoiceno +'-'+deliverydate +'-'+vehicleno+'-'+courierno);
|
||||
var MaterialRcvdDate = $("#MaterialRcvdDate"+i).val();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$("#EditRevenueSplPOModel").modal("show");
|
||||
$(".oldimage").text(file);
|
||||
$("#hideoldfile").val(file);
|
||||
$("#hidebillno").val(Billno);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function openbillmodel(i){
|
||||
|
||||
//alert(i);
|
||||
var file = $("#file"+i).val();
|
||||
//alert(file);
|
||||
var Billno = $("#billnos"+i).val();
|
||||
//alert(Billno);
|
||||
|
||||
$("#hideoldfile").val(file);
|
||||
$("#hidebillno").val(Billno);
|
||||
$("#billModel").modal("show");
|
||||
|
||||
|
||||
$("#bill").text(Billno);
|
||||
}
|
||||
|
||||
@ -5848,40 +5930,21 @@ $("#Date").datepicker();
|
||||
|
||||
|
||||
function splpoupdate(){
|
||||
var formData = new FormData();
|
||||
|
||||
// var file = $("#images").prop('files')[0];
|
||||
// console.log(file);
|
||||
var param1 = $('#hidebillno').val();
|
||||
var param2 = $('#hideoldfile').val();
|
||||
// var filename = $("#imag").val();
|
||||
// filename = filename.split('\\');
|
||||
|
||||
var param8 =$('#imag').prop('files')[0];
|
||||
|
||||
// console.log(param8);
|
||||
var param3 =$('#ChallanInvNo').val();
|
||||
var param4 =$('#PODate1').val();
|
||||
//alert(param4);
|
||||
|
||||
|
||||
var param5 =$('#VehicleNo').val();
|
||||
var param6 =$('#CourierNo').val();
|
||||
var param7 =$('#MaterialRcvdDate').val();
|
||||
var formData = new FormData();
|
||||
|
||||
var file = $("#billimag").prop('files')[0];
|
||||
var param1 = $('#hidebillno').val();
|
||||
var param2 = $('#hideoldfile').val();
|
||||
|
||||
// var filename = $("#billimag").val();
|
||||
// filename = filename.split('\\');
|
||||
|
||||
|
||||
//formData.append('file',file);
|
||||
formData.append('param1',param1);
|
||||
formData.append('param2',param2);
|
||||
|
||||
formData.append('param3',param3);
|
||||
formData.append('param4',param4);
|
||||
formData.append('param5',param5);
|
||||
formData.append('param6',param6);
|
||||
formData.append('param7',param7);
|
||||
formData.append('param8',param8);
|
||||
|
||||
formData.append('file',file);
|
||||
formData.append('param1',param1);
|
||||
formData.append('param2',param2);
|
||||
|
||||
|
||||
|
||||
$('.content').loader('show');
|
||||
@ -5896,6 +5959,59 @@ function splpoupdate(){
|
||||
if(data){
|
||||
alert(data);
|
||||
$('.content').loader('hide');
|
||||
// $('#spl').find('td').eq(5).text(filename[2]);
|
||||
$('#billModel').modal('hide');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function splupdate(){
|
||||
|
||||
|
||||
var formData = new FormData();
|
||||
|
||||
|
||||
|
||||
var param1 =$('#ChallanInvNo').val();
|
||||
var param2 =$('#InvDate').val();
|
||||
var param3 =$('#VehicleNo').val();
|
||||
var param4 =$('#CourierNo').val();
|
||||
var param5 =$('#MaterialRcvdDate').val();
|
||||
var param6 =$('#txtPONO').val();
|
||||
var param7 =$('#igrno').val();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
formData.append('param1',param1);
|
||||
formData.append('param2',param2);
|
||||
formData.append('param3',param3);
|
||||
formData.append('param4',param4);
|
||||
formData.append('param5',param5);
|
||||
formData.append('param6',param6);
|
||||
formData.append('param7',param7);
|
||||
|
||||
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:formData,
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>purchaseorder/splpodata",
|
||||
cache : false,
|
||||
contentType : false,
|
||||
processData : false,
|
||||
success:function(data) {
|
||||
if(data){
|
||||
alert(data);
|
||||
window.location.reload();
|
||||
$('.content').loader('hide');
|
||||
// $('#spl').find('td').eq(5).text(filename[2]);
|
||||
$('#EditRevenueSplPOModel').modal('hide');
|
||||
}
|
||||
@ -5905,20 +6021,24 @@ function splpoupdate(){
|
||||
|
||||
}
|
||||
|
||||
function fileupload()
|
||||
function fileupload(counter)
|
||||
{
|
||||
var formData = new FormData();
|
||||
var file = $("#images").prop('files')[0];
|
||||
//console.log(file);
|
||||
var param1 =$('#images').prop('files')[0];
|
||||
var file = $("#images"+counter).prop('files')[0];
|
||||
// console.log(file);
|
||||
|
||||
|
||||
var PONO =$('#txtPONO').val();
|
||||
var igr =$('#hiddenigrno').val();
|
||||
//alert(igr);
|
||||
|
||||
|
||||
|
||||
formData.append('param1',param1);
|
||||
|
||||
formData.append('file',file);
|
||||
formData.append('PONO',PONO);
|
||||
|
||||
formData.append('count',counter);
|
||||
formData.append('igr',igr);
|
||||
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
@ -5931,9 +6051,10 @@ function fileupload()
|
||||
success:function(data) {
|
||||
if(data){
|
||||
alert(data);
|
||||
window.location.reload();
|
||||
$('.content').loader('hide');
|
||||
// $('#spl').find('td').eq(5).text(filename[2]);
|
||||
$('#EditRevenueSplPOModel').modal('hide');
|
||||
$('#billModel').modal('hide');
|
||||
}
|
||||
|
||||
}
|
||||
@ -5943,8 +6064,8 @@ function fileupload()
|
||||
|
||||
function filecheck()
|
||||
{
|
||||
var sizef = document.getElementById('imag').files[0].size;
|
||||
var file = $('#imag').val();
|
||||
var sizef = document.getElementById('billimag').files[0].size;
|
||||
var file = $('#billimag').val();
|
||||
|
||||
if(file!='' && sizef < 2100000)
|
||||
{ // alert('Your file added successfully');
|
||||
@ -5952,7 +6073,7 @@ var sizef = document.getElementById('imag').files[0].size;
|
||||
else
|
||||
{
|
||||
alert('Sorry Your File is Large To 2MB');
|
||||
$('#imag').val('');
|
||||
$('#billimag').val('');
|
||||
}
|
||||
}
|
||||
|
||||
@ -5976,13 +6097,14 @@ $("#addmorebutton").click(function(){
|
||||
// }
|
||||
// else{
|
||||
|
||||
// counter++;
|
||||
// counterConstant++;
|
||||
counter++;
|
||||
|
||||
|
||||
|
||||
var div = document.createElement('div');
|
||||
div.id = "divid";
|
||||
div.className="row";
|
||||
//alert(counter);
|
||||
div.innerHTML='<div class="col-md-12">'+
|
||||
// '<div class="col-md-3">'+
|
||||
// '<label>File Name</label>'+
|
||||
@ -5990,7 +6112,7 @@ div.innerHTML='<div class="col-md-12">'+
|
||||
// '</div>'+
|
||||
'<div class="col-md-3">'+
|
||||
'<label><br></label>'+
|
||||
'<input type="file" name="browseFiles" id="images" onchange="Copyfilename(this.name); "><br>'+
|
||||
'<input type="file" name="browseFiles" id="images'+counter+'" onchange="Copyfilename(this.name); "><br>'+
|
||||
'</div>'+
|
||||
// '<div class="col-md-3">'
|
||||
// '<label><br><br></label>'+
|
||||
@ -6020,10 +6142,10 @@ var file = $('#images').val();
|
||||
if (file=='')
|
||||
{
|
||||
alert('File not found');
|
||||
fileupload();
|
||||
|
||||
}
|
||||
else{
|
||||
fileupload();
|
||||
fileupload(counter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -399,7 +399,24 @@ display: none;
|
||||
<!--STOCK -->
|
||||
<?php if(empty($DepAccesslist)){?>
|
||||
<?php if($DEPCode == PRODUCTION){?>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-check-square-o"></i>
|
||||
<span>Store Details</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-down pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Stock">
|
||||
<i class="fa fa-dashboard"></i> <span>Stock</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo base_url(); ?>FinalProduct">
|
||||
<i class="fa fa-dashboard"></i> <span>Final Product</span>
|
||||
@ -424,7 +441,7 @@ display: none;
|
||||
<i class="fa fa-dashboard"></i> <span>Material Adjustment List</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul></li>
|
||||
|
||||
<?php } }
|
||||
|
||||
@ -435,6 +452,22 @@ else{
|
||||
if($assd == PRODUCTION || $DEPCode == PRODUCTION){
|
||||
$check25 =1
|
||||
?>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-check-square-o"></i>
|
||||
<span>Store Details</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-down pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
|
||||
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Stock">
|
||||
<i class="fa fa-dashboard"></i> <span>Stock </span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="<?php echo base_url(); ?>FinalProduct">
|
||||
@ -460,7 +493,7 @@ else{
|
||||
<i class="fa fa-dashboard"></i> <span>Material Adjustment List</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul></li>
|
||||
|
||||
<?php } if($check25 == 1){break;} } } ?>
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 289 KiB |
BIN
uploads/Igrfiles/Screenshot_from_2018-04-24_14-32-24.png
Normal file
BIN
uploads/Igrfiles/Screenshot_from_2018-04-24_14-32-24.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
Loading…
Reference in New Issue
Block a user