mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Delete payment migration
This commit is contained in:
parent
7c3a6766c0
commit
a217b086b1
@ -120,7 +120,7 @@ class PaymentMigrationRepository extends BaseRepository
|
|||||||
$payment->invoices->each(function ($inv) use ($invoice_totals, $refund_totals, $payment) {
|
$payment->invoices->each(function ($inv) use ($invoice_totals, $refund_totals, $payment) {
|
||||||
|
|
||||||
|
|
||||||
if($payment->status_id != Payment::STATUS_CANCELLED)
|
if($payment->status_id != Payment::STATUS_CANCELLED || !$payment->is_deleted)
|
||||||
{
|
{
|
||||||
$inv->pivot->amount = $invoice_totals;
|
$inv->pivot->amount = $invoice_totals;
|
||||||
$inv->pivot->refunded = $refund_totals;
|
$inv->pivot->refunded = $refund_totals;
|
||||||
@ -133,8 +133,6 @@ class PaymentMigrationRepository extends BaseRepository
|
|||||||
$inv->balance = 0;
|
$inv->balance = 0;
|
||||||
|
|
||||||
// if($inv->balance > 0)
|
// if($inv->balance > 0)
|
||||||
//
|
|
||||||
|
|
||||||
// $inv->balance = max(0, $inv->balance);
|
// $inv->balance = max(0, $inv->balance);
|
||||||
|
|
||||||
$inv->save();
|
$inv->save();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user