Refund feature added

This commit is contained in:
2014-04-25 22:54:55 +10:00
parent 84ec125c80
commit 4c33ebf977
2 changed files with 66 additions and 6 deletions

View File

@@ -1277,9 +1277,12 @@ function _booking_update($node) {
watchdog('booking', 'Detected person moving from Booked In list to No Longer Coming');
//let this person know their request has been processed
_booking_demoted_to_notcoming_email($node->nid);
_booking_demoted_to_notcoming_email($node->nid);
//TODO: Calculate refund
//Calculate refund
$refund = _booking_process_refund($node);
drupal_set_message(t('Refund calculated for !first !last is $!refund.',
array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname, '!refund' => $refund)));
//check if there is room on the booked-in list
if (_booking_check_bookings_full() == False)