You are here

function commerce_invoice_settings_form in Commerce Invoice 7.2

Same name and namespace in other branches
  1. 7 includes/commerce_invoice_ui.invoices.inc \commerce_invoice_settings_form()

Settings form for the Commerce Invoice module.

1 string reference to 'commerce_invoice_settings_form'
commerce_invoice_menu in ./commerce_invoice.module
Implements hook_menu().

File

./commerce_invoice.admin.inc, line 11
Administrative form and page callbacks for the Commerce Invoice module.

Code

function commerce_invoice_settings_form($form, &$form_state) {
  $form['commerce_invoice_default_number_pattern'] = [
    '#title' => t('Default invoice number pattern'),
    '#type' => 'select',
    '#options' => commerce_invoice_number_pattern_options_list(),
    '#default_value' => \Drupal\commerce_invoice\Entity\InvoiceNumberPattern::getDefaultName(),
    '#description' => t('The default pattern used to create invoice numbers (<a href="@url">administer patterns</a>).', [
      '@url' => url('admin/commerce/config/invoice/numbers'),
    ]),
  ];
  return system_settings_form($form);
}