Default invoice status - new invoice create

how to set the invoice default status to always viewed when creating a new invoice
If i creating new invoice default status is always draft


Is there any special reason to set a status to always viewed ? Actually as far as I know it’s not possible but just to understand why it’s important :slight_smile:

because users forget to set the status to a different one as draft, and draft invoice is not an accounting document
most do not use Draft, they just issue invoices.

Hm ok I get it but for me it sounds more like a way to teach your user on how to use correctly the software than changing this.
Maybe a feature to specify the default statut for an invoice … don’t know really what we can do about it

display the new invoice on the main page in the status viewd field
can he sort out here?

human stupidity knows no boundaries, you will show one hundred times and he will do wrong anyway :slight_smile:

public function statuses()
return array(
‘1’ => array(
‘label’ => trans(‘draft’),
‘class’ => ‘draft’,
‘href’ => ‘invoices/status/draft’
‘2’ => array(
‘label’ => trans(‘sent’),
‘class’ => ‘sent’,
‘href’ => ‘invoices/status/sent’
‘3’ => array(
‘label’ => trans(‘viewed’),
‘class’ => ‘viewed’,
‘href’ => ‘invoices/status/viewed’
‘4’ => array(
‘label’ => trans(‘paid’),
‘class’ => ‘paid’,
‘href’ => ‘invoices/status/paid’

maybe a list of statuses is created somewhere here ?
where is creates $key ? Maybe sort statuses in this key ?

                                           <?php foreach ($invoice_statuses as $key => $status) { ?>
                                        <option value="<?php echo $key; ?>"
                                                <?php if ($key == $invoice->invoice_status_id) { ?>selected="selected"<?php } ?>>
                                                    <?php echo $status['label']; ?>