|
@@ -8,6 +8,50 @@ Lib::loadClass('Request');
|
|
|
// index.php?_route=UrlAction_BiAuditRaport - uruchamia defaultAction
|
|
|
class RouteTool_Bocian extends RouteToolBase {
|
|
|
|
|
|
+ public static $FIELD_LIST_PRACOWNICY = [
|
|
|
+ 'ID',
|
|
|
+ 'imiona',
|
|
|
+ 'nazwisko',
|
|
|
+ 'nip',
|
|
|
+ 'pesel',
|
|
|
+ 'regon',
|
|
|
+ 'source',
|
|
|
+ 'jednostka_organizacyjna',
|
|
|
+ 'A_STATUS',
|
|
|
+ 'A_STATUS_INFO',
|
|
|
+ 'L_APPOITMENT_USER',
|
|
|
+ // 'Adresy' // 'default_db__x3A__BI_audit_ENERGA_PRACOWNICY_adresy:BI_audit_ENERGA_PRACOWNICY_adresy/*'
|
|
|
+ ];
|
|
|
+ public static $FIELD_LIST_KONTRAHENCI = [
|
|
|
+ 'ID',
|
|
|
+ 'Nazwa_grupy_kapitalowej',
|
|
|
+ 'Pelna_nazwa_kontrahenta',
|
|
|
+ 'Numer_kontrahenta',
|
|
|
+ 'Skrocona_Nazwa_Kontrahenta',
|
|
|
+ 'Typ_kontrahenta',
|
|
|
+ 'NIP',
|
|
|
+ 'KRS',
|
|
|
+ 'REGON',
|
|
|
+ 'PESEL',
|
|
|
+ 'Forma_prawna_dzialalnosci',
|
|
|
+ 'Ulica',
|
|
|
+ 'Numer_budynku',
|
|
|
+ 'Numer_mieszkania_lokalu',
|
|
|
+ 'Miejscowosc',
|
|
|
+ 'Kod_pocztowy',
|
|
|
+ 'Kraj',
|
|
|
+ 'Telefon',
|
|
|
+ 'Fax',
|
|
|
+ 'Mail',
|
|
|
+ 'A_ADM_COMPANY',
|
|
|
+ 'A_CLASSIFIED',
|
|
|
+ 'Dodano',
|
|
|
+ 'Podmiot_dominujacy',
|
|
|
+ 'Tytul_dokumentu',
|
|
|
+ 'ownCompany',
|
|
|
+ 'uwagi',
|
|
|
+ ];
|
|
|
+
|
|
|
public function defaultAction() {
|
|
|
UI::gora();
|
|
|
echo UI::h('script', ['src'=>"static/sweetalert2.min.js"]);
|
|
@@ -40,6 +84,17 @@ class RouteTool_Bocian extends RouteToolBase {
|
|
|
'URL_FORM_DATA_CSV_FILE_AJAX' => $this->getLink('formDataCsvFileAjax'),
|
|
|
'URL_SAVE_FORM_CSV_FILE_AJAX' => $this->getLink('saveFormCsvFileAjax'),
|
|
|
'URL_TABLE_POWIAZANIA' => Router::getRoute('ViewTableAjax', [ 'namespace' => "default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA" ]),
|
|
|
+ 'FIELD_LIST_PRACOWNICY' => array_merge(
|
|
|
+ array_map(function ($fieldName) {
|
|
|
+ return "f_{$fieldName}";
|
|
|
+ }, self::$FIELD_LIST_PRACOWNICY),
|
|
|
+ [
|
|
|
+ 'f_Adresy',
|
|
|
+ ]
|
|
|
+ ),
|
|
|
+ 'FIELD_LIST_KONTRAHENCI' => array_map(function ($fieldName) {
|
|
|
+ return "f_{$fieldName}";
|
|
|
+ }, self::$FIELD_LIST_KONTRAHENCI),
|
|
|
]);
|
|
|
|
|
|
echo '</div>'; // #smad-wrapper
|
|
@@ -635,6 +690,7 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
|
|
|
|
|
|
public function showTableKontrahenci($labels = []) {
|
|
|
+ // TODO: use self::$FIELD_LIST_KONTRAHENCI
|
|
|
$view = '<form class="form-horizontal" method="post">
|
|
|
<table class="table table-bordered table-hover table-striped" height=5>
|
|
|
<thead>
|
|
@@ -924,21 +980,9 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
|
|
|
$acl = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_PRACOWNICY/BI_audit_ENERGA_PRACOWNICY');
|
|
|
$query = $acl->buildQuery(array_merge([
|
|
|
- 'cols' => [
|
|
|
- 'ID',
|
|
|
- 'imiona',
|
|
|
- 'nazwisko',
|
|
|
- 'nip',
|
|
|
- 'pesel',
|
|
|
- 'regon',
|
|
|
- 'source',
|
|
|
- 'A_ADM_COMPANY',
|
|
|
- 'A_CLASSIFIED',
|
|
|
- 'A_STATUS',
|
|
|
- 'A_STATUS_INFO',
|
|
|
- 'L_APPOITMENT_USER',
|
|
|
+ 'cols' => array_merge(self::$FIELD_LIST_PRACOWNICY, [
|
|
|
'default_db__x3A__BI_audit_ENERGA_PRACOWNICY_adresy:BI_audit_ENERGA_PRACOWNICY_adresy/*'
|
|
|
- ],
|
|
|
+ ]),
|
|
|
//'f_ID' => $id,
|
|
|
'limit' => $limit,
|
|
|
'limitstart' => $limitstart, // offset
|
|
@@ -990,6 +1034,7 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
|
|
|
|
|
|
public function showTablePracownicy($labels = []) {
|
|
|
+ // TODO: use self::$FIELD_LIST_PRACOWNICY
|
|
|
$view = '<form class="form-horizontal" method="post">
|
|
|
<table class="table table-responsive table-bordered table-hover table-striped" height=5>
|
|
|
<thead>
|
|
@@ -1002,8 +1047,7 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
<td>' . V::get('pesel', 'Pesel', $labels) . '</td>
|
|
|
<td>' . V::get('regon', 'Regon', $labels) . '</td>
|
|
|
<td>' . V::get('source', 'source', $labels) . '</td>
|
|
|
- <td>' . V::get('A_ADM_COMPANY', 'A_ADM_COMPANY', $labels) . '</td>
|
|
|
- <td>' . V::get('A_CLASSIFIED', 'A_CLASSIFIED', $labels) . '</td>
|
|
|
+ <td>' . V::get('jednostka_organizacyjna', 'jednostka_organizacyjna', $labels) . '</td>
|
|
|
<td>' . V::get('A_STATUS', 'A_STATUS', $labels) . '</td>
|
|
|
<td>' . V::get('A_STATUS_INFO', 'A_STATUS_INFO', $labels) . '</td>
|
|
|
<td>' . V::get('L_APPOITMENT_USER', 'L_APPOITMENT_USER', $labels) . '</td>
|
|
@@ -1018,8 +1062,7 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
<td style="padding:0"><input style="padding:2px 8px; width:100%" onChange="return onChangeFiltersPracownicy(this)" type="text" name="f_pesel" value="" placeholder="%"></td>
|
|
|
<td style="padding:0"><input style="padding:2px 8px; width:100%" onChange="return onChangeFiltersPracownicy(this)" type="text" name="f_regon" value="" placeholder="%"></td>
|
|
|
<td style="padding:0"><input style="padding:2px 8px; width:100%" onChange="return onChangeFiltersPracownicy(this)" type="text" name="f_source" value="" placeholder="%"></td>
|
|
|
- <td style="padding:0"><input style="padding:2px 8px; width:100%" onChange="return onChangeFiltersPracownicy(this)" type="text" name="f_A_ADM_COMPANY" value="" placeholder="%"></td>
|
|
|
- <td style="padding:0"><input style="padding:2px 8px; width:100%" onChange="return onChangeFiltersPracownicy(this)" type="text" name="f_A_CLASSIFIED" value="" placeholder="%"></td>
|
|
|
+ <td style="padding:0"><input style="padding:2px 8px; width:100%" onChange="return onChangeFiltersPracownicy(this)" type="text" name="f_jednostka_organizacyjna" value="" placeholder="%"></td>
|
|
|
<td style="padding:0"><input style="padding:2px 8px; width:100%" onChange="return onChangeFiltersPracownicy(this)" type="text" name="f_A_STATUS" value="" placeholder="%"></td>
|
|
|
<td style="padding:0"><input style="padding:2px 8px; width:100%" onChange="return onChangeFiltersPracownicy(this)" type="text" name="f_A_STATUS_INFO" value="" placeholder="%"></td>
|
|
|
<td style="padding:0"><input style="padding:2px 8px; width:100%" onChange="return onChangeFiltersPracownicy(this)" type="text" name="f_L_APPOITMENT_USER" value="" placeholder="%"></td>
|