You are here

function invoice_install in Invoice 6

Same name and namespace in other branches
  1. 7 invoice.install \invoice_install()

Implementation of hook_install()

File

./invoice.install, line 17

Code

function invoice_install() {
  drupal_install_schema('invoice');
  variable_set('invoice_locale', 'en_US.utf8');
  variable_set('invoice_date_format', 'm/d/Y');
  variable_set('invoice_pay_limit', '14');

  // Pay limit in days
  variable_set('invoice_vat', '19');

  // VAT percentage
  variable_set('invoice_invoice_number_zerofill', 4);
  variable_set('invoice_invoice_number_prefix', '%Y');
  variable_set('invoice_default_template', 'default');
  variable_set('invoice_supplier_company_name', 'My company');
  variable_set('invoice_display_column_vat', 0);

  // By default the VAT column is not displayed, however if there is more than 1 different VAT the VAT column will still be shown. (is required by law)
  variable_set('invoice_display_column_exunitcost', 1);
  variable_set('invoice_display_column_incunitcost', 1);
  variable_set('invoice_display_column_extotal', 1);
  variable_set('invoice_display_column_inctotal', 1);
  _make_sure_node_promote_flag_is_off();
}