groupApprove statement transaction mapping api

This commit is contained in:
edmondlang
2023-04-20 17:50:36 +08:00
parent b372ee9e13
commit f8260258fc
@@ -58,11 +58,11 @@ class GroupApproveStatementTransactionLogic extends AbstractControllerLogic
));
foreach ($statementTrasactions as $statementTrasaction) {
$statementTrasactionOwner = $statementTrasaction->owners->first();
dd($statementTrasactionOwner);
$statementTrasactionOwner = $statementTrasaction->owners;
$this->updatesBankStatementTransactionOwnerStatus->execute($statementTrasactionOwner, ApprovalStatus::APPROVED);
if (count($statementTrasactionOwner)) {
$this->updatesBankStatementTransactionOwnerStatus->execute($statementTrasactionOwner->first(), ApprovalStatus::APPROVED);
}
}
return $this->collectionResponse(BankStatementTransactionResource::collection($statementTrasactions));