clean up development

This commit is contained in:
omair saleh
2022-03-12 20:21:01 +08:00
parent 89069a8afe
commit be0aa22607
8 changed files with 34 additions and 192 deletions
@@ -71,14 +71,15 @@ class UpdateRefundTransactionStatusLogic extends AbstractControllerLogic
$transaction = $this->updatesTransactionStatus->execute($transaction, $request->input('status'));
$company = $this->fetchesCompany->execute(['id' => $transaction->booking->company_id]);
$booking = $transaction->owner->owner;
$reference = 'Refund for booking reference '.$transaction->booking->marking;
$reference = 'Credit Voucher for Overpaid for Ref. '.$booking->marking;
if ($transaction->status == ApprovalStatus::APPROVED) {
// add to credit wallet
$this->creditWalletProcessor->execute($company, $transaction->type, $transaction->amount, $reference);
}
$this->creditWalletProcessor->execute($booking->company, $transaction->type, $transaction->amount, $reference);
}
return $this->response([]);
}