Fixed bug in balance payment email

This commit is contained in:
2014-01-17 23:05:21 +11:00
parent 3328a9aaa0
commit 5c81fa6cf6
2 changed files with 22 additions and 2 deletions

View File

@@ -127,9 +127,9 @@ function _booking_balance_payment_email($nid)
$node = node_load($nid);
$tokens = booking_define_personspecific_tokens($node);
if ($tokens['amount-owing'] <= 0)
if ($tokens['payment-required'] <= 0)
{
watchdog('booking', "Not sending amount owing email, since this person doesnt owe any money: @info", array('@info' => var_export($node, TRUE)));
watchdog('booking', "Not sending amount owing email, since this person doesn't owe any money: @info", array('@info' => var_export($node, TRUE)));
return;
}

View File

@@ -136,6 +136,26 @@ function booking_update_7202() {
//user form to register for a given variety session
}
/**
* Add tables for study group calculations
*/
function booking_update_7203() {
//TODO: Figure out what fields we need
$booking_studygroup_mapping = array(
'fields' => array(
'sid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_node_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_studygroup_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_is_leader' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
'booking_is_helper' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
),
'primary key' => array('sid'),
);
}
/**
* Implementation of hook_install().
*/