Hello Matt,
In error log you attached show error regarding GetCounter function.
[05-Mar-2018 04:14:53 Australia/Sydney] PHP Fatal error: Call to a member function getCounter() on a non-object in /home/dsicapit/public_html/components/com_payplans/libraries/lib/order.php on line 714
Regarding the error, It looks few entries missing in database from order or subscription tables.
Have you deleted some entries manually from database ?
I see some deleted entry logs in payplans Logs section. see attached screen shot.
To resolve this issue , refer below mentioned solution.
Here is the solution for getCounter() function issue.
Go to
root/components/com_payplans/libraries/lib/order.php, near line no. 700, find below mentioned of code function
public function getRecurringInvoiceCount()
{
$status = array(PayplansStatus::INVOICE_PAID, PayplansStatus::INVOICE_REFUNDED);
// get counter of last master invoice
$last_master_invoice = $this->getLastMasterInvoice(PAYPLANS_INSTANCE_REQUIRE);
$counter = 0;
if($last_master_invoice){
$counter = $last_master_invoice->getCounter();
}
$totalInvoices = $this->getInvoices($status);
sort($totalInvoices);
$lastInvoice = array_pop($totalInvoices);
$lastCounter = $lastInvoice->getCounter();
return $lastCounter - ($counter - 1);
}
Replace with below mentioned code
public function getRecurringInvoiceCount()
{
$status = array(PayplansStatus::INVOICE_PAID, PayplansStatus::INVOICE_REFUNDED);
// get counter of last master invoice
$last_master_invoice = $this->getLastMasterInvoice(PAYPLANS_INSTANCE_REQUIRE);
$counter = 0;
if($last_master_invoice){
$counter = $last_master_invoice->getCounter();
}
$totalInvoices = $this->getInvoices($status);
sort($totalInvoices);
$lastInvoice = array_pop($totalInvoices);
if($lastInvoice && $lastInvoice instanceof PayplansInvoice)
{
$lastCounter = $lastInvoice->getCounter();
return $lastCounter - ($counter - 1);
}
return false;
}
Update me , if any entity you have deleted then why you have deleted ?