Jelajahi Sumber

updated kontrahenci group

Piotr Labudda 7 tahun lalu
induk
melakukan
37ca0722db
1 mengubah file dengan 246 tambahan dan 275 penghapusan
  1. 246 275
      tools/Bocian.php

+ 246 - 275
tools/Bocian.php

@@ -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'); // TODO: dla filtrów "Wysokiego ryzyka" - przekazywany ID rekodu
+		if ($idGroup < 0) $idGroup = 0;
 
-public function fetchKontrahenciAjax($args) {
-
-			$idGroup = V::get('filterIdGroup', 0, $_REQUEST, 'int'); // TODO: dla filtrów "Wysokiego ryzyka" - przekazywany ID rekodu
-			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}*"; // wildCard="*" -> mysql '%'
-				$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', // TODO: nowy rejetr na grupy / filty KONTRAHENCI
-					'primaryKey' => $idGroup,
-					'fieldName' => 'default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_KONTRAHENCI',
-				];
-				// TODO: Storage dodać obiekt xsd default_db/BI_audit_ENERGA_PRACOWNICY_group/BI_audit_ENERGA_KONTRAHENCI_GRUPY:
-				// - ID
-				// - ID_USER - id usera który stworzył grupę (tylko dla niego będzie widoczna)
-				// - NAZWA - nazwa grupy
-				// - 'default_db/BI_audit_ENERGA_PRACOWNICY/BI_audit_ENERGA_KONTRAHENCI' minOccurs="0" maxOccurs="unbounded"
-			}
+		$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}*"; // wildCard="*" -> mysql '%'
+			$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' => [ // TODO:? propertyName = []
-									'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',
-				],
-				//'f_ID' => $id,
-				'limit' => $limit,
-				'limitstart' => $limitstart, // offset
-			], $searchParams, $backRefFilter));
-			$total = $query->getTotal();
-			$items = $query->getItems();
-
-			$pagination = array();
-			$pagination['total_items'] = $total;
-			$pagination['size'] = ceil($total/$limit); // pages size
-			$pagination['current'] = $page;
-			$pagination['limit'] = $limit;
-
-			return [
-				'type' => 'success',
-				'msg' => 'showKontrajenci',
-				'__req_args' => $_REQUEST,
-				'__args' => $args,
-				'body' => [
-					'items' => $items,
-					//'view' => $this->htmlViewFormBiAudit($items, 'KONTRAHENCI'),
-					'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',
 			];
+			// - ID
+			// - ID_USER - id usera który stworzył grupę (tylko dla niego będzie widoczna)
+			// - NAZWA - nazwa grupy
+			// - 'default_db/BI_audit_ENERGA_RUM_KONTRAHENCI/BI_audit_ENERGA_KONTRAHENCI' minOccurs="0" maxOccurs="unbounded"
 		}
-//
-// public function fetchKontrahenciAjaxOld($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 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' => [ // TODO:? propertyName = []
+								'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',
+			],
+			//'f_ID' => $id,
+			'limit' => $limit,
+			'limitstart' => $limitstart, // offset
+		], $searchParams, $backRefFilter));
+		$total = $query->getTotal();
+		$items = $query->getItems();
 
-// tworzenie grupy kontrahentów
-public function createKontrahenciGroupAjaxAction() {
-	Response::sendTryCatchJson(array($this, 'createKontrahenciGroupAjax'), $args = 'JSON_FROM_REQUEST_BODY'); // użyj tej wersji jeśli chcesz wysyłać z przelgądarki JSON-a post-em
-}
+		$pagination = array();
+		$pagination['total_items'] = $total;
+		$pagination['size'] = ceil($total/$limit); // pages size
+		$pagination['current'] = $page;
+		$pagination['limit'] = $limit;
 
-public function createKontrahenciGroupAjax($args) {
-	$nazwa = V::get('NAZWA', '', $args);
-	// TODO: vlaidacja nazwy - sprawdzenie czy już nie występuje
-
-	$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,
+				//'view' => $this->htmlViewFormBiAudit($items, 'KONTRAHENCI'),
+				'pagination' => $pagination
+			]
+		];
+	}
+
+	// public function fetchKontrahenciAjaxOld($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 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;
+	}
+
+	// tworzenie grupy kontrahentów
+	public function createKontrahenciGroupAjaxAction() {
+		Response::sendTryCatchJson(array($this, 'createKontrahenciGroupAjax'), $args = 'JSON_FROM_REQUEST_BODY'); // użyj tej wersji jeśli chcesz wysyłać z przelgądarki JSON-a post-em
+	}
+
+	public function createKontrahenciGroupAjax($args) {
+		$nazwa = V::get('NAZWA', '', $args);
+		// TODO: vlaidacja nazwy - sprawdzenie czy już nie występuje
+
+		$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' => [ // TODO:? propertyName = []
 				'ID',
 				'ID_USER',
@@ -563,8 +560,8 @@ public function createKontrahenciGroupAjax($args) {
 		if (User::getID() != $group['ID_USER']) throw new Exception("Brak uprawnień do grupy");
 
 		// $refGrupyToPracownicy = ACL::getRefTable('obiekt główny', 'nazwa pola - powiązane rekordy');
-		$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' => [ // TODO:? propertyName = []
+				'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() {
-// TODO: odkomentować jak zostanie dodana tabela default_db/BI_audit_ENERGA_KONTRAHENCI_GRUPY/BI_audit_ENERGA_KONTRAHENCI_GRUPY
-	/*$group = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_KONTRAHENCI_GRUPY/BI_audit_ENERGA_KONTRAHENCI_GRUPY')->buildQuery([
-		'cols' => [ // TODO:? propertyName = []
-			'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) {
+			// if (User::getID() != $item['ID_USER']) throw new Exception("Brak uprawnień do grupy");
+			$arrayGroupKontrahenci[] = [
+				'NAZWA' => $item['NAZWA'],
+				'ID' => $item['ID'],
+			];
+		}
+
+		return [
+			'type' => 'success',
+			'msg' => 'fetchGroupKontrahenciAjax',
+			'__req_args' => $_REQUEST,
+			'__args' => $args,
+			'body' => [
+				'itemsGroupKontrahenci' => $arrayGroupKontrahenci
+			]
+		];
 	}
-*/
-	//TODO: USUNAĆ listę grup wpisane na sztywno
-	$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() {
-		// sleep(2);
 		Response::sendTryCatchJson(array($this, 'fetchPracownicyAjax'));
 	}
-
 	public function fetchPracownicyAjax($args) {
 
 		$idGroup = V::get('filterIdGroup', 0, $_REQUEST, 'int'); // TODO: dla filtrów "Wysokiego ryzyka" - przekazywany ID rekodu