src/Model/Invoice.php
public function isPaid(int $iInvoiceId, bool $bIncludeProcessing = false): bool
    {
        $oInvoice = $this->getById($iInvoiceId);

        if (!empty($oInvoice)) {

            $iPaid = $oInvoice->totals->raw->paid;
            if ($bIncludeProcessing) {
                $iPaid += $oInvoice->totals->raw->processing;
            }

            return $iPaid >= $oInvoice->totals->raw->grand;
        }

        return false;
    }
public function isPaid(int $iInvoiceId, bool $bIncludeProcessing = false): bool
    {
        $oInvoice = $this->getById($iInvoiceId);

        if (!empty($oInvoice)) {

            $iPaid = $oInvoice->totals->raw->paid;
            if ($bIncludeProcessing) {
                $iPaid += $oInvoice->totals->raw->processing;
            }

            return $iPaid >= $oInvoice->totals->raw->grand;
        }

        return false;
    }
public function isPaid ( int $ iInvoiceId , bool $ bIncludeProcessing = false ) : bool { $ oInvoice = $ this -> getById ( $ iInvoiceId ) ; if ( ! empty ( $ oInvoice ) ) { $ iPaid = $ oInvoice -> totals -> raw -> paid ; if ( $ bIncludeProcessing ) { $ iPaid += $ oInvoice -> totals -> raw -> processing ; } return $ iPaid >= $ oInvoice -> totals -> raw -> grand ; } return false ; }
Whether an invoice has been fully paid or not

@param  int  $iInvoiceId         The Invoice to query
@param  bool $bIncludeProcessing Whether to include payments which are still processing

@return bool
@throws ModelException
Whether an invoice has been fully paid or not