You are here

function merci_get_available_bucket_items in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6.2

Same name and namespace in other branches
  1. 6 merci.module \merci_get_available_bucket_items()
  2. 7.2 includes/api.inc \merci_get_available_bucket_items()

Pulls items available to assign to a bucket for a reservation.

Parameters

$node: The reservation node.

$bucket_type: The bucket type.

Return value

An array of available items, in select options format.

1 call to merci_get_available_bucket_items()
merci_build_reservation_table_form in ./merci.module
Builds the table of existing reserved items.

File

includes/api.inc, line 819
MERCI - Managed Equipment Reservation Checkout and Inventory

Code

function merci_get_available_bucket_items($node, $bucket_type) {
  $date_info = $node->field_merci_date[0];
  $start = $date_info['value'];
  $end = $date_info['value2'];
  $options = merci_get_reservable_items($bucket_type, $start, $end, $node->nid);
  return $options;
}