minor fixes

This commit is contained in:
David Bomba 2022-03-23 15:51:32 +11:00
parent afe6262904
commit bd24a10409
2 changed files with 7 additions and 8 deletions

View File

@ -390,7 +390,6 @@ class LoginController extends BaseController
$truth = app()->make(TruthSource::class);
$truth->setCompanyUser($cu->first());
$truth->setUser(auth()->user());
$truth->setCompany(auth()->user()->account->default_company);

View File

@ -84,6 +84,13 @@ class ApplyPaymentAmount extends AbstractService
->deletePdf()
->save();
$this->invoice
->client
->service()
->updateBalance($payment->amount * -1)
->updatePaidToDate($payment->amount)
->save();
if ($this->invoice->client->getSetting('client_manual_payment_notification'))
$payment->service()->sendEmail();
@ -92,13 +99,6 @@ class ApplyPaymentAmount extends AbstractService
$payment->ledger()
->updatePaymentBalance($payment->amount * -1);
$this->invoice
->client
->service()
->updateBalance($payment->amount * -1)
->updatePaidToDate($payment->amount)
->save();
$this->invoice->service()->workFlow()->save();
event('eloquent.created: App\Models\Payment', $payment);