1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Enable viewing draft invoices with link

This commit is contained in:
Hillel Coren 2017-01-08 22:00:37 +02:00
parent 854b13de19
commit 206efd1fc0

View File

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