Fix exception in AccountingInvoiceAdd

This commit is contained in:
Deon George 2023-05-14 21:39:54 +10:00
parent c1bb20dec0
commit 8f283f83f2

View File

@ -49,7 +49,7 @@ class AccountingInvoiceAdd extends Command
// Check the customer exists
if ($o->account->providers->where('pivot.provider_oauth_id',$so->id)->count() !== 1)
throw new \Exception('Account [%d] for Invoice [%d] not defined',$o->account_id,$o->id);
throw new \Exception(sprintf('Account [%d] for Invoice [%d] not defined',$o->account_id,$o->id));
$ao = $o->account->providers->where('pivot.provider_oauth_id',$so->id)->pop();