Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding debt types #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion alma_user/plugins/debt/alma.inc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function alma_user_debt_list($account) {
foreach ($debts['debts'] as $id => $debt) {
$return[$id] = array(
'id' => $id,
'display_title' => $debt['note'],
'display_title' => alma_debt_types($debt['type']) . ($debt['note'] ? ' (' . $debt['note'] . ')' : ""),
'payable' => TRUE,
'date' => $debt['date'],
'amount' => $debt['amount'],
Expand All @@ -50,3 +50,42 @@ function alma_user_debt_list($account) {
}
return $return;
}

function alma_debt_types($debttype) {
switch ($debttype) {
case 'overdueFeeInvoiceDebt':
return t('overdue Fee Invoice Debt');
case 'overdueFeeDebt':
return t('overdue Fee Debt');
case 'loanFeeDebt':
return t('loan Fee Debt');
case 'reservationPickupFeeDebt':
return t('reservation Pickup Fee Debt');
case 'reservationFeeDebt':
return t('reservation Fee Debt');
case 'deleteReservationFeeDebt':
return t('delete Reservation Fee Debt');
case 'illFeeDebt':
return t('ill Fee Debt');
case 'smsReservationFeeDebt':
return t('sms Reservation Fee Debt');
case 'smsReminderFeeDebt':
return t('sms Reminder Fee Debt');
case 'smsRecall1FeeDebt':
return t('sms Recall 1. Fee Debt');
case 'smsRecall2FeeDebt':
return t('sms Recall 2. Fee Debt');
case 'smsRecall3FeeDebt':
return t('sms Recall 3. Fee Debt');
case 'smsRecall4FeeDebt':
return t('sms Recall 4. Fee Debt');
case 'smsRecall5FeeDebt':
return t('sms Recall 5. Fee Debt');
case 'emailReminderFeeDebt':
return t('email Reminder Fee Debt');
case 'otherFeeDebt':
return t('other Fee Debt');
default:
return t($debttype);
};
}