function invoice_delete in Invoice 6
Same name and namespace in other branches
- 7 invoice.module \invoice_delete()
Implemenation of hook_delete()
File
- ./
invoice.module, line 758 - Invoice module
Code
function invoice_delete(&$node) {
$invoice_number = db_result(db_query("SELECT iid FROM {invoice_invoices} WHERE nid=%d", $node->nid));
db_query("DELETE FROM {invoice_invoices} WHERE iid=%d", $invoice_number);
db_query("DELETE FROM {invoice_customers} WHERE invoice_id=%d", $invoice_number);
db_query("DELETE FROM {invoice_items} WHERE invoice_id=%d", $invoice_number);
unset($_SESSION['invoice_template']);
}