@@ -97,27 +98,31 @@
id="tickets-table">
-
- Date
- User
- Description
+ CD Account No
+ Policy Name
+ Endorsement No
Sub Type
Credit
Debit
Balance
-
+ Description
+ Date/User
- created_at)); ?>
- username; ?>
- description; ?>
- sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?>
+ cd_ac_no; ?>
+ policy_name; ?>
+ endorsement_no; ?>
+ sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?>
+
transaction_type == 'Credit') ? $row->amount : ''; ?>
transaction_type == 'Debit') ? $row->amount : ''; ?>
balance; ?>
+ description; ?>
+ created_at)); ?> by
+ username; ?>
@@ -151,7 +156,7 @@
- Deposit
+ Replenishment
Transaction Sub Type
- Deposit
+ Replenishment
Adjustment
@@ -222,22 +227,22 @@ $(document).ready(function() {
$('#tickets-table').DataTable({
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
buttons: [{
- extend: 'csv',
- text: 'CSV',
- title: 'TransactionDetails',
- exportOptions: {
- columns: ''
+ extend: 'csv',
+ text: 'CSV',
+ title: 'TransactionDetails',
+ exportOptions: {
+ columns: ''
+ }
+ },
+ {
+ extend: 'pdf',
+ text: 'PDF',
+ title: 'TransactionDetails',
+ exportOptions: {
+ columns: ''
+ }
}
- },
- {
- extend: 'pdf',
- text: 'PDF',
- title: 'TransactionDetails',
- exportOptions: {
- columns: ''
- }
- }
- ],
+ ],
language: {
@@ -288,15 +293,25 @@ $(document).ready(function() {
// Add more options as needed
};
+
var subType = $('#subType').val();
var subTypeId = subTypeOptions[subType] || null;
if (subTypeId === null) {
// Handle the case where sub_type is not found in the options
- alert('Invalid sub_type selected.');
+ toastr.warning('Invalid sub_type selected.', "Warning");
return;
}
+ // console.log('transactionType ', transactionType)
+ // console.log('description ', description)
+ // console.log('amount ', amount)
+ // console.log('subType ', subType)
+ // console.log('sub_type_id ', sub_type_id)
+ // console.log('clientId ', clientId)
+ // console.log('insurerId ', insurerId)
+
+
// Send data to the server using Ajax
$.ajax({
type: 'POST',
@@ -312,15 +327,18 @@ $(document).ready(function() {
},
success: function(response) {
// Handle success response
- console.log("Transaction saved successfully");
+ toastr.success("Transaction saved successfully", "Success");
// Reload the page or perform other actions as needed
location.reload();
},
- error: function(error) {
- // Handle error response
- console.error(error);
+ error: function(xhr, status, error) {
+ toastr.error("Transaction save failed", "Error");
+ console.error(xhr.responseText);
+ console.error(status, error);
+ location.reload(); // Uncomment if you need to reload the page on error
}
});
+
});
});
\ No newline at end of file
diff --git a/public/.htaccess b/public/.htaccess
index dbed322f..28a9d8df 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -38,6 +38,22 @@ Options -Indexes
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+
+ExpiresActive On
+ExpiresByType image/jpg "access 1 year"
+ExpiresByType image/jpeg "access 1 year"
+ExpiresByType image/gif "access 1 year"
+ExpiresByType image/png "access 1 year"
+ExpiresByType text/css "access 1 month"
+ExpiresByType text/js "access 1 month"
+ExpiresByType application/pdf "access 1 month"
+ExpiresByType application/javascript "access 1 month"
+ExpiresByType application/x-javascript "access 1 month"
+ExpiresByType application/x-shockwave-flash "access 1 month"
+ExpiresByType image/x-icon "access 1 year"
+ExpiresDefault "access 2 days"
+
+
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.