You are here

function invoice_update_5 in Invoice 6

Implementation of hook_update_N()

Return value

array Array with query results

File

./invoice.install, line 226

Code

function invoice_update_5() {

  // If these settings are not set already, set the default values.
  $var1 = variable_get('invoice_display_column_vat', NULL);
  $var2 = variable_get('invoice_display_column_exunitcost', NULL);
  $var3 = variable_get('invoice_display_column_incunitcost', NULL);
  $var4 = variable_get('invoice_display_column_extotal', NULL);
  $var5 = variable_get('invoice_display_column_inctotal', NULL);
  if (is_null($var1) && is_null($var2) && is_null($var3) && is_null($var4) && is_null($var5)) {
    variable_set('invoice_display_column_vat', 0);
    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);
  }
  return array();
}