|
|
|
@ -3,10 +3,7 @@
|
|
|
|
|
namespace App\Http\Controllers\Customer;
|
|
|
|
|
|
|
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
|
use App\Models\Account;
|
|
|
|
|
use App\Models\Customer;
|
|
|
|
|
use App\Models\DepositHistory;
|
|
|
|
|
use App\Models\DepositLocation;
|
|
|
|
|
use App\Models\PaylaterHistory;
|
|
|
|
|
use App\Models\Setting;
|
|
|
|
|
use App\Services\GeneralService;
|
|
|
|
@ -35,7 +32,7 @@ class PaylaterController extends Controller
|
|
|
|
|
if (! in_array($deposit->is_valid, [DepositHistory::STATUS_VALID])) {
|
|
|
|
|
return redirect()->route('transactions.deposit.show', [
|
|
|
|
|
'deposit' => $deposit,
|
|
|
|
|
'back' => 'customer.paylater.index'
|
|
|
|
|
'back' => 'customer.paylater.index',
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -75,7 +72,7 @@ class PaylaterController extends Controller
|
|
|
|
|
$repayment = DepositHistory::query()
|
|
|
|
|
->where([
|
|
|
|
|
['customer_id', '=', $customer->id],
|
|
|
|
|
['type', '=', DepositHistory::TYPE_REPAYMENT]
|
|
|
|
|
['type', '=', DepositHistory::TYPE_REPAYMENT],
|
|
|
|
|
])->where(function ($query) {
|
|
|
|
|
$query->where('is_valid', '!=', DepositHistory::STATUS_VALID)
|
|
|
|
|
->where('is_valid', '!=', DepositHistory::STATUS_REJECT)
|
|
|
|
@ -130,7 +127,7 @@ class PaylaterController extends Controller
|
|
|
|
|
return redirect()->route('transactions.deposit.show', [
|
|
|
|
|
'deposit' => $deposit->id,
|
|
|
|
|
'direct' => 'true',
|
|
|
|
|
'back' => 'customer.paylater.index'
|
|
|
|
|
'back' => 'customer.paylater.index',
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|