Ignore:
Timestamp:
Mar 6, 2024, 11:47:49 PM (10 months ago)
Author:
chronos
Message:
  • Added: Monthly finance report.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UpdateTrace.php

    r957 r967  
    619619  $Manager->Execute('ALTER TABLE `EmployeeSalary` ADD `Contract` INT NULL ,
    620620ADD INDEX ( `Contract` ) ;');
    621  $Manager->Execute('ALTER TABLE `EmployeeSalary` ADD FOREIGN KEY ( `Contract` ) REFERENCES `Contract` (
     621  $Manager->Execute('ALTER TABLE `EmployeeSalary` ADD FOREIGN KEY ( `Contract` ) REFERENCES `Contract` (
    622622`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;');
    623623  $Manager->Execute("INSERT INTO `Action` (
     
    22422242{
    22432243  $Manager->Execute('ALTER TABLE `Log` ADD `URL` VARCHAR(255) NOT NULL AFTER `IPAddress`;');
     2244}
     2245
     2246function UpdateTo967(UpdateManager $Manager): void
     2247{
     2248  $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Roční výkazy"');
     2249  if ($DbResult->num_rows > 0)
     2250  {
     2251    $DbRow = $DbResult->fetch_assoc();
     2252
     2253    $Manager->Execute("INSERT INTO `Action` (
     2254      `Id` ,`Name` ,`Title` ,`Type` ,`URL` ,`Group` ,`Icon` ,`PermissionOperation` ,
     2255      `Enable`) VALUES (NULL , '', 'Měsíční přehled', '1', '/is/?t=FinanceMonthReport&a=list', NULL , NULL , NULL , '1'
     2256      );");
     2257    $ActionId = $Manager->Database->insert_id;
     2258    $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ".
     2259      "VALUES (NULL , 'Měsíční přehled', '".$DbRow['Id']."', '".$ActionId."', '1');");   
     2260  }
    22442261}
    22452262
     
    23572374      948 => array('Revision' => 953, 'Function' => 'UpdateTo953'),
    23582375      953 => array('Revision' => 957, 'Function' => 'UpdateTo957'),
     2376      957 => array('Revision' => 967, 'Function' => 'UpdateTo967'),
    23592377    );
    23602378  }
Note: See TracChangeset for help on using the changeset viewer.