Created
February 10, 2023 13:53
-
-
Save cesarockstar1985/73f762df9cf594cea905537ef8db2a89 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
protected function setupAdmin() | |
{ | |
$this->_searchParameters = []; | |
parent::setupAdmin(); | |
$fields = [ | |
'underwriter' => [ | |
'url' => [ | |
'controller' => 'Underwriters', | |
'action' => 'view' | |
], | |
'url_field_param' => 'underwriter_id', | |
'url_options' => ['escape' => false], | |
], | |
'bonds' => [], | |
'bonds_written' => [], | |
'closing_ratio' => [ | |
'formatter' => 'Reports.closingRatio', | |
], | |
'quoted' => [ | |
'formatter' => 'Reports.currency', | |
], | |
'surety_gross' => [ | |
'formatter' => 'Reports.currency', | |
], | |
'surety_net' => [ | |
'formatter' => 'Reports.currency', | |
], | |
'claims_amount' => [ | |
'formatter' => 'Reports.currency', | |
], | |
'commission' => [ | |
'formatter' => 'Reports.currency', | |
], | |
'loss_ratio' => [ | |
'formatter' => 'Reports.lossRatio', | |
], | |
'wwis_net' => [ | |
'formatter' => 'Reports.wwisNet', | |
], | |
]; | |
$headers = [ | |
'underwriter' => __('Underwriter'), | |
'bonds' => __('Bonds'), | |
'bonds_written' => __('Bonds Written'), | |
'closing_ratio' => __('Closing Ratio'), | |
'quoted' => __('Quoted'), | |
'net' => __('Net'), | |
'surety_gross' => __('Surety Gross'), | |
'surety_net' => __('Surety Net'), | |
'claims_amount' => __('Claims'), | |
'commission' => __('Commission'), | |
'loss_ratio' => __('Loss Ratio'), | |
'wwis_net' => __('WWIS Net'), | |
]; | |
$this->Admin->setConfig('pageSubtitle', ['index' => __('Get Claim and Bond totals, grouped by Underwriters')]); | |
$this->Admin->setConfig('pageIcon', ['index' => 'building-o']); | |
$this->Admin->setConfig('headers', $headers); | |
$this->Admin->setConfig('fields', $fields); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment