You are here

function pminvoice_getitems in Drupal PM (Project Management) 7

Helper function to return items for a particular invoice.

File

pminvoice/pminvoice.module, line 828
1: Hooks (help, perm, init, menu, theme, node_info) 2: Access functions 3: Load organization and project details 4: Invoice create / edit form 5: Invoice node manipulation functions 6: Admin settings 7: Views hook 8: Project Managementinvoiceitem…

Code

function pminvoice_getitems($invoice_vid) {
  $s = "SELECT sit.* FROM {pminvoice_items} AS sit WHERE sit.invoice_vid = %d ORDER BY sit.weight ASC";
  $r = db_query($s, $invoice_vid);
  $items = array();
  while ($i = db_fetch_object($r)) {
    $items[] = $i;
  }
  return $items;
}