edit po file upload in limit
This commit is contained in:
parent
c3bd0a32a1
commit
f59ea384a8
@ -1187,16 +1187,16 @@ function edited(){
|
||||
|
||||
}
|
||||
//This used to Edit the Revenue Purchase Order
|
||||
function EditRevenuePurchaseOrder()
|
||||
function EditRevenuePurchaseOrder()
|
||||
{
|
||||
//echo "EDIT REBEIE";
|
||||
//die();
|
||||
$PONO =$this->input->post('txtPONO');
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
|
||||
$newsup=$this->input->post('newsup');
|
||||
$newsup=$this->input->post('newsup');
|
||||
$newSupId = split("[ - ]+", $newsup);
|
||||
|
||||
|
||||
@ -1212,11 +1212,11 @@ function edited(){
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
/*-----------------------------------*/
|
||||
$b4supplier=$this->input->post('b4supplier');
|
||||
|
||||
$b4supplier=$this->input->post('b4supplier');
|
||||
$b4date=$this->input->post('b4podate');
|
||||
$b4podate = $this->getDateformat($b4date);
|
||||
/*-----------------------------------*/
|
||||
|
||||
$Modeofshipment=$this->input->post('editmodeofshipment');
|
||||
$supplierreference=$this->input->post('editsupplierreference');
|
||||
$supplieroffno=$this->input->post('editsupplierofferno');
|
||||
@ -1258,8 +1258,7 @@ function edited(){
|
||||
// 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,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
|
||||
//print_r($POList);
|
||||
//die();
|
||||
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
|
||||
@ -1291,10 +1290,10 @@ function edited(){
|
||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||
$Quantity = $this->input->post('quantity'.$i);
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
/*-----------------------------------*/
|
||||
|
||||
$b4qty=$this->input->post('b4qty'.$i);
|
||||
$b4rate=$this->input->post('b4rate'.$i);
|
||||
/*-----------------------------------*/
|
||||
|
||||
$itemRate = $this->input->post('itemRate'.$i);
|
||||
$per=$this->input->post('per'.$i);
|
||||
$DiscountType = $this->input->post('DisType'.$i);
|
||||
@ -1305,29 +1304,30 @@ function edited(){
|
||||
$PackagingValue = $this->input->post('PackVal'.$i);
|
||||
$AfterPackagingValue = $this->input->post('AfterPackVal'.$i);
|
||||
$Cgst = $this->input->post('RevenueCgst'.$i);
|
||||
$Sgst = $this->input->post('RevenueSgst'.$i);
|
||||
$Igst = $this->input->post('RevenueIgst'.$i);
|
||||
$AfterCgst = $this->input->post('RevenueAfterCgst'.$i);
|
||||
$AfterSgst = $this->input->post('RevenueAfterSgst'.$i);
|
||||
$AfterIgst = $this->input->post('RevenueAfterIgst'.$i);
|
||||
$Sgst = $this->input->post('RevenueSgst'.$i);
|
||||
$Igst = $this->input->post('RevenueIgst'.$i);
|
||||
$AfterCgst = $this->input->post('RevenueAfterCgst'.$i);
|
||||
$AfterSgst = $this->input->post('RevenueAfterSgst'.$i);
|
||||
$AfterIgst = $this->input->post('RevenueAfterIgst'.$i);
|
||||
$FreightType = $this->input->post('FreightType'.$i);
|
||||
$FreightValue = $this->input->post('FreightVal'.$i);
|
||||
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
|
||||
$NOOfTrip = $this->input->post('NoOfTrip'.$i);
|
||||
$revenuedescription = $this->input->post('service_description'.$i); $InsuranceValue = $this->input->post('Insval'.$i);
|
||||
$revenuedescription = $this->input->post('service_description'.$i);
|
||||
$InsuranceValue = $this->input->post('Insval'.$i);
|
||||
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
||||
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
$LineItemNo = '';
|
||||
|
||||
/*---------start---------------------*/
|
||||
if($Quantity != $b4qty)
|
||||
if($Quantity != $b4qty)
|
||||
{
|
||||
$logpo =array('PONO'=>$PONO,'LineItemNos'=>$POLineItemNo,'UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt,'oldValue'=>$b4qty,'newValue'=>$Quantity,'entity'=>'Quantity Changed');
|
||||
|
||||
|
||||
$this->purchaseorder_model->insertlogpo($logpo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($itemRate != $b4rate)
|
||||
@ -1338,30 +1338,7 @@ function edited(){
|
||||
$this->purchaseorder_model->insertlogpo($logpo);
|
||||
}
|
||||
|
||||
// if($PODate != $b4podate )
|
||||
// {
|
||||
// $logpo =array('UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
|
||||
|
||||
// $this->purchaseorder_model->updatelogpo($MaterialCode,$POLineItemNo,$logpo);
|
||||
// }
|
||||
// if($PODate != $b4podate )
|
||||
// {
|
||||
// $logpo =array('UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
|
||||
|
||||
// $this->purchaseorder_model->updatelogpo($MaterialCode,$POLineItemNo,$logpo);
|
||||
// }
|
||||
// if($PODate != $b4podate )
|
||||
// {
|
||||
// $logpo =array('UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
|
||||
|
||||
// $this->purchaseorder_model->updatelogpo($MaterialCode,$POLineItemNo,$logpo);
|
||||
// }
|
||||
|
||||
|
||||
/*----------end--------------------*/
|
||||
|
||||
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
@ -1379,31 +1356,20 @@ function edited(){
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------start-----------------*/
|
||||
//if($MaterialCode!= ''){
|
||||
|
||||
|
||||
$ReqDetails = array('Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
//print_r($ReqDetails);
|
||||
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber,$MaterialCode,$ReqDetails);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$recqty=0;
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber,$MaterialCode,$ReqDetails);
|
||||
$recqty=0;
|
||||
|
||||
if($POStatus == SPECIAL_PO)
|
||||
{
|
||||
|
||||
$recqty= $Quantity;
|
||||
|
||||
|
||||
|
||||
|
||||
$IGRD= $this->purchaseorder_model->IGRDetailsupdate($PONO);
|
||||
$IGRD= $this->purchaseorder_model->IGRDetailsupdate($PONO);
|
||||
$j = $i-1;
|
||||
|
||||
|
||||
@ -1413,51 +1379,33 @@ function edited(){
|
||||
|
||||
$this->purchaseorder_model->updateIGR($IGRD[$j]['IGRItemNo'],$IGRDs);
|
||||
|
||||
|
||||
|
||||
/*------------------------------- may 24 today change edit po start---------------------------------*/
|
||||
|
||||
|
||||
$MaterialstockHistoryupdate= array('SupplierID'=>$SupplierID,'Quantity'=>$Quantity,'ItemValue'=>$itemRate,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
// print_r($MaterialstockHistoryupdate);
|
||||
|
||||
$MaterialstockHistoryupdate= array('SupplierID'=>$SupplierID,'Quantity'=>$Quantity,'ItemValue'=>$itemRate,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
|
||||
|
||||
$itemNo = $IGRD[$j]['IGRItemNo'];
|
||||
//echo $itemNo;
|
||||
|
||||
|
||||
$this->purchaseorder_model->updateMatStock($itemNo,
|
||||
$MaterialstockHistoryupdate);
|
||||
$this->purchaseorder_model->updateMatStock($itemNo,
|
||||
$MaterialstockHistoryupdate);
|
||||
|
||||
/*-------------------------------today change edit po end---------------------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//print_r($data['IGRDetails']);
|
||||
|
||||
/*-----------end-------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($SkipInsert == "False")
|
||||
{
|
||||
|
||||
if(strlen($POLineItemNo) == 0)
|
||||
{
|
||||
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Per'=>$per,'ServiceMaterialDescription'=>$revenuedescription,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter);
|
||||
//print_r($POLineItemList);
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
if(count($POLineItem)>0)
|
||||
{
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
// $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Per'=>$per,'ServiceMaterialDescription'=>$revenuedescription,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CostCenterCode'=>$CostCenter);
|
||||
// //print_r($POLineItemList);
|
||||
// $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
// if(count($POLineItem)>0)
|
||||
// {
|
||||
// $LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
// }
|
||||
|
||||
}
|
||||
else
|
||||
@ -1475,9 +1423,9 @@ function edited(){
|
||||
$isExists = $this->purchaseorder_model->LineItemExistsinRevenueTax($LineItemNo);
|
||||
if(count($isExists) == 0)
|
||||
{
|
||||
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'NoOfTrip'=>$NOOfTrip);
|
||||
//print_r($RevenueTaxList);
|
||||
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
|
||||
// $RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$updatedBy,'CreatedDate'=>$updateddt,'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'NoOfTrip'=>$NOOfTrip);
|
||||
// //print_r($RevenueTaxList);
|
||||
// $RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
|
||||
|
||||
}
|
||||
else
|
||||
@ -1491,67 +1439,8 @@ function edited(){
|
||||
}
|
||||
|
||||
|
||||
$counts = $this->input->post('hidecounter');
|
||||
$constants = $this->input->post('hideconstant');
|
||||
//$oldfile = $this->input->post('param2');
|
||||
$newfile = $this->input->post('param1');
|
||||
|
||||
// if(empty($newfile))
|
||||
// {
|
||||
// // echo $IGRNO;
|
||||
// // echo $PONO;
|
||||
|
||||
// $myfile = array('FilePath'=>$oldfile,'PONO'=>$PONO,'IGRNO'=>$IGRNO);
|
||||
// // print_r($myfile);
|
||||
// $this->purchaseorder_model->fileupload($myfile);
|
||||
|
||||
// }
|
||||
|
||||
// else{
|
||||
for($i=1;$i<=$constants;$i++){
|
||||
$pathname = 'browseFiles'.$i;
|
||||
|
||||
|
||||
|
||||
if(!empty($_FILES[$pathname]['name']))
|
||||
{
|
||||
|
||||
|
||||
$Picture = $this->addfile($pathname);
|
||||
//echo $Picture;
|
||||
$arr[] = array($Picture);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//print_r($arr);
|
||||
foreach($arr as $ma){
|
||||
|
||||
|
||||
$index = 0;
|
||||
$newfile = null;
|
||||
foreach($ma as $key=>$value){
|
||||
$index++;
|
||||
if($index == 1){
|
||||
$newfile = $value;
|
||||
}
|
||||
}
|
||||
|
||||
//$myfile = array('FilePath'=>$filename);
|
||||
//$emergencyitemcode = $this->input->post('materialCode'.$i);
|
||||
$myfile = array('FilePath'=>$newfile,'PONO'=>$PONO,'IGRNO'=>$IGRNO);
|
||||
|
||||
// print_r($myfile);
|
||||
|
||||
|
||||
$this->purchaseorder_model->fileupload($myfile);
|
||||
//addfiledetails($addfilelist);
|
||||
//print_r($myfile);
|
||||
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ;
|
||||
@ -1596,13 +1485,6 @@ function edited(){
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
|
||||
@ -383,7 +383,7 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
$DescriptionOfPo = $this->input->post('editdescofpo');
|
||||
|
||||
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
$PaymentTerms=$this->input->post('PaymentTerms');
|
||||
$OtherPayment=$this->input->post('Otherpayment');
|
||||
|
||||
$POType = $this->input->post('POType');
|
||||
@ -438,8 +438,8 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||
$Quantity = $this->input->post('quantity'.$i);
|
||||
/*-----------------------------------*/
|
||||
$b4qty=$this->input->post('b4qty'.$i);
|
||||
$b4rate=$this->input->post('b4rate'.$i);
|
||||
$b4qty=$this->input->post('b4qty'.$i);
|
||||
$b4rate=$this->input->post('b4rate'.$i);
|
||||
/*-----------------------------------*/
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
$itemRate = $this->input->post('itemRate'.$i);
|
||||
@ -597,8 +597,9 @@ function uploadfile()
|
||||
{
|
||||
$bill= $this->input->post('param1');
|
||||
$oldfile= $this->input->post('param2');
|
||||
$new_file_name =$_FILES['file']['name'];
|
||||
|
||||
if(!empty($_FILES['file']['name']))
|
||||
if(!empty($new_file_name))
|
||||
{
|
||||
$Picture = $this->add();
|
||||
}
|
||||
@ -652,6 +653,74 @@ function uploadfile()
|
||||
|
||||
$this->loadViews("404", $this->global, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function addfileuplod()
|
||||
{
|
||||
|
||||
$pono= $this->input->post('PONO');
|
||||
|
||||
|
||||
|
||||
$new_file_name =$_FILES['file']['name'];
|
||||
//echo $new_file_name;die;
|
||||
if(!empty($new_file_name))
|
||||
{
|
||||
$Picture = $this->adfile();
|
||||
}
|
||||
else
|
||||
{
|
||||
$Picture ='';
|
||||
}
|
||||
//echo $Picture;die;
|
||||
$filelist =array('PONO'=>$pono,'FilePath'=>$Picture);
|
||||
|
||||
|
||||
|
||||
$uploadfile = $this->purchaseorder_model->insertfile($filelist);
|
||||
|
||||
if($uploadfile > 0){
|
||||
echo "file updated successfully!";
|
||||
}
|
||||
else{
|
||||
echo "file not updated!";
|
||||
}
|
||||
}
|
||||
|
||||
function adfile()
|
||||
{
|
||||
$picture = '';
|
||||
if(!empty($_FILES['file']['name']))
|
||||
{
|
||||
$config['upload_path'] = 'uploads/BillFiles/';
|
||||
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
|
||||
$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
|
||||
{
|
||||
$picture = '';
|
||||
}
|
||||
|
||||
return $picture ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -179,7 +179,7 @@ button.dt-button, div.dt-button, a.dt-button{
|
||||
doc.content[1].margin = [ -25, 0, -25, 0 ] //left, top, right, bottom
|
||||
},
|
||||
|
||||
text: 'Save pdf',
|
||||
text: 'pdf',
|
||||
// footer: 'true',
|
||||
// messageTop: $('h3').text(),
|
||||
title: 'Maintenance/Breakdown Report',
|
||||
|
||||
@ -2271,6 +2271,21 @@ $(document).ready(function () {
|
||||
<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;" >
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<div class="col-md-offset-10 col-md-8" >
|
||||
<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>
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>Bill No </th>
|
||||
@ -2297,19 +2312,12 @@ $(document).ready(function () {
|
||||
<tr id="lastvalue">
|
||||
<td><?php echo $gd->BillNo ?></td>
|
||||
<input type="hidden" id="billnos<?= $row?>" value="<?= $gd->BillNo?>">
|
||||
<!-- <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 target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $gd->FilePath ?>"><i class="fa fa-download" ></i></a></td> -->
|
||||
|
||||
|
||||
|
||||
<input type="hidden" id="file<?=$row?>" value="<?=$gd->FilePath?>">
|
||||
|
||||
|
||||
<td><?php echo (!empty($gd->FilePath))?$gd->FilePath:"No File"; ?></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>
|
||||
<?php if(!empty($gd->FilePath)) { ?>
|
||||
@ -3753,6 +3761,7 @@ function splpoupdate(){
|
||||
success:function(data) {
|
||||
if(data){
|
||||
alert(data);
|
||||
window.location.reload();
|
||||
$('.content').loader('hide');
|
||||
//$('#spl').find('td').eq(1).text(filename[2]);
|
||||
$('#EditServiceSplPOModel').modal('hide');
|
||||
@ -3779,9 +3788,143 @@ var sizef = document.getElementById('imag').files[0].size;
|
||||
$('#imag').val('');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function fileupload(counter)
|
||||
{
|
||||
var formData = new FormData();
|
||||
var file = $("#images"+counter).prop('files')[0];
|
||||
// console.log(file);
|
||||
|
||||
|
||||
var PONO =$('#txtPONO').val();
|
||||
// var igr =$('#hiddenigrno').val();
|
||||
//alert(igr);
|
||||
|
||||
formData.append('file',file);
|
||||
formData.append('PONO',PONO);
|
||||
formData.append('count',counter);
|
||||
// formData.append('igr',igr);
|
||||
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:formData,
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>servicepurchaseorder/addfileuplod",
|
||||
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]);
|
||||
$('#EditServiceSplPOModel').modal('hide');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var counter = 0;
|
||||
var counterConstant = 0;
|
||||
|
||||
$("#addmorebutton").click(function(){
|
||||
|
||||
|
||||
counter++;
|
||||
|
||||
var bill = <?php echo json_encode($getdata)?>;
|
||||
if(bill.length>=5){
|
||||
|
||||
alert("No more files to add");//this allows only 5 files;
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
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><br></label>'+
|
||||
'<input type="file" name="browseFiles" id="images'+counter+'" onchange="Copyfilename(this.name); "><br>'+
|
||||
'</div>'+
|
||||
|
||||
'<div class="col-md-2">'+
|
||||
'<label><br><br></label>'+
|
||||
'<button class="btn btn-primary add add_this" id="addbtn" onclick="addRow()">ADD</button></div>'+
|
||||
'</div>'+
|
||||
|
||||
|
||||
'</div>';
|
||||
$('#newdiv').append(div);
|
||||
|
||||
|
||||
$('#hidecounter').val(counter);
|
||||
// $('#hideconstant').val(counterConstant);
|
||||
|
||||
if(counter>1){
|
||||
alert("Add button click here");//this allows only 5 files;
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
$('#addmorebutton').hide();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
function addRow()
|
||||
{
|
||||
//alert();
|
||||
|
||||
var file = $('#images').val();
|
||||
|
||||
if (file=='')
|
||||
{
|
||||
alert('File not found');
|
||||
|
||||
}
|
||||
else{
|
||||
fileupload(counter);
|
||||
}
|
||||
}
|
||||
|
||||
function Copyfilename(id)
|
||||
{
|
||||
|
||||
var size = $('input[name='+id+']')[0].files[0].size;
|
||||
|
||||
var number = id.replace(/[^0-9]+/ig,"");
|
||||
|
||||
if(size > 2100000){
|
||||
//alert(id);
|
||||
alert('Sorry Your File is Large To 2MB');
|
||||
removeRow(id);
|
||||
//$('input[name = browseFiles'+number+']').val(' ');
|
||||
}else {
|
||||
var name = $('input[name='+id+']')[0].files[0].name;
|
||||
//alert(name);
|
||||
$("#maint_filename"+number).val(name);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ if(!empty($MaxPODate))
|
||||
{
|
||||
$MaxPoDate = $date->PODate;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($CompanyDetails))
|
||||
{
|
||||
foreach ($CompanyDetails as $Req)
|
||||
@ -8600,19 +8600,7 @@ var specialrow=0;
|
||||
addHidden(theForm,"emergencyitemcode"+temp,emergencyitemcode );
|
||||
addHidden(theForm,"imag"+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++;
|
||||
@ -8622,11 +8610,7 @@ var specialrow=0;
|
||||
// $('#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
|
||||
@ -8714,78 +8698,14 @@ var specialservicerow=0;
|
||||
// $("#tablevalues").val(jsondata);
|
||||
|
||||
|
||||
}//add click function closed
|
||||
// function filecheck()
|
||||
// {
|
||||
|
||||
// //$('#content').loader('show');
|
||||
// var sizef = document.getElementById('imag').files[0].size;
|
||||
// var file = $('#imag').val();
|
||||
// //alert(file);
|
||||
// if(file!='' && sizef < 2100000)
|
||||
// {
|
||||
|
||||
// alert('Your file added successfully');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// alert('Sorry Your File is Large To 2MB');
|
||||
// $('#imag').val('');
|
||||
// }
|
||||
|
||||
// }
|
||||
// function sfilecheck()
|
||||
// {
|
||||
// //$('#content').loader('show');
|
||||
// var sizef = document.getElementById('images1').files[0].size;
|
||||
// var file1 = $('#images1').val();
|
||||
// if(file1!='' && sizef < 2100000)
|
||||
// {
|
||||
|
||||
// alert('Your file added successfully');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// alert('Sorry Your File is Large To 2MB');
|
||||
// $('#images1').val('');
|
||||
// }
|
||||
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<!-- Multiple file Upload Script -->
|
||||
<script>
|
||||
|
||||
// var selDiv = "";
|
||||
|
||||
// document.addEventListener("DOMContentLoaded", init, false);
|
||||
|
||||
// function init() {
|
||||
// document.querySelector('#files').addEventListener('change', handleFileSelect, false);
|
||||
// selDiv = document.querySelector("`#selectedFiles");
|
||||
// }
|
||||
|
||||
// function handleFileSelect(e) {
|
||||
|
||||
// if(!e.target.files) return;
|
||||
|
||||
// selDiv.innerHTML = "";
|
||||
|
||||
// var files = e.target.files;
|
||||
// for(var i=0; i<files.length; i++) {
|
||||
// var f = files[i];
|
||||
|
||||
// selDiv.innerHTML += f.name + "<br/>";
|
||||
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
//this script used to multiple file upoads in REVENUE//
|
||||
|
||||
|
||||
var counter = 0;
|
||||
var counterConstant = 0;
|
||||
@ -8794,11 +8714,11 @@ $("#addmorebutton").click(function(){
|
||||
|
||||
//alert('sda');
|
||||
|
||||
// if(counter>4){
|
||||
// alert("No more files to add");//this allows only 5 files;
|
||||
// return false;
|
||||
// }
|
||||
// else{
|
||||
if(counter>4){
|
||||
alert("No more files to add");//this allows only 5 files;
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
|
||||
counter++;
|
||||
counterConstant++;
|
||||
@ -8826,7 +8746,7 @@ div.innerHTML='<div class="col-md-12">'+
|
||||
$('#hidecounter').val(counter);
|
||||
$('#hideconstant').val(counterConstant);
|
||||
|
||||
//}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -8902,11 +8822,11 @@ $("#addemorebutton").click(function(){
|
||||
|
||||
//alert('sda');
|
||||
|
||||
// if(counter>4){
|
||||
// alert("No more files to add");//this allows only 5 files;
|
||||
// return false;
|
||||
// }
|
||||
// else{
|
||||
if(counters>4){
|
||||
alert("No more files to add");//this allows only 5 files;
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
|
||||
counters++;
|
||||
counterConstants++;
|
||||
@ -8940,7 +8860,7 @@ div.innerHTML='<div class="col-md-12">'+
|
||||
|
||||
|
||||
// document.write("browseFiles"+length);
|
||||
//}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
BIN
uploads/BillFiles/1.jpg
Executable file
BIN
uploads/BillFiles/1.jpg
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 179 KiB |
Loading…
Reference in New Issue
Block a user