Refactor isInvoice to isStandard
This commit is contained in:
parent
8227726f50
commit
b5ed7d9896
2 changed files with 3 additions and 3 deletions
|
|
@ -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…
Add table
Reference in a new issue