<!--
Steps for enrollment process:
Admission under review
Payment pending //we should generate invoice
Enrolled


Steps for Withdrawn: 
Withdraw under review
Refund pending
After providing refund if any -> Withdrawn


add Withdraw deadline at configuration table


##########################################################################################################################
cron job command for paypal to update payment table:
*/15 * * * *	/usr/bin/php /home/u280815660/domains/alrahmaisgl.org/alrahma/spark sync_paypal_payments >> /home/u280815660/domains/alrahmaisgl.org/alrahma/writable/logs/paypal_cron.log 2>&1

###########################################################################################################################


dX7!aPz9#LmqR2@t





curl -i -X POST https://test.alrahmaisgl.org/api/paypal-webhook \
     -H "Content-Type: application/json" \
     -d @payload.json





curl -i -X POST http://localhost:8080/api/paypal-webhook \
     -H "Content-Type: application/json" \
     -d @payload.json



     get:
'balance', and   'paid_amount', from invoice table
invoice table has parent_id = user_id







webhook_id, client_id, and secret should ideally be stored in .env or config files.



################################################
<table id="myTable" class="display">

<?= $this->section('scripts') ?>
<script>
$(document).ready(function() {
    $('#myTable').DataTable();
});
</script>
<?= $this->endSection() ?>

#####################################################


when the payment status=paid update the enrollment status = enrolled
refund amount at http://localhost:8080/invoice_payment/invoice_management need to be updated
need to track the refund status either refunded or not 

################################################################################
#very important to add to deployment script
If the file is currently in writable/uploads/checks/, then you need to:
# From project root
ln -s writable/uploads public/uploads

Then it can be accessed via:
<?= base_url('uploads/checks/' . $refund['check_file']) ?>
##########################################################################


I want to design pages to show everything about the school:
financial report
number of students
number of teachers
number of admins
number of parents
expenses
number of tables chairs