= settingsSwitch('recurring', '1', ['id' => 'coRecurring', 'label' => 'Bill ' . $co_contract['contract_name'] . ' with a recurring invoice', 'data' => ['gs-reveal' => 'coRecurringFields'],
'help' => $co_contract['contract_status'] === 'Draft' ? 'It is paused until the contract is countersigned and active, and paused again once it ends.' : 'It runs while the contract is active, and is paused once it ends.']) ?>
= settingsInput('amount', '', ['id' => 'coAmount', 'icon' => 'fa-dollar-sign', 'label' => 'Amount each time', 'inputmode' => 'decimal', 'placeholder' => '1,500.00']) ?>
= settingsSelect('frequency', 'month', recurringInvoiceFrequencies(), ['id' => 'coFrequency', 'icon' => 'fa-sync-alt', 'label' => 'How often']) ?>
= settingsInput('first', contractRecurringFirstDate($co_contract), ['id' => 'coFirst', 'icon' => 'fa-calendar-day', 'type' => 'date', 'label' => 'First invoice', 'max' => '2999-12-31']) ?>
= settingsSelect('category', '0', [], ['id' => 'coCategory', 'icon' => 'fa-tag', 'label' => 'Category',
'options_html' => '' . categoryOptionsHtml('Income', settingsValue('category', '0'))]) ?>
= settingsInput('item_name', $co_contract['contract_name'], ['id' => 'coItemName', 'icon' => 'fa-cube', 'label' => 'Line', 'maxlength' => 200]) ?>
= settingsInput('description', contractTypeLabel($co_contract['contract_type']) . ' - {period}', ['id' => 'coItemDescription', 'icon' => 'fa-align-left', 'label' => 'Description', 'maxlength' => 1000,
'help' => '{month}, {quarter}, {year} and {period} become the dates each invoice covers.']) ?>
= settingsSelect('tax_id', (string) taxDefaultFor($client_id, 'goods'), [], ['id' => 'coItemTax', 'icon' => 'fa-percent', 'label' => 'Tax',
'options_html' => taxOptionsHtml(billingTaxes(), intval(settingsValue('tax_id', taxDefaultFor($client_id, 'goods'))))]) ?>
= settingsSwitch('auto_send', '1', ['id' => 'coAutoSend', 'label' => 'Email each invoice by itself']) ?>