bug fixes, senderID polishing, support fees, paperless partial

This commit is contained in:
Kwesi Banson
2024-07-02 09:25:00 +00:00
parent 318fddbff0
commit edb78d1bfc
116 changed files with 1488 additions and 368 deletions

BIN
public/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -33,6 +33,10 @@
$('#launchDate').datetimepicker({
format: 'YYYY-MM-DD'
});
$('#invoiceDateSupport').datetimepicker({
format: 'YYYY-MM-DD'
});
$('#expiryDate').datetimepicker({
format: 'YYYY-MM-DD'
});
@@ -67,6 +71,10 @@
evt.preventDefault();
$('#financePaymentsForm').modal('show');
});
$('#addSupportFeesInfoBtn').click(function(evt){
evt.preventDefault();
$('#supportFeesFormModal').modal('show');
});
$('.paymentEntryEditBtn').click(function(tve){
tve.preventDefault();
//var theIDD = $("input[name=payment_entry_id]").val();
@@ -285,6 +293,57 @@
});
});
$('#supportFeesEntryForm').submit(function(evt){
evt.preventDefault();
var formData = new FormData($(this)[0]);
$.ajax({
type: "POST",
url: base_url + '/clients/support_fees_store',
data : formData,
processData: false,
contentType: false,
async: false,
success: function (data){
if (data.code === 1) {
$("#financeForm")[0].reset();
$.alert({
title: 'Alert!',
content: 'Support Fees Details added successfully',
});
setTimeout(function(){
location.reload();
}, 8000);
}
else if (data.code > 5) {
$.alert({
title: 'Alert!',
content: data.msg,
});
}
else {
$.alert({
title: 'Alert!',
content: 'Your request could not be handled. Try again !',
});
}
},
error: function(error){
//console.log(error);
//console.log("AJAX error in request: " + JSON.stringify(err, null, 2));
var output = $.parseJSON(error.responseText);
// console.log(output.errors);
$('#financeNotifyArea').removeClass('hidden');
$('#financeNotifyArea').addClass('alert alert-danger');
$.each(output.errors, function (key, value) {
// console.log(value[0]);
$('#financeNotifyArea').text(value[0]);
});
}
});
});
$('#financeServicesStore').change(function(evtt){
let currentServices = $('#financeServicesStore').val();
$.each(currentServices, function (key, value) {
@@ -300,6 +359,7 @@
}
});
});
$('#financeEditForm').submit(function(evt){
evt.preventDefault();
var formData = new FormData($(this)[0]);
@@ -336,6 +396,7 @@
}
});
});
$('#shortCodeEditForm').submit(function(evt){
evt.preventDefault();
var formData = new FormData($(this)[0]);

View File

@@ -5,6 +5,28 @@ var d = new Date();
var currentDate = d.getFullYear() + '/' + ((''+month).length<2 ? '0' : '') + month + '/' + ((''+day).length<2 ? '0' : '') + day;
//$('select').select2();
var selectedRateTypeRest = $("#rateTypeSel").val();
if (selectedRateTypeRest == 'sliding') {
$('#flatRateFileDiv').addClass('hidden');
$('#slidingRateFileDiv').removeClass('hidden');
}
else {
$('#flatRateFileDiv').removeClass('hidden');
$('#slidingRateFileDiv').addClass('hidden');
}
$("#rateTypeSel").change(function(){
var selectedRateType = $("#rateTypeSel").val();
// console.log(selectedRateType);
if (selectedRateType == 'sliding') {
$('#flatRateFileDiv').addClass('hidden');
$('#slidingRateFileDiv').removeClass('hidden');
}
else {
$('#flatRateFileDiv').removeClass('hidden');
$('#slidingRateFileDiv').addClass('hidden');
}
});
$('#myDatepicker2').datetimepicker({
format: 'YYYY-MM-DD',
maxDate: currentDate
@@ -20,12 +42,12 @@ $('#addIpBtn').click(function(evt){
$('#createNotesBtn').click(function(evt){
evt.preventDefault();
console.log('foo bar');
// console.log('foo bar');
$('#newNotesForm').modal('show');
});
$('#newIpForm').submit(function(evt){
evt.preventDefault();
evt.preventDefault();
var formData = new FormData($(this)[0]);
$.ajax({
type: "POST",
@@ -56,27 +78,27 @@ $('#newIpForm').submit(function(evt){
title: 'Alert!',
content: 'Your request could not be handled. Try again !',
});
}
},
error: function(error){
var output = $.parseJSON(error.responseText);
console.log(output.errors);
// console.log(output.errors);
$('#ipNotifyArea').removeClass('hidden');
$('#ipNotifyArea').addClass('alert alert-danger');
$.each(output.errors, function (key, value) {
console.log(value[0]);
// console.log(value[0]);
$('#ipNotifyArea').text(value[0]);
});
}
});
});
});
$('.notesEditBtn').click(function(tve){
tve.preventDefault();
//var theIDD = $("input[name=payment_entry_id]").val();
var theIDD = $(this).siblings('.notesRowId').val();
console.log(theIDD);
// console.log(theIDD);
$.ajax({
type: "GET",
@@ -86,7 +108,7 @@ $('.notesEditBtn').click(function(tve){
async: false,
success: function (data){
if (data.code === 1) {
console.log(theIDD);
// console.log(theIDD);
$('#noteIdEdit').val(theIDD);
$('#notesServicesEdit').val(data.services_arr).change();
$('#notesBodyEdit').val(data.result.notes_body);
@@ -105,17 +127,17 @@ $('.notesEditBtn').click(function(tve){
title: 'Alert!',
content: 'Your request could not be handled. Try again !',
});
}
}
});
});
$('#newNotesFormForm').submit(function(evt){
evt.preventDefault();
evt.preventDefault();
var formData = new FormData($(this)[0]);
$.ajax({
type: "POST",
@@ -146,16 +168,16 @@ $('#newNotesFormForm').submit(function(evt){
title: 'Alert!',
content: 'Your request could not be handled. Try again !',
});
}
}
});
});
});
$('#editNotesForm').submit(function(evt){
evt.preventDefault();
console.log($(this).length);
evt.preventDefault();
// console.log($(this).length);
var formData = new FormData($(this)[0]);
$.ajax({
type: "POST",
@@ -185,11 +207,11 @@ $('#editNotesForm').submit(function(evt){
title: 'Alert!',
content: 'Your request could not be handled. Try again !',
});
}
}
});
});
});
});
$('#addPaymentBtn').click(function(evt){
evt.preventDefault();
$('#financePaymentsForm').modal('show');
@@ -207,7 +229,7 @@ $('.paymentEntryEditBtn').click(function(tve){
async: false,
success: function (data){
if (data.code === 1) {
console.log(theIDD);
// console.log(theIDD);
$('#paymentIdEdit').val(theIDD);
$('#financeServicesEdit').val(data.services_arr).change();
$('#invoiceNumberEdit').val(data.result.invoice_number);
@@ -228,7 +250,7 @@ $('.paymentEntryEditBtn').click(function(tve){
title: 'Alert!',
content: 'Your request could not be handled. Try again !',
});
}
}
});
@@ -236,7 +258,7 @@ $('.paymentEntryEditBtn').click(function(tve){
});
$('#financeForm').submit(function(evt){
evt.preventDefault();
evt.preventDefault();
var formData = new FormData($(this)[0]);
$.ajax({
type: "POST",
@@ -267,27 +289,27 @@ $('#financeForm').submit(function(evt){
title: 'Alert!',
content: 'Your request could not be handled. Try again !',
});
}
},
error: function(error){
//console.log(error);
//console.log("AJAX error in request: " + JSON.stringify(err, null, 2));
var output = $.parseJSON(error.responseText);
console.log(output.errors);
// console.log(output.errors);
$('#financeNotifyArea').removeClass('hidden');
$('#financeNotifyArea').addClass('alert alert-danger');
$.each(output.errors, function (key, value) {
console.log(value[0]);
// console.log(value[0]);
$('#financeNotifyArea').text(value[0]);
});
}
});
});
});
$('#financeEditForm').submit(function(evt){
evt.preventDefault();
evt.preventDefault();
var formData = new FormData($(this)[0]);
$.ajax({
type: "POST",
@@ -317,9 +339,9 @@ $('#financeEditForm').submit(function(evt){
title: 'Alert!',
content: 'Your request could not be handled. Try again !',
});
}
}
});
});
});
});
});

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
public/documents/oasl.pdf Executable file

Binary file not shown.

Binary file not shown.