susee
This commit is contained in:
parent
d29dc0e51f
commit
fc8e736a31
@ -194,11 +194,11 @@ $(document).on('click','.manage-credits',function(){
|
|||||||
<div id="count_hide_show" class="mb-1 mt-2"></div>
|
<div id="count_hide_show" class="mb-1 mt-2"></div>
|
||||||
<div class="mb-1 mt-2 col-md-4">
|
<div class="mb-1 mt-2 col-md-4">
|
||||||
<label class="form-label">Credit Points<span style="color: red;margin-left: 4px;">*</label>
|
<label class="form-label">Credit Points<span style="color: red;margin-left: 4px;">*</label>
|
||||||
<input type="number" class="form-control" min="1" name="credit_points" id="credit" required value="1" onkeypress = "return matchnum(event)">
|
<input type="number" class="form-control" min="1" name="credit_points" id="credit" required value="1" onkeypress = "return matchnum(event)">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-1 mt-2 col-md-4">
|
<div class="mb-1 mt-2 col-md-4">
|
||||||
<label class="form-label">Cost($)<span style="color: red;margin-left: 4px;">*</label>
|
<label class="form-label">Cost($)<span style="color: red;margin-left: 4px;">*</label>
|
||||||
<input type="text" class="form-control" name="cost" id="cost" readonly required value="${res.OnePackValue[0]['value']}">
|
<input type="number" class="form-control" name="cost" id="cost" onkeypress = "return matchnum(event)" readonly required value="${res.OnePackValue[0]['value']}">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-1 mt-2 col-md-4">
|
<div class="mb-1 mt-2 col-md-4">
|
||||||
<label class="form-label">Transaction Method<span style="color: red;margin-left: 4px;">*</label>
|
<label class="form-label">Transaction Method<span style="color: red;margin-left: 4px;">*</label>
|
||||||
@ -209,8 +209,8 @@ $(document).on('click','.manage-credits',function(){
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-1 mt-2 col-md-12">
|
<div class="mb-1 mt-2 col-md-12">
|
||||||
<label class="form-label">Remarks</label>
|
<label for="remarks" class="form-label">Remarks<span style="color: red;margin-left: 4px;">*</span></label>
|
||||||
<input type="text" class="form-control" id="remarks" name="remarks" maxlength="30">
|
<input type="text" class="form-control" id="remarks" name="remarks" required maxlength="30">
|
||||||
<span style="color: red;margin-left: 4px;"><i>Remarks must be 30 characters</i></span>
|
<span style="color: red;margin-left: 4px;"><i>Remarks must be 30 characters</i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -237,6 +237,19 @@ $(document).on('click','.manage-credits',function(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#method').on('click', function(){
|
||||||
|
if($(this).val() == 'Others')
|
||||||
|
{
|
||||||
|
$('#remarks').prop('required', true);
|
||||||
|
$('label[for="remarks"]').html('Remarks<span style="color: red;margin-left: 4px;">*</span>');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#remarks').prop('required', false);
|
||||||
|
$('label[for="remarks"]').text('Remarks');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$('#credit').on('click', function(){
|
$('#credit').on('click', function(){
|
||||||
if($('#packs').val() == 'CreditPoints')
|
if($('#packs').val() == 'CreditPoints')
|
||||||
@ -348,7 +361,9 @@ $(document).on('change','#packs',function(){
|
|||||||
title: 'Member Name : <?php echo $fname." ".$lname; ?> (Total Credits : <?php echo $avaiable_credit; ?>)', // Set your custom PDF title here
|
title: 'Member Name : <?php echo $fname." ".$lname; ?> (Total Credits : <?php echo $avaiable_credit; ?>)', // Set your custom PDF title here
|
||||||
text: 'PDF',
|
text: 'PDF',
|
||||||
customize: function(doc) {
|
customize: function(doc) {
|
||||||
// You can further customize the PDF here if needed
|
doc.content[1].table.body.forEach(function(row) {
|
||||||
|
row.splice(0, 1); // Remove the first column (ID column)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -356,18 +371,24 @@ $(document).on('change','#packs',function(){
|
|||||||
title: 'Member Name : <?php echo $fname." ".$lname; ?> (Total Credits : <?php echo $avaiable_credit; ?>)', // Set your custom print title here
|
title: 'Member Name : <?php echo $fname." ".$lname; ?> (Total Credits : <?php echo $avaiable_credit; ?>)', // Set your custom print title here
|
||||||
text: 'Print',
|
text: 'Print',
|
||||||
customize: function(win) {
|
customize: function(win) {
|
||||||
// You can further customize the print output here if needed
|
$(win.document.body).find('table').find('th:first, td:first').remove();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'copy',
|
extend: 'copy',
|
||||||
text: 'Copy', // Set the title for the Copy button
|
text: 'Copy', // Set the title for the Copy button
|
||||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'csv',
|
extend: 'csv',
|
||||||
text: 'CSV', // Set the title for the CSV button
|
text: 'CSV', // Set the title for the CSV button
|
||||||
title: 'Member Name : <?php echo $fname." ".$lname; ?> (Total Credits : <?php echo $avaiable_credit; ?>)', // Set your custom print title here
|
title: 'Member Name : <?php echo $fname." ".$lname; ?> (Total Credits : <?php echo $avaiable_credit; ?>)', // Set your custom print title here
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@ -398,7 +419,9 @@ $(document).on('change','.add_or_sub',function(){
|
|||||||
$("#credit").val("1"); // Reset Credit to 1 (you can set it to any default value)
|
$("#credit").val("1"); // Reset Credit to 1 (you can set it to any default value)
|
||||||
$("#cost").val($("#costHidden").val());
|
$("#cost").val($("#costHidden").val());
|
||||||
$('#credit').prop('readonly', false);
|
$('#credit').prop('readonly', false);
|
||||||
|
$('#cost').prop('readonly', false);
|
||||||
$('.changeClass').removeClass('col-md-8').addClass('col-md-12');
|
$('.changeClass').removeClass('col-md-8').addClass('col-md-12');
|
||||||
|
$('label[for="remarks"]').html('Remarks<span style="color: red;margin-left: 4px;">*</span>');
|
||||||
} else {
|
} else {
|
||||||
$("#packs").val("CreditPoints");
|
$("#packs").val("CreditPoints");
|
||||||
$('#method option[value="card"]').show();
|
$('#method option[value="card"]').show();
|
||||||
@ -407,6 +430,7 @@ $(document).on('change','.add_or_sub',function(){
|
|||||||
$("#packs option[value='7']").show();
|
$("#packs option[value='7']").show();
|
||||||
$('#remarks').prop('required', false);
|
$('#remarks').prop('required', false);
|
||||||
$("#cost").val($("#costHidden").val());
|
$("#cost").val($("#costHidden").val());
|
||||||
|
$('label[for="remarks"]').text('Remarks');
|
||||||
if(packSel == 'CreditPoints'){
|
if(packSel == 'CreditPoints'){
|
||||||
$('#count_hide_show').hide();
|
$('#count_hide_show').hide();
|
||||||
}
|
}
|
||||||
@ -429,20 +453,6 @@ $(document).on('change','.add_or_sub',function(){
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<!-- <script>
|
|
||||||
$('#packs').on('change', function () {
|
|
||||||
// Get the selected value of the dropdown
|
|
||||||
var selectedValue = $(this).val();
|
|
||||||
alert(selectedValue)
|
|
||||||
if(selectedValue == 'CreditPoints'){
|
|
||||||
$('#count_hide_show').hide();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$('#count_hide_show').show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script> -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -159,7 +159,9 @@ $(document).on('click','.order_details',function(){
|
|||||||
title: 'Transactions', // Set your custom PDF title here
|
title: 'Transactions', // Set your custom PDF title here
|
||||||
text: 'PDF',
|
text: 'PDF',
|
||||||
customize: function(doc) {
|
customize: function(doc) {
|
||||||
// You can further customize the PDF here if needed
|
doc.content[1].table.body.forEach(function(row) {
|
||||||
|
row.splice(0, 1); // Remove the first column (ID column)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -167,18 +169,24 @@ $(document).on('click','.order_details',function(){
|
|||||||
title: 'Transactions', // Set your custom print title here
|
title: 'Transactions', // Set your custom print title here
|
||||||
text: 'Print',
|
text: 'Print',
|
||||||
customize: function(win) {
|
customize: function(win) {
|
||||||
// You can further customize the print output here if needed
|
$(win.document.body).find('table').find('th:first, td:first').remove();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'copy',
|
extend: 'copy',
|
||||||
text: 'Copy', // Set the title for the Copy button
|
text: 'Copy', // Set the title for the Copy button
|
||||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'csv',
|
extend: 'csv',
|
||||||
text: 'CSV', // Set the title for the CSV button
|
text: 'CSV', // Set the title for the CSV button
|
||||||
title: 'Transactions', // Set your custom print title here
|
title: 'Transactions', // Set your custom print title here
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"language": {
|
"language": {
|
||||||
|
|||||||
@ -99,7 +99,9 @@
|
|||||||
title: 'Users', // Set your custom PDF title here
|
title: 'Users', // Set your custom PDF title here
|
||||||
text: 'PDF',
|
text: 'PDF',
|
||||||
customize: function(doc) {
|
customize: function(doc) {
|
||||||
// You can further customize the PDF here if needed
|
doc.content[1].table.body.forEach(function(row) {
|
||||||
|
row.splice(0, 1); // Remove the first column (ID column)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -107,18 +109,24 @@
|
|||||||
title: 'Users', // Set your custom print title here
|
title: 'Users', // Set your custom print title here
|
||||||
text: 'Print',
|
text: 'Print',
|
||||||
customize: function(win) {
|
customize: function(win) {
|
||||||
// You can further customize the print output here if needed
|
$(win.document.body).find('table').find('th:first, td:first').remove();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'copy',
|
extend: 'copy',
|
||||||
text: 'Copy', // Set the title for the Copy button
|
text: 'Copy', // Set the title for the Copy button
|
||||||
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
titleAttr: 'Copy', // Set the tooltip for the Copy button
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'csv',
|
extend: 'csv',
|
||||||
text: 'CSV', // Set the title for the CSV button
|
text: 'CSV', // Set the title for the CSV button
|
||||||
title: 'Users', // Set your custom print title here
|
title: 'Users', // Set your custom print title here
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':not(:first-child)' // Exclude the first column (ID column)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"language": {
|
"language": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user