Changeset 765


Ignore:
Timestamp:
Nov 6, 2015, 8:40:19 PM (9 years ago)
Author:
chronos
Message:
  • Added: Customer support activity table.
  • Added: Show operations for operation group.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/FormClasses.php

    r755 r765  
    377377    'Filter' => '1',
    378378  ),
    379   'TFinanceOperationListAccount' => array(
     379  'TFinanceOperationListGroup' => array(
     380    'Type' => 'ManyToOne',
     381    'Table' => 'FinanceOperation',
     382    'Id' => 'Id',
     383    'Ref' => 'Group',
     384    'Filter' => '1',
     385  ),
     386    'TFinanceOperationListAccount' => array(
    380387    'Type' => 'ManyToOne',
    381388    'Table' => 'FinanceOperation',
  • trunk/Application/Version.php

    r764 r765  
    11<?php
    22
    3 $Revision = 764; // Subversion revision
    4 $DatabaseRevision = 763; // SQL structure revision
    5 $ReleaseTime = strtotime('2015-11-05');
     3$Revision = 765; // Subversion revision
     4$DatabaseRevision = 765; // SQL structure revision
     5$ReleaseTime = strtotime('2015-11-06');
  • trunk/Common/Setup/Updates.php

    r763 r765  
    16041604}
    16051605
     1606function UpdateTo765($Manager)
     1607{
     1608  $Manager->Execute('CREATE TABLE IF NOT EXISTS `SupportActivity` (
     1609    `Id` int(11) NOT NULL AUTO_INCREMENT,
     1610    `Description` text NOT NULL,
     1611    `Customer` int(11) NOT NULL,
     1612    `User` int(11) NOT NULL,
     1613    `Time` datetime NOT NULL,
     1614    PRIMARY KEY (`Id`),
     1615    KEY `User` (`User`),
     1616    KEY `Customer` (`Customer`)
     1617   ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;');
     1618
     1619  $Manager->Execute('ALTER TABLE `SupportActivity`
     1620ADD CONSTRAINT `SupportActivity_ibfk_1` FOREIGN KEY (`Customer`) REFERENCES `Member` (`Id`),
     1621ADD CONSTRAINT `SupportActivity_ibfk_2` FOREIGN KEY (`User`) REFERENCES `User` (`Id`);');
     1622
     1623  // IS menu item
     1624  $Manager->Execute('INSERT INTO `Action` (`Id` ,`Name` ,`Title` ,`Type` ,`URL` ,
     1625`Group` ,`Icon` ,`PermissionOperation` ,`Enable`) VALUES (
     1626NULL , "", "Zákaznická podpora", "1", "/is/?t=SupportActivity&a=list", NULL , NULL , NULL , "1");');
     1627  $ActionId = $Manager->Database->insert_id;
     1628  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Zákazníci"');
     1629  if($DbResult->num_rows > 0)
     1630  {
     1631    $DbRow = $DbResult->fetch_assoc();
     1632    $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ".
     1633        "VALUES (NULL , 'Zákazická podpora', ".$DbRow['Id'].", '".$ActionId."', '1');");
     1634  }
     1635}
    16061636
    16071637class Updates
     
    16821712      759 => array('Revision' => 762, 'Function' => 'UpdateTo762'),
    16831713      762 => array('Revision' => 763, 'Function' => 'UpdateTo763'),
     1714      763 => array('Revision' => 765, 'Function' => 'UpdateTo765'),
    16841715    ));
    16851716  }
  • trunk/Modules/Customer/Customer.php

    r755 r765  
    3434        'UserRel' => array('Type' => 'TUserCustomerRelListCustomer', 'Caption' => 'Přiřazení uživatelé', 'Default' => ''),
    3535        'ServiceRel' => array('Type' => 'TServiceCustomerRelListCustomer', 'Caption' => 'Placené služby', 'Default' => ''),
     36        'SupportActivity' => array('Type' => 'TSupportActivityListCustomer', 'Caption' => 'Zákaznická podpora', 'Default' => ''),
    3637        'Consumption' => array('Type' => 'TCustomerStockSerialNumber', 'Caption' => 'Spotřeba zařízení', 'Default' => ''),
    3738      ),
     
    148149      'Filter' => '1',
    149150    ));
     151    $this->System->FormManager->RegisterClass('SupportActivity', array(
     152      'Title' => 'Zákaznická podpora',
     153      'Table' => 'SupportActivity',
     154      'DefaultSortColumn' => 'Time',
     155      'Items' => array(
     156        'Time' => array('Type' => 'DateTime', 'Caption' => 'Čas', 'Default' => ''),
     157        'Description' => array('Type' => 'Text', 'Caption' => 'Popis', 'Default' => ''),
     158        'Customer' => array('Type' => 'TMember', 'Caption' => 'Zákazník', 'Default' => ''),
     159        'User' => array('Type' => 'TUser', 'Caption' => 'Pracovník', 'Default' => ''),
     160      ),
     161    ));
     162    $this->System->FormManager->RegisterFormType('TSupportActivityListCustomer', array(
     163      'Type' => 'ManyToOne',
     164      'Table' => 'SupportActivity',
     165      'Id' => 'Id',
     166      'Ref' => 'Customer',
     167      'Filter' => '1',
     168    ));
    150169
    151170    $this->System->ModuleManager->Modules['IS']->RegisterDashboardItem('Customer',
  • trunk/Modules/Finance/Finance.php

    r761 r765  
    297297        'ValueSign' => array('Type' => 'TFinanceValueSign', 'Caption' => 'Znaménko hodnoty', 'Default' => '0'),
    298298        'Direction' => array('Type' => 'TFinanceDirection', 'Caption' => 'Směr', 'Default' => '0'),
     299        'Items' => array('Type' => 'TFinanceOperationListGroup', 'Caption' => 'Operace', 'Default' => ''),
    299300      ),
    300301    ));
  • trunk/Modules/FinanceBankAPI/FileImport.php

    r764 r765  
    7878    $DbResult = $this->Database->select('FinanceBank', '*', 'Id='.$BankAccount['Bank']);
    7979    $Bank = $DbResult->fetch_assoc();
    80     $Output .= 'Účet: '.$BankAccount['Number'].'/'.$Bank['Code'].' ('.$Bank['Name'].')';
     80    $Output .= 'Účet: '.$BankAccount['Number'].'/'.$Bank['Code'].' ('.$Bank['Name'].')'."\n";
    8181
    8282    if($Bank['Code'] == '2010') $Import = new ImportFio($this->System);
  • trunk/Modules/FinanceBankAPI/ImportFio.php

    r738 r765  
    3838        $Output .= '<td>'.$Record['UserIdent'].'</td>';
    3939        $Output .= '<td>'.$Record['Value'].'</td>';
    40         $Output .= '</tr>';
     40        $Output .= '</tr>'."\n";
    4141      }
    4242    }
Note: See TracChangeset for help on using the changeset viewer.