Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
vadivelJ96 2024-09-13 11:22:31 +05:30
commit 730d57d795
10 changed files with 758 additions and 760 deletions

View File

@ -4,6 +4,7 @@
$("#loan_issued_date").datepicker({ $("#loan_issued_date").datepicker({
minDate: 'now', minDate: 'now',
orientation: 'bottom',
// maxDate : 'now', // maxDate : 'now',
dateFormat: 'dd-mm-yy', dateFormat: 'dd-mm-yy',
changeMonth: true, changeMonth: true,
@ -55,24 +56,6 @@
<form role="form" id="addemppaydate" action="<?php echo base_url() ?>emppaydate/addNewemppay" method="post" name="addform"> <form role="form" id="addemppaydate" action="<?php echo base_url() ?>emppaydate/addNewemppay" method="post" name="addform">
<div class="box-body"> <div class="box-body">
<!-- Supplier Information --> <!-- Supplier Information -->
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="row">
<div class="col-md-3">
</div>
</div>
</div>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="row">
<div class="col-md-3">
</div>
</div>
</div>
<div class="col-md-12" style="margin-bottom: 27px;">
<div class="row">
<div class="col-md-3">
</div>
</div>
</div>
<div class="col-md-12" style="margin-bottom: 27px;"> <div class="col-md-12" style="margin-bottom: 27px;">
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">

View File

@ -1,184 +1,185 @@
<?php
<?php //print_r($AppList);
//print_r($AppList);
?> ?>
<div class="content-wrapper"> <div class="content-wrapper">
<section class="content"> <section class="content">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<center><h3 class="box-title"> Store Requisition Approval List</h3></center> <center>
</div> <h3 class="box-title"> Store Requisition Approval List</h3>
</center>
<?php
$attributes = array('class' => 'form-label-left Approve ','name' => 'Approve','id' => 'Approve');
echo form_open(base_url().'storerequisitionlist/SearchRequistLists',$attributes); ?>
<div class="container-fluid">
<!-- popup for view store requisition detail -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal -->
<form>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<center><h4> Store Requisition Details - <span id="StReqno"></span></h4></center>
</div> </div>
<div align="left">
<?php
<div class="col-md-12"> $attributes = array('class' => 'form-label-left Approve ', 'name' => 'Approve', 'id' => 'Approve');
<!--<div class="col-md-4">
echo form_open(base_url() . 'storerequisitionlist/SearchRequistLists', $attributes); ?>
<div class="container-fluid">
<!-- popup for view store requisition detail -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal -->
<form>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<center>
<h4> Store Requisition Details - <span id="StReqno"></span></h4>
</center>
</div>
<div align="left">
<div class="col-md-12">
<!--<div class="col-md-4">
<label>Requistion Type</label> <label>Requistion Type</label>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'ReqType','value' => set_value('ReqType'),'id'=>'ReqType', 'class' => 'form-control' ,'readonly' => 'true'); $data = array('name' => 'ReqType', 'value' => set_value('ReqType'), 'id' => 'ReqType', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
</div> --> </div> -->
<div class="col-md-6">
<label>Requested By</label>
<div class="form-group">
<?php
$data = array('name' => 'Requestedby','value' => set_value('Requestedby'),'id'=>'Requestedby', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-6">
<label>Department Name</label>
<div class="form-group">
<?php
$data = array('name' => 'Desigination','value' => set_value('Desigination'),'id'=>'Desigination', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-6">
<label>Requested Date</label>
<div class="form-group">
<?php
$data = array('name' => 'ReqDate','value' => set_value('ReqDate'),'id'=>'ReqDate', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-6">
<label>Cost Center Name</label>
<div class="form-group">
<?php
$data = array('name' => 'CostCenter','value' => set_value('CostCenter'),'id'=>'CostCenter', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?> <div class="col-md-6">
<label>Requested By</label>
<div class="form-group">
<?php
$data = array('name' => 'Requestedby', 'value' => set_value('Requestedby'), 'id' => 'Requestedby', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-6">
<label>Department Name</label>
<div class="form-group">
<?php
$data = array('name' => 'Desigination', 'value' => set_value('Desigination'), 'id' => 'Desigination', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
</div> </div>
</div> <div class="col-md-12">
<!-- <div class="col-md-4"> <div class="col-md-6">
<label>Requested Date</label>
<div class="form-group">
<?php
$data = array('name' => 'ReqDate', 'value' => set_value('ReqDate'), 'id' => 'ReqDate', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<div class="col-md-6">
<label>Cost Center Name</label>
<div class="form-group">
<?php
$data = array('name' => 'CostCenter', 'value' => set_value('CostCenter'), 'id' => 'CostCenter', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data);
?>
</div>
</div>
<!-- <div class="col-md-4">
<label>Avl Budget Amt</label>&nbsp;<img id="AlertImg" src="<?php echo base_url(); ?>public/assets/dist/img/red.png" alt="your image" width="25px" style="display:none"/> <label>Avl Budget Amt</label>&nbsp;<img id="AlertImg" src="<?php echo base_url(); ?>public/assets/dist/img/red.png" alt="your image" width="25px" style="display:none"/>
<div class="form-group"> <div class="form-group">
<?php <?php
$data = array('name' => 'AvlBudgetAmount','value' => set_value('AvlBudgetAmount'),'id'=>'AvlBudgetAmount', 'class' => 'form-control' ,'readonly' => 'true'); $data = array('name' => 'AvlBudgetAmount', 'value' => set_value('AvlBudgetAmount'), 'id' => 'AvlBudgetAmount', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data); echo form_input($data);
?> ?>
</div> --> </div> -->
</div> </div>
</div> </div>
<table id="Items" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;"> <table id="Items" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<div align="right" style="padding-right:10px"> <div align="right" style="padding-right:10px">
<div class="modal fade" role="dialog"> <div class="modal fade" role="dialog">
<thead> <thead>
<tr> <tr>
<th>SNo</th> <th>SNo</th>
<th>Item Code</th> <th>Item Code</th>
<th>Item Description</th> <th>Item Description</th>
<th>UOM</th> <th>UOM</th>
<th>Requested Quantity</th> <th>Requested Quantity</th>
<th>Issued Quantity</th> <th>Issued Quantity</th>
<th>Status</th> <th>Status</th>
<th>Remarks</th> <th>Remarks</th>
</tr> </tr>
</thead>
<tbody id="tbleAppend">
</tbody>
</div>
</div>
</table>
<div class="modal-footer">
<div class="col-md-12">
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Ok</a>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<table id="Requisition" class="table table-bordered table-hover editabletable" style="background-color:#fff;font-size:12px;">
<div align="right" style="padding-right:10px">
<div id="content"> </div>
<div class="modal fade" role="dialog">
<thead>
<tr>
<th>Store Requisition Number</th>
<th>Requested By</th>
<th>Requested Date</th>
<th>Status</th>
<th>Action</th>
<th>comments</th>
</tr>
</thead> </thead>
<tbody id="tbleAppend"> <tbody id="ApprovalList">
</tbody> <?php
</div> if (!empty($AppList)) {
</div> //print_r($AppList);
</table> $index = 0;
<div class="modal-footer"> <div class="col-md-12"> foreach ($AppList as $record) {
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Ok</a> $index = $index + 1;
</div> ?>
</div> <tr id="<?php echo $index ?>">
</div> <td><a data-toggle="modal" data-target="#myModal" data-id="<%=index%>" data-userid="<?php echo $record->StoreReqNo ?>"><u><?php echo $record->StoreReqNo ?></u></a></td>
<td><?php echo $record->FirstName ?></td>
</div> <td><?php $Cdt = new DateTime($record->ReqDate);
$ReqDate = $Cdt->format('d-m-Y');
echo $ReqDate;
</form> ?></td>
<td><?php echo $record->StatusName ?></td>
</div> <?php if (($record->Status) == STORE_PENDINGAPPROVAL) {
</div>
?>
<!-- <td contenteditable="true"><input type="text" id="Remarks<?php echo $index ?>" name="Remarks<?php echo $index ?>"class="form-control" maxlength="100"></td> -->
<table id="Requisition" class="table table-bordered table-hover editabletable" style="background-color:#fff;font-size:12px;"> <!-- <td data-name="sel" id="Action<?php echo $index ?>" onchange="saveToDatabase(this.options[this.selectedIndex].value,'question','<?php echo $record->StoreReqNo; ?>','<?php echo $index; ?>')">
<div align="right" style="padding-right:10px">
<div id="content" > </div>
<div class="modal fade" role="dialog">
<thead>
<tr>
<th>Store Requisition Number</th>
<th>Requested By</th>
<th>Requested Date</th>
<th>Status</th>
<th>Action</th>
<th>comments</th>
</tr>
</thead>
<tbody id="ApprovalList">
<?php
if(!empty($AppList))
{
//print_r($AppList);
$index = 0;
foreach($AppList as $record)
{
$index = $index +1;
?>
<tr id="<?php echo $index ?>" >
<td><a data-toggle="modal" data-target="#myModal" data-id="<%=index%>" data-userid="<?php echo $record->StoreReqNo ?>" ><u><?php echo $record->StoreReqNo ?></u></a></td>
<td><?php echo $record->FirstName?></td>
<td ><?php $Cdt = new DateTime($record->ReqDate);
$ReqDate= $Cdt->format('d-m-Y');
echo $ReqDate;
?></td>
<td><?php echo $record->StatusName ?></td>
<?php if (($record->Status) == STORE_PENDINGAPPROVAL)
{
?>
<!-- <td contenteditable="true"><input type="text" id="Remarks<?php echo $index ?>" name="Remarks<?php echo $index ?>"class="form-control" maxlength="100"></td> -->
<!-- <td data-name="sel" id="Action<?php echo $index ?>" onchange="saveToDatabase(this.options[this.selectedIndex].value,'question','<?php echo $record->StoreReqNo ; ?>','<?php echo $index ; ?>')">
<select name="status<?php echo $index ?>" id="status<?php echo $index ?>"> <select name="status<?php echo $index ?>" id="status<?php echo $index ?>">
@ -189,218 +190,207 @@
</select> </select>
</td> --> </td> -->
<td> <select name="selectId" id="selectId" title="Select Your Option" onchange="saveToDatabase('<?php echo $record->StoreReqNo ?>','<?php echo $index ; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Comments ?>');"> <td> <select name="selectId" id="selectId" title="Select Your Option" onchange="saveToDatabase('<?php echo $record->StoreReqNo ?>','<?php echo $index; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Comments ?>');">
<option value="-1" >Select Option</option> <option value="-1">Select Option</option>
<option value="1">Approve</option> <option value="1">Approve</option>
<option value="2">Reject</option> <option value="2">Reject</option>
</select></td> </select></td>
<?php <?php
} } else {
else ?>
{ <td><?php echo "---"; //$record->Comments
?> ?></td>
<td><?php echo "---";//$record->Comments ?></td> <!-- <td><?php echo $record->StatusName ?></td> -->
<!-- <td><?php echo $record->StatusName ?></td> --> <?php
<?php
}
} ?>
?> <td contenteditable="true" id="newcomments<?php echo $index; ?>"><?php echo $record->Comments ?></td>
<td contenteditable="true" id="newcomments<?php echo $index ; ?>" ><?php echo $record->Comments ?></td> </tr>
</tr> <?php
<?php }
} }
} ?>
?>
</tbody>
</tbody>
</table>
</table>
<br>
<br> </div>
</div>
</div>
</section>
</div> </div>
<script> </section>
</div>
<script>
var startDate = ''; var startDate = '';
var endDate = ''; var endDate = '';
function Reset() function Reset() {
{ $('#RequisitionStatus').val("-1");
$('#RequisitionStatus').val("-1"); $('#SearchDate').val('');
$('#SearchDate').val(''); }
} $("#myModal").on("shown.bs.modal", function(e) {
$("#myModal").on("shown.bs.modal", function(e) { var ReqId = $(e.relatedTarget).data('userid');
var ReqId = $(e.relatedTarget).data('userid'); $("#StReqno").html(ReqId);
$("#StReqno").html(ReqId); $('#ReqNO').val(ReqId);
$('#ReqNO').val(ReqId); $("#CostCenter").val('');
$("#CostCenter").val(''); $("#tbleAppend").empty();
$("#tbleAppend").empty(); $("#ReqDate").val('');
$("#ReqDate").val(''); $("#Desigination").val('');
$("#Desigination").val('');
$('#content').loader('show');
$('#content').loader('show'); $.ajax({
$.ajax({ data: {
data:{id:ReqId}, id: ReqId
type:"POST", },
type: "POST",
dataType: 'json', dataType: 'json',
url:"<?php echo base_url() ?>storerequisitionlist/ViewRequest", url: "<?php echo base_url() ?>storerequisitionlist/ViewRequest",
success:function(json) { success: function(json) {
//success:function(data) { //success:function(data) {
$('#content').loader('hide'); $('#content').loader('hide');
//alert(json.Requist); //alert(json.Requist);
if(json.Requist != '') if (json.Requist != '') {
{ //alert(json.Requist[0]['Requestedby']) ;
//alert(json.Requist[0]['Requestedby']) ; $("#Requestedby").val(json.Requist[0]['FirstName']);
$("#Requestedby").val(json.Requist[0]['FirstName']); $("#ReqDate").val(json.Requist[0]['ReqDate']);
$("#ReqDate").val(json.Requist[0]['ReqDate']); $("#Desigination").val(json.Requist[0]['DepartmentName']);
$("#Desigination").val(json.Requist[0]['DepartmentName']); $("#CostCenter").val(json.Requist[0]['CostCenterName']);
$("#CostCenter").val(json.Requist[0]['CostCenterName']); $("#tbleAppend").append(json.Items);
$("#tbleAppend").append(json.Items);
} }
} }
}); });
}); });
function saveToDatabase(ReqId,Index,option,com) function saveToDatabase(ReqId, Index, option, com) {
{
var newcomments = document.getElementById('newcomments' + Index + '').innerHTML;
var newcomments=document.getElementById('newcomments'+Index+'').innerHTML;
var id = ReqId;
var id=ReqId; var Status = '';
var Status= ''; if (option == -1) {
if (option == -1 ) alert("Please Select Approve/Reject option");
{
alert("Please Select Approve/Reject option");
return false; return false;
} } else if (option == 1) {
else if (option == 1 )
{
// alert(' The Approval '); // alert(' The Approval ');
Status='<?php echo STORE_APPROVAL;?>'; Status = '<?php echo STORE_APPROVAL; ?>';
var strMsg='Do You want to Approve this requisition?'; var strMsg = 'Do You want to Approve this requisition?';
} } else {
else
{ Status = '<?php echo STORE_REJECT; ?>';
var strMsg = 'Do You want to Reject this requisition?';
Status='<?php echo STORE_REJECT;?>';
var strMsg='Do You want to Reject this requisition?';
} }
var answer = confirm(strMsg); var answer = confirm(strMsg);
if (answer) if (answer) {
{
$('#content').loader('show'); $('#content').loader('show');
$.ajax({ $.ajax({
data:{id:id,newcomments:newcomments}, data: {
type:"POST", id: id,
url:"<?php echo base_url() ?>storerequisitionlist/ApproveRequest?Status="+Status, newcomments: newcomments
success:function(data) { },
if(data) type: "POST",
{ url: "<?php echo base_url() ?>storerequisitionlist/ApproveRequest?Status=" + Status,
$('#content').loader('hide'); success: function(data) {
alert(data); if (data) {
location.reload(); $('#content').loader('hide');
} alert(data);
else location.reload();
{ } else {
alert("Error"); alert("Error");
} }
}
});
} else {
return;
} }
});
}
else
{
return;
}
}
$(function() {
var d = new Date();
var month = d.getMonth();
var day = d.getDate();
var year = d.getFullYear() ;
var SIAStartYear = year - 2015;
var mindt = year-70;
var maxdt = year-15;
$( ".datePicker" ).datepicker(
{
minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now',
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,
} }
);
//$('#SearchDate').daterangepicker( ); $(function() {
//Initialize Select2 Elements var d = new Date();
$(".select2").select2();
//$('#SearchDate').val(''); var month = d.getMonth();
$('#SearchDate').daterangepicker( var day = d.getDate();
{ var year = d.getFullYear();
locale: { var SIAStartYear = year - 2015;
format: 'DD-MM-YYYY' var mindt = year - 70;
}, var maxdt = year - 15;
$(".datePicker").datepicker({
showDropdowns: true minDate: new Date(year - SIAStartYear, 1, 1),
}, maxDate: 'now',
function(start, end, label) { dateFormat: 'mm/dd/yy',
changeMonth: true,
startDate = start.format('DD-MM-YYYY'); changeYear: true,
endDate = end.format('DD-MM-YYYY'); });
$('#FromDate').val(startDate); //$('#SearchDate').daterangepicker( );
$('#ToDate').val(endDate); //Initialize Select2 Elements
$(".select2").select2();
//$('#SearchDate').val('');
//alert("A new date range was chosen: " + start.format('DD-MM-YYYY') + ' to ' + end.format('DD-MM-YYYY')); $('#SearchDate').daterangepicker({
}); locale: {
format: 'DD-MM-YYYY'
},
showDropdowns: true
},
function(start, end, label) {
startDate = start.format('DD-MM-YYYY');
endDate = end.format('DD-MM-YYYY');
$('#FromDate').val(startDate);
$('#ToDate').val(endDate);
//alert("A new date range was chosen: " + start.format('DD-MM-YYYY') + ' to ' + end.format('DD-MM-YYYY'));
}); });
$(function () {
$('#Items').DataTable({
"paging": false,
"lengthChange": true,
"searching": false,
"ordering": false,
"info": false,
"autoWidth": false
});
$.fn.dataTable.moment( 'DD-MM-YYYY' );
$('#Requisition').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
// "columnDefs" : [{"targets":2, "type":"date-eu"}],
"aaSorting": [[ 2, "desc" ]],
"info": true,
"autoWidth": true
});
});
</script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
});
$(function() {
$('#Items').DataTable({
"paging": false,
"lengthChange": true,
"searching": false,
"ordering": false,
"info": false,
"autoWidth": false
});
$.fn.dataTable.moment('DD-MM-YYYY');
$('#Requisition').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
// "columnDefs" : [{"targets":2, "type":"date-eu"}],
"aaSorting": [
[2, "desc"]
],
"info": true,
"autoWidth": true
});
});
</script>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>

View File

@ -149,14 +149,13 @@
// changeYear: true, // changeYear: true,
// yearRange: '0:+10' // yearRange: '0:+10'
// }); // });
// $("#Exchangerateon").datepicker({ $("#Exchangerateon").datepicker({
// //minDate : d, format: 'dd-mm-yyyy',
// maxDate: 'now', startDate: new Date(),
// dateFormat: 'dd-mm-yy', autoclose: true,
// changeMonth: true, todayHighlight: true,
// changeYear: true, clearBtn: true
// yearRange: '-100:+0' });
// });
$('#Date').click(function() { $('#Date').click(function() {
//for Dispatch range selection //for Dispatch range selection
@ -395,8 +394,8 @@
<label>Delivery Date<span class="text-danger">*</span></label> <label>Delivery Date<span class="text-danger">*</span></label>
<div> <div>
<?php <?php
$formattedDate = $dt->format('Y-m-d'); $formattedDate = $dt->format('d-m-Y');
$data = array('type' => 'date', 'name' => 'Deliverydate', 'value' => set_value('Deliverydate', $formattedDate), 'id' => 'Deliverydate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;'); $data = array('type' => 'text', 'name' => 'Deliverydate', 'value' => set_value('Deliverydate', $formattedDate), 'id' => 'Deliverydate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
@ -420,8 +419,8 @@
<label>Exchange Rate On</label> <label>Exchange Rate On</label>
<div> <div>
<?php <?php
$formattedDate = $dt->format('Y-m-d'); $formattedDate = $dt->format('d-m-Y');
$data = array('type' => 'date', 'name' => 'Exchangerateon', 'value' => set_value('Exchangerateon', $formattedDate), 'id' => 'Exchangerateon', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;'); $data = array('type' => 'text', 'name' => 'Exchangerateon', 'value' => set_value('Exchangerateon', $formattedDate), 'id' => 'Exchangerateon', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
@ -454,8 +453,8 @@
<label>Purchase Order Date</label> <label>Purchase Order Date</label>
<div> <div>
<?php <?php
$formattedDate = $dt->format('Y-m-d'); $formattedDate = $dt->format('d-m-Y');
$data = array('type' => "date", 'name' => 'PODate', 'value' => set_value('PODate', $formattedDate), 'id' => 'PODate', 'class' => 'form-control', 'required' => 'true', 'onkeypress' => 'return false;'); $data = array('type' => "text", 'name' => 'PODate', 'value' => set_value('PODate', $formattedDate), 'id' => 'PODate', 'class' => 'form-control num', 'required' => 'true', 'onkeypress' => 'return false;');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
@ -1479,126 +1478,126 @@
<div class="modal-body p-4"> <div class="modal-body p-4">
<div class="form-row" style="padding:0px;"> <div class="form-row" style="padding:0px;">
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label>Req No<span class="text-danger">*</span></label> <label>Req No<span class="text-danger">*</span></label>
<div> <div>
<?php <?php
$RL = array("0" => 'Select Req No'); $RL = array("0" => 'Select Req No');
if (!empty($RequistionDetails)) { if (!empty($RequistionDetails)) {
foreach ($RequistionDetails as $SID) : foreach ($RequistionDetails as $SID) :
$RL[$SID->ReqNo] = $SID->ReqNo . ' ' . ' - ' . ' ' . $SID->DepartmentName; $RL[$SID->ReqNo] = $SID->ReqNo . ' ' . ' - ' . ' ' . $SID->DepartmentName;
endforeach; endforeach;
} }
$data = array('name' => 'EditReqnumber', 'value' => set_value('EditReqnumber'), 'id' => 'EditReqnumber', 'class' => 'form-control', 'readonly' => 'true'); $data = array('name' => 'EditReqnumber', 'value' => set_value('EditReqnumber'), 'id' => 'EditReqnumber', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data); echo form_input($data);
?> ?>
</div>
</div> </div>
<div class="form-group col-md-2"> </div>
<label>Department Name</label> <div class="form-group col-md-2">
<div> <label>Department Name</label>
<?php <div>
$data = array('name' => 'EditCapitalDepartmentName', 'value' => set_value('EditCapitalDepartmentName'), 'id' => 'EditCapitalDepartmentName', 'class' => 'form-control', 'readonly' => 'true'); <?php
echo form_input($data); $data = array('name' => 'EditCapitalDepartmentName', 'value' => set_value('EditCapitalDepartmentName'), 'id' => 'EditCapitalDepartmentName', 'class' => 'form-control', 'readonly' => 'true');
?> echo form_input($data);
</div> ?>
</div> </div>
</div>
<div class="form-group col-md-2"> <div class="form-group col-md-2">
<label>Cost Center Code</label> <label>Cost Center Code</label>
<div> <div>
<?php <?php
$data = array('name' => 'EditCostCenter', 'value' => set_value('EditCostCenter'), 'id' => 'EditCostCenter', 'class' => 'form-control', 'readonly' => 'true'); $data = array('name' => 'EditCostCenter', 'value' => set_value('EditCostCenter'), 'id' => 'EditCostCenter', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data); echo form_input($data);
?> ?>
</div>
</div>
<div class="form-group col-md-3"> <label>Avail Bud Amount</label>
<div> <?php $data = array('name' => 'EditCapitalbudAmt', 'value' => set_value('EditCapitalbudAmt'), 'id' => 'EditCapitalbudAmt', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data); ?> </div>
</div> </div>
</div>
<div class="form-group col-md-3"> <label>Avail Bud Amount</label>
<div> <?php $data = array('name' => 'EditCapitalbudAmt', 'value' => set_value('EditCapitalbudAmt'), 'id' => 'EditCapitalbudAmt', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data); ?> </div>
</div>
<div class="form-group col-md-2" id="hideModalExchangeEdit"> <div class="form-group col-md-2" id="hideModalExchangeEdit">
<label> Exchange Rate</label> <label> Exchange Rate</label>
<div> <div>
<?php <?php
$data = array('name' => 'EditExchangeRtModal', 'value' => set_value('EditExchangeRtModal'), 'id' => 'EditExchangeRtModal', 'class' => 'form-control num', 'readonly' => 'true'); $data = array('name' => 'EditExchangeRtModal', 'value' => set_value('EditExchangeRtModal'), 'id' => 'EditExchangeRtModal', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data); echo form_input($data);
?> ?>
</div>
</div> </div>
</div>
</div> </div>
<div class="form-row" style="padding:0px;"> <div class="form-row" style="padding:0px;">
<div class="form-group col-md-2"> <div class="form-group col-md-2">
<label>Item Code<span class="text-danger">*</span></label> <label>Item Code<span class="text-danger">*</span></label>
<div> <div>
<?php <?php
$options = array("0" => 'Item Code'); $options = array("0" => 'Item Code');
echo form_dropdown('MaterialCode', $options, set_value('EditMaterialCode'), 'id="EditMaterialCode" class="form-control select2"'); echo form_dropdown('MaterialCode', $options, set_value('EditMaterialCode'), 'id="EditMaterialCode" class="form-control select2"');
?> ?>
</div> </div>
</div> </div>
<div class="form-group col-md-2" style="padding-right:0px;"> <div class="form-group col-md-2" style="padding-right:0px;">
<label>Item Name</label> <label>Item Name</label>
<div> <div>
<?php <?php
$data = array('name' => 'EditCapitalItemName', 'value' => set_value('EditCapitalItemName'), 'id' => 'EditCapitalItemName', 'class' => 'form-control', 'readonly' => 'true'); $data = array('name' => 'EditCapitalItemName', 'value' => set_value('EditCapitalItemName'), 'id' => 'EditCapitalItemName', 'class' => 'form-control', 'readonly' => 'true');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
</div> </div>
<div class="form-group col-md-1"> <div class="form-group col-md-1">
<label>UOM</label> <label>UOM</label>
<div> <div>
<?php <?php
$data = array('name' => 'EditCPUOM', 'value' => set_value('EditCPUOM'), 'id' => 'EditCPUOM', 'class' => 'form-control num', 'readonly' => 'true'); $data = array('name' => 'EditCPUOM', 'value' => set_value('EditCPUOM'), 'id' => 'EditCPUOM', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
</div> </div>
<div class="form-group col-md-2"> <div class="form-group col-md-2">
<label>Quantity<span class="text-danger">*</span></label> <label>Quantity<span class="text-danger">*</span></label>
<div> <div>
<?php <?php
$data = array('name' => 'EditCPQuantity', 'value' => set_value('EditCPQuantity'), 'id' => 'EditCPQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();calculateFreight(4);calculateFreightloceditper()'); $data = array('name' => 'EditCPQuantity', 'value' => set_value('EditCPQuantity'), 'id' => 'EditCPQuantity', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();calculateFreight(4);calculateFreightloceditper()');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
</div> </div>
<div class="form-group col-md-2" style="padding-right: 0px;"> <div class="form-group col-md-2" style="padding-right: 0px;">
<label id="EditRateIn">Rate (In INR/UOM)</label><span class="text-danger">*</span> <label id="EditRateIn">Rate (In INR/UOM)</label><span class="text-danger">*</span>
<div> <div>
<?php <?php
$data = array('name' => 'EditCPRate', 'value' => set_value('EditCPRate'), 'id' => 'EditCPRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();calculateFreight(4);calculateFreightloceditper()'); $data = array('name' => 'EditCPRate', 'value' => set_value('EditCPRate'), 'id' => 'EditCPRate', 'class' => 'form-control num', 'onkeypress' => 'return isNumberKey(event);', 'onchange' => 'EditRatechange();calculateFreight(4);calculateFreightloceditper()');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
</div> </div>
<div class="form-group col-md-1"> <div class="form-group col-md-1">
<label>Per</label> <?php <label>Per</label> <?php
$data = array('name' => 'EditPer', 'value' => set_value('EditPer'), 'id' => 'EditPer', 'class' => 'form-control'); $data = array('name' => 'EditPer', 'value' => set_value('EditPer'), 'id' => 'EditPer', 'class' => 'form-control');
echo form_input($data); ?> echo form_input($data); ?>
</div> </div>
<div class="form-group col-md-2"> <div class="form-group col-md-2">
<label id="EditTotalAmount">Basic value <?php echo "($INR)" ?></label> <label id="EditTotalAmount">Basic value <?php echo "($INR)" ?></label>
<div> <div>
<?php <?php
$data = array('name' => 'EditCPTotalAmount', 'value' => set_value('EditCPTotalAmount'), 'id' => 'EditCPTotalAmount', 'class' => 'form-control num', 'readonly' => 'true'); $data = array('name' => 'EditCPTotalAmount', 'value' => set_value('EditCPTotalAmount'), 'id' => 'EditCPTotalAmount', 'class' => 'form-control num', 'readonly' => 'true');
echo form_input($data); echo form_input($data);
?> ?>
</div> </div>
</div> </div>
</div> </div>
<div class="form-row"> <div class="form-row">
@ -2254,21 +2253,20 @@
$(function() { $(function() {
// $("#PODate").datepicker({ $("#PODate").datepicker({
// minDate: d, format: 'dd-mm-yyyy',
// maxDate: 'now', startDate: new Date(),
// dateFormat: 'dd-mm-yy', autoclose: true,
// changeMonth: true, todayHighlight: true,
// changeYear: true, clearBtn: true
// yearRange: '-100:+0' });
// }); $("#Deliverydate").datepicker({
// $("#Deliverydate").datepicker({ format: 'dd-mm-yyyy',
// minDate: 'now', startDate: new Date(),
// dateFormat: 'dd-mm-yy', autoclose: true,
// changeMonth: true, todayHighlight: true,
// changeYear: true, clearBtn: true
// yearRange: '0:+10' });
// });
var a = parseFloat($('#optcapital').val()); var a = parseFloat($('#optcapital').val());
@ -3312,7 +3310,7 @@
</td> </td>
</tr>`; </tr>`;
$('#capitalAppend').append(rowHtml); $('#capitalAppend').append(rowHtml);
//clearCapitalModalFields(); //clearCapitalModalFields();
var theForm = $(".CapitalPO"); var theForm = $(".CapitalPO");
@ -4033,149 +4031,150 @@ $('#capitalAppend').append(rowHtml);
} }
/* get Edit Capital Po Modal*/ /* get Edit Capital Po Modal*/
$(document).ready(function() { $(document).ready(function() {
$("#EDITCAPITAL").on("shown.bs.modal", function(e) { $("#EDITCAPITAL").on("shown.bs.modal", function(e) {
userid = $(e.relatedTarget).data('userid'); userid = $(e.relatedTarget).data('userid');
$('#isEdit').val(1); $('#isEdit').val(1);
//alert(userid); //alert(userid);
var tr = document.getElementById(userid); var tr = document.getElementById(userid);
var cellval = tr.cells; var cellval = tr.cells;
var id = $('#Reqnumber' + userid).val(); var id = $('#Reqnumber' + userid).val();
$('#EditReqnumber').val($('#Reqnumber' + userid).val()); $('#EditReqnumber').val($('#Reqnumber' + userid).val());
$('#EditCapitalDepartmentName').val($('#departmentName' + userid).val()); $('#EditCapitalDepartmentName').val($('#departmentName' + userid).val());
$("#EditCostCenter").val($('#CPCostCode' + userid).val()); $("#EditCostCenter").val($('#CPCostCode' + userid).val());
$('#EditCapitalbudAmt').val($('#AvilBudget' + userid).val()); $('#EditCapitalbudAmt').val($('#AvilBudget' + userid).val());
$('#EditExchangeRtModal').val($('#echangeRate' + userid).val()); $('#EditExchangeRtModal').val($('#echangeRate' + userid).val());
$('#EditCapitalItemName').val($('#materialName' + userid).val()); $('#EditCapitalItemName').val($('#materialName' + userid).val());
$('#EditCPUOM').val($('#uom' + userid).val()); $('#EditCPUOM').val($('#uom' + userid).val());
$('#EditPer').val($('#per' + userid).val()); $('#EditPer').val($('#per' + userid).val());
var EditUOM = $('#uom' + userid).val(); var EditUOM = $('#uom' + userid).val();
$('#EditCPQuantity').val($('#quantity' + userid).val()); $('#EditCPQuantity').val($('#quantity' + userid).val());
$('#EditCPRate').val($('#rateInUs' + userid).val()); $('#EditCPRate').val($('#rateInUs' + userid).val());
$('#EditCPTotalAmount').val($('#basicval' + userid).val()); $('#EditCPTotalAmount').val($('#basicval' + userid).val());
RequistQuantity = $('#quantity' + userid).val(); RequistQuantity = $('#quantity' + userid).val();
$('#EditAfterServiceTax').val($('#AfterServiceTax' + userid).val()); $('#EditAfterServiceTax').val($('#AfterServiceTax' + userid).val());
$('#EditAfterEduCess').val($('#AfterEduCess' + userid).val()); $('#EditAfterEduCess').val($('#AfterEduCess' + userid).val());
$('#EditAfterSecHighTax').val($('#AfterSecHighTax' + userid).val()); $('#EditAfterSecHighTax').val($('#AfterSecHighTax' + userid).val());
$('#EditAfterKrishiTax').val($('#AfterKrishiTax' + userid).val()); $('#EditAfterKrishiTax').val($('#AfterKrishiTax' + userid).val());
$('#EditAfterSwachhTax').val($('#AfterSwachhTax' + userid).val()); $('#EditAfterSwachhTax').val($('#AfterSwachhTax' + userid).val());
$('#EditAfterBasicPriceTax').val($('#basicvalInINR' + userid).val()); $('#EditAfterBasicPriceTax').val($('#basicvalInINR' + userid).val());
$('#EditAfterLandingCharge').val($('#landingCharge' + userid).val()); $('#EditAfterLandingCharge').val($('#landingCharge' + userid).val());
$('#EditAfterCustomduty').val($('#CustomDuty' + userid).val()); $('#EditAfterCustomduty').val($('#CustomDuty' + userid).val());
$('#EditAfterCustomEDcess').val($('#CustomEDCess' + userid).val()); $('#EditAfterCustomEDcess').val($('#CustomEDCess' + userid).val());
$('#EditAfterCustomSHcess').val($('#CustomSHCess' + userid).val()); $('#EditAfterCustomSHcess').val($('#CustomSHCess' + userid).val());
$('#EditGrossdutypayable').val($('#GrossDutyPayable' + userid).val()); $('#EditGrossdutypayable').val($('#GrossDutyPayable' + userid).val());
$('#EditCustomDutyExpenses').val($('#CustomDutyExpenses' + userid).val()); $('#EditCustomDutyExpenses').val($('#CustomDutyExpenses' + userid).val());
//$('#txtEditInsurance').val($('#RMCIncludingCustomers'+userid).val()); //$('#txtEditInsurance').val($('#RMCIncludingCustomers'+userid).val());
$('#EdittxtTotalOrderValue').val(cellval[9].innerHTML); $('#EdittxtTotalOrderValue').val(cellval[9].innerHTML);
$('#EditCgst').val($('#Cgst' + userid).val()); $('#EditCgst').val($('#Cgst' + userid).val());
$('#EditAfterCgst').val($('#AfterCgst' + userid).val()); $('#EditAfterCgst').val($('#AfterCgst' + userid).val());
$('#EditSgst').val($('#Sgst' + userid).val()); $('#EditSgst').val($('#Sgst' + userid).val());
$('#EditAfterSgst').val($('#AfterSgst' + userid).val()); $('#EditAfterSgst').val($('#AfterSgst' + userid).val());
$('#EditIgst').val($('#Igst' + userid).val()); $('#EditIgst').val($('#Igst' + userid).val());
$('#EditAfterIgst').val($('#AfterIgst' + userid).val()); $('#EditAfterIgst').val($('#AfterIgst' + userid).val());
$('#EditOtherAllowances').val($('#OtherAmt' + userid).val()); $('#EditOtherAllowances').val($('#OtherAmt' + userid).val());
/* get % value */ /* get % value */
$('#EditLandingCharge').val($('#beforeLanding' + userid).val()); $('#EditLandingCharge').val($('#beforeLanding' + userid).val());
$('#EditCustomduty').val($('#beforeCustomDuty' + userid).val()); $('#EditCustomduty').val($('#beforeCustomDuty' + userid).val());
$('#EditCustomEDcess').val($('#beforeCustomEDCess' + userid).val()); $('#EditCustomEDcess').val($('#beforeCustomEDCess' + userid).val());
$('#EditCustomSHcess').val($('#beforeCustomSHCess' + userid).val()); $('#EditCustomSHcess').val($('#beforeCustomSHCess' + userid).val());
$('#EditPurQuantity').val($('#PurQuantity' + userid).val()); $('#EditPurQuantity').val($('#PurQuantity' + userid).val());
$('#txtEditFreight').val($('#FreightVal' + userid).val()); $('#txtEditFreight').val($('#FreightVal' + userid).val());
$('#txtEditAfterFreight').val($('#AfterFreightVal' + userid).val()); $('#txtEditAfterFreight').val($('#AfterFreightVal' + userid).val());
$('#EditNOOfTrips').val($('#NoOfTrip' + userid).val()); $('#EditNOOfTrips').val($('#NoOfTrip' + userid).val());
$("#drpEditFreight").val($('#FreightType' + userid).val()); $("#drpEditFreight").val($('#FreightType' + userid).val());
$("#drpFreighteditloc").val($('#FreightTypeloc' + userid).val()); $("#drpFreighteditloc").val($('#FreightTypeloc' + userid).val());
$("#NOOfTripslocedit").val($('#NoofTriploc' + userid).val()); $("#NOOfTripslocedit").val($('#NoofTriploc' + userid).val());
$("#txtFreightlocedit").val($('#FreightRateloc' + userid).val()); $("#txtFreightlocedit").val($('#FreightRateloc' + userid).val());
$("#txtAfterFreightlocedit").val($('#AfterFreightRateloc' + userid).val()); $("#txtAfterFreightlocedit").val($('#AfterFreightRateloc' + userid).val());
$('#EditAfterAssessable').val($("#AfterAssessable" + userid).val()); $('#EditAfterAssessable').val($("#AfterAssessable" + userid).val());
$('#EditSubtotal').val($("#Subtotal" + userid).val()); $('#EditSubtotal').val($("#Subtotal" + userid).val());
$('#EditIgstInt').val($("#IgstInt" + userid).val()); $('#EditIgstInt').val($("#IgstInt" + userid).val());
$('#EditAfterIgstInt').val($("#AfterIgstInt" + userid).val()); $('#EditAfterIgstInt').val($("#AfterIgstInt" + userid).val());
$('#EditDutyImpact').val($("#Dutyimpact" + userid).val()); $('#EditDutyImpact').val($("#Dutyimpact" + userid).val());
$('#EditClearingCharges').val($("#ClearingCharges" + userid).val()); $('#EditClearingCharges').val($("#ClearingCharges" + userid).val());
$('#EditNett').val($("#Nett" + userid).val()); $('#EditNett').val($("#Nett" + userid).val());
var a = parseFloat($('#EditDutyImpact').val()); var a = parseFloat($('#EditDutyImpact').val());
//var b =parseFloat($('#Dutyimpact'+userid).val()); //var b =parseFloat($('#Dutyimpact'+userid).val());
// console.log(a); // console.log(a);
//console.log(b); //console.log(b);
var FreightTypeloc = $('#FreightTypeloc' + userid).val(); var FreightTypeloc = $('#FreightTypeloc' + userid).val();
if (FreightTypeloc == '<?php echo PERTRIP; ?>') { if (FreightTypeloc == '<?php echo PERTRIP; ?>') {
$('#TripsValuelocedit').show(); $('#TripsValuelocedit').show();
} else { } else {
$('#TripsValuelocedit').hide(); $('#TripsValuelocedit').hide();
} }
var FreightType = $('#FreightType' + userid).val(); var FreightType = $('#FreightType' + userid).val();
if (FreightType == "PER TRIP") { if (FreightType == "PER TRIP") {
$('#EditTripsValue').show(); $('#EditTripsValue').show();
} else { } else {
$('#EditTripsValue').hide(); $('#EditTripsValue').hide();
} }
$("#EditDiscountType").val($('#DisType' + userid).val()); $("#EditDiscountType").val($('#DisType' + userid).val());
$('#txtEditDiscount').val($('#DisVal' + userid).val()); $('#txtEditDiscount').val($('#DisVal' + userid).val());
$('#txtEditAfterDiscount').val($('#AfterDisVal' + userid).val()); $('#txtEditAfterDiscount').val($('#AfterDisVal' + userid).val());
tinyMCE.get('EditItemDescription').setContent($('#CapitalItemDescrition' + userid).val()); tinyMCE.get('EditItemDescription').setContent($('#CapitalItemDescrition' + userid).val());
var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>; var Material = <?php echo json_encode($MaterialList, JSON_PRETTY_PRINT) ?>;
$("#EditMaterialCode").empty(); $("#EditMaterialCode").empty();
$("#EditMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val())); $("#EditMaterialCode").append($('<option></option>').val($('#materialCode' + userid).val()).html($('#materialCode' + userid).val() + "-" + $('#materialName' + userid).val()));
$('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + EditUOM + ')'); $('#EditRateIn').html('Rate(in' + " " + DisplayCurrencySymbol + '/' + EditUOM + ')');
for (i = 0; i < Material.length; i++) { for (i = 0; i < Material.length; i++) {
$.each(Material[i], function(idx, obj) { $.each(Material[i], function(idx, obj) {
if (obj.MaterialCode != $('#materialCode' + userid).val()) { if (obj.MaterialCode != $('#materialCode' + userid).val()) {
$("#EditMaterialCode").append($('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName)); $("#EditMaterialCode").append($('<option></option>').val(obj.MaterialCode).html(obj.MaterialCode + "-" + obj.MaterialName));
} }
}); });
} }
}); }); });
});
/*get edit material list*/ /*get edit material list*/
$('#EditMaterialCode').change(function() { $('#EditMaterialCode').change(function() {

View File

@ -11,6 +11,7 @@ if (!empty($EmpCount)) {
?> ?>
<style> <style>
@media (min-width: 991.98px) { @media (min-width: 991.98px) {
.avatar-title.bg-soft-primary.rounded { .avatar-title.bg-soft-primary.rounded {
background-color: 'black'; background-color: 'black';
@ -640,10 +641,8 @@ if (!empty($EmpCount)) {
<!-- </section> --> <!-- </section> -->
<!-- Main content --> <!-- Main content -->
<section class="content"> <section class="content">
<br><br>
<br><br>
<div class="row"> <div class="row">
<div class="col-12 text-right" style="height: 75px;"> <div class="col-12 text-right synczohobooks_button" style="height: 75px;">
<a href="javascript:void(0)" type="button" title="Sync With Zoho Books" class="btn btn-success" onclick="synczohobooks()"> <a href="javascript:void(0)" type="button" title="Sync With Zoho Books" class="btn btn-success" onclick="synczohobooks()">
<i class="fas fa-sync-alt"></i> <!-- <img src="<?php echo base_url(); ?>public/new_assets/images/zoho_sync.png" alt="Sync Icon" style="width: 20px; height: 20px;"> --> <i class="fas fa-sync-alt"></i> <!-- <img src="<?php echo base_url(); ?>public/new_assets/images/zoho_sync.png" alt="Sync Icon" style="width: 20px; height: 20px;"> -->
</a> </a>

View File

@ -205,7 +205,7 @@ if (isset($AvlimportBudAmt) && !empty($AvlimportBudAmt)) {
return false; return false;
} else if ($('#Importoption').val() == "0") { } else if ($('#Importoption').val() == "0") {
alert('Please Select POType'); alert('Please Select Import Type');
$('#Importoption').focus(); $('#Importoption').focus();
return false; return false;
@ -4242,7 +4242,7 @@ $('#ImportAppend').append(rowHtml);
} else if ($('#Importoption').val() == "0") { } else if ($('#Importoption').val() == "0") {
alert('Please Select POType'); alert('Please Select Import Type');
$('#Importoption').focus(); $('#Importoption').focus();
return false; return false;

View File

@ -111,6 +111,14 @@
} }
}); });
} }
// $("#hdate").datepicker({
// format: 'dd-mm-yyyy', // Correct format for Bootstrap Datepicker
// startDate: new Date(), // Replace `d` with `new Date()` if `d` is not defined
// autoclose: true,
// todayHighlight: true,
// clearBtn: true
// });
</script> </script>
</body> </body>

View File

@ -120,6 +120,12 @@
margin-top: 55px; margin-top: 55px;
} }
} }
@media (max-width: 992px) {
.synczohobooks_button {
margin-top: 55px;
}
}
.topnav .navbar-nav .nav-link { .topnav .navbar-nav .nav-link {
line-height: 15px; line-height: 15px;

View File

@ -1,61 +1,3 @@
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js"></script>
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
<script>
$(document).ready(function() {
// Initialize the datepicker with onSelect event
$("#hdate").datepicker({
minDate: null,
dateFormat: 'dd-mm-yy',
changeMonth: true,
changeYear: true,
yearRange: '-100:+0',
});
function isValidDateFormat(date) {
var datePattern = /^\d{2}-\d{2}-\d{4}$/;
var altDatePattern = /^\d{2}\/\d{2}\/\d{4}$/;
return datePattern.test(date) || altDatePattern.test(date);
}
function convertToDDMMYY(date) {
if (date.includes("/")) {
var parts = date.split("/");
return parts[1] + '-' + parts[0] + '-' + parts[2];
}
return date;
}
// Handle manual input change for the date
$("#hdate").on('change', function() {
var selectedDate = $(this).val(); // Get the date entered manually (string)
if (selectedDate) {
if (isValidDateFormat(selectedDate)) {
selectedDate = convertToDDMMYY(selectedDate);
var dateParts = selectedDate.split("-");
var year = dateParts[2];
var yearNumber = parseInt(year, 10);
console.log("Year as a number: " + yearNumber);
$('#page-title-year-selected').html(yearNumber);
} else {
console.log("Invalid date format. Please enter in 'dd-mm-yy' format.");
}
} else {
console.log("No date selected or entered.");
}
});
});
$('html').bind('keypress', function(e) {
//alert('Key Pressed');
if (e.keyCode == 13) {
return false;
}
});
</script>
<style type="text/css"> <style type="text/css">
.num { .num {
text-align: right; text-align: right;
@ -79,7 +21,6 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<br>
<div class="row" style="padding-left: 26px;"> <div class="row" style="padding-left: 26px;">
<div class="col-md-3"> <div class="col-md-3">
<span>Holiday Name : </span> <span>Holiday Name : </span>
@ -223,4 +164,61 @@
}); });
// $('#page-title-year-selected') // $('#page-title-year-selected')
</script>
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.6/underscore-min.js"></script>
<script src="<?php echo base_url() ?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js"></script>
<script>
$(document).ready(function() {
$("#hdate").datepicker({
format: 'dd-mm-yyyy', // Correct format for Bootstrap Datepicker
startDate: new Date(), // Replace `d` with `new Date()` if `d` is not defined
autoclose: true,
todayHighlight: true,
clearBtn: true
});
function isValidDateFormat(date) {
var datePattern = /^\d{2}-\d{2}-\d{4}$/;
var altDatePattern = /^\d{2}\/\d{2}\/\d{4}$/;
return datePattern.test(date) || altDatePattern.test(date);
}
function convertToDDMMYY(date) {
if (date.includes("/")) {
var parts = date.split("/");
return parts[1] + '-' + parts[0] + '-' + parts[2];
}
return date;
}
// Handle manual input change for the date
$("#hdate").on('change', function() {
var selectedDate = $(this).val(); // Get the date entered manually (string)
if (selectedDate) {
if (isValidDateFormat(selectedDate)) {
selectedDate = convertToDDMMYY(selectedDate);
var dateParts = selectedDate.split("-");
var year = dateParts[2];
var yearNumber = parseInt(year, 10);
console.log("Year as a number: " + yearNumber);
$('#page-title-year-selected').html(yearNumber);
} else {
console.log("Invalid date format. Please enter in 'dd-mm-yy' format.");
}
} else {
console.log("No date selected or entered.");
}
});
});
$('html').bind('keypress', function(e) {
//alert('Key Pressed');
if (e.keyCode == 13) {
return false;
}
});
</script> </script>

View File

@ -135,7 +135,7 @@ if (!empty($INRSYMBOL)) {
$('#Deliverydate').focus(); $('#Deliverydate').focus();
return false; return false;
} else if ($('#PoTypeOptions').val() == "0") { } else if ($('#PoTypeOptions').val() == "0") {
alert('Please Select POType'); alert('Please Select Revenue Type');
$('#PoTypeOptions').focus(); $('#PoTypeOptions').focus();
return false; return false;
} else if ($('#BudgetType').val() == "0") { } else if ($('#BudgetType').val() == "0") {
@ -1868,7 +1868,7 @@ if (!empty($INRSYMBOL)) {
</div> </div>
<div class="form-group col-md-3" id="Deliverydtdiv"> <div class="form-group col-md-3" id="Deliverydtdiv">
<label>Delivery Date<span class="badge mandatory">*</span></label> <label>Delivery Date<span class="badge mandatory">*</span></label>
<input class="form-control num" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="Deliverydt" name="Deliverydt" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off" value="<?= date('d/m/Y'); ?>"> <input class="form-control num" data-provide="datepicker" data-date-format="dd-mm-yyyy" data-date-autoclose="true" id="Deliverydt" name="Deliverydt" data-date-start-date="<?= date('d-m-Y'); ?>" required autocomplete="off" value="<?= date('d-m-Y'); ?>">
<!-- <div> <!-- <div>
<?php <?php
@ -1898,7 +1898,7 @@ if (!empty($INRSYMBOL)) {
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label>Purchase Order Date</label> <label>Purchase Order Date</label>
<input class="form-control num" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="PODate" name="PODate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off" value="<?= date('d/m/Y'); ?>"> <input class="form-control num" data-provide="datepicker" data-date-format="dd-mm-yyyy" data-date-autoclose="true" id="PODate" name="PODate" data-date-start-date="<?= date('d-m-Y'); ?>" required autocomplete="off" value="<?= date('d-m-Y'); ?>">
<!-- <div> <!-- <div>
<?php <?php
@ -3768,7 +3768,7 @@ $('#RevenueAppend').append(rowHtml);
$('#insurance').focus(); $('#insurance').focus();
return false; return false;
} else if ($('#PoTypeOptions').val() == "0") { } else if ($('#PoTypeOptions').val() == "0") {
alert('Please Select POType'); alert('Please Select Revenue Type');
$('#PoTypeOptions').focus(); $('#PoTypeOptions').focus();
return false; return false;

View File

@ -116,51 +116,51 @@ if (!empty($INRSYMBOL)) {
document.getElementById("Date").checked = true; document.getElementById("Date").checked = true;
$('#drpSupplier').change(function() { $('#drpSupplier').change(function() {
var id = $('#drpSupplier').val();
console.log(id);
$("#SupAddress").val('');
var PaymentID = '';
if (id != '0') { var id = $('#drpSupplier').val();
var suppliers = <?php echo json_encode($Suplist, JSON_PRETTY_PRINT); ?>; console.log(id);
var payments = <?php echo json_encode($Payment, JSON_PRETTY_PRINT); ?>;
// Find the selected supplier and set address and PaymentID
$.each(suppliers, function(idx, supplier) {
if (supplier.SupplierID === id) {
PaymentID = supplier.PaymentID; // Set PaymentID
if (supplier.MSME) {
$("#SupAddress").val("MSME : " + supplier.MSME + "\n" + supplier.Address);
} else {
$("#SupAddress").val(supplier.Address);
}
console.log(PaymentID); // Debugging PaymentID value
}
});
// Conditional logic for PaymentID $("#SupAddress").val('');
if (PaymentID === 'PT08') { var PaymentID = '';
$('#otheroptiondiv').show();
$('#Otherpayment').val('');
} else {
$('#otheroptiondiv').hide();
$('#Otherpayment').val('');
}
// Populate Payment Terms if (id != '0') {
$('#PaymentTerms').empty(); var suppliers = <?php echo json_encode($Suplist, JSON_PRETTY_PRINT); ?>;
$.each(payments, function(pay, payobj) { var payments = <?php echo json_encode($Payment, JSON_PRETTY_PRINT); ?>;
$("#PaymentTerms").append($('<option></option>').val(payobj.PaymentID).html(payobj.PaymentTerms));
});
} else { // Find the selected supplier and set address and PaymentID
alert('Please select a Supplier.'); $.each(suppliers, function(idx, supplier) {
return false; if (supplier.SupplierID === id) {
} PaymentID = supplier.PaymentID; // Set PaymentID
}); if (supplier.MSME) {
$("#SupAddress").val("MSME : " + supplier.MSME + "\n" + supplier.Address);
} else {
$("#SupAddress").val(supplier.Address);
}
console.log(PaymentID); // Debugging PaymentID value
}
});
// Conditional logic for PaymentID
if (PaymentID === 'PT08') {
$('#otheroptiondiv').show();
$('#Otherpayment').val('');
} else {
$('#otheroptiondiv').hide();
$('#Otherpayment').val('');
}
// Populate Payment Terms
$('#PaymentTerms').empty();
$.each(payments, function(pay, payobj) {
$("#PaymentTerms").append($('<option></option>').val(payobj.PaymentID).html(payobj.PaymentTerms));
});
} else {
alert('Please select a Supplier.');
return false;
}
});
$('#ReqNo').change(function() { $('#ReqNo').change(function() {
@ -536,7 +536,16 @@ if (!empty($INRSYMBOL)) {
} }
$(document).ready(function() { $(document).ready(function() {
$("#Deliverydt").datepicker({
format: 'dd-mm-yyyy',
startDate: new Date(),
clearBtn: true
});
$("#PODate").datepicker({
format: 'dd-mm-yyyy',
startDate: new Date(),
clearBtn: true
});
$("#PaymentTerms").select2(); $("#PaymentTerms").select2();
$('#Date').click(function() { $('#Date').click(function() {
@ -634,18 +643,18 @@ if (!empty($INRSYMBOL)) {
<label>Select Supplier<span class="text-danger">*</span></label> <label>Select Supplier<span class="text-danger">*</span></label>
<?php <?php
$options = array("0" => 'Select Supplier');
if (!empty($Suplist)) { $options = array("0" => 'Select Supplier');
foreach ($Suplist as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName;
endforeach;
}
echo form_dropdown('drpSupplier', $options, set_value('drpSupplier'), 'id="drpSupplier" required="true" class="form-control select2"');
?> if (!empty($Suplist)) {
foreach ($Suplist as $SID) :
$options[$SID->SupplierID] = $SID->SupplierID . ' - ' . $SID->SupplierName;
endforeach;
}
echo form_dropdown('drpSupplier', $options, set_value('drpSupplier'), 'id="drpSupplier" required="true" class="form-control select2"');
?>
</div> <!-- 1.3. col-md-3 div closed here --> </div> <!-- 1.3. col-md-3 div closed here -->
@ -689,7 +698,8 @@ echo form_dropdown('drpSupplier', $options, set_value('drpSupplier'), 'id="drpSu
</div> </div>
<div class="form-group col-md-3" id="Deliverydtdiv"> <!-- // $CurrentDate --> <div class="form-group col-md-3" id="Deliverydtdiv"> <!-- // $CurrentDate -->
<label>Delivery Date<span class="text-danger">*</span></label> <label>Delivery Date<span class="text-danger">*</span></label>
<input type="date" class="form-control num" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="Deliverydt" name="Deliverydt" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off" value="<?= date('d/m/Y'); ?>"> <!-- <input type="text" class="form-control num" data-provide="" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="Deliverydt" name="Deliverydt" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off" value="<?= date('d/m/Y'); ?>"> -->
<input type="text" class="form-control num" data-provide="" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="Deliverydt" name="Deliverydt" required autocomplete="off" value="<?= date('d-m-Y'); ?>">
</div> </div>
<div class="form-group col-md-3" id="Schedulediv" style="display:none;"> <div class="form-group col-md-3" id="Schedulediv" style="display:none;">
<label>Schedule By<span class="text-danger">*</span></label> <label>Schedule By<span class="text-danger">*</span></label>
@ -713,7 +723,7 @@ echo form_dropdown('drpSupplier', $options, set_value('drpSupplier'), 'id="drpSu
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label>Purchase Order Date</label> <label>Purchase Order Date</label>
<input type="date" class="form-control num" data-provide="datepicker" data-date-format="dd/mm/yyyy" data-date-autoclose="true" id="PODate" name="PODate" data-date-end-date="<?= date('d/m/Y'); ?>" required autocomplete="off" value="<?= date('d/m/Y'); ?>"> <input type="text" class="form-control num" data-date-format="dd-mm-yyyy" data-date-autoclose="true" id="PODate" name="PODate" required autocomplete="off" value="<?= date('d-m-Y'); ?>">
</div> </div>
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label>Mode Of Shipment</label> <label>Mode Of Shipment</label>
@ -803,23 +813,23 @@ echo form_dropdown('drpSupplier', $options, set_value('drpSupplier'), 'id="drpSu
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-3"> <div class="form-group col-md-3">
<label>Insurance Options<span class="text-danger">*</span></label> <label>Insurance Options<span class="text-danger">*</span></label>
<?php
$optionsInsurance = array(); // Initialize the options array
if (!empty($insuranceStatus)) {
foreach ($insuranceStatus as $INS) {
$optionsInsurance[$INS['value']] = $INS['name'];
}
}
echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceStatus'), 'id="insuranceStatus" required="true" class="form-control select2"');
?> <?php
$optionsInsurance = array(); // Initialize the options array
if (!empty($insuranceStatus)) {
foreach ($insuranceStatus as $INS) {
$optionsInsurance[$INS['value']] = $INS['name'];
}
}
echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceStatus'), 'id="insuranceStatus" required="true" class="form-control select2"');
?>
</div> </div>
<div class="form-group col-md-3" id="insuranceTxtDiv" style="display:block;"> <div class="form-group col-md-3" id="insuranceTxtDiv" style="display:block;">
<label>Insurance No / Insurance Details<span class="text-danger">*</span></label> <label>Insurance No / Insurance Details<span class="text-danger">*</span></label>
@ -923,9 +933,9 @@ echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceSta
</div><!-- col-md-2 div closed here --> </div><!-- col-md-2 div closed here -->
</div><!-- 8 form-row div closed here --> </div><!-- 8 form-row div closed here -->
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<label>Description Of Service<span class="text-danger">*</label> <label>Description Of Service<span class="text-danger">*</label>
<?php <?php
$data = array('name' => 'descofpo', 'value' => set_value('descofpo'), 'id' => 'descofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); $data = array('name' => 'descofpo', 'value' => set_value('descofpo'), 'id' => 'descofpo', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data); echo form_textarea($data);
@ -1237,14 +1247,14 @@ echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceSta
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<label>Service Description </label> <label>Service Description </label>
<?php <?php
$data = array('name' => 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction'), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); $data = array('name' => 'txtSpcialInstruction', 'value' => set_value('txtSpcialInstruction'), 'id' => 'txtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data); ?> echo form_textarea($data); ?>
</div> </div>
</div><!-- SERVICE --> </div><!-- SERVICE -->
</div> </div>
@ -1504,13 +1514,13 @@ echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceSta
</div> </div>
</div> </div>
</div><!-- EDITSERVICE.8 form-row closed here --> </div><!-- EDITSERVICE.8 form-row closed here -->
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<label>Service Description </label> <label>Service Description </label>
<?php <?php
$data = array('name' => 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction'), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40'); $data = array('name' => 'EdittxtSpcialInstruction', 'value' => set_value('EdittxtSpcialInstruction'), 'id' => 'EdittxtSpcialInstruction', 'class' => 'form-control', 'rows' => '3', 'cols' => '40');
echo form_textarea($data); ?> echo form_textarea($data); ?>
</div> </div>
</div><!-- EDITSERVICE.9 form-row closed here --> </div><!-- EDITSERVICE.9 form-row closed here -->
@ -1766,8 +1776,8 @@ echo form_dropdown('insuranceStatus', $optionsInsurance, set_value('insuranceSta
</tr> </tr>
`; `;
// Append the generated HTML to your table body // Append the generated HTML to your table body
$('#ServiceAppend').append(rowHtml); $('#ServiceAppend').append(rowHtml);
@ -2173,12 +2183,17 @@ $('#ServiceAppend').append(rowHtml);
// this function is used to clear data changing schedule option // this function is used to clear data changing schedule option
$('#Scheduleby').change(function() { $('#Scheduleby').change(function() {
// $("#Deliverydt").datepicker({
// minDate: 'now',
// dateFormat: 'mm/dd/yy',
// });
$("#Deliverydt").datepicker({ $("#Deliverydt").datepicker({
minDate: 'now', format: 'dd-mm-yyyy',
dateFormat: 'mm/dd/yy', startDate: new Date(),
yearRange: '0:+10',
changeMonth: true, changeMonth: true,
changeYear: true, changeYear: true,
yearRange: '0:+10' clearBtn: true
}); });
}); });