mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for is_quote
This commit is contained in:
parent
59d0a1cb80
commit
a9302d4d01
@ -243,6 +243,10 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
return $this->invoice_type_id == $typeId;
|
||||
}
|
||||
|
||||
public function isQuote() {
|
||||
return $this->isType(INVOICE_TYPE_QUOTE);
|
||||
}
|
||||
|
||||
public function markInvitationsSent($notify = false)
|
||||
{
|
||||
foreach ($this->invitations as $invitation) {
|
||||
|
@ -731,8 +731,8 @@ class InvoiceRepository extends BaseRepository
|
||||
public function findOpenInvoices($clientId)
|
||||
{
|
||||
return Invoice::scope()
|
||||
->invoiceType(INVOICE_TYPE_STANDARD)
|
||||
->whereClientId($clientId)
|
||||
->whereIsQuote(false)
|
||||
->whereIsRecurring(false)
|
||||
->whereDeletedAt(null)
|
||||
->whereHasTasks(true)
|
||||
|
@ -70,7 +70,7 @@
|
||||
@include('partials.checkout_com_payment')
|
||||
@else
|
||||
<div class="pull-right" style="text-align:right">
|
||||
@if ($invoice->is_quote)
|
||||
@if ($invoice->isQuote())
|
||||
{!! Button::normal(trans('texts.download_pdf'))->withAttributes(['onclick' => 'onDownloadClick()'])->large() !!}
|
||||
@if ($showApprove)
|
||||
{!! Button::success(trans('texts.approve'))->asLinkTo(URL::to('/approve/' . $invitation->invitation_key))->large() !!}
|
||||
@ -135,7 +135,7 @@
|
||||
remove_created_by:{{ $invoice->client->account->hasFeature(FEATURE_REMOVE_CREATED_BY) ? 'true' : 'false' }},
|
||||
invoice_settings:{{ $invoice->client->account->hasFeature(FEATURE_INVOICE_SETTINGS) ? 'true' : 'false' }}
|
||||
};
|
||||
invoice.is_quote = {{ $invoice->is_quote ? 'true' : 'false' }};
|
||||
invoice.is_quote = {{ $invoice->isQuote() ? 'true' : 'false' }};
|
||||
invoice.contact = {!! $contact->toJson() !!};
|
||||
|
||||
function getPDFString(cb) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user