Ver Fonte

+ windyk raport info

Piotr Labudda há 6 anos atrás
pai
commit
e1e058e64b
1 ficheiros alterados com 18 adições e 1 exclusões
  1. 18 1
      SE/se-lib/Route/UrlAction/UserContact.php

+ 18 - 1
SE/se-lib/Route/UrlAction/UserContact.php

@@ -694,7 +694,24 @@ where
     and h.A_RECORD_UPDATE_AUTHOR not like '%update%'
     and h.ID_KORESP = 'N/S;' -- params like 'rowzwiazanie umowy%'
 
-select sum(ILE_ODZYSKANO) from USERS2_CONTACT where A_RECORD_UPDATE_DATE like '2019-10-%';
+===
+
+dzięki akcjom windykacyjnym w miesiącu 2020-01 odzyskano: {odzyskano}
+
+{total_wpis} wpisów ({nie_odbiera} nie odbiera) do {total_user} klientów.
+
+===
+
+```sql
+select x.* from (
+select
+	(select sum(ILE_ODZYSKANO) as odzyskano from USERS2_CONTACT where L_APPOITMENT_DATE like '2020-01-%' and A_STATUS != 'DELETED') as odzyskano,
+	(select count(*) as total_wpis from USERS2_CONTACT where L_APPOITMENT_DATE like '2020-01-%' and A_STATUS != 'DELETED') as total_wpis,
+	(select count(DISTINCT ID_BILLING_USERS) as total_user from USERS2_CONTACT where L_APPOITMENT_DATE like '2020-01-%' and A_STATUS != 'DELETED') as total_user,
+	(select count(*) as nie_odbiera from USERS2_CONTACT where L_APPOITMENT_DATE like '2020-01-%' and A_STATUS != 'DELETED' and L_APPOITMENT_TYPE = 'TEL_NIE_ODBIERA') as nie_odbiera
+) x
+```
+
 
 select count(DISTINCT ID_BILLING_USERS) from USERS2_CONTACT where A_RECORD_UPDATE_DATE like '2019-10-%';
 select count(DISTINCT ID_BILLING_USERS) from USERS2_CONTACT where L_APPOITMENT_DATE like '2019-12-%';