mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
remove -increment() methods
This commit is contained in:
parent
0c7cfef91f
commit
ea18f24c4e
@ -124,7 +124,7 @@ class Handler extends ExceptionHandler
|
||||
}
|
||||
});
|
||||
|
||||
if ($this->validException($exception)) {
|
||||
if ($this->validException($exception) && auth()->guard('contact')->user()->company->account->report_errors) {
|
||||
app('sentry')->captureException($exception);
|
||||
}
|
||||
}
|
||||
|
@ -28,21 +28,21 @@ class ClientService
|
||||
|
||||
public function updateBalance(float $amount)
|
||||
{
|
||||
$this->client->increment('balance', $amount);
|
||||
$this->client->balance += $amount;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function updatePaidToDate(float $amount)
|
||||
{
|
||||
$this->client->increment('paid_to_date', $amount);
|
||||
$this->client->paid_to_date += $amount;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function adjustCreditBalance(float $amount)
|
||||
{
|
||||
$this->client->increment('credit_balance', $amount);
|
||||
$this->client->credit_balance += $amount;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@ -167,25 +167,22 @@ class CreditService
|
||||
|
||||
public function adjustBalance($adjustment)
|
||||
{
|
||||
// $this->credit->balance += $adjustment;
|
||||
$this->credit->increment('balance', $adjustment);
|
||||
|
||||
$this->credit->balance += $adjustment;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function updatePaidToDate($adjustment)
|
||||
{
|
||||
// $this->credit->paid_to_date += $adjustment;
|
||||
$this->credit->increment('paid_to_date', $adjustment);
|
||||
|
||||
$this->credit->paid_to_date += $adjustment;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function updateBalance($adjustment)
|
||||
{
|
||||
// $this->credit->balance -= $adjustment;
|
||||
$this->credit->decrement('balance', $adjustment);
|
||||
|
||||
$this->credit->balance -= $adjustment;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -403,8 +403,8 @@ class InvoiceService
|
||||
/*Update the partial amount of a invoice*/
|
||||
public function updatePartial($amount)
|
||||
{
|
||||
// $this->invoice->partial += $amount;
|
||||
$this->invoice->increment('partial', $amount);
|
||||
$this->invoice->partial += $amount;
|
||||
// $this->invoice->increment('partial', $amount);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user