Created
March 8, 2023 13:52
-
-
Save cesarockstar1985/a4a901553a7cec2e3f9eb3d8f4f11439 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->all_sureties 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'); | |
$bestMatchingSurety->autoapprove = false; | |
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