1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Enable viewing draft invoices with link

This commit is contained in:
Hillel Coren 2017-01-08 22:01:18 +02:00
parent 206efd1fc0
commit 0911b0ab7d

View File

@ -315,7 +315,8 @@ class InvoiceRepository extends BaseRepository
return $invoice;
}
if (isset($data['is_public']) && filter_var($data['is_public'], FILTER_VALIDATE_BOOLEAN)) {
// set default to true for backwards compatability
if ( ! isset($data['is_public']) || filter_var($data['is_public'], FILTER_VALIDATE_BOOLEAN)) {
$invoice->is_public = true;
if ( ! $invoice->isSent()) {
$invoice->invoice_status_id = INVOICE_STATUS_SENT;