mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 22:13:59 +00:00
test appprove group mapping transaction api
This commit is contained in:
+6
-11
@@ -73,17 +73,12 @@ class ApproveDuplicateBankStatementDetailsStatusLogic extends AbstractController
|
||||
|
||||
$this->updatesBankStatementTransactionOwnerStatus->execute($bankSatementDetails, ApprovalStatus::APPROVED);
|
||||
|
||||
dump($bankSatementDetails);
|
||||
|
||||
dd($bankSatementDetails->transaction);
|
||||
|
||||
if ($bankSatementDetails->owner) {
|
||||
if ($bankSatementDetails->owner->type === StatementTransactionOwnerType::SALES) {
|
||||
if ($bankSatementDetails->owner->status === ApprovalStatus::PENDING_VERIFICATION) {
|
||||
$this->updatesTransactionStatus->execute($bankSatementDetails->owner, ApprovalStatus::APPROVED);
|
||||
}
|
||||
}
|
||||
}
|
||||
// todo-new: approve payments status, need to check the owner(if system is shipping, need to api with shipping portal)
|
||||
// if ($bankSatementDetails->transaction->type === StatementTransactionOwnerType::SALES) {
|
||||
// if ($bankSatementDetails->owner->status === ApprovalStatus::PENDING_VERIFICATION) {
|
||||
// $this->updatesTransactionStatus->execute($bankSatementDetails->owner, ApprovalStatus::APPROVED);
|
||||
// }
|
||||
// }
|
||||
|
||||
$rejectedBankSatementDetails = $this->listsBankStatementDetails->execute(['id_not' => $request->route('id'), 'owner_id' => $bankSatementDetails->owner_id]);
|
||||
|
||||
|
||||
+8
-7
@@ -67,13 +67,14 @@ class UpdateStatementTransactionStatusLogic extends AbstractControllerLogic
|
||||
|
||||
$this->updatesBankStatementTransactionOwnerStatus->execute($statementTrasactionOwner, $request->route('status') == 'approve' ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
|
||||
|
||||
if ($request->route('status') == 'approve') {
|
||||
if ($statementTrasactionOwner->owner->type === StatementTransactionOwnerType::SALES) {
|
||||
if ($statementTrasactionOwner->owner->status === ApprovalStatus::PENDING_VERIFICATION) {
|
||||
$this->updatesTransactionStatus->execute($statementTrasactionOwner->owner, ApprovalStatus::APPROVED);
|
||||
}
|
||||
}
|
||||
}
|
||||
// todo-new: approve payments status, need to check the owner(if system is shipping, need to api with shipping portal)
|
||||
// if ($request->route('status') == 'approve') {
|
||||
// if ($statementTrasactionOwner->transaction->type === StatementTransactionOwnerType::SALES) {
|
||||
// if ($statementTrasactionOwner->owner->status === ApprovalStatus::PENDING_VERIFICATION) {
|
||||
// $this->updatesTransactionStatus->execute($statementTrasactionOwner->owner, ApprovalStatus::APPROVED);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
return $this->resourceResponse(new BankStatementTransactionResource($statementTrasaction));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user