|
@@ -9,7 +9,6 @@ class Route_UrlAction_BiAuditRaport extends RouteBase {
|
|
|
|
|
|
|
|
public function defaultAction() {
|
|
public function defaultAction() {
|
|
|
UI::topSection();
|
|
UI::topSection();
|
|
|
- //UI::startContainer();
|
|
|
|
|
|
|
|
|
|
echo '<div class="container-bi_audit_raport"></div>';
|
|
echo '<div class="container-bi_audit_raport"></div>';
|
|
|
/*try {
|
|
/*try {
|
|
@@ -50,19 +49,19 @@ class Route_UrlAction_BiAuditRaport extends RouteBase {
|
|
|
'URL_FETCH_TEST_KRS' => $this->getLink('fetchTestKrsAjax'),
|
|
'URL_FETCH_TEST_KRS' => $this->getLink('fetchTestKrsAjax'),
|
|
|
'URL_FETCH_TEST_CEIDG' => $this->getLink('fetchTestCeidgAjax'),
|
|
'URL_FETCH_TEST_CEIDG' => $this->getLink('fetchTestCeidgAjax'),
|
|
|
'URL_FETCH_PRACOWNICY' => $this->getLink('fetchPracownicyAjax'),
|
|
'URL_FETCH_PRACOWNICY' => $this->getLink('fetchPracownicyAjax'),
|
|
|
|
|
+ 'URL_FETCH_KONTRAHENCI' => $this->getLink('fetchKontrahenciAjax'),
|
|
|
'DBG' => V::get('DBG', 0, $_GET),
|
|
'DBG' => V::get('DBG', 0, $_GET),
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- //UI::endContainer();
|
|
|
|
|
UI::footerSection();
|
|
UI::footerSection();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+/*
|
|
|
public function fetchEnergaRumKontrahenciPowiazaniaAjaxAction() {
|
|
public function fetchEnergaRumKontrahenciPowiazaniaAjaxAction() {
|
|
|
Response::sendTryCatchJson(array($this, 'fetchEnergaRumKontrahenciPowiazaniaAjax')); // , $args = 'JSON_FROM_REQUEST_BODY');
|
|
Response::sendTryCatchJson(array($this, 'fetchEnergaRumKontrahenciPowiazaniaAjax')); // , $args = 'JSON_FROM_REQUEST_BODY');
|
|
|
}
|
|
}
|
|
|
public function fetchEnergaRumKontrahenciPowiazaniaAjax($args) {
|
|
public function fetchEnergaRumKontrahenciPowiazaniaAjax($args) {
|
|
|
$id = V::get('ID', 1, $_REQUEST, 'int');
|
|
$id = V::get('ID', 1, $_REQUEST, 'int');
|
|
|
|
|
+
|
|
|
$items = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA')->buildQuery([
|
|
$items = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA')->buildQuery([
|
|
|
'cols' => [ // TODO:? propertyName = []
|
|
'cols' => [ // TODO:? propertyName = []
|
|
|
'ID',
|
|
'ID',
|
|
@@ -136,8 +135,7 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
|
|
|
|
|
return $view;
|
|
return $view;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -246,8 +244,87 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * KONTRAHENCI
|
|
|
|
|
+ */
|
|
|
|
|
+//TODO: NIE wiem czemu nie mogę pobrać infoamcji o kontrahentach
|
|
|
|
|
+public function fetchKontrahenciAjaxAction() {
|
|
|
|
|
+ Response::sendTryCatchJson(array($this, 'fetchKontrahenciAjax'));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+public function fetchKontrahenciAjax($args) {
|
|
|
|
|
+ //$id = V::get('ID', 1, $_REQUEST, 'int');
|
|
|
|
|
+ $items = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_RUM_KONTRAHENCI/BI_audit_ENERGA_RUM_KONTRAHENCI')->buildQuery([
|
|
|
|
|
+ 'cols' => [ // TODO:? propertyName = []
|
|
|
|
|
+ 'ID',
|
|
|
|
|
+ 'Nazwa_grupy_kapitalowej',
|
|
|
|
|
+ 'Pelna_nazwa_kontrahenta',
|
|
|
|
|
+ 'NIP',
|
|
|
|
|
+ 'KRS',
|
|
|
|
|
+ 'REGON',
|
|
|
|
|
+ 'Miejscowosc',
|
|
|
|
|
+ 'Kod_pocztowy',
|
|
|
|
|
+ 'Telefon'
|
|
|
|
|
+ ],
|
|
|
|
|
+ //'f_ID' => $id,
|
|
|
|
|
+ ])->getItems([
|
|
|
|
|
+ 'limit' => 10
|
|
|
|
|
+ ]);
|
|
|
|
|
+
|
|
|
|
|
+ return [
|
|
|
|
|
+ 'type' => 'success',
|
|
|
|
|
+ 'msg' => 'showKontrahenci',
|
|
|
|
|
+ '__req_args' => $_REQUEST,
|
|
|
|
|
+ '__args' => $args,
|
|
|
|
|
+ 'body' => [
|
|
|
|
|
+ 'items' => $items,
|
|
|
|
|
+ 'view' => $this->htmlViewFormBiAudit($items, 'KONTRAHENCI')
|
|
|
|
|
+ ]
|
|
|
|
|
+ ];
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
+public function showListKontrahenci($items) {
|
|
|
|
|
+ $view = '<form class="form-horizontal" method="post">
|
|
|
|
|
+ <table class="table table-bordered table-hover table-striped" height=5>
|
|
|
|
|
+ <thead>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td width=1><input type="checkbox" name="checkAll" id="checkAll" /></td>
|
|
|
|
|
+ <td width=1>ID</td>
|
|
|
|
|
+ <td>Nazwa grupy kapitalowej</td>
|
|
|
|
|
+ <td>Pelnanazwa kontrahenta</td>
|
|
|
|
|
+ <td>NIP</td>
|
|
|
|
|
+ <td>KRS</td>
|
|
|
|
|
+ <td>Regon</td>
|
|
|
|
|
+ <td>Miejscowosc</td>
|
|
|
|
|
+ <td>Kod_pocztowy</td>
|
|
|
|
|
+ <td>Telefon</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </thead>
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ ';
|
|
|
|
|
+
|
|
|
|
|
+ foreach ($items as $key => $row) {
|
|
|
|
|
+ $view .= '<tr>
|
|
|
|
|
+ <td><input type="checkbox" name="prID[]" value="'.$row['ID'].'" /></td>
|
|
|
|
|
+ <td align="right">'.$row["ID"].'</td>
|
|
|
|
|
+ <td align="right">'.$row["Nazwa_grupy_kapitalowej"].'</td>
|
|
|
|
|
+ <td align="right">'.$row["Pelna_nazwa_kontrahenta"].'</td>
|
|
|
|
|
+ <td align="right">'.$row["NIP"].'</td>
|
|
|
|
|
+ <td align="right">'.$row["KRS"].'</td>
|
|
|
|
|
+ <td align="right">'.$row["REGON"].'</td>
|
|
|
|
|
+ <td align="right">'.$row["Miejscowosc"].'</td>
|
|
|
|
|
+ <td align="right">'.$row["Kod_pocztowy"].'</td>
|
|
|
|
|
+ <td align="right">'.$row["Telefon"].'</td>
|
|
|
|
|
+ ';
|
|
|
|
|
+ }
|
|
|
|
|
+ $view .= '</tbody></table></form>';
|
|
|
|
|
|
|
|
|
|
+ return $view;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * Pracownicy
|
|
|
|
|
+ */
|
|
|
public function fetchPracownicyAjaxAction() {
|
|
public function fetchPracownicyAjaxAction() {
|
|
|
Response::sendTryCatchJson(array($this, 'fetchPracownicyAjax'));
|
|
Response::sendTryCatchJson(array($this, 'fetchPracownicyAjax'));
|
|
|
}
|
|
}
|
|
@@ -278,14 +355,14 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
'__args' => $args,
|
|
'__args' => $args,
|
|
|
'body' => [
|
|
'body' => [
|
|
|
'items' => $items,
|
|
'items' => $items,
|
|
|
- 'view' => $this->htmlViewEmployees($items)
|
|
|
|
|
|
|
+ 'view' => $this->htmlViewFormBiAudit($items, 'PRACOWNICY')
|
|
|
]
|
|
]
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- public function showPracownicy($items) {
|
|
|
|
|
- $view = '<form class="form-horizontal" method="post">
|
|
|
|
|
|
|
+ public function showListPracownicy($items) {
|
|
|
|
|
+ $view = '<form class="form-horizontal" method="post">
|
|
|
<table class="table table-bordered table-hover table-striped" height=5>
|
|
<table class="table table-bordered table-hover table-striped" height=5>
|
|
|
<thead>
|
|
<thead>
|
|
|
<tr>
|
|
<tr>
|
|
@@ -374,7 +451,21 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public function htmlViewEmployees($items) {
|
|
|
|
|
|
|
+ public function htmlViewFormBiAudit($items, $type) {
|
|
|
|
|
+
|
|
|
|
|
+$activeFormSteps = '';
|
|
|
|
|
+
|
|
|
|
|
+switch($type) {
|
|
|
|
|
+ case 'KONTRAHENCI':
|
|
|
|
|
+ $activeFormSteps = 'complete';
|
|
|
|
|
+ $titleHeader = 'KONTRAHENCI';
|
|
|
|
|
+ break;
|
|
|
|
|
+
|
|
|
|
|
+ case 'PRACOWNICY':
|
|
|
|
|
+ $titleHeader = 'PRACOWNICY';
|
|
|
|
|
+ break;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
|
|
|
$viewEployees = '
|
|
$viewEployees = '
|
|
|
<!-- start:employees-section-->
|
|
<!-- start:employees-section-->
|
|
@@ -385,7 +476,7 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
<div id="smad-menu-section">
|
|
<div id="smad-menu-section">
|
|
|
<div class="col-sm-12 col-md-6 padding-lr-0">
|
|
<div class="col-sm-12 col-md-6 padding-lr-0">
|
|
|
<div class="menu-items">
|
|
<div class="menu-items">
|
|
|
- <div class="smad-heder-title menu-item"><span class="smad-line-red">|</span> PRACOWNICY</div>
|
|
|
|
|
|
|
+ <div class="smad-heder-title menu-item"><span class="smad-line-red">|</span> ' . $titleHeader . ' </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-sm-12 col-md-6 padding-lr-0">
|
|
<div class="col-sm-12 col-md-6 padding-lr-0">
|
|
@@ -402,7 +493,7 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="col-xs-4 col-md-4 smad-wizard-step ">
|
|
|
|
|
|
|
+ <div class="col-xs-4 col-md-4 smad-wizard-step ' . $activeFormSteps . '">
|
|
|
<div class="text-center smad-wizard-stepnum"> </div>
|
|
<div class="text-center smad-wizard-stepnum"> </div>
|
|
|
<div class="progress"><div class="progress-bar"></div></div>
|
|
<div class="progress"><div class="progress-bar"></div></div>
|
|
|
<a href="#" class="smad-wizard-dot"></a>
|
|
<a href="#" class="smad-wizard-dot"></a>
|
|
@@ -502,7 +593,7 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
</div>
|
|
</div>
|
|
|
<div class="container-fluid">
|
|
<div class="container-fluid">
|
|
|
<div class="container padding-0">
|
|
<div class="container padding-0">
|
|
|
- ' . $this->showPracownicy($items) . '
|
|
|
|
|
|
|
+ ' . $this->showListDataByType($items, $type) . '
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- end:list employees -->
|
|
<!-- end:list employees -->
|
|
@@ -514,7 +605,7 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
<a href="#" title="PRZENIEŚ DO GRUPY" class="btn btn-grey-border">PRZENIEŚ DO GRUPY</a>
|
|
<a href="#" title="PRZENIEŚ DO GRUPY" class="btn btn-grey-border">PRZENIEŚ DO GRUPY</a>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-lg-6 text-right">
|
|
<div class="col-lg-6 text-right">
|
|
|
- <a href="#" title="DODAJ DO ANALIZY" class="btn btn-default">DODAJ DO ANALIZY</a>
|
|
|
|
|
|
|
+ <a href="index.php?_route=UrlAction_BiAuditRaport#KONTRAHENCI" title="DODAJ DO ANALIZY" class="btn btn-default">DODAJ DO ANALIZY</a>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -524,4 +615,16 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
';
|
|
';
|
|
|
return $viewEployees;
|
|
return $viewEployees;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public function showListDataByType($items, $type='PRACOWNICY') {
|
|
|
|
|
+
|
|
|
|
|
+ switch ($type) {
|
|
|
|
|
+ case 'PRACOWNICY':
|
|
|
|
|
+ return $this->showListPracownicy($items);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'KONTRAHENCI':
|
|
|
|
|
+ return $this->showListKontrahenci($items);
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|