Changeset 718
- Timestamp:
- Jan 1, 2015, 3:22:27 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r717 r718 1 1 <?php 2 2 3 $Revision = 71 7; // Subversion revision4 $DatabaseRevision = 71 5; // SQL structure revision3 $Revision = 718; // Subversion revision 4 $DatabaseRevision = 718; // SQL structure revision 5 5 $ReleaseTime = strtotime('2015-01-01'); -
trunk/Common/Setup/Updates.php
r715 r718 1001 1001 $Manager->Execute('ALTER TABLE `Member` DROP `NetworkSegment`'); 1002 1002 $Manager->Execute('DROP TABLE `NetworkSegment`'); 1003 $Manager->Execute('DELETE FROM `MenuItem` WHERE `Name`="Úseky sítě"'); 1004 $Manager->Execute('DELETE FROM `Action` WHERE `Title`="Úseky sítě"'); 1005 } 1006 1007 function UpdateTo718($Manager) 1008 { 1009 $Manager->Execute('CREATE TABLE IF NOT EXISTS `Company` ( 1010 `Id` int(11) NOT NULL, 1011 `Name` varchar(255) NOT NULL, 1012 `Subject` int(11) NOT NULL 1013 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); 1014 $Manager->Execute('ALTER TABLE `Company` 1015 ADD PRIMARY KEY (`Id`), ADD KEY `Subject` (`Subject`);'); 1016 $Manager->Execute('ALTER TABLE `Company` 1017 MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;'); 1018 $Manager->Execute('ALTER TABLE `Company` 1019 ADD CONSTRAINT `Company_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`);'); 1020 1021 // IS menu item 1022 $Manager->Execute('INSERT INTO `Action` (`Id` ,`Name` ,`Title` ,`Type` ,`URL` , 1023 `Group` ,`Icon` ,`PermissionOperation` ,`Enable`) VALUES ( 1024 NULL , "", "Firmy", "1", "/is/?t=Company&a=list", NULL , NULL , NULL , "1");'); 1025 $ActionId = $Manager->Database->insert_id; 1026 $DbResult = $Manager->Execute('SELECT `Id` FROM `MenuItem` WHERE `Name`="Finance"'); 1027 if($DbResult->num_rows > 0) 1028 { 1029 $DbRow = $DbResult->fetch_assoc(); 1030 $Manager->Execute("INSERT INTO `MenuItem` (`Id` ,`Name` ,`Parent` ,`Action` ,`Menu`) ". 1031 "VALUES (NULL , 'Firmy', ".$DbRow['Id'].", '".$ActionId."', '1');"); 1032 } 1003 1033 } 1004 1034 … … 1057 1087 697 => array('Revision' => 707, 'Function' => 'UpdateTo707'), 1058 1088 710 => array('Revision' => 715, 'Function' => 'UpdateTo715'), 1089 715 => array('Revision' => 718, 'Function' => 'UpdateTo718'), 1059 1090 )); 1060 1091 } -
trunk/Modules/Finance/Finance.php
r716 r718 320 320 'BeforeInsert' => array($this, 'BeforeInsertFinanceOperation'), 321 321 )); 322 $this->System->FormManager->RegisterClass('Company', array( 323 'Title' => 'Firma', 324 'Table' => 'Company', 325 'Items' => array( 326 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => '0'), 327 'Subject' => array('Type' => 'TSubject', 'Caption' => 'Subjekt', 'Default' => '0'), 328 ), 329 )); 322 330 $this->System->FormManager->RegisterClass('FinanceInvoiceItem', array( 323 331 'Title' => 'Položka faktury',
Note:
See TracChangeset
for help on using the changeset viewer.