add refund and event logic

This commit is contained in:
root
2026-03-10 23:12:49 -04:00
parent ba1206e314
commit f6be51576c
67 changed files with 4808 additions and 1000 deletions
+25
View File
@@ -68,6 +68,7 @@ use App\Http\Controllers\Api\Reports\PrintablesReportsController;
use App\Http\Controllers\Api\Scores\ProjectController;
use App\Http\Controllers\Api\Scores\QuizController;
use App\Http\Controllers\Api\Finance\PaymentController;
use App\Http\Controllers\Api\Finance\RefundController;
use App\Http\Controllers\Api\Finance\PaymentNotificationController;
use App\Http\Controllers\Api\Finance\PaymentTransactionController;
use App\Http\Controllers\Api\Finance\PaypalTransactionsController;
@@ -223,6 +224,17 @@ Route::prefix('v1')->group(function () {
Route::delete('events/{eventId}', [SchoolCalendarController::class, 'destroy']);
});
Route::prefix('settings/events')->group(function () {
Route::get('/', [EventController::class, 'index']);
Route::post('/', [EventController::class, 'store']);
Route::get('charges/list', [EventController::class, 'charges']);
Route::post('{eventId}/charges', [EventController::class, 'updateCharges']);
Route::get('charges/students', [EventController::class, 'studentsWithCharges']);
Route::get('{eventId}', [EventController::class, 'show']);
Route::patch('{eventId}', [EventController::class, 'update']);
Route::delete('{eventId}', [EventController::class, 'destroy']);
});
Route::prefix('whatsapp')->group(function () {
Route::get('links', [WhatsappController::class, 'index']);
Route::post('links', [WhatsappController::class, 'store']);
@@ -398,6 +410,19 @@ Route::prefix('v1')->group(function () {
Route::post('fees/refund', [FeeCalculationController::class, 'refund']);
Route::post('fees/tuition-total', [FeeCalculationController::class, 'tuitionTotal']);
Route::prefix('refunds')->group(function () {
Route::post('recalculate-overpayments', [RefundController::class, 'recalculateOverpayments']);
Route::get('parent-balances/{parentId}', [RefundController::class, 'parentBalances']);
Route::get('/', [RefundController::class, 'index']);
Route::post('/', [RefundController::class, 'store']);
Route::get('{refundId}', [RefundController::class, 'show']);
Route::patch('{refundId}', [RefundController::class, 'update']);
Route::delete('{refundId}', [RefundController::class, 'destroy']);
Route::post('{refundId}/approve', [RefundController::class, 'approve']);
Route::post('{refundId}/reject', [RefundController::class, 'reject']);
Route::post('{refundId}/payments', [RefundController::class, 'recordPayment']);
});
Route::prefix('reimbursements')->group(function () {
Route::get('under-processing', [ReimbursementController::class, 'underProcessing']);
Route::post('mark-donation', [ReimbursementController::class, 'markDonation']);