Removed replaceRequestingAccount() from regCartSupport class. No longer needed.
Fixed problem with comparison of rate date number.
Fixed loss of event ID when merging time and rate for use with registration page.
// Preserve rate ID and don't let it trash the time ID
$rv['rate_id'] = $rv['id'];
- unset($rv['id']);
+ unset($rv['id'], $rv['reg_event']);
$this->regEventData['reg_class'][$ck]['times'][$tv['event_time']] = array_merge($tv, $rv);
$this->regEventData['reg_class'][$ck]['hasTimes'] = true;
// Add registrant account to accounts table
$this->addAccountToCart($registrant['account']);
- // Add time data to reg_times table
-// **** $this->addTimeToCart($registrant['reg_time']);
-
} // Each Registrant
}
}
- /*
- * Update request to use another account
- *
- * @param integer $requestId
- * @param integer $accountId
- *
- * @return boolean True is success otherwise false
- * @access public
- */
- public function replaceRequestingAccount($requestId = false, $accountId = false)
- {
-
- // **** NEED TO COMPLETE THIS FUNCTION ****
-
- }
-
/*
* Check if logged in user has permission to access cart
*
}
- /*
- * Add a reg_time record to the times list in the temoporary cart array if not already there
- *
- *
- * @param integer $timeId
- *
- * @return boolean Success or fail
- * @access public
- */
- public function addTimeToCart($timeId)
- {
-
- // Check the supplied reg_time ID
- $timeId = ($timeId-0);
- if ($timeId == 0) {
- return false;
- }
-
- // Try to get the account record for the person who submitted (is submitting) the request
- $RegTime = new GlmDataRegistrationsRegTime($this->wpdb, $this->config);
- $time = $RegTime->getEntry($timeId);
-
- // If time was not found
- if (!$time) {
- return false;
- }
-
- // If the time doesn't exist in the times array, add it
- if (!isset($this->cart['times'][$timeId])) {
- $this->cart['times'][$time['id']] = $time;
- }
-
- return true;
-
- }
-
/*
* Purge old reg_time_pending entries
*
name: '',
start_days: 0,
end_days: 0,
- base_rate: 0.0,
- per_registrant: 0.0,
+ base_rate: 0.00,
+ per_registrant: 0.00,
registrant_credits: 0
},
if (v == '') {
v = 0;
}
- v = '$' + Number(v).toFixed(2);
+ v = Number(v).toFixed(2);
return v;
},
var datesError = '';
var cur = model.cid; // ID of current rate
- var start = current.start_days;
- var end = current.end_days;
+ var start = parseInt(current.start_days);
+ var end = parseInt(current.end_days);
if (start < end) {
datesError += 'Start days must be greater than end days. ';
name: '',
start_days: 0,
end_days: 0,
- base_rate: 0.0,
- per_registrant: 0.0,
+ base_rate: 0.00,
+ per_registrant: 0.00,
registrant_credits: 0
},
if (v == '') {
v = 0;
}
- v = '$' + Number(v).toFixed(2);
+ v = Number(v).toFixed(2);
return v;
},
var datesError = '';
var cur = model.cid; // ID of current rate
- var start = current.start_days;
- var end = current.end_days;
+ var start = parseInt(current.start_days);
+ var end = parseInt(current.end_days);
if (start < end) {
datesError += 'Start days must be greater than end days. ';
$this->postProcAddedEventData = true;
$regEvent = $this->getEventForRegistration($eventRegID);
- //echo '<pre>$regEvent: ' . print_r( $regEvent, true ) . '</pre>';
+ // echo '<pre>$regEvent: ' . print_r( $regEvent, true ) . '</pre>';
// Create an $event array with the event data.
$event = array(
id INT NOT NULL AUTO_INCREMENT,
reg_event INT NULL, -- Pointer to reg_event table
reg_time INT NULL, -- ID of time record
+++ registrant INT NULL, -- ID of reg_request_registrant record --
expire_time DATETIME NULL, -- Time at which this hold expires
PRIMARY KEY (id),
INDEX (reg_event),
<td>
<span class="glm-nowrap">Base $<input class="rate-base-rate glm-form-text-input-veryshort" type="text" name="base_rate_<% if (id) { %><%- id %><% } else { %> new <% } %>" value="<% if (base_rate) { %><%- base_rate %><% } %>"></span>
<span class="glm-nowrap">Per-Registrant $<input class="rate-per-registrant glm-form-text-input-veryshort" type="text" name="per_registrant_<% if (id) { %><%- id %><% } else { %> new <% } %>" value="<% if (per_registrant) { %><%- per_registrant %><% } %>"></span>
- <span class="glm-nowrap">Registrant Credits <input class="rate-registrant-credits glm-form-text-input-veryshort" type="text" name="registrant_credits_<% if (id) { %><%- id %><% } else { %> new <% } %>" value="<% if (registrant_credits) { %><%- registrant_credits %><% } %>"></span>
+ <span class="glm-nowrap">Registrant Credits <input class="rate-registrant-credits glm-form-text-input-veryshort" type="text" name="registrant_credits_<% if (id) { %><%- id %><% } else { %> new <% } %>" value="<% if (registrant_credits) { %><%= registrant_credits %><% } %>"></span>
<br>
</td>
</tr>