|
@@ -317,224 +317,221 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
|
|
|
];
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- * KONTRAHENCI
|
|
|
- */
|
|
|
-public function fetchKontrahenciAjaxAction() {
|
|
|
- Response::sendTryCatchJson(array($this, 'fetchKontrahenciAjax'));
|
|
|
-}
|
|
|
+
|
|
|
+ * KONTRAHENCI
|
|
|
+ */
|
|
|
+ public function fetchKontrahenciAjaxAction() {
|
|
|
+ Response::sendTryCatchJson(array($this, 'fetchKontrahenciAjax'));
|
|
|
+ }
|
|
|
+ public function fetchKontrahenciAjax($args) {
|
|
|
+ $idGroup = V::get('filterIdGroup', 0, $_REQUEST, 'int');
|
|
|
+ if ($idGroup < 0) $idGroup = 0;
|
|
|
|
|
|
-public function fetchKontrahenciAjax($args) {
|
|
|
-
|
|
|
- $idGroup = V::get('filterIdGroup', 0, $_REQUEST, 'int');
|
|
|
- if ($idGroup < 0) $idGroup = 0;
|
|
|
-
|
|
|
- $limit = 5;
|
|
|
-
|
|
|
- $limitstart = V::get('limitstart', 0, $_REQUEST, 'int');
|
|
|
- if ($limitstart < 0) $limitstart = 0;
|
|
|
-
|
|
|
- $page = V::get('page', 0, $_REQUEST, 'int');
|
|
|
- $limitstart = ($page - 1) * $limit;
|
|
|
-
|
|
|
- $search = V::get('search', '', $_REQUEST);
|
|
|
- $searchParams = [];
|
|
|
- if (!empty($search)) {
|
|
|
- $ogcSearch = "*{$search}*";
|
|
|
- $searchParams['ogc:Filter'] = '
|
|
|
- <ogc:Filter>
|
|
|
- <ogc:Or>
|
|
|
- <ogc:PropertyIsLike wildCard="" singleChar="%23" escapeChar="!">
|
|
|
- <ogc:PropertyName>NIP</ogc:PropertyName>
|
|
|
- <ogc:Literal>' . $ogcSearch . '</ogc:Literal>
|
|
|
- </ogc:PropertyIsLike>
|
|
|
- <ogc:PropertyIsLike wildCard="*" singleChar="%23" escapeChar="!">
|
|
|
- <ogc:PropertyName>Nazwa_grupy_kapitalowej</ogc:PropertyName>
|
|
|
- <ogc:Literal>' . $ogcSearch . '</ogc:Literal>
|
|
|
- </ogc:PropertyIsLike>
|
|
|
- <ogc:PropertyIsLike wildCard="*" singleChar="%23" escapeChar="!">
|
|
|
- <ogc:PropertyName>Pelna_nazwa_kontrahenta</ogc:PropertyName>
|
|
|
- <ogc:Literal>' . $ogcSearch . '</ogc:Literal>
|
|
|
- </ogc:PropertyIsLike>
|
|
|
- </ogc:Or>
|
|
|
- </ogc:Filter>
|
|
|
- ';
|
|
|
- }
|
|
|
+ $limit = 5;
|
|
|
|
|
|
- $backRefFilter = [];
|
|
|
- if ($idGroup > 0) {
|
|
|
- $backRefFilter['__backRef'] = [
|
|
|
- 'namespace' => 'default_db/BI_audit_ENERGA_PRACOWNICY_group/BI_audit_ENERGA_KONTRAHENCIS_GRUPY',
|
|
|
- 'primaryKey' => $idGroup,
|
|
|
- 'fieldName' => 'default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_KONTRAHENCI',
|
|
|
- ];
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
+ $limitstart = V::get('limitstart', 0, $_REQUEST, 'int');
|
|
|
+ if ($limitstart < 0) $limitstart = 0;
|
|
|
+
|
|
|
+ $page = V::get('page', 0, $_REQUEST, 'int');
|
|
|
+ $limitstart = ($page - 1) * $limit;
|
|
|
+
|
|
|
+ $search = V::get('search', '', $_REQUEST);
|
|
|
+ $searchParams = [];
|
|
|
+ if (!empty($search)) {
|
|
|
+ $ogcSearch = "*{$search}*";
|
|
|
+ $searchParams['ogc:Filter'] = '
|
|
|
+ <ogc:Filter>
|
|
|
+ <ogc:Or>
|
|
|
+ <ogc:PropertyIsLike wildCard="" singleChar="%23" escapeChar="!">
|
|
|
+ <ogc:PropertyName>NIP</ogc:PropertyName>
|
|
|
+ <ogc:Literal>' . $ogcSearch . '</ogc:Literal>
|
|
|
+ </ogc:PropertyIsLike>
|
|
|
+ <ogc:PropertyIsLike wildCard="*" singleChar="%23" escapeChar="!">
|
|
|
+ <ogc:PropertyName>Nazwa_grupy_kapitalowej</ogc:PropertyName>
|
|
|
+ <ogc:Literal>' . $ogcSearch . '</ogc:Literal>
|
|
|
+ </ogc:PropertyIsLike>
|
|
|
+ <ogc:PropertyIsLike wildCard="*" singleChar="%23" escapeChar="!">
|
|
|
+ <ogc:PropertyName>Pelna_nazwa_kontrahenta</ogc:PropertyName>
|
|
|
+ <ogc:Literal>' . $ogcSearch . '</ogc:Literal>
|
|
|
+ </ogc:PropertyIsLike>
|
|
|
+ </ogc:Or>
|
|
|
+ </ogc:Filter>
|
|
|
+ ';
|
|
|
+ }
|
|
|
|
|
|
- $acl = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_RUM_KONTRAHENCI/BI_audit_ENERGA_RUM_KONTRAHENCI');
|
|
|
- $query = $acl->buildQuery(array_merge([
|
|
|
- 'cols' => [
|
|
|
- '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',
|
|
|
- 'A_STATUS',
|
|
|
- 'A_STATUS_INFO',
|
|
|
- 'Dodano',
|
|
|
- 'L_APPOITMENT_USER',
|
|
|
- 'Podmiot_dominujacy',
|
|
|
- 'Tytul_dokumentu',
|
|
|
- 'ownCompany',
|
|
|
- 'uwagi',
|
|
|
- ],
|
|
|
-
|
|
|
- 'limit' => $limit,
|
|
|
- 'limitstart' => $limitstart,
|
|
|
- ], $searchParams, $backRefFilter));
|
|
|
- $total = $query->getTotal();
|
|
|
- $items = $query->getItems();
|
|
|
-
|
|
|
- $pagination = array();
|
|
|
- $pagination['total_items'] = $total;
|
|
|
- $pagination['size'] = ceil($total/$limit);
|
|
|
- $pagination['current'] = $page;
|
|
|
- $pagination['limit'] = $limit;
|
|
|
-
|
|
|
- return [
|
|
|
- 'type' => 'success',
|
|
|
- 'msg' => 'showKontrajenci',
|
|
|
- '__req_args' => $_REQUEST,
|
|
|
- '__args' => $args,
|
|
|
- 'body' => [
|
|
|
- 'items' => $items,
|
|
|
-
|
|
|
- 'pagination' => $pagination
|
|
|
- ]
|
|
|
+ $backRefFilter = [];
|
|
|
+ if ($idGroup > 0) {
|
|
|
+ $backRefFilter['__backRef'] = [
|
|
|
+ 'namespace' => 'default_db/BI_audit_ENERGA_KONTRAHENCI_group/BI_audit_ENERGA_KONTRAHENCI_group',
|
|
|
+ 'primaryKey' => $idGroup,
|
|
|
+ 'fieldName' => 'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI:BI_audit_ENERGA_RUM_KONTRAHENCI',
|
|
|
];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-public function showTableKontrahenci($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-KONTRAHENCI" /></td>
|
|
|
- <td width=1>ID</td>
|
|
|
- <td>Nazwa grupy kapitalowej</td>
|
|
|
- <td>Pelna nazwa kontrahenta</td>
|
|
|
- <td>Numer kontrahenta</td>
|
|
|
- <td>Skrócona nazwa kontrahenta</td>
|
|
|
- <td>Typ_kontrahenta</td>
|
|
|
- <td>NIP</td>
|
|
|
- <td>KRS</td>
|
|
|
- <td>Regon</td>
|
|
|
- <td>PESEL</td>
|
|
|
- <td>Forma prawna działalności</td>
|
|
|
- <td>Ulica</td>
|
|
|
- <td>Numer budynku</td>
|
|
|
- <td>Numer mieszkania lokalu</td>
|
|
|
- <td>Miejscowosc</td>
|
|
|
- <td>Kod pocztowy</td>
|
|
|
- <td>Kraj</td>
|
|
|
- <td>Telefon</td>
|
|
|
- <td>Fax</td>
|
|
|
- <td>Mail</td>
|
|
|
- <td>A_ADM_COMPANY</td>
|
|
|
- <td>A_CLASSIFIED</td>
|
|
|
- <td>A_STATUS</td>
|
|
|
- <td>A_STATUS_INFO</td>
|
|
|
- <td>Dodano</td>
|
|
|
- <td>L_APPOITMENT_USER</td>
|
|
|
- <td>Podmiot dominujacy</td>
|
|
|
- <td>Tytul dokumentu</td>
|
|
|
- <td>ownCompany</td>
|
|
|
- <td>uwagi</td>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="body-kontrahenci">
|
|
|
- </tbody></table>
|
|
|
- </form>
|
|
|
- ';
|
|
|
|
|
|
- return $view;
|
|
|
-}
|
|
|
+ $acl = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_RUM_KONTRAHENCI/BI_audit_ENERGA_RUM_KONTRAHENCI');
|
|
|
+ $query = $acl->buildQuery(array_merge([
|
|
|
+ 'cols' => [
|
|
|
+ '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',
|
|
|
+ 'A_STATUS',
|
|
|
+ 'A_STATUS_INFO',
|
|
|
+ 'Dodano',
|
|
|
+ 'L_APPOITMENT_USER',
|
|
|
+ 'Podmiot_dominujacy',
|
|
|
+ 'Tytul_dokumentu',
|
|
|
+ 'ownCompany',
|
|
|
+ 'uwagi',
|
|
|
+ ],
|
|
|
+
|
|
|
+ 'limit' => $limit,
|
|
|
+ 'limitstart' => $limitstart,
|
|
|
+ ], $searchParams, $backRefFilter));
|
|
|
+ $total = $query->getTotal();
|
|
|
+ $items = $query->getItems();
|
|
|
|
|
|
-
|
|
|
-public function createKontrahenciGroupAjaxAction() {
|
|
|
- Response::sendTryCatchJson(array($this, 'createKontrahenciGroupAjax'), $args = 'JSON_FROM_REQUEST_BODY');
|
|
|
-}
|
|
|
+ $pagination = array();
|
|
|
+ $pagination['total_items'] = $total;
|
|
|
+ $pagination['size'] = ceil($total/$limit);
|
|
|
+ $pagination['current'] = $page;
|
|
|
+ $pagination['limit'] = $limit;
|
|
|
|
|
|
-public function createKontrahenciGroupAjax($args) {
|
|
|
- $nazwa = V::get('NAZWA', '', $args);
|
|
|
-
|
|
|
-
|
|
|
- $idGroup = DB::getPDO()->insert('BI_audit_ENERGA_KONTRAHENCI_GRUPY', [
|
|
|
- 'A_RECORD_CREATE_AUTHOR' => User::getLogin(),
|
|
|
- 'A_RECORD_CREATE_DATE' => 'NOW()',
|
|
|
- 'NAZWA' => $nazwa,
|
|
|
- ]);
|
|
|
-
|
|
|
- return [
|
|
|
- 'msg' => "Utworzona grupę {$idGroup}",
|
|
|
- 'type' => "success",
|
|
|
- 'body' => [
|
|
|
- 'id' => $idGroup,
|
|
|
- ]
|
|
|
- ];
|
|
|
-}
|
|
|
+ return [
|
|
|
+ 'type' => 'success',
|
|
|
+ 'msg' => 'showKontrajenci',
|
|
|
+ '__req_args' => $_REQUEST,
|
|
|
+ '__args' => $args,
|
|
|
+ 'body' => [
|
|
|
+ 'items' => $items,
|
|
|
+
|
|
|
+ 'pagination' => $pagination
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public function showTableKontrahenci($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-KONTRAHENCI" /></td>
|
|
|
+ <td width=1>ID</td>
|
|
|
+ <td>Nazwa grupy kapitalowej</td>
|
|
|
+ <td>Pelna nazwa kontrahenta</td>
|
|
|
+ <td>Numer kontrahenta</td>
|
|
|
+ <td>Skrócona nazwa kontrahenta</td>
|
|
|
+ <td>Typ_kontrahenta</td>
|
|
|
+ <td>NIP</td>
|
|
|
+ <td>KRS</td>
|
|
|
+ <td>Regon</td>
|
|
|
+ <td>PESEL</td>
|
|
|
+ <td>Forma prawna działalności</td>
|
|
|
+ <td>Ulica</td>
|
|
|
+ <td>Numer budynku</td>
|
|
|
+ <td>Numer mieszkania lokalu</td>
|
|
|
+ <td>Miejscowosc</td>
|
|
|
+ <td>Kod pocztowy</td>
|
|
|
+ <td>Kraj</td>
|
|
|
+ <td>Telefon</td>
|
|
|
+ <td>Fax</td>
|
|
|
+ <td>Mail</td>
|
|
|
+ <td>A_ADM_COMPANY</td>
|
|
|
+ <td>A_CLASSIFIED</td>
|
|
|
+ <td>A_STATUS</td>
|
|
|
+ <td>A_STATUS_INFO</td>
|
|
|
+ <td>Dodano</td>
|
|
|
+ <td>L_APPOITMENT_USER</td>
|
|
|
+ <td>Podmiot dominujacy</td>
|
|
|
+ <td>Tytul dokumentu</td>
|
|
|
+ <td>ownCompany</td>
|
|
|
+ <td>uwagi</td>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="body-kontrahenci">
|
|
|
+ </tbody></table>
|
|
|
+ </form>
|
|
|
+ ';
|
|
|
+
|
|
|
+ return $view;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public function createKontrahenciGroupAjaxAction() {
|
|
|
+ Response::sendTryCatchJson(array($this, 'createKontrahenciGroupAjax'), $args = 'JSON_FROM_REQUEST_BODY');
|
|
|
+ }
|
|
|
+
|
|
|
+ public function createKontrahenciGroupAjax($args) {
|
|
|
+ $nazwa = V::get('NAZWA', '', $args);
|
|
|
+
|
|
|
+
|
|
|
+ $idGroup = DB::getPDO()->insert('BI_audit_ENERGA_KONTRAHENCI_GRUPY', [
|
|
|
+ 'A_RECORD_CREATE_AUTHOR' => User::getLogin(),
|
|
|
+ 'A_RECORD_CREATE_DATE' => 'NOW()',
|
|
|
+ 'NAZWA' => $nazwa,
|
|
|
+ ]);
|
|
|
+
|
|
|
+ return [
|
|
|
+ 'msg' => "Utworzona grupę {$idGroup}",
|
|
|
+ 'type' => "success",
|
|
|
+ 'body' => [
|
|
|
+ 'id' => $idGroup,
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
@@ -551,7 +548,7 @@ public function createKontrahenciGroupAjax($args) {
|
|
|
if (!$idGroup) throw new Exception("Nie wybrano grupa");
|
|
|
if (!$kontrahenciIds || count($kontrahenciIds) == 0 ) throw new Exception("Proszę wybrać kontrahentów");
|
|
|
|
|
|
- $group = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_KONTRAHENCI_GRUPY/BI_audit_ENERGA_KONTRAHENCI_GRUPY')->buildQuery([
|
|
|
+ $group = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_KONTRAHENCI_group/BI_audit_ENERGA_KONTRAHENCI_group')->buildQuery([
|
|
|
'cols' => [
|
|
|
'ID',
|
|
|
'ID_USER',
|
|
@@ -563,8 +560,8 @@ public function createKontrahenciGroupAjax($args) {
|
|
|
if (User::getID() != $group['ID_USER']) throw new Exception("Brak uprawnień do grupy");
|
|
|
|
|
|
|
|
|
- $refGrupyToKontrahenci = ACL::getRefTable('default_db/BI_audit_ENERGA_KONTRAHENCI_GRUPY/BI_audit_ENERGA_KONTRAHENCI_GRUPY',
|
|
|
- 'default_db__x3A__BI_audit_ENERGA_KONTRAHENCI:BI_audit_ENERGA_KONTRAHENCI');
|
|
|
+ $refGrupyToKontrahenci = ACL::getRefTable('default_db/BI_audit_ENERGA_KONTRAHENCI_group/BI_audit_ENERGA_KONTRAHENCI_group',
|
|
|
+ 'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI:BI_audit_ENERGA_RUM_KONTRAHENCI');
|
|
|
foreach ($kontrahenciIds as $kontrahentIds) {
|
|
|
DB::getPDO()->insert($refGrupyToKontrahenci, ['PRIMARY_KEY' => $idGroup, 'REMOTE_PRIMARY_KEY' => $kontrahentIds]);
|
|
|
}
|
|
@@ -576,75 +573,49 @@ public function createKontrahenciGroupAjax($args) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-public function fetchGroupKontrahenciAjaxAction() {
|
|
|
- Response::sendTryCatchJson(array($this, 'fetchGroupKontrahenciAjax'));
|
|
|
-}
|
|
|
+ public function fetchGroupKontrahenciAjaxAction() {
|
|
|
+ Response::sendTryCatchJson(array($this, 'fetchGroupKontrahenciAjax'));
|
|
|
+ }
|
|
|
+ public function fetchGroupKontrahenciAjax() {
|
|
|
+ $query = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_KONTRAHENCI_group/BI_audit_ENERGA_KONTRAHENCI_group')->buildQuery([
|
|
|
+ 'cols' => [
|
|
|
+ 'ID',
|
|
|
+ 'ID_USER',
|
|
|
+ 'NAZWA',
|
|
|
+ ],
|
|
|
+ 'f_ID_USER' => "=" . User::getID(),
|
|
|
+ 'f_A_STATUS' => "!DELETED",
|
|
|
+ ]);
|
|
|
+ $itemsKontrahenci = $query->getItems();
|
|
|
+ if (empty($itemsKontrahenci)) throw new AlertWarningException("Grupy nie istnieją");
|
|
|
|
|
|
-public function fetchGroupKontrahenciAjax() {
|
|
|
-
|
|
|
-
|
|
|
- 'cols' => [
|
|
|
- 'ID',
|
|
|
- 'ID_USER',
|
|
|
- 'NAZWA',
|
|
|
- ],
|
|
|
- 'f_ID_USER' => User::getID()
|
|
|
- ])->getItem($idGroup);
|
|
|
- if (!$group) throw new Exception("Grupa nie istnieje");
|
|
|
- if (User::getID() != $group['ID_USER']) throw new Exception("Brak uprawnień do grupy");
|
|
|
-
|
|
|
- $itemsKontrahenci = $query->getItems();
|
|
|
-
|
|
|
- $arrayGroupKontrahenci = array();
|
|
|
- foreach ($itemsKontrahenci as $key => $value) {
|
|
|
- $arrayGroupKontrahenci[$value['ID']] = $value['NAZWA'];
|
|
|
+ $arrayGroupKontrahenci = array();
|
|
|
+ foreach ($itemsKontrahenci as $item) {
|
|
|
+
|
|
|
+ $arrayGroupKontrahenci[] = [
|
|
|
+ 'NAZWA' => $item['NAZWA'],
|
|
|
+ 'ID' => $item['ID'],
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
+ return [
|
|
|
+ 'type' => 'success',
|
|
|
+ 'msg' => 'fetchGroupKontrahenciAjax',
|
|
|
+ '__req_args' => $_REQUEST,
|
|
|
+ '__args' => $args,
|
|
|
+ 'body' => [
|
|
|
+ 'itemsGroupKontrahenci' => $arrayGroupKontrahenci
|
|
|
+ ]
|
|
|
+ ];
|
|
|
}
|
|
|
-*/
|
|
|
-
|
|
|
- $arrayGroupKontrahenci = array();
|
|
|
- $arrayGroupKontrahenci[0]["ID"] = 1;
|
|
|
- $arrayGroupKontrahenci[0]["NAZWA"] = "Grupa 1";
|
|
|
- $arrayGroupKontrahenci[1]["ID"] = 2;
|
|
|
- $arrayGroupKontrahenci[1]["NAZWA"] = "Grupa 2";
|
|
|
- $arrayGroupKontrahenci[2]["ID"] = 3;
|
|
|
- $arrayGroupKontrahenci[2]["NAZWA"] = "Grupa 3";
|
|
|
- $arrayGroupKontrahenci[3]["ID"] = 4;
|
|
|
- $arrayGroupKontrahenci[3]["NAZWA"] = "Grupa 4";
|
|
|
- $arrayGroupKontrahenci[4]["ID"] = 5;
|
|
|
- $arrayGroupKontrahenci[4]["NAZWA"] = "Grupa 5";
|
|
|
- $arrayGroupKontrahenci[5]["ID"] = 6;
|
|
|
- $arrayGroupKontrahenci[5]["NAZWA"] = "Grupa 6";
|
|
|
- $arrayGroupKontrahenci[6]["ID"] = 7;
|
|
|
- $arrayGroupKontrahenci[6]["NAZWA"] = "Grupa 7";
|
|
|
- $arrayGroupKontrahenci[7]["ID"] = 8;
|
|
|
- $arrayGroupKontrahenci[7]["NAZWA"] = "Grupa 8";
|
|
|
- $arrayGroupKontrahenci[8]["ID"] = 9;
|
|
|
- $arrayGroupKontrahenci[8]["NAZWA"] = "Grupa 9";
|
|
|
- $arrayGroupKontrahenci[9]["ID"] = 10;
|
|
|
- $arrayGroupKontrahenci[9]["NAZWA"] = "Grupa 10";
|
|
|
- $arrayGroupKontrahenci[9]["ID"] = 11;
|
|
|
- $arrayGroupKontrahenci[9]["NAZWA"] = "Grupa 11";
|
|
|
-
|
|
|
- return [
|
|
|
- 'type' => 'success',
|
|
|
- 'msg' => 'fetchKontrahenciToGroup',
|
|
|
- '__req_args' => $_REQUEST,
|
|
|
- '__args' => $args,
|
|
|
- 'body' => [
|
|
|
- 'itemsGroupKontrahenci' => $arrayGroupKontrahenci
|
|
|
- ]
|
|
|
- ];
|
|
|
-}
|
|
|
|
|
|
|
|
|
-
|
|
|
- * PRACOWNICY
|
|
|
- */
|
|
|
+
|
|
|
+ * PRACOWNICY
|
|
|
+ */
|
|
|
public function fetchPracownicyAjaxAction() {
|
|
|
-
|
|
|
Response::sendTryCatchJson(array($this, 'fetchPracownicyAjax'));
|
|
|
}
|
|
|
-
|
|
|
public function fetchPracownicyAjax($args) {
|
|
|
|
|
|
$idGroup = V::get('filterIdGroup', 0, $_REQUEST, 'int');
|