Added an email for missed payment processing
This commit is contained in:
@@ -1328,6 +1328,8 @@ function _booking_update($node) {
|
||||
}
|
||||
}
|
||||
|
||||
//status change triggers start here
|
||||
|
||||
//check if someone has moved to not-coming list from the booked-in list
|
||||
if ($previous_status->booking_status == 1 && $node->booking_status == 3)
|
||||
{
|
||||
@@ -1363,6 +1365,40 @@ function _booking_update($node) {
|
||||
else
|
||||
watchdog('booking', 'Still no room on the booked in list though.');
|
||||
}
|
||||
//check if someone has been demoted to the "missed payment deadline" status from being booked-in
|
||||
elseif ($previous_status->booking_status == 1 && $node->booking_status == 4)
|
||||
{
|
||||
watchdog('booking', 'Detected person moving from Booked In list to Missed Payment Deadline list.');
|
||||
|
||||
//disable this until we're sure that's what we want to do
|
||||
|
||||
/*
|
||||
//let this person know they're no longer "booked in"
|
||||
_booking_missedpayment_email($node->nid);
|
||||
|
||||
//Remove from any study groups
|
||||
_booking_studygroups_cleanup($node->nid);
|
||||
|
||||
//check if there is room on the booked-in list
|
||||
if (_booking_check_bookings_full() == False)
|
||||
{
|
||||
watchdog('booking', 'Looks like there was room on the booked in list, so lets tell the next person');
|
||||
//find the first person on the waiting list
|
||||
$temp_nid = _booking_get_waitinglist_top();
|
||||
|
||||
if ($temp_nid != -1) //-1 means there was no one on the waiting list
|
||||
{
|
||||
//update their registration status
|
||||
_booking_change_status($temp_nid,1);
|
||||
|
||||
//send them an email
|
||||
_booking_promoted_from_waitinglist_email($temp_nid);
|
||||
}
|
||||
}
|
||||
else
|
||||
watchdog('booking', 'Still no room on the booked in list though.');
|
||||
*/
|
||||
}
|
||||
//if someone is moving to the not-coming list from the waiting list
|
||||
elseif ($previous_status->booking_status == 2 && $node->booking_status == 3)
|
||||
{
|
||||
@@ -1453,7 +1489,7 @@ function _booking_update($node) {
|
||||
->condition('nid', $node->nid)
|
||||
->execute();
|
||||
}
|
||||
|
||||
//end trigger processing
|
||||
}
|
||||
|
||||
function _booking_delete($node) {
|
||||
|
Reference in New Issue
Block a user