Emergency PO changes-1 vadivel J 03-12--2024
This commit is contained in:
parent
7ad0d2853c
commit
bef33dc5cd
@ -297,34 +297,22 @@ class Emergencypurchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
if ($POStatus == SPECIAL_PO) {
|
if ($POStatus == SPECIAL_PO) {
|
||||||
|
|
||||||
$count = $this->request->getPost('hidecounters');
|
$serviceFilesLength = $this->request->getPost('serviceFilesLength');
|
||||||
$constant = $this->request->getPost('hideconstants');
|
$file = $this->request->getFiles();
|
||||||
|
|
||||||
|
|
||||||
|
if($serviceFilesLength > 0){ $listOfFiles = $serviceFilesLength ;}
|
||||||
|
|
||||||
$arr = [];
|
$arr = [];
|
||||||
$prefile = array();
|
$prefile = array();
|
||||||
|
|
||||||
for ($i = 1; $i <= $constant; $i++) {
|
for ($i = 1; $i <= $listOfFiles; $i++) {
|
||||||
|
|
||||||
$file = $this->request->getFile('browseFiles' . $i);
|
$file = $this->request->getFile('browseFiles' . $i);
|
||||||
$requestfilename = $file->getName();
|
$requestfilename = $file->getName();
|
||||||
|
|
||||||
if (!empty($requestfilename)) {
|
if (!empty($requestfilename)) {
|
||||||
|
|
||||||
$files = str_replace(" ", "", $requestfilename);
|
|
||||||
|
|
||||||
$fcount = 0;
|
|
||||||
|
|
||||||
foreach ($prefile as $value) {
|
|
||||||
|
|
||||||
if ($value == $files) {
|
|
||||||
|
|
||||||
$fcount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($fcount == 0) {
|
|
||||||
|
|
||||||
|
|
||||||
if ($file->isValid() && !$file->hasMoved()) {
|
if ($file->isValid() && !$file->hasMoved()) {
|
||||||
$path = ROOTPATH.'public/uploads/BillFiles/';
|
$path = ROOTPATH.'public/uploads/BillFiles/';
|
||||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||||
@ -334,28 +322,14 @@ class Emergencypurchaseorder extends BaseController
|
|||||||
//echo $Picture;
|
//echo $Picture;
|
||||||
$arr[] = array($Picture);
|
$arr[] = array($Picture);
|
||||||
}
|
}
|
||||||
|
$prefile[] = trim($requestfilename);
|
||||||
$prefile[] = $files;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//print_r($arr);
|
|
||||||
if (!empty($arr)) {
|
if (!empty($arr)) {
|
||||||
foreach ($arr as $ma) {
|
foreach ($arr as $filename) {
|
||||||
|
|
||||||
|
|
||||||
$index = 0;
|
|
||||||
foreach ($ma as $key => $value) {
|
|
||||||
$index++;
|
|
||||||
if ($index == 1) {
|
|
||||||
$filename = $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($filename)) {
|
|
||||||
|
|
||||||
$myfile = array('FilePath' => $filename, 'PONO' => $PONO);
|
$myfile = array('FilePath' => $filename, 'PONO' => $PONO);
|
||||||
$this->purchaseorder_model->fileupload($myfile);
|
$this->purchaseorder_model->fileupload($myfile);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -740,14 +714,9 @@ class Emergencypurchaseorder extends BaseController
|
|||||||
$igrDetails = array('IGRNO' => $IGRNO, 'MaterialCode' => $MaterialCode, 'QuantityAsPerInvoice' => $QuantityAsPerInvoice, 'Remarks' => $Remarks, 'IGRItemStatus' => $IGRItemStatus, 'CreatedBy' => $CreatedBy, 'CreatedDate' => $createddt);
|
$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);
|
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
||||||
$IGRItemNo = !empty($igrD) ? $igrD : '';
|
$IGRItemNo = !empty($igrD) ? $igrD : '';
|
||||||
|
|
||||||
//echo $IGRItemNo;
|
|
||||||
$MaterialstockHistoryadd = array('Ref_No' => $IGRItemNo, 'MaterialCode' => $MaterialCode, 'Transaction_type' => 'Add', 'Ref_Type' => 'IGR', 'SupplierID' => $SupplierID, 'Quantity' => $QuantityAsPerInvoice, 'ItemValue' => $itemRate, 'CreatedBy' => $CreatedBy, 'CreatedOn' => $createddt);
|
$MaterialstockHistoryadd = array('Ref_No' => $IGRItemNo, 'MaterialCode' => $MaterialCode, 'Transaction_type' => 'Add', 'Ref_Type' => 'IGR', 'SupplierID' => $SupplierID, 'Quantity' => $QuantityAsPerInvoice, 'ItemValue' => $itemRate, 'CreatedBy' => $CreatedBy, 'CreatedOn' => $createddt);
|
||||||
|
|
||||||
|
|
||||||
@ -797,77 +766,52 @@ class Emergencypurchaseorder extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//$myfile = array('FilePath'=>$filename);
|
|
||||||
// $emergencyitemcode = $this->request->getPost('emergencyitemcode'.$i);
|
|
||||||
// ($this->request->getPost('materialCode'.$i));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$counts = $this->request->getPost('hidecounter');
|
$revenueFilesLength = $this->request->getPost('revenueFilesLength');
|
||||||
$constants = $this->request->getPost('hideconstant');
|
$serviceFilesLength = $this->request->getPost('serviceFilesLength');
|
||||||
|
|
||||||
$file = $this->request->getFiles();
|
$file = $this->request->getFiles();
|
||||||
|
|
||||||
dd($file);
|
|
||||||
|
|
||||||
$arr = [];
|
$arr = [];
|
||||||
$prefile = array();
|
$prefile = array();
|
||||||
|
|
||||||
for ($i = 1; $i <= $constants; $i++) {
|
$listOfFiles = 0 ;
|
||||||
|
|
||||||
|
if($revenueFilesLength > 0){ $listOfFiles = $revenueFilesLength ;}
|
||||||
|
if($serviceFilesLength > 0){ $listOfFiles = $serviceFilesLength ;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for ($i = 1; $i <= $listOfFiles; $i++) {
|
||||||
|
|
||||||
$file = $this->request->getFile('browseFiles' . $i);
|
$file = $this->request->getFile('browseFiles' . $i);
|
||||||
$requestfilename = $file->getName();
|
$requestfilename = $file->getName();
|
||||||
|
|
||||||
if (!empty($requestfilename)) {
|
if (!empty($requestfilename)) {
|
||||||
|
|
||||||
$files = str_replace(" ", "", $requestfilename);
|
if ($file->isValid() && !$file->hasMoved()){
|
||||||
|
|
||||||
$fcount = 0;
|
|
||||||
|
|
||||||
foreach ($prefile as $value) {
|
|
||||||
|
|
||||||
|
|
||||||
if ($value == $files) {
|
|
||||||
|
|
||||||
|
|
||||||
$fcount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($fcount == 0) {
|
|
||||||
if ($file->isValid() && !$file->hasMoved()) {
|
|
||||||
$path = ROOTPATH.'public/uploads/BillFiles/';
|
$path = ROOTPATH.'public/uploads/BillFiles/';
|
||||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
if(!is_dir($path)) { mkdir($path, 0777, true);}
|
||||||
$Picture = $file->getName();
|
$Picture = $file->getName();
|
||||||
$file->move($path,$Picture);
|
$file->move($path,$Picture);
|
||||||
}
|
}
|
||||||
//echo $Picture;
|
|
||||||
$arr[] = array($Picture);
|
|
||||||
}
|
|
||||||
|
|
||||||
$prefile[] = $files;
|
$arr[] = array($Picture);
|
||||||
|
|
||||||
|
$prefile[] = trim($requestfilename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($arr)) {
|
if (!empty($arr)) {
|
||||||
foreach ($arr as $ma) {
|
foreach ($arr as $filename) {
|
||||||
|
|
||||||
|
|
||||||
$index = 0;
|
|
||||||
$filename = null;
|
|
||||||
foreach ($ma as $key => $value) {
|
|
||||||
$index++;
|
|
||||||
if ($index == 1) {
|
|
||||||
$filename = $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($filename)) {
|
|
||||||
|
|
||||||
$myfile = array('FilePath' => $filename, 'PONO' => $PONO, 'IGRNO' => $IGRNO);
|
$myfile = array('FilePath' => $filename, 'PONO' => $PONO, 'IGRNO' => $IGRNO);
|
||||||
$this->purchaseorder_model->fileupload($myfile);
|
$this->purchaseorder_model->fileupload($myfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1422,8 +1422,6 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
function SpecialPOcheck() {
|
function SpecialPOcheck() {
|
||||||
|
|
||||||
// alert('splpo')
|
|
||||||
//$('#content').loader('show');
|
|
||||||
POcheck = $("input:radio[name='Quality']:checked").val();
|
POcheck = $("input:radio[name='Quality']:checked").val();
|
||||||
|
|
||||||
console.log(POcheck);
|
console.log(POcheck);
|
||||||
@ -1432,24 +1430,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
var row = $('#txtRowCount1').val();
|
var row = $('#txtRowCount1').val();
|
||||||
var PO = $('#POType').val();
|
var PO = $('#POType').val();
|
||||||
|
|
||||||
// $('#hideconstants').val(counterConstants);
|
|
||||||
var file1 = $('#images1' + counterConstants).val()
|
|
||||||
var file = $('#imag' + counterConstant).val()
|
|
||||||
|
|
||||||
// if(splrow!=row)
|
|
||||||
// {
|
|
||||||
// alert("You havent add all the material details")
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
if (PO == 'REVENUE') {
|
if (PO == 'REVENUE') {
|
||||||
|
|
||||||
var images = $('#imag').val();
|
|
||||||
|
|
||||||
// $('#content').loader('show');
|
|
||||||
|
|
||||||
if (POcheck == 0) {
|
if (POcheck == 0) {
|
||||||
$('#txtSpecial').val(1);
|
$('#txtSpecial').val(1);
|
||||||
$('#txtQuality').val(1);
|
$('#txtQuality').val(1);
|
||||||
@ -4860,17 +4842,23 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<div class="modal-body ">
|
<div class="modal-body ">
|
||||||
<form action="">
|
<form action="">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 "><strong>Delivery Challan /Inv No</strong>
|
<div class="col-md-4 ">
|
||||||
|
<strong>Delivery Challan /Inv No</strong>
|
||||||
|
<span class="text-danger">*</span>
|
||||||
<input type="text" name="ChallanInvNo" id="ChallanInvNo" maxlength="12"
|
<input type="text" name="ChallanInvNo" id="ChallanInvNo" maxlength="12"
|
||||||
class="form-control" value="" required
|
class="form-control" value="" required
|
||||||
onkeypress="return isNumberKey(event)">
|
onkeypress="return isNumberKey(event)">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 "><strong>Delivery Challan /Inv Date</strong>
|
<div class="col-md-4 ">
|
||||||
|
<strong>Delivery Challan /Inv Date</strong>
|
||||||
|
<span class="text-danger">*</span>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'Date1', 'value' => set_value('Date1', $CurrentDate), 'id' => 'Date1', 'class' => 'form-control num', 'required' => 'true');
|
$data = array('name' => 'Date1', 'value' => set_value('Date1', $CurrentDate), 'id' => 'Date1', 'class' => 'form-control num', 'required' => 'true');
|
||||||
echo form_input($data); ?>
|
echo form_input($data); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 "><strong>Material Received Date</strong>
|
<div class="col-md-4 ">
|
||||||
|
<strong>Material Received Date</strong>
|
||||||
|
<span class="text-danger">*</span>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'MRC', 'value' => set_value('MRC', $CurrentDate), 'id' => 'MRC', 'class' => 'form-control num', 'required' => 'true');
|
$data = array('name' => 'MRC', 'value' => set_value('MRC', $CurrentDate), 'id' => 'MRC', 'class' => 'form-control num', 'required' => 'true');
|
||||||
echo form_input($data); ?>
|
echo form_input($data); ?>
|
||||||
@ -4878,16 +4866,21 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 mt-2 "><strong>Vehicle No</strong>
|
<div class="col-md-4 mt-2 ">
|
||||||
|
<strong>Vehicle No</strong>
|
||||||
|
<span class="text-danger">*</span>
|
||||||
<input type="text" name="VehicleNo" id="VehicleNo" maxlength="13"
|
<input type="text" name="VehicleNo" id="VehicleNo" maxlength="13"
|
||||||
class="form-control" value="" required>
|
class="form-control" value="" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4 mt-2 "><strong>Courier No</strong>
|
<div class="col-md-4 mt-2 ">
|
||||||
|
<strong>Courier No</strong>
|
||||||
|
<span class="text-danger">*</span>
|
||||||
<input type="text" name="CourierNo" id="CourierNo" maxlength="12"
|
<input type="text" name="CourierNo" id="CourierNo" maxlength="12"
|
||||||
class="form-control" value="" required>
|
class="form-control" value="" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 mt-2" id="QualityChecked"><strong>Is Quality Check
|
<div class="col-md-4 mt-2" id="QualityChecked">
|
||||||
|
<strong>Is Quality Check
|
||||||
Required</strong>
|
Required</strong>
|
||||||
<div class="radio m-2">
|
<div class="radio m-2">
|
||||||
<input type="radio" name="Quality" checked="checked" value='0'
|
<input type="radio" name="Quality" checked="checked" value='0'
|
||||||
@ -4921,9 +4914,11 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
<div class="col-md-12 " align="right">
|
<div class="col-md-12 " align="right">
|
||||||
<a class="btn btn-secondary" data-dismiss="modal"
|
<a class="btn btn-secondary" data-dismiss="modal"
|
||||||
onclick="SetExciseCalculationCancel();" value="Cancel">Cancel</a>
|
onclick="SetExciseCalculationCancel();" value="Cancel">Cancel
|
||||||
|
</a>
|
||||||
<a class="btn btn-info ok" ID="ExciseOption12"
|
<a class="btn btn-info ok" ID="ExciseOption12"
|
||||||
onclick="rfilealert();"> <span class="bold">Submit</span></a>
|
onclick="rfilealert();"> <span class="bold">Submit</span>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -4956,12 +4951,18 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" style="padding:0px;">
|
<div class="modal-body" style="padding:0px;">
|
||||||
<div class="col-md-12" align="left">
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<button type="button" class="btn btn-success" id="addMoreServiceFileButton">Add
|
||||||
|
File</button>
|
||||||
|
<button type="button" class="btn btn-danger" id="removeServiceFileButton">Remove
|
||||||
|
File</button>
|
||||||
|
|
||||||
<div class="col-md-offset-0 col-md-1">
|
<div id="newdiv"></div>
|
||||||
<input type="button" class="btn btn-success" id="addemorebutton"
|
|
||||||
value=" + ADD FILES..">
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="newsdiv"></div><!-- this div for add more section-->
|
<div id="newsdiv"></div><!-- this div for add more section-->
|
||||||
@ -5012,8 +5013,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<input type="radio" name="optfreight" checked="checked" value='0'
|
<input type="radio" name="optfreight" checked="checked" value='0' id="optfreightBasicAmount">
|
||||||
id="optfreightBasicAmount"> <label for="optfreightBasicAmount">Basic Amount</label>
|
<label for="optfreightBasicAmount">Basic Amount</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
@ -5045,8 +5046,8 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form>
|
<form>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label><input type="radio" name="optExcise" checked="checked" value="0"
|
<label><input type="radio" name="optExcise" checked="checked" value="0" id="optExcise">From
|
||||||
id="optExcise">From Basic Amount</label>
|
Basic Amount</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label><input type="radio" name="optExcise" value="1" id="optExcise">Basic
|
<label><input type="radio" name="optExcise" value="1" id="optExcise">Basic
|
||||||
@ -5099,8 +5100,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a class="btn btn-cancel" data-dismiss="modal" style="margin-top: -24px;"
|
<a class="btn btn-cancel" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
|
||||||
value="Cancel">Cancel</a>
|
|
||||||
<a class="btn btn-success" ID="VatOption" onclick="SetVatCalculation();"
|
<a class="btn btn-success" ID="VatOption" onclick="SetVatCalculation();"
|
||||||
style="margin-top: -24px;"> <span class="bold">Ok</span></a>
|
style="margin-top: -24px;"> <span class="bold">Ok</span></a>
|
||||||
</div>
|
</div>
|
||||||
@ -5132,8 +5132,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a class="btn btn-cancel" data-dismiss="modal" style="margin-top: -24px;"
|
<a class="btn btn-cancel" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
|
||||||
value="Cancel">Cancel</a>
|
|
||||||
<a class="btn btn-success" ID="CSTOption" onclick="SetCSTCalculation();"
|
<a class="btn btn-success" ID="CSTOption" onclick="SetCSTCalculation();"
|
||||||
style="margin-top: -24px;"> <span class="bold">Ok</span></a>
|
style="margin-top: -24px;"> <span class="bold">Ok</span></a>
|
||||||
</div>
|
</div>
|
||||||
@ -5308,8 +5307,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label><?php echo "Rate ($INRSYM)"; ?><span
|
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory">*</span></label>
|
||||||
class="badge mandatory">*</span></label>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'EditRate', 'value' => set_value('EditRate'), 'id' => 'EditRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange()');
|
$data = array('name' => 'EditRate', 'value' => set_value('EditRate'), 'id' => 'EditRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange()');
|
||||||
@ -5470,9 +5468,9 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Edit Revenue Modal -->
|
<!-- Edit Revenue Modal -->
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<div id="EDITREVENUE" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
|
<div id="EDITREVENUE" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
|
||||||
style="overflow-y:scroll !important">
|
style="overflow-y:scroll !important">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
@ -5589,8 +5587,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3" style="padding-right: 0px;">
|
<div class="col-md-3" style="padding-right: 0px;">
|
||||||
<label><?php echo "Rate ($INRSYM)"; ?><span
|
<label><?php echo "Rate ($INRSYM)"; ?><span class="badge mandatory">*</span></label>
|
||||||
class="badge mandatory">*</span></label>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'EditRevenueRate', 'value' => set_value('EditRate'), 'id' => 'EditRevenueRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange()', 'style' => 'text-align:right;');
|
$data = array('name' => 'EditRevenueRate', 'value' => set_value('EditRate'), 'id' => 'EditRevenueRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'Editchange()', 'style' => 'text-align:right;');
|
||||||
@ -5885,15 +5882,15 @@ if (!empty($INRSYMBOL)) {
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<div class="col-md-12 text-right">
|
<div class="col-md-12 text-right">
|
||||||
<a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel">Cancel</a>
|
<a class="btn btn-secondary waves-effect" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||||
<a class="btn btn-success EditRevenue" ID="EditRevenue"> <span
|
<a class="btn btn-success EditRevenue" ID="EditRevenue"> <span class="bold">Edit
|
||||||
class="bold">Edit Revenue</span></a>
|
Revenue</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -7216,6 +7213,18 @@ if (!empty($INRSYMBOL)) {
|
|||||||
formData.append('TextStatus', stat);
|
formData.append('TextStatus', stat);
|
||||||
formData.append('PaymentMethod', $('#PaymentMethod').val());
|
formData.append('PaymentMethod', $('#PaymentMethod').val());
|
||||||
formData.append('workStatus', $('#workstatusValue').val());
|
formData.append('workStatus', $('#workstatusValue').val());
|
||||||
|
formData.append('serviceFilesLength', $('.servicefiles').length);
|
||||||
|
|
||||||
|
//add igr files too here ..!!
|
||||||
|
$('input[type="file"]').each(function () {
|
||||||
|
const inputName = $(this).attr('name');
|
||||||
|
const files = this.files;
|
||||||
|
if (files.length > 0) {
|
||||||
|
const file = files[0];
|
||||||
|
formData.append(inputName, file);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// Perform form validation
|
// Perform form validation
|
||||||
if (validate()) {
|
if (validate()) {
|
||||||
@ -7301,8 +7310,31 @@ if (!empty($INRSYMBOL)) {
|
|||||||
formData.append('TextStatus', stat);
|
formData.append('TextStatus', stat);
|
||||||
formData.append('PaymentMethod', $('#PaymentMethod').val());
|
formData.append('PaymentMethod', $('#PaymentMethod').val());
|
||||||
formData.append('workStatus', $('#workstatusValue').val());
|
formData.append('workStatus', $('#workstatusValue').val());
|
||||||
|
formData.append('ChallanInvNo',$('#ChallanInvNo').val());
|
||||||
|
formData.append('ChallanInvDate',$('#Date1').val());
|
||||||
|
//abbreviation
|
||||||
|
//MRC --> material received
|
||||||
|
formData.append('MRC',$('#MRC').val());
|
||||||
|
formData.append('VehicleNo',$('#VehicleNo').val());
|
||||||
|
formData.append('CourierNo',$('#CourierNo').val());
|
||||||
|
formData.append('Quality', $('input[name="Quality"]:checked').val());
|
||||||
|
formData.append('igrStatusForMRC','ST027');
|
||||||
|
formData.append('revenueFilesLength', $('.revenuefiles').length);
|
||||||
|
|
||||||
|
|
||||||
|
//need to update the Igr status here..!!ST027 because material already recieved..!!
|
||||||
|
|
||||||
|
|
||||||
//add igr files too here ..!!
|
//add igr files too here ..!!
|
||||||
|
$('input[type="file"]').each(function () {
|
||||||
|
const inputName = $(this).attr('name'); // Get the `name` attribute
|
||||||
|
const files = this.files; // Get the FileList
|
||||||
|
|
||||||
|
if (files.length > 0) {
|
||||||
|
const file = files[0]; // Get the first file (or loop through for multiple files)
|
||||||
|
formData.append(inputName, file); // Append the file to FormData
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// Perform form validation
|
// Perform form validation
|
||||||
@ -7329,8 +7361,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
processData: false, // Prevent jQuery from automatically transforming the data into a query string
|
processData: false, // Prevent jQuery from automatically transforming the data into a query string
|
||||||
contentType: false, // Prevent jQuery from setting the content type header
|
contentType: false, // Prevent jQuery from setting the content type header
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
// Handle the server response
|
|
||||||
// alert(data);
|
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
$('#txtRowCount1').val('');
|
$('#txtRowCount1').val('');
|
||||||
$('#txtDeletedRow1').val('');
|
$('#txtDeletedRow1').val('');
|
||||||
@ -8361,30 +8392,32 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// var count = 0;
|
|
||||||
// var countConstant = 0;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function rfilealert() {
|
function rfilealert() {
|
||||||
//alert(counterConstant);
|
let result = validateIgrDetails();
|
||||||
|
if(result){
|
||||||
var file = $('#imag').val();
|
|
||||||
//var file = $('#imag').val();
|
|
||||||
|
|
||||||
// alert(file);
|
|
||||||
|
|
||||||
if (file == '') {
|
|
||||||
alert('File not found');
|
|
||||||
SpecialPOcheck();
|
SpecialPOcheck();
|
||||||
// addtable();
|
}else{
|
||||||
|
alert('Kindly fill all the mandatory details..!!');
|
||||||
|
return;
|
||||||
|
|
||||||
} else {
|
|
||||||
SpecialPOcheck();
|
|
||||||
// addtable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function validateIgrDetails (){
|
||||||
|
|
||||||
|
let ChallanInvNo = $('#ChallanInvNo').val().trim();
|
||||||
|
let Date1 = $('#Date1').val().trim();
|
||||||
|
let MRC = $('#MRC').val().trim();
|
||||||
|
let VehicleNo = $('#VehicleNo').val().trim();
|
||||||
|
let CourierNo = $('#CourierNo').val().trim();
|
||||||
|
|
||||||
|
if(ChallanInvNo && Date1 && MRC && VehicleNo && CourierNo ){
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Copyfilename(id) {
|
function Copyfilename(id) {
|
||||||
@ -8406,180 +8439,62 @@ if (!empty($INRSYMBOL)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function removeRow(input) {
|
|
||||||
// alert(input);
|
|
||||||
var number = input.replace(/[^0-9]+/ig, "");
|
|
||||||
//alert(number);
|
|
||||||
if (counter >= 1) {
|
|
||||||
counter--;
|
|
||||||
|
|
||||||
$("#divid" + number).remove();
|
|
||||||
$('#hidecounter').val(counter);
|
|
||||||
}
|
|
||||||
|
|
||||||
var rm_count = $("#hideconstant").val();
|
|
||||||
if (counter != 0) {
|
|
||||||
if (number != rm_count) {
|
|
||||||
// alert("if");
|
|
||||||
$("#addbtn" + counter).show();
|
|
||||||
$("#removebtn" + counter).show();
|
|
||||||
} else {
|
|
||||||
//alert('else');
|
|
||||||
$("#addbtn" + counter).show();
|
|
||||||
$("#removebtn" + counter).show();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$("#addmorebutton").show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//this script used to multiple file upoads in service//
|
//this script used to multiple file upoads in service//
|
||||||
|
|
||||||
|
$("#addMoreServiceFileButton").click(function () {
|
||||||
|
|
||||||
|
let filesAdded = $(".servicefiles").length;
|
||||||
|
|
||||||
|
if (filesAdded >= 5) {
|
||||||
|
alert("Maximum of five files Only be uploaded..!!");
|
||||||
var counters = 0;
|
return;
|
||||||
var counterConstants = 0;
|
|
||||||
|
|
||||||
$("#addemorebutton").click(function () {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (counters > 4) {
|
|
||||||
alert("You have to upload five files only"); //this allows only 5 files;
|
|
||||||
return false;
|
|
||||||
} else {
|
} else {
|
||||||
|
$("#removeServiceFileButton").show();
|
||||||
|
|
||||||
counters++;
|
filesAdded++;
|
||||||
counterConstants++;
|
let newFile = filesAdded;
|
||||||
|
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.id = "divid" + counters;
|
div.id = "divid" + newFile;
|
||||||
div.className = "row p-2";
|
div.className = "row servicefiles mt-2";
|
||||||
div.innerHTML =
|
div.innerHTML =
|
||||||
'<div class="col-md-4" >' +
|
'<br>' +
|
||||||
'<label>Select Service Bill</label>' +
|
'<div class="col-md-3">' +
|
||||||
'<input type="file" id="images1" name="browseFiles' + counterConstants + '" onchange="Copyfilenames(this.name);"><br>' +
|
'<label>Select File</label>' +
|
||||||
|
'<input type="file" name="browseFiles' + newFile + '" "><br>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
|
'<br>';
|
||||||
|
|
||||||
|
$('#newdiv').append(div);
|
||||||
|
|
||||||
|
|
||||||
'<div class="col-md-1 " >' +
|
$('#hidecounter').val(newFile);
|
||||||
'<label><br><br></label>' +
|
$('#hideconstant').val(newFile);
|
||||||
'<button class="btn btn-success btn-sm" type="button" onclick="addRows(' + counters + ')"id="addbtns1" ><i class="fa fa-plus-square"></i></button></div>' +
|
|
||||||
|
|
||||||
'<div class="col-md-1" >' +
|
|
||||||
'<label><br><br></label>' +
|
|
||||||
'<button class="btn btn-danger btn-sm remove remove_this" id="removebtns' + counters + '" onclick="removeRows(this.id)"><i class="fa fa-minus-square"></i></button></div>' +
|
|
||||||
|
|
||||||
'</div>';
|
|
||||||
$('#newsdiv').append(div);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#hidecounters').val(counters);
|
|
||||||
$('#hideconstants').val(counterConstants);
|
|
||||||
|
|
||||||
if (counters > 1) {
|
|
||||||
alert("Add button click here"); //this allows only 5 files;
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
|
|
||||||
$('#addemorebutton').hide();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// document.write("browseFiles"+length);
|
})
|
||||||
|
|
||||||
|
$("#removeServiceFileButton").click(function () {
|
||||||
|
|
||||||
|
let filesAdded = $(".servicefiles").length;
|
||||||
|
|
||||||
|
if (filesAdded > 1) {
|
||||||
|
$(".servicefiles:last").remove();
|
||||||
|
|
||||||
|
} else if (filesAdded == 1) {
|
||||||
|
$(".servicefiles:last").remove();
|
||||||
|
$('#removeServiceFileButton').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function addRows(inputs) {
|
|
||||||
if (inputs < 5) {
|
|
||||||
if (inputs == 0) {
|
|
||||||
inputs = inputs + 1;
|
|
||||||
$("#addbtns" + inputs).hide();
|
|
||||||
$("#removebtns" + inputs).hide();
|
|
||||||
} else {
|
|
||||||
$("#addbtns" + inputs).hide();
|
|
||||||
$("#removebtns" + inputs).hide();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$("#addbtns" + inputs).show();
|
|
||||||
$("#removebtns" + inputs).show();
|
|
||||||
}
|
|
||||||
// alert(s);
|
|
||||||
if (counters > 4) {
|
|
||||||
alert("No more files to add"); //this allows only 5 files;
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
counters++;
|
|
||||||
counterConstants++;
|
|
||||||
//alert("count"+counterConstants);
|
|
||||||
var div = document.createElement('div');
|
|
||||||
div.id = "divid" + counters;
|
|
||||||
div.className = "row p-2";
|
|
||||||
div.innerHTML =
|
|
||||||
|
|
||||||
'<div class="col-md-4">' +
|
|
||||||
'<label>Select Service Bill</label>' +
|
|
||||||
'<input type="file" name="browseFiles' + counterConstants + '" id="images1" onchange="Copyfilename(this.name); "><br>' +
|
|
||||||
'</div>' +
|
|
||||||
|
|
||||||
'<div class="col-md-1" >' +
|
|
||||||
'<label><br><br></label>' +
|
|
||||||
'<button class="btn btn-success btn-sm" type="button" id="addbtns' + counters + '" onclick="addRows(' + counters + ')"><i class="fa fa-plus-square"></i></button></div>' +
|
|
||||||
|
|
||||||
'<div class="col-md-1" >' +
|
|
||||||
'<label><br><br></label>' +
|
|
||||||
'<button class="btn btn-danger btn-sm remove remove_this" id="removebtns' + counters + '" onclick="removeRows(this.id)"><i class="fa fa-minus-square"></i></button></div>' +
|
|
||||||
'</div>' +
|
|
||||||
|
|
||||||
|
|
||||||
'</div>';
|
|
||||||
$('#newsdiv').append(div);
|
|
||||||
|
|
||||||
|
|
||||||
$('#hidecounters').val(counters);
|
|
||||||
$('#hideconstants').val(counterConstants);
|
|
||||||
|
|
||||||
|
|
||||||
if (counters > 1) {
|
|
||||||
//alert("Next File choose + button click here");//this allows only 5 files;
|
|
||||||
//return false;
|
|
||||||
$('#addbtns').hide();
|
|
||||||
$("#removebtns").hide();
|
|
||||||
} else {
|
|
||||||
|
|
||||||
$('#addemorebutton').hide();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function sfilealert() {
|
function sfilealert() {
|
||||||
//alert(counterConstants);
|
|
||||||
var file1 = $('#images1').val();
|
|
||||||
//$('input[name='+id+']')[0].files[0].size;
|
|
||||||
if (file1 == '') {
|
|
||||||
alert('File not found');
|
|
||||||
SpecialPOcheck();
|
SpecialPOcheck();
|
||||||
} else {
|
|
||||||
SpecialPOcheck();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function Copyfilenames(id) {
|
function Copyfilenames(id) {
|
||||||
@ -8602,47 +8517,7 @@ if (!empty($INRSYMBOL)) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// function removeRows(input) {
|
|
||||||
|
|
||||||
// var number = input.replace(/[^0-9]+/ig,"");
|
|
||||||
|
|
||||||
// if(counters>= 1){
|
|
||||||
// counters --;
|
|
||||||
|
|
||||||
// $("#divid"+number).remove();
|
|
||||||
// $('#hidecounters').val(counters);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
function removeRows(inputs) {
|
|
||||||
// alert(input);
|
|
||||||
var number = inputs.replace(/[^0-9]+/ig, "");
|
|
||||||
//alert(number);
|
|
||||||
if (counters >= 1) {
|
|
||||||
counters--;
|
|
||||||
|
|
||||||
$("#divid" + number).remove();
|
|
||||||
$('#hidecounters').val(counters);
|
|
||||||
}
|
|
||||||
|
|
||||||
var rm_count = $("#hideconstants").val();
|
|
||||||
if (counters != 0) {
|
|
||||||
if (number != rm_count) {
|
|
||||||
// alert("if");
|
|
||||||
$("#addbtns" + counters).show();
|
|
||||||
$("#removebtns" + counters).show();
|
|
||||||
} else {
|
|
||||||
//alert('else');
|
|
||||||
$("#addbtns" + counters).show();
|
|
||||||
$("#removebtns" + counters).show();
|
|
||||||
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$("#addemorebutton").show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
$('#IsOpenOrder').change(function () {
|
$('#IsOpenOrder').change(function () {
|
||||||
|
|||||||
@ -2633,7 +2633,7 @@ if (!empty($getlogpodtl)) {
|
|||||||
<div class="form-row" style="padding-bottom: 10px;">
|
<div class="form-row" style="padding-bottom: 10px;">
|
||||||
|
|
||||||
<div class=" col-md-8 px-2">
|
<div class=" col-md-8 px-2">
|
||||||
<label>Upload Purchase Order Bill </label>
|
<label>Upload IGR Bill </label>
|
||||||
<input type="button" class="btn btn-success" id="addmorebutton"
|
<input type="button" class="btn btn-success" id="addmorebutton"
|
||||||
value=" ADD FILES "><br>
|
value=" ADD FILES "><br>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user