Kaynağa Gözat

added total od and do in add by last report

Piotr Labudda 6 yıl önce
ebeveyn
işleme
e7ea3ac324
1 değiştirilmiş dosya ile 11 ekleme ve 1 silme
  1. 11 1
      tools/Bocian.php

+ 11 - 1
tools/Bocian.php

@@ -1365,11 +1365,21 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
 			$rootObjectNamespace = 'default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA',
 			$fieldTypeName = 'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI:BI_audit_ENERGA_RUM_KONTRAHENCI'
 		);
+		$refRaportToPzostaleOdConfig = ACL::getRefConfig(
+			$rootObjectNamespace = 'default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA',
+			$fieldTypeName = 'default_db__x3A__BI_audit_POWIAZANIA_OD:BI_audit_POWIAZANIA_OD'
+		);
+		$refRaportToPzostaleDoConfig = ACL::getRefConfig(
+			$rootObjectNamespace = 'default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA',
+			$fieldTypeName = 'default_db__x3A__BI_audit_POWIAZANIA_DO:BI_audit_POWIAZANIA_DO'
+		);
 		$items = DB::getPDO()->fetchAll("
 			select r.ID as id
 				, r.L_APPOITMENT_INFO as adnotacje
-				, (select count(1) from `{$refRaportToPracownicyConfig->tableName}`  as prRef  where prRef.PRIMARY_KEY = r.ID  and prRef.A_STATUS not in ('DELETED')) as totalPracownicy
+				, (select count(1) from `{$refRaportToPracownicyConfig->tableName}`  as prRef  where prRef.PRIMARY_KEY  = r.ID and prRef.A_STATUS  not in ('DELETED')) as totalPracownicy
 				, (select count(1) from `{$refRaportToKontrahenciConfig->tableName}` as comRef where comRef.PRIMARY_KEY = r.ID and comRef.A_STATUS not in ('DELETED')) as totalKontrahenci
+				, (select count(1) from `{$refRaportToPzostaleOdConfig->tableName}`  as odRef  where odRef.PRIMARY_KEY  = r.ID and odRef.A_STATUS  not in ('DELETED')) as totalPozostaleOd
+				, (select count(1) from `{$refRaportToPzostaleDoConfig->tableName}`  as doRef  where doRef.PRIMARY_KEY  = r.ID and doRef.A_STATUS  not in ('DELETED')) as totalPozostaleDo
 			from `BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA` as r
 			order by r.ID DESC
 			limit 10