function invoice_uninstall in Invoice 7
Same name and namespace in other branches
- 6 invoice.install \invoice_uninstall()
Implementation of hook_uninstall()
File
- ./
invoice.install, line 42
Code
function invoice_uninstall() {
// Delete invoice specific settings
variable_del('invoice_locale');
variable_del('invoice_date_format');
variable_del('invoice_pay_limit');
variable_del('invoice_vat');
variable_del('invoice_invoice_number_zerofill');
variable_del('invoice_invoice_number_prefix');
variable_del('invoice_default_template');
variable_del('invoice_supplier_company_name');
// Delete display columns specific settings
variable_del('invoice_display_column_vat');
variable_del('invoice_display_column_exunitcost');
variable_del('invoice_display_column_incunitcost');
variable_del('invoice_display_column_extotal');
variable_del('invoice_display_column_inctotal');
// Delete supplier specific settings
variable_del('invoice_supplier_company_name');
variable_del('invoice_supplier_street');
variable_del('invoice_supplier_building_number');
variable_del('invoice_supplier_zipcode');
variable_del('invoice_supplier_city');
variable_del('invoice_supplier_state');
variable_del('invoice_supplier_country');
variable_del('invoice_supplier_phone');
variable_del('invoice_supplier_fax');
variable_del('invoice_supplier_email');
variable_del('invoice_supplier_web');
variable_del('invoice_supplier_coc_number');
variable_del('invoice_supplier_vat_number');
// Delete API specific settings
variable_del('invoice_api_allowed_ips');
variable_del('invoice_api_root_username');
// Delete invoice node settings
variable_del('comment_invoice');
variable_del('node_preview_invoice');
variable_del('node_options_invoice');
variable_del('pathauto_node_invoice_pattern');
// Delete all invoice nodes
db_delete('node')
->condition('type', 'invoice')
->execute();
// Delete all invoice tables
db_drop_table('invoice_customers');
db_drop_table('invoice_invoices');
db_drop_table('invoice_items');
db_drop_table('invoice_templates');
}