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
<?php | |
/** | |
* @var \App\View\AppView $this | |
*/ | |
$this->extend('/Base/portletCollapsed'); | |
$this->assign('portlet_title', $sectionHeader ?? __('Related Bonds')); | |
$this->start("portlet_body"); | |
$columns = $this->Admin->getDatatableColumns($headers, false); | |
$niceAlias = 'Bonds'; | |
$tableId = 'table-' . \Cake\Utility\Text::slug(mb_strtolower($niceAlias)); |
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
function index(){ | |
$bondCategoryId = $this->request->getQuery('bond_category_id'); | |
$bondTypesByCategoryId = $this->BondTypes->find()->where(['bond_category_id' => $bondCategoryId] ); | |
return $bondTypesByCategoryId; | |
} |
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
public function generateAnyPdf($id = null) | |
{ | |
$this->set('quote', $this->Quotes->get($id)); | |
$this->set('templates', $this->Quotes->Sureties->Templates->find()->orderAsc('name')); | |
$this->set('sendTargets', $this->Quotes->getSendTargets($id)); | |
} |
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
$this->hasOne('InstantBondTypes') | |
->setStrategy('select'); |
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
$this->addFilter('InstantBondTypes.rate_calculation_type', [ | |
'className' => 'Custom', | |
'method' => fn(Query $query, $field, $value, $data, $options) => $query | |
->contain(['InstantBondTypes']) | |
->where($query->newExpr()->like($query->identifier('InstantBondTypes.rate_calculation_type'), $value . '%')), | |
]); |
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
->prependOption([ | |
'title' => __('Rules'), | |
'url' => ['prefix' => 'Admin', 'plugin' => false, 'controller' => 'AppRules', 'action' => 'index'], | |
'icon' => 'fa fa-address-card fa-fw', | |
'class' => 'nav-item', | |
]) |
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
<div class="view" style="overflow:scroll;"> | |
<div class="table-responsive" style="overflow-x: auto; max-width: 100%"> | |
<?php | |
echo $this->Form->create($followUp, [ | |
'id' => 'enableFollowUp', | |
'url' => [ | |
'plugin' => false, | |
'prefix' => 'Admin', | |
'controller' => 'Bonds', | |
'action' => 'enableFollowUp', |
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
$followUp = $this->Bonds->FollowUps->find()->where(['bond_id' => $bondId])->first(); | |
if ($elemId == 'enableFollowUp') { | |
if ($followUp) { | |
$followUp->enabled = !$followUp->enabled; | |
} else { | |
$followupData = [ | |
'last_run' => date('Y-m-d H:i:s'), | |
'email_daily_sent_count' => 0, | |
'email_monthly_sent_count' => 0, | |
'enabled' => 1, |
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
$this->hasMany('Todos', [ | |
'foreignKey' => 'foreign_key', | |
'className' => 'CakeDC/Todo.Todos', | |
'conditions' => [ | |
'model' => 'Bonds', | |
], | |
]); | |
$this->hasOne('FollowUps', [ | |
'foreignKey' => 'bond_id', | |
'joinType' => 'LEFT', |
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
$this->hasMany('FollowUpsTodo', [ | |
'foreignKey' => 'foreign_key', | |
'className' => 'CakeDC/Todo.Todos', | |
'conditions' => [ | |
'model' => 'FollowUps', | |
], | |
]); |