Last active
February 28, 2023 12:32
-
-
Save cesarockstar1985/4d40964aad64a84c97e9d78ce0dca485 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach ($bestMatchingSureties->toArray() as $bestMatchingSurety) { | |
$this->Quotes->getConnection()->transactional(function () use ($bestMatchingSureties, $quote, $requestDataSurety, $bestMatchingSurety) { | |
$quote = $this->Quotes->selectSurety($requestDataSurety, $quote, $bestMatchingSureties); | |
$autoApprove = $this->Quotes->Bonds->getMatchingSuretiesById($quote->bond_id, false, 'AutoApprove'); | |
$dataAutoApprove = (int)Hash::get(array_values($autoApprove), '0.data.auto_approve'); | |
if ($dataAutoApprove) { | |
$bestMatchingSurety->autoapprove = true; | |
} | |
return false; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment