Ignore:
Timestamp:
Sep 22, 2021, 10:34:30 PM (3 years ago)
Author:
chronos
Message:
  • Added: Made IS dashboard numbers as links with filters.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Customer/Customer.php

    r912 r914  
    249249    $DbResult = $this->Database->select('Member', 'COUNT(*)', '1');
    250250    $DbRow = $DbResult->fetch_row();
    251     $Output = 'Zákazníků: registrovaných:'.$DbRow['0'];
    252 
    253     $DbResult = $this->Database->select('Member', 'COUNT(*)', '`Blocked`=0 AND `BillingPeriod`<>1');
     251    $Output = 'Zákazníků: registrovaných: <a href="'.$this->System->Link('/is/?a=list&amp;t=Member').'">'.$DbRow['0'].'</a>';
     252
     253    $DbResult = $this->Database->select('Member', 'COUNT(*)', '(`Blocked`=0) AND (`BillingPeriod`<>1)');
    254254    $DbRow = $DbResult->fetch_row();
    255     $Output .= ' platících:'.$DbRow['0'].'<br/>';
     255    $Output .= ' aktivních: <a href="'.$this->System->Link('/is/?a=list&t=Member&amp;filter=1&amp;FilterBlocked=0&amp;FilterBillingPeriod=Nikdy&amp;FilterOpBillingPeriod=notequal').'">'.$DbRow['0'].'</a>';
     256
     257    $DbResult = $this->Database->select('Member', 'COUNT(*)', '(`Blocked`=0) AND (`BillingPeriod`<>1) AND '.
     258      '((SELECT SUM(Service.Price) FROM ServiceCustomerRel LEFT JOIN Service ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id) <> 0)');
     259    $DbRow = $DbResult->fetch_row();
     260    $Output .= ' platících: <a href="'.$this->System->Link('/is/?a=list&t=Member&amp;filter=1&amp;FilterBlocked=0&amp;FilterBillingPeriod=Nikdy&amp;FilterOpBillingPeriod=notequal').'">'.$DbRow['0'].'</a><br/>';
    256261
    257262    return $Output;
Note: See TracChangeset for help on using the changeset viewer.