mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:34:30 -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);
|
$invoice = $this->invoiceService->save($data);
|
||||||
$payment = false;
|
$payment = false;
|
||||||
|
|
||||||
if ($invoice->isInvoice()) {
|
if ($invoice->isStandard()) {
|
||||||
if ($isAutoBill) {
|
if ($isAutoBill) {
|
||||||
$payment = $this->paymentService->autoBillInvoice($invoice);
|
$payment = $this->paymentService->autoBillInvoice($invoice);
|
||||||
} elseif ($isPaid) {
|
} elseif ($isPaid) {
|
||||||
|
@ -430,7 +430,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isInvoice()
|
public function isStandard()
|
||||||
{
|
{
|
||||||
return $this->isType(INVOICE_TYPE_STANDARD) && ! $this->is_recurring;
|
return $this->isType(INVOICE_TYPE_STANDARD) && ! $this->is_recurring;
|
||||||
}
|
}
|
||||||
@ -611,7 +611,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
|
|
||||||
public function canBePaid()
|
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)
|
public static function calcStatusLabel($status, $class, $entityType, $quoteInvoiceId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user