Definition

invoice_delete_confirm($invoice_id)
ecommerce-5--4/invoice/invoice.module, line 327

Description

invoice_delete_confirm()

Parameters

$invoice_id Number, the invoice ID

Related topics

Namesort iconDescription
Form generationFunctions to enable the processing and display of HTML forms.

Code

<?php
function invoice_delete_confirm($invoice_id) {
  if (!($invoice = invoice_get($invoice_id))) {
    drupal_not_found();
    exit();
  }
  $form['invoice_id'] = array('#type' => 'value', '#value' => $invoice_id);
  $form['invoice'] = array('#type' => 'value', '#value' => $invoice);

  return confirm_form($form, t('Delete pending invoice for %contact_name',
    array('%contact_name' => $invoice->address['billing']->firstname ?
    "{$invoice->address['billing']->firstname} {$invoice->address['billing']->lastname}" :
    $invoice->id)), $_GET['destination'] ? $_GET['destination'] : 'admin/store/invoice',
    t('This action is permanant'), t('Delete'));
}
?>