mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Refactor isInvoice to isStandard
This commit is contained in:
parent
8227726f50
commit
b5ed7d9896
@ -185,7 +185,7 @@ class InvoiceApiController extends BaseAPIController
|
||||
$invoice = $this->invoiceService->save($data);
|
||||
$payment = false;
|
||||
|
||||
if ($invoice->isInvoice()) {
|
||||
if ($invoice->isStandard()) {
|
||||
if ($isAutoBill) {
|
||||
$payment = $this->paymentService->autoBillInvoice($invoice);
|
||||
} elseif ($isPaid) {
|
||||
|
@ -430,7 +430,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isInvoice()
|
||||
public function isStandard()
|
||||
{
|
||||
return $this->isType(INVOICE_TYPE_STANDARD) && ! $this->is_recurring;
|
||||
}
|
||||
@ -611,7 +611,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
|
||||
public function canBePaid()
|
||||
{
|
||||
return floatval($this->balance) != 0 && ! $this->is_deleted && $this->isInvoice();
|
||||
return floatval($this->balance) != 0 && ! $this->is_deleted && $this->isStandard();
|
||||
}
|
||||
|
||||
public static function calcStatusLabel($status, $class, $entityType, $quoteInvoiceId)
|
||||
|
Loading…
x
Reference in New Issue
Block a user