|
|
@@ -4,6 +4,7 @@ class Schema__biuro_pro_netmedia_pl__default_db__crm_lista_zasobow_orders extend
|
|
|
|
|
|
public function initTypes() {
|
|
|
parent::initTypes();
|
|
|
+
|
|
|
$this->_types['NETTO'] = 'p5:alias';
|
|
|
// $this->_params['NETTO'] = [
|
|
|
// 'type' => 'sql_table_alias',
|
|
|
@@ -37,6 +38,7 @@ class Schema__biuro_pro_netmedia_pl__default_db__crm_lista_zasobow_orders extend
|
|
|
",
|
|
|
'format' => '<span style="text-align:right">{0}</span>',
|
|
|
];
|
|
|
+
|
|
|
$this->_types['APPROVE_STATUS'] = 'p5:string';
|
|
|
$this->_params['APPROVE_STATUS'] = [
|
|
|
'formatByValue' => [
|
|
|
@@ -47,6 +49,23 @@ class Schema__biuro_pro_netmedia_pl__default_db__crm_lista_zasobow_orders extend
|
|
|
'ODRZUCONE' => '<div style="padding:0 6px; background:#d9534f; color:#fff; overflow:hidden">{0}</div>',// danger
|
|
|
]
|
|
|
];
|
|
|
+
|
|
|
+ $this->_types['KONTRAHENT_NAME'] = 'p5:alias';
|
|
|
+ $this->_params['KONTRAHENT_NAME'] = [
|
|
|
+ 'type' => 'sql_query_alias',
|
|
|
+ 'local_join_key' => 'ID',
|
|
|
+ 'join_query_format' => "
|
|
|
+ SELECT o.ID
|
|
|
+ , CONCAT(c.P_NAME, ' ', c.P_NAME_SECOND) as remote_value
|
|
|
+ FROM `CRM_LISTA_ZASOBOW_ORDERS` o
|
|
|
+ LEFT JOIN `COMPANIES` c on(c.ID = o.ID_COMPANIES)
|
|
|
+ WHERE o.ID in(
|
|
|
+ {sql_in_local_join_key}
|
|
|
+ )
|
|
|
+ GROUP BY o.`ID`
|
|
|
+ ",
|
|
|
+ 'format' => '{0}',
|
|
|
+ ];
|
|
|
}
|
|
|
|
|
|
}
|