invoice_form($invoice_id, $module)
ecommerce-5--4/invoice/invoice.module, line 192
Create an invoice form
$invoice_id Number, the invoice ID
$module
| Name | Description |
|---|---|
| Form generation | Functions to enable the processing and display of HTML forms. |
<?php
function invoice_form($invoice_id, $module) {
$invoice = invoice_get($invoice_id);
$form = invoice_invoke($module, $invoice, 'form');
$default_controls = array(
'module' => array(
'#type' => 'value',
'#value' => $module,
),
'invoice_id' => array(
'#type' => 'value',
'#value' => $invoice_id
),
'invoice' => array(
'#type' => 'value',
'#value' => $invoice
),
'submit' => array(
'next' => array(
'#type' => 'submit',
'#value' => isset($_REQUEST['destination']) && $_REQUEST['destination'] == 'checkout/review' ? t('Review Order') : (isset($_REQUEST['op']) ? t('Update') : t('Next')),
),
),
);
$form += $default_controls;
return $form;
}
?>