Changeset 497
- Timestamp:
- Mar 3, 2013, 1:03:25 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Version.php
r496 r497 1 1 <?php 2 2 3 $Revision = 49 6; // Subversion revision4 $DatabaseRevision = 49 5;5 $ReleaseTime = '2013-03-0 1';3 $Revision = 497; // Subversion revision 4 $DatabaseRevision = 497; 5 $ReleaseTime = '2013-03-03'; 6 6 7 7 ?> -
trunk/Modules/IS/IS.php
r485 r497 219 219 $Output .= '<ul class="ActionMenu">'; 220 220 $Output .= '<li><a href="?a=add&t='.$Table.'"><img alt="Přidat" title="Přidat" src="'. 221 221 $this->System->Link('/images/add.png').'"/>Přidat</a></li>'; 222 222 $Output .= '<li><a href="?a=list&t='.$Table.'"><img alt="Seznam" title="Seznam" src="'. 223 $this->System->Link('/images/list.png').'"/>Seznam</a></li>'; 223 $this->System->Link('/images/list.png').'"/>Seznam</a></li>'; 224 if(array_key_exists('Actions', $FormClass)) 225 { 226 foreach($FormClass['Actions'] as $Action) 227 $Output .= '<li><a href="'.$this->System->Link($Action['URL']).'"><img alt="'.$Action['Caption'].'" title="'.$Action['Caption'].'" src="'. 228 $this->System->Link('/images/action.png').'"/>'.$Action['Caption'].'</a></li>'; 229 } 224 230 $Output .= '</ul>'; 225 231 return($Output); -
trunk/admin/FullInstall.php
r494 r497 3 3 function FullInstall($Manager) 4 4 { 5 $Manager->Execute("CREATE TABLE IF NOT EXISTS `ChatHistory` ( 5 $Manager->Execute(" 6 -- 7 -- Funkce 8 -- 9 CREATE DEFINER=`centrala`@`localhost` FUNCTION `CompareNetworkPrefix`(Address1 INT(11) UNSIGNED, Address2 INT(11) UNSIGNED, Size INT(11)) RETURNS tinyint(1) 10 RETURN Address1 & (-1 << (32 - Size)) = Address2 & (-1 << (32 - Size)); 11 12 -- 13 -- Struktura tabulky `ChatHistory` 14 -- 15 16 CREATE TABLE IF NOT EXISTS `ChatHistory` ( 6 17 `Id` int(11) NOT NULL AUTO_INCREMENT, 7 18 `Nick` varchar(64) COLLATE utf8_czech_ci NOT NULL, … … 100 111 `ValidTo` date DEFAULT NULL, 101 112 PRIMARY KEY (`Id`) 102 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;113 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 103 114 104 115 -- -------------------------------------------------------- … … 115 126 PRIMARY KEY (`Id`), 116 127 KEY `Employee` (`Employee`) 117 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;128 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 118 129 119 130 -- -------------------------------------------------------- … … 127 138 `Name` varchar(256) COLLATE utf8_czech_ci NOT NULL, 128 139 `Size` int(11) NOT NULL, 129 PRIMARY KEY (`Id`) 130 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; 140 `Directory` int(11) DEFAULT NULL, 141 PRIMARY KEY (`Id`), 142 KEY `Directory` (`Directory`) 143 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6298 ; 144 145 -- 146 -- RELACE PRO TABULKU `File`: 147 -- `Directory` 148 -- `FileDirectory` -> `Id` 149 -- 150 151 -- -------------------------------------------------------- 152 153 -- 154 -- Struktura tabulky `FileDirectory` 155 -- 156 157 CREATE TABLE IF NOT EXISTS `FileDirectory` ( 158 `Id` int(11) NOT NULL AUTO_INCREMENT, 159 `Name` varchar(255) NOT NULL, 160 `Parent` int(11) DEFAULT NULL, 161 PRIMARY KEY (`Id`), 162 KEY `Parent` (`Parent`) 163 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 164 165 -- 166 -- RELACE PRO TABULKU `FileDirectory`: 167 -- `Parent` 168 -- `FileDirectory` -> `Id` 169 -- 131 170 132 171 -- -------------------------------------------------------- … … 184 223 185 224 -- 186 -- Struktura tabulky `FinanceBills` 187 -- 188 189 CREATE TABLE IF NOT EXISTS `FinanceBills` ( 225 -- Struktura tabulky `FinanceBillsItemsOld` 226 -- 227 228 CREATE TABLE IF NOT EXISTS `FinanceBillsItemsOld` ( 229 `Id` int(11) NOT NULL AUTO_INCREMENT, 230 `Bill` int(11) NOT NULL DEFAULT '0', 231 `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL, 232 `Price` float NOT NULL DEFAULT '0', 233 `Quantity` float NOT NULL DEFAULT '1', 234 PRIMARY KEY (`Id`), 235 KEY `Bill` (`Bill`) 236 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=17839 ; 237 238 -- 239 -- RELACE PRO TABULKU `FinanceBillsItemsOld`: 240 -- `Bill` 241 -- `FinanceBillsOld` -> `Id` 242 -- 243 244 -- -------------------------------------------------------- 245 246 -- 247 -- Struktura tabulky `FinanceBillsOld` 248 -- 249 250 CREATE TABLE IF NOT EXISTS `FinanceBillsOld` ( 190 251 `Id` int(11) NOT NULL AUTO_INCREMENT, 191 252 `TimeFrom` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', … … 204 265 205 266 -- 206 -- RELACE PRO TABULKU `FinanceBills `:267 -- RELACE PRO TABULKU `FinanceBillsOld`: 207 268 -- `Subject` 208 269 -- `Subject` -> `Id` 209 --210 211 -- --------------------------------------------------------212 213 --214 -- Struktura tabulky `FinanceBillsItems`215 --216 217 CREATE TABLE IF NOT EXISTS `FinanceBillsItems` (218 `Id` int(11) NOT NULL AUTO_INCREMENT,219 `Bill` int(11) NOT NULL DEFAULT '0',220 `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL,221 `Price` float NOT NULL DEFAULT '0',222 `Quantity` float NOT NULL DEFAULT '1',223 PRIMARY KEY (`Id`),224 KEY `Bill` (`Bill`)225 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=17839 ;226 227 --228 -- RELACE PRO TABULKU `FinanceBillsItems`:229 -- `Bill`230 -- `FinanceBills` -> `Id`231 270 -- 232 271 … … 252 291 253 292 -- 254 -- Struktura tabulky `FinanceClaimLiabilityItem` 255 -- 256 257 CREATE TABLE IF NOT EXISTS `FinanceClaimLiabilityItem` ( 258 `Id` int(11) NOT NULL AUTO_INCREMENT, 259 `FinanceClaimLiability` int(11) NOT NULL DEFAULT '0', 293 -- Struktura tabulky `FinanceGroup` 294 -- 295 296 CREATE TABLE IF NOT EXISTS `FinanceGroup` ( 297 `Id` int(11) NOT NULL AUTO_INCREMENT, 298 `Description` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 299 PRIMARY KEY (`Id`) 300 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; 301 302 -- -------------------------------------------------------- 303 304 -- 305 -- Struktura tabulky `FinanceInvoice` 306 -- 307 308 CREATE TABLE IF NOT EXISTS `FinanceInvoice` ( 309 `Id` int(11) NOT NULL AUTO_INCREMENT, 310 `BillCode` varchar(16) COLLATE utf8_czech_ci NOT NULL, 311 `Subject` int(11) NOT NULL DEFAULT '0', 312 `TimeCreation` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 313 `TimeDue` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 314 `TimePayment` datetime DEFAULT NULL, 315 `Value` float NOT NULL DEFAULT '0', 316 `File` int(11) DEFAULT NULL, 317 `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 318 `PeriodTo` date DEFAULT NULL, 319 `PeriodFrom` date DEFAULT NULL, 320 PRIMARY KEY (`Id`), 321 KEY `Subject` (`Subject`), 322 KEY `Bill` (`File`) 323 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8773 ; 324 325 -- 326 -- RELACE PRO TABULKU `FinanceInvoice`: 327 -- `File` 328 -- `File` -> `Id` 329 -- `Subject` 330 -- `Subject` -> `Id` 331 -- 332 333 -- -------------------------------------------------------- 334 335 -- 336 -- Struktura tabulky `FinanceInvoiceItem` 337 -- 338 339 CREATE TABLE IF NOT EXISTS `FinanceInvoiceItem` ( 340 `Id` int(11) NOT NULL AUTO_INCREMENT, 341 `FinanceInvoice` int(11) NOT NULL DEFAULT '0', 260 342 `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL, 261 343 `Price` float NOT NULL DEFAULT '0', … … 263 345 `Quantity` float NOT NULL DEFAULT '1', 264 346 PRIMARY KEY (`Id`), 265 KEY `FinanceClaimLiability` (`FinanceClaimLiability`) 266 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; 267 268 -- 269 -- RELACE PRO TABULKU `FinanceClaimLiabilityItem`: 270 -- `FinanceClaimLiability` 271 -- `FinanceClaimsLiabilities` -> `Id` 272 -- 273 274 -- -------------------------------------------------------- 275 276 -- 277 -- Struktura tabulky `FinanceClaimsLiabilities` 278 -- 279 280 CREATE TABLE IF NOT EXISTS `FinanceClaimsLiabilities` ( 281 `Id` int(11) NOT NULL AUTO_INCREMENT, 282 `BillCode` varchar(16) COLLATE utf8_czech_ci NOT NULL, 283 `Subject` int(11) NOT NULL DEFAULT '0', 284 `TimeCreation` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 285 `TimeDue` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 286 `TimePayment` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 287 `Value` float NOT NULL DEFAULT '0', 288 `Bill` int(11) DEFAULT '0', 289 `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 290 `PeriodTo` date DEFAULT NULL, 291 `PeriodFrom` date DEFAULT NULL, 292 PRIMARY KEY (`Id`), 293 KEY `Subject` (`Subject`), 294 KEY `Bill` (`Bill`) 295 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8770 ; 296 297 -- 298 -- RELACE PRO TABULKU `FinanceClaimsLiabilities`: 299 -- `Subject` 300 -- `Subject` -> `Id` 301 -- 302 303 -- -------------------------------------------------------- 304 305 -- 306 -- Struktura tabulky `FinanceGroup` 307 -- 308 309 CREATE TABLE IF NOT EXISTS `FinanceGroup` ( 310 `Id` int(11) NOT NULL AUTO_INCREMENT, 311 `Description` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 312 PRIMARY KEY (`Id`) 313 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; 347 KEY `FinanceClaimLiability` (`FinanceInvoice`) 348 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8192 ; 349 350 -- 351 -- RELACE PRO TABULKU `FinanceInvoiceItem`: 352 -- `FinanceInvoice` 353 -- `FinanceInvoice` -> `Id` 354 -- 314 355 315 356 -- -------------------------------------------------------- … … 362 403 `BillCode` varchar(32) COLLATE utf8_czech_ci DEFAULT NULL, 363 404 `Taxable` tinyint(1) NOT NULL DEFAULT '1', 364 ` Bill` int(11) DEFAULT NULL,405 `File` int(11) DEFAULT NULL, 365 406 `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT 'Vklad', 366 407 `Network` int(11) NOT NULL DEFAULT '1', … … 371 412 UNIQUE KEY `BillCode_2` (`BillCode`), 372 413 KEY `Subject` (`Subject`), 373 KEY `Bill` (` Bill`),414 KEY `Bill` (`File`), 374 415 KEY `BankAccount` (`BankAccount`), 375 416 KEY `Treasury` (`Treasury`) 376 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=654 3;417 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6546 ; 377 418 378 419 -- 379 420 -- RELACE PRO TABULKU `FinanceOperation`: 421 -- `File` 422 -- `File` -> `Id` 380 423 -- `Subject` 381 424 -- `Subject` -> `Id` 382 -- `Bill`383 -- `FinanceBills` -> `Id`384 425 -- `BankAccount` 385 426 -- `FinanceBankAccount` -> `Id` 386 427 -- `Treasury` 387 428 -- `FinanceTreasury` -> `Id` 388 --389 390 -- --------------------------------------------------------391 392 --393 -- Struktura tabulky `FinanceOperationItem`394 --395 396 CREATE TABLE IF NOT EXISTS `FinanceOperationItem` (397 `Id` int(11) NOT NULL AUTO_INCREMENT,398 `FinanceOperation` int(11) NOT NULL DEFAULT '0',399 `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL,400 `Price` float NOT NULL DEFAULT '0',401 `VAT` float NOT NULL DEFAULT '0',402 `Quantity` float NOT NULL DEFAULT '1',403 PRIMARY KEY (`Id`),404 KEY `FinanceOperation` (`FinanceOperation`)405 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;406 407 --408 -- RELACE PRO TABULKU `FinanceOperationItem`:409 -- `FinanceOperation`410 -- `FinanceOperation` -> `Id`411 429 -- 412 430 … … 525 543 PRIMARY KEY (`Id`), 526 544 KEY `Parent` (`Parent`) 527 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 38;545 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=40 ; 528 546 529 547 -- … … 561 579 KEY `Time` (`Time`), 562 580 KEY `User` (`User`) 563 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 41115;581 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=38283 ; 564 582 565 583 -- … … 581 599 `Longitude` double NOT NULL, 582 600 PRIMARY KEY (`Id`) 583 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT= 260;601 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=767 ; 584 602 585 603 -- -------------------------------------------------------- … … 636 654 KEY `BillingPeriodNext` (`BillingPeriodNext`), 637 655 KEY `NetworkSegment` (`NetworkSegment`) 638 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=20 0;656 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=201 ; 639 657 640 658 -- … … 667 685 PRIMARY KEY (`Id`), 668 686 KEY `Member` (`Member`) 669 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=18 2;687 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=183 ; 670 688 671 689 -- … … 787 805 KEY `Type` (`Type`), 788 806 KEY `MapPosition` (`MapPosition`) 789 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=64 4;807 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=645 ; 790 808 791 809 -- … … 917 935 KEY `Device` (`Device`), 918 936 KEY `Type` (`Type`) 919 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=71 1;937 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=712 ; 920 938 921 939 -- … … 956 974 KEY `host_id` (`NetworkInterface`), 957 975 KEY `time` (`Time`) 958 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;976 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 959 977 960 978 -- -------------------------------------------------------- … … 987 1005 KEY `Interface1` (`Interface1`), 988 1006 KEY `Interface2` (`Interface2`) 989 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=35 7;1007 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=356 ; 990 1008 991 1009 -- 992 1010 -- RELACE PRO TABULKU `NetworkLink`: 1011 -- `Interface2` 1012 -- `NetworkInterface` -> `Id` 993 1013 -- `Interface1` 994 1014 -- `NetworkInterface` -> `Id` 995 -- `Interface2`996 -- `NetworkInterface` -> `Id`997 1015 -- 998 1016 … … 1021 1039 PRIMARY KEY (`Id`), 1022 1040 KEY `Comment` (`Comment`) 1023 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=14 22;1041 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1430 ; 1024 1042 1025 1043 -- -------------------------------------------------------- … … 1119 1137 KEY `Link` (`Link`), 1120 1138 KEY `User` (`User`) 1121 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=9733 30;1139 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=973387 ; 1122 1140 1123 1141 -- … … 1254 1272 KEY `AssignedGroup` (`AssignedGroup`), 1255 1273 KEY `AssignedOperation` (`AssignedOperation`) 1256 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=22 6;1274 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=227 ; 1257 1275 1258 1276 -- … … 1304 1322 KEY `UnitOfMeasure` (`UnitOfMeasure`), 1305 1323 KEY `Manufacturer` (`Manufacturer`) 1306 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=18 0;1324 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=181 ; 1307 1325 1308 1326 -- … … 1345 1363 -- 1346 1364 -- RELACE PRO TABULKU `Service`: 1365 -- `ReplaceId` 1366 -- `Service` -> `Id` 1347 1367 -- `Category` 1348 1368 -- `ServiceCategory` -> `Id` 1349 -- `ReplaceId`1350 -- `Service` -> `Id`1351 1369 -- 1352 1370 … … 1377 1395 KEY `Service` (`Service`), 1378 1396 KEY `Customer` (`Customer`) 1379 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT= 437;1397 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=511 ; 1380 1398 1381 1399 -- 1382 1400 -- RELACE PRO TABULKU `ServiceCustomerRel`: 1401 -- `Service` 1402 -- `Service` -> `Id` 1383 1403 -- `Customer` 1384 1404 -- `Member` -> `Id` … … 1432 1452 KEY `Segment` (`Segment`), 1433 1453 KEY `Location` (`Location`) 1434 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=18 2;1454 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=186 ; 1435 1455 1436 1456 -- … … 1462 1482 `DIC` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 1463 1483 `PayVAT` int(11) NOT NULL, 1464 `MapPositionX` float NOT NULL DEFAULT '0', 1465 `MapPositionY` float NOT NULL DEFAULT '0', 1484 `MapPosition` int(11) DEFAULT NULL, 1466 1485 `WWW` varchar(255) COLLATE utf8_czech_ci NOT NULL, 1467 1486 `Note` varchar(255) COLLATE utf8_czech_ci NOT NULL, 1468 1487 PRIMARY KEY (`Id`), 1469 KEY `AddressCountry` (`AddressCountry`) 1470 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=231 ; 1488 KEY `AddressCountry` (`AddressCountry`), 1489 KEY `MapPosition` (`MapPosition`) 1490 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=233 ; 1471 1491 1472 1492 -- 1473 1493 -- RELACE PRO TABULKU `Subject`: 1494 -- `MapPosition` 1495 -- `MapPosition` -> `Id` 1474 1496 -- `AddressCountry` 1475 1497 -- `Country` -> `Id` … … 1663 1685 UNIQUE KEY `Name` (`Login`), 1664 1686 UNIQUE KEY `Nick` (`Name`) 1665 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=25 2;1687 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=253 ; 1666 1688 1667 1689 -- -------------------------------------------------------- … … 1678 1700 KEY `Customer` (`Customer`), 1679 1701 KEY `User` (`User`) 1680 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=52 0;1702 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=521 ; 1681 1703 1682 1704 -- … … 1696 1718 CREATE TABLE IF NOT EXISTS `UserOnline` ( 1697 1719 `Id` int(11) NOT NULL AUTO_INCREMENT, 1698 `User` int(11) NOT NULL DEFAULT '0'COMMENT 'User.Id',1720 `User` int(11) DEFAULT NULL COMMENT 'User.Id', 1699 1721 `ActivityTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1700 1722 `LoginTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', … … 1705 1727 PRIMARY KEY (`Id`), 1706 1728 KEY `User` (`User`) 1707 ) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2 ;1729 ) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2430 ; 1708 1730 1709 1731 -- -------------------------------------------------------- … … 1747 1769 1748 1770 -- 1771 -- Omezení pro tabulku `File` 1772 -- 1773 ALTER TABLE `File` 1774 ADD CONSTRAINT `File_ibfk_1` FOREIGN KEY (`Directory`) REFERENCES `FileDirectory` (`Id`); 1775 1776 -- 1777 -- Omezení pro tabulku `FileDirectory` 1778 -- 1779 ALTER TABLE `FileDirectory` 1780 ADD CONSTRAINT `FileDirectory_ibfk_1` FOREIGN KEY (`Parent`) REFERENCES `FileDirectory` (`Id`); 1781 1782 -- 1749 1783 -- Omezení pro tabulku `FinanceBankAccount` 1750 1784 -- … … 1753 1787 1754 1788 -- 1755 -- Omezení pro tabulku `FinanceBills` 1756 -- 1757 ALTER TABLE `FinanceBills` 1758 ADD CONSTRAINT `FinanceBills_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); 1759 1760 -- 1761 -- Omezení pro tabulku `FinanceBillsItems` 1762 -- 1763 ALTER TABLE `FinanceBillsItems` 1764 ADD CONSTRAINT `FinanceBillsItems_ibfk_1` FOREIGN KEY (`Bill`) REFERENCES `FinanceBills` (`Id`); 1765 1766 -- 1767 -- Omezení pro tabulku `FinanceClaimLiabilityItem` 1768 -- 1769 ALTER TABLE `FinanceClaimLiabilityItem` 1770 ADD CONSTRAINT `FinanceClaimLiabilityItem_ibfk_1` FOREIGN KEY (`FinanceClaimLiability`) REFERENCES `FinanceClaimsLiabilities` (`Id`); 1771 1772 -- 1773 -- Omezení pro tabulku `FinanceClaimsLiabilities` 1774 -- 1775 ALTER TABLE `FinanceClaimsLiabilities` 1776 ADD CONSTRAINT `FinanceClaimsLiabilities_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); 1789 -- Omezení pro tabulku `FinanceBillsItemsOld` 1790 -- 1791 ALTER TABLE `FinanceBillsItemsOld` 1792 ADD CONSTRAINT `FinanceBillsItemsOld_ibfk_1` FOREIGN KEY (`Bill`) REFERENCES `FinanceBillsOld` (`Id`); 1793 1794 -- 1795 -- Omezení pro tabulku `FinanceBillsOld` 1796 -- 1797 ALTER TABLE `FinanceBillsOld` 1798 ADD CONSTRAINT `FinanceBillsOld_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); 1799 1800 -- 1801 -- Omezení pro tabulku `FinanceInvoice` 1802 -- 1803 ALTER TABLE `FinanceInvoice` 1804 ADD CONSTRAINT `FinanceInvoice_ibfk_2` FOREIGN KEY (`File`) REFERENCES `File` (`Id`), 1805 ADD CONSTRAINT `FinanceInvoice_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); 1806 1807 -- 1808 -- Omezení pro tabulku `FinanceInvoiceItem` 1809 -- 1810 ALTER TABLE `FinanceInvoiceItem` 1811 ADD CONSTRAINT `FinanceInvoiceItem_ibfk_1` FOREIGN KEY (`FinanceInvoice`) REFERENCES `FinanceInvoice` (`Id`); 1777 1812 1778 1813 -- … … 1780 1815 -- 1781 1816 ALTER TABLE `FinanceOperation` 1817 ADD CONSTRAINT `FinanceOperation_ibfk_5` FOREIGN KEY (`File`) REFERENCES `File` (`Id`), 1782 1818 ADD CONSTRAINT `FinanceOperation_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`), 1783 ADD CONSTRAINT `FinanceOperation_ibfk_2` FOREIGN KEY (`Bill`) REFERENCES `FinanceBills` (`Id`),1784 1819 ADD CONSTRAINT `FinanceOperation_ibfk_3` FOREIGN KEY (`BankAccount`) REFERENCES `FinanceBankAccount` (`Id`), 1785 1820 ADD CONSTRAINT `FinanceOperation_ibfk_4` FOREIGN KEY (`Treasury`) REFERENCES `FinanceTreasury` (`Id`); 1786 1787 --1788 -- Omezení pro tabulku `FinanceOperationItem`1789 --1790 ALTER TABLE `FinanceOperationItem`1791 ADD CONSTRAINT `FinanceOperationItem_ibfk_1` FOREIGN KEY (`FinanceOperation`) REFERENCES `FinanceOperation` (`Id`);1792 1821 1793 1822 -- … … 1868 1897 -- 1869 1898 ALTER TABLE `NetworkLink` 1870 ADD CONSTRAINT `NetworkLink_ibfk_1` FOREIGN KEY (`Interface1`) REFERENCES `NetworkDevice` (`Id`), 1871 ADD CONSTRAINT `NetworkLink_ibfk_2` FOREIGN KEY (`Interface1`) REFERENCES `NetworkInterface` (`Id`), 1872 ADD CONSTRAINT `NetworkLink_ibfk_3` FOREIGN KEY (`Interface2`) REFERENCES `NetworkInterface` (`Id`); 1899 ADD CONSTRAINT `NetworkLink_ibfk_2` FOREIGN KEY (`Interface2`) REFERENCES `NetworkInterface` (`Id`), 1900 ADD CONSTRAINT `NetworkLink_ibfk_1` FOREIGN KEY (`Interface1`) REFERENCES `NetworkInterface` (`Id`); 1873 1901 1874 1902 -- … … 1925 1953 -- 1926 1954 ALTER TABLE `Service` 1927 ADD CONSTRAINT `Service_ibfk_ 1` FOREIGN KEY (`Category`) REFERENCES `ServiceCategory` (`Id`),1928 ADD CONSTRAINT `Service_ibfk_ 2` FOREIGN KEY (`ReplaceId`) REFERENCES `Service` (`Id`);1955 ADD CONSTRAINT `Service_ibfk_2` FOREIGN KEY (`ReplaceId`) REFERENCES `Service` (`Id`), 1956 ADD CONSTRAINT `Service_ibfk_1` FOREIGN KEY (`Category`) REFERENCES `ServiceCategory` (`Id`); 1929 1957 1930 1958 -- … … 1932 1960 -- 1933 1961 ALTER TABLE `ServiceCustomerRel` 1962 ADD CONSTRAINT `ServiceCustomerRel_ibfk_3` FOREIGN KEY (`Service`) REFERENCES `Service` (`Id`), 1934 1963 ADD CONSTRAINT `ServiceCustomerRel_ibfk_2` FOREIGN KEY (`Customer`) REFERENCES `Member` (`Id`); 1935 1964 … … 1953 1982 -- 1954 1983 ALTER TABLE `Subject` 1984 ADD CONSTRAINT `Subject_ibfk_2` FOREIGN KEY (`MapPosition`) REFERENCES `MapPosition` (`Id`), 1955 1985 ADD CONSTRAINT `Subject_ibfk_1` FOREIGN KEY (`AddressCountry`) REFERENCES `Country` (`Id`); 1956 1986 … … 1999 2029 ALTER TABLE `Work` 2000 2030 ADD CONSTRAINT `Work_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`), 2001 ADD CONSTRAINT `Work_ibfk_2` FOREIGN KEY (`Task`) REFERENCES `Task` (`Id`);"); 2031 ADD CONSTRAINT `Work_ibfk_2` FOREIGN KEY (`Task`) REFERENCES `Task` (`Id`); 2032 "); 2002 2033 $Manager->Execute("INSERT INTO `SystemVersion` (`Id`, `Revision`) VALUES 2003 (1, 49 1);");2034 (1, 495);"); 2004 2035 2005 2036 } … … 2018 2049 $Manager->Execute("INSERT INTO `User` (`Id`, `Login`, `Name`, `Password`, `Salt`, `Email`, `LastIpAddress`, `LastLoginTime`, `RegistrationTime`, `Locked`, `ICQ`, `PhoneNumber`, `InitPassword`) VALUES 2019 2050 (1, 'admin', 'Správce', '05d97409afcce47d028c0d2a04cf359998cbaaf1', 'b295d117135a9763da282e7dae73a5ca7d3e5b11', 'admin@localhost', '', '0000-00-00 00:00:00', '2013-03-01 19:40:22', 0, 0, '+420123456789', '');"); 2020 $Manager->Execute("INSERT INTO `Subject` (`Id`, `Name`, `AddressStreet`, `AddressTown`, `AddressPSC`, `AddressCountry`, `IC`, `DIC`, `PayVAT`, `MapPositionX`, `MapPositionY`, `WWW`, `Note`) VALUES 2021 (1, 'Franta Vopršálek', 'Na hradě 1001', 'Bouzov', 12345, 1, '12345667', 'CZ1234567890', 0, 1, 2, '', '');"); 2051 $Manager->Execute("INSERT INTO `MapPosition` (`Id`, `Name`, `Latitude`, `Longitude`) VALUES 2052 (1, 'Franta Vopršálek', 47.555, 11.082)"); 2053 $Manager->Execute("INSERT INTO `Subject` (`Id`, `Name`, `AddressStreet`, `AddressTown`, `AddressPSC`, `AddressCountry`, `IC`, `DIC`, `PayVAT`, `MapPosition`, `WWW`, `Note`) VALUES 2054 (1, 'Franta Vopršálek', 'Na hradě 1001', 'Bouzov', 12345, 1, '12345667', 'CZ1234567890', 0, 1, '', '');"); 2022 2055 $Manager->Execute("INSERT INTO `UnitOfMeasure` (`Id`, `Unit`, `Name`) VALUES 2023 2056 (1, 'ks', 'kus'), … … 2186 2219 (15, 'Kino Vatra', 0, 15, 1, 'http://www.dkvsetin.cz/rss/kino/8'), 2187 2220 (16, 'Obec Hovězí', 0, 16, 1, 'http://www.obec-hovezi.cz/web/rss.xml');"); 2188 $Manager->Execute("INSERT INTO `MapPosition` (`Id`, `Name`, `Latitude`, `Longitude`) VALUES2189 (1, 'Franta Vopršálek', 47.555, 11.082)");2190 2221 $Manager->Execute("INSERT INTO `FinanceBillingPeriod` (`Id`, `Name`, `MonthCount`) VALUES 2191 2222 (1, 'Nikdy', 0), … … 2362 2393 $Manager->Execute("INSERT INTO `ServiceCustomerRel` (`Id`, `Service`, `Customer`, `Period`) VALUES 2363 2394 (1, 1, 1, 0), (2, 1, 1, 1);"); 2364 $Manager->Execute("INSERT INTO `File` (`Id` ,`Name` ,`Size` ,`Directory`) VALUES (NULL , 'invoice_1.pdf', '123', NULL);"); 2395 $Manager->Execute("INSERT INTO `File` (`Id` ,`Name` ,`Size` ,`Directory`) ". 2396 "VALUES (1 , 'invoice_1.pdf', '123', NULL);"); 2365 2397 $Manager->Execute("INSERT INTO `FinanceInvoice` (`Id` ,`BillCode` ,`Subject` ,`TimeCreation` ,`TimeDue` ,`TimePayment` ,`Value` ,`File` ,`Text` ,`PeriodTo` ,`PeriodFrom`) ". 2366 2398 "VALUES (1 , 'VF123/2013', '1', NOW( ) , '0000-00-00 00:00:00', NULL , '300', '1', 'Měsíční paušál', '2013-01-01', '2013-01-31');"); 2367 2399 $Manager->Execute("INSERT INTO `FinanceInvoiceItem` (`Id` ,`FinanceInvoice` ,`Description` ,`Price` ,`VAT` ,`Quantity`) ". 2368 2400 "VALUES (1 , '1', 'Internet 16M', '300', '21', '1');"); 2369 2401 $Manager->Execute("INSERT INTO `FinanceYear` (`Id`, `Year`, `DateStart`, `DateEnd`) VALUES 2370 2402 (1, 2007, '2007-12-01', '2007-12-31'), … … 2378 2410 (1, 10000, 100000, 10000, 50, 6, 1024, 50, 138), 2379 2411 (0, 10000, 100000, 10000, 50, 6, 1024, 50, 138);"); 2412 $Manager->Execute("INSERT INTO `DocumentLine` (`Id`, `Name`, `Shortcut`) VALUES 2413 (1, 'Příjmy do pokladny', 'PP'), 2414 (2, 'Výdeje z pokladny', 'VP'), 2415 (3, 'Příjem na účet', 'BV'), 2416 (4, 'Výdej z účtu', 'PR'), 2417 (5, 'Přijaté faktury', 'PF'), 2418 (6, 'Vydané faktury', 'VF'), 2419 (7, 'Výdej ze skladu', 'VS'), 2420 (8, 'Příjem na sklad', 'PS');"); 2380 2421 } 2381 2422 -
trunk/admin/Updates.php
r495 r497 24 24 } 25 25 26 function UpdateTo497($Manager) 27 { 28 $Manager->Execute("ALTER TABLE `FinanceCharge` ADD `Id` INT NOT NULL AUTO_INCREMENT FIRST , ADD PRIMARY KEY ( `Id` ) "); 29 $Manager->Execute("ALTER TABLE `FinanceCharge` ADD `ReplaceId` INT NULL ,ADD INDEX ( `ReplaceId` ) "); 30 $Manager->Execute("DELETE FROM `FinanceCharge` WHERE `FinanceCharge`.`Period` = 1"); 31 $Manager->Execute("ALTER TABLE `FinanceCharge` DROP `Period`"); 32 $Manager->Execute("ALTER TABLE `FinanceCharge` ADD `Action` ENUM( 'add', 'modify', 'remove' ) NULL AFTER `TopTariffPrice` "); 33 $Manager->Execute("ALTER TABLE `FinanceCharge` ADD FOREIGN KEY ( `ReplaceId` ) REFERENCES `FinanceCharge` (". 34 "`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;"); 35 $Manager->Execute("ALTER TABLE `FinanceCharge` ADD INDEX ( `Action` )"); 36 $Manager->Execute("INSERT INTO `ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ". 37 "VALUES (NULL , 'Parametry účtování', '2', 'FinanceCharge', '');"); 38 $Manager->Execute("INSERT INTO `ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ". 39 "VALUES (NULL , 'Úseky sítě', '2', 'NetworkSegment', ''"); 40 $Manager->Execute("ALTER TABLE `ServiceCustomerRel` ADD `Action` ENUM( 'add', 'modify', 'remove' ) NULL , ". 41 "ADD `ReplaceId` INT NULL"); 42 $Manager->Execute("DELETE FROM `ServiceCustomerRel` WHERE `Period`=1"); 43 $Manager->Execute("ALTER TABLE `ServiceCustomerRel` DROP `Period`"); 44 $Manager->Execute("ALTER TABLE `ServiceCustomerRel` ADD INDEX ( `Action` )"); 45 $Manager->Execute("ALTER TABLE `ServiceCustomerRel` ADD INDEX ( `ReplaceId` ) "); 46 $Manager->Execute("ALTER TABLE `ServiceCustomerRel` ADD FOREIGN KEY ( `ReplaceId` ) REFERENCES `ServiceCustomerRel` (". 47 "`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT ;"); 48 $Manager->Execute("ALTER TABLE `Service` ADD `Action` ENUM( 'add', 'modify', 'remove' ) NULL AFTER `CustomerCount`"); 49 $Manager->Execute("ALTER TABLE `Service` ADD INDEX ( `Action` )"); 50 $Manager->Execute("INSERT INTO `ISMenuItem` (`Id` ,`Name` ,`Parent` ,`Table` ,`IconName`) ". 51 "VALUES (NULL , 'Placení zákazníků', '2', 'MemberPayment', '');"); 52 } 53 26 54 $Updates = array( 27 55 491 => array('Revision' => 493, 'Function' => 'UpdateTo493'), 28 56 493 => array('Revision' => 494, 'Function' => 'UpdateTo494'), 29 57 494 => array('Revision' => 495, 'Function' => 'UpdateTo495'), 58 495 => array('Revision' => 497, 'Function' => 'UpdateTo497'), 30 59 ); 31 60 -
trunk/finance/clenove.php
r479 r497 17 17 'Subject.Name, NetworkDevice, '. 18 18 '(SELECT GROUP_CONCAT(Service.Name) FROM ServiceCustomerRel LEFT JOIN Service '. 19 'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND ServiceCustomerRel.Period=0) AS ServicesCurrentMonth, '. 20 '(SELECT GROUP_CONCAT(Service.Name) FROM ServiceCustomerRel LEFT JOIN Service '. 21 'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND ServiceCustomerRel.Period=1) AS ServicesNextMonth, '. 19 'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND '. 20 'ServiceCustomerRel.Action IS NULL) AS ServicesCurrentMonth, '. 21 //'(SELECT GROUP_CONCAT(Service.Name) FROM ServiceCustomerRel LEFT JOIN Service '. 22 //'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND '. 23 //'ServiceCustomerRel.Period=1) AS ServicesNextMonth, '. 22 24 'User.Name AS FullName FROM MemberPayment LEFT JOIN Member ON '. 23 25 'Member.Id=MemberPayment.Member LEFT JOIN Subject ON Subject.Id=Member.Subject '. … … 36 38 array('Name' => 'Cash', 'Title' => 'Stav účtu [Kč]'), 37 39 array('Name' => 'ServicesCurrentMonth', 'Title' => 'Běžící tarif'), 38 array('Name' => 'ServicesNextMonth', 'Title' => 'Příští tarif'),40 //array('Name' => 'ServicesNextMonth', 'Title' => 'Příští tarif'), 39 41 array('Name' => 'Note', 'Title' => 'Poznámky'), 40 42 array('Name' => 'WWW', 'Title' => 'WWW'), … … 55 57 if($Row['Cash'] < 0) $Row['Cash'] = '<span style="color: red;">'.$Row['Cash'].'</span>'; 56 58 $Tarif = $Row['ServicesCurrentMonth']; 57 $PristiTarif = $Row['ServicesNextMonth'];59 //$PristiTarif = $Row['ServicesNextMonth']; 58 60 $Output .= '<tr><td>'.$Row['FullName'].'</td><td><a href="user_state.php?Subject='.$Row['Id'].'">'.$Row['Name'].'</a></td>'; 59 61 //<td align="right">'.$Row['network_device'].'</td> 60 $Output .= '<td align="right">'.$Row['MonthlyTotal'].'</td><td align="right">'.$Row['Cash'].'</td><td align="center">'.$Tarif.'</td><td align="center">'.$PristiTarif.'</td><td>'.$Row['Note'].'</td><td>'.$Row['WWW'].'</td></tr>'; 62 $Output .= '<td align="right">'.$Row['MonthlyTotal'].'</td><td align="right">'.$Row['Cash'].'</td>'. 63 '<td align="center">'.$Tarif.'</td>'. 64 //'<td align="center">'.$PristiTarif.'</td>'. 65 '<td>'.$Row['Note'].'</td><td>'.$Row['WWW'].'</td></tr>'; 61 66 $TotalDevice += $Row['NetworkDevice']; 62 67 $TotalMonth += ($Row['MonthlyTotal']); … … 64 69 $Output .= '<tr><td><strong>Celkem</strong></td><td> </td>'; 65 70 //<td align="right"><strong>'.$TotalDevice.'</strong></td> 66 $Output .= '<td align="right"><strong>'.$TotalMonth.'</strong></td><td align="right"><strong>'.$TotalCash.'</strong></td><td align="right"> </td><td align="right"> </td><td align="right"> </td><td align="right"> </td></tr>'; 71 $Output .= '<td align="right"><strong>'.$TotalMonth.'</strong></td>'. 72 '<td align="right"><strong>'.$TotalCash.'</strong></td><td align="right"> </td>'. 73 //'<td align="right"> </td>'. 74 '<td align="right"> </td><td align="right"> </td></tr>'; 67 75 $Output .= '</table>'; 68 76 $Output .= $PageList['Output']; -
trunk/finance/finance.php
r494 r497 54 54 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Member` '. 55 55 'LEFT JOIN `ServiceCustomerRel` ON `ServiceCustomerRel`.`Customer`=`Member`.`Id` '. 56 'WHERE (`ServiceCustomerRel`.`Service`='.$Index.') AND (`Member`.`BillingPeriod` > 1) AND (`Member`.`Blocked`=0)'); 56 'WHERE (`ServiceCustomerRel`.`Service`='.$Index.') AND (`Member`.`BillingPeriod` > 1) '. 57 'AND (`Member`.`Blocked`=0)'); 57 58 $Row = $DbResult->fetch_row(); 58 59 $this->Tariffs[$Index]['CustomerCount'] = $Row[0]; … … 103 104 $this->BillingPeriods[$BillingPeriod['Id']] = $BillingPeriod; 104 105 105 $DbResult = $this->Database->query('SELECT * FROM `FinanceCharge` WHERE `Period`='.$Period); 106 // Period parameter is not used as it have to be determined from item replacement 107 $DbResult = $this->Database->query('SELECT * FROM `FinanceCharge` WHERE `ReplaceId` IS NULL LIMIT 1'); 106 108 $Row = $DbResult->fetch_array(); 107 109 $this->kWh = $Row['kWh']; … … 203 205 'FROM `ServiceCustomerRel` LEFT JOIN '. 204 206 '`Service` ON `Service`.`Id` = `ServiceCustomerRel`.`Service` WHERE `ServiceCustomerRel`.`Customer`='. 205 $Member['Id'].' AND `ServiceCustomerRel`.` Period`=1');207 $Member['Id'].' AND `ServiceCustomerRel`.`Action` IS NULL'); 206 208 $DbRow = $DbResult2->fetch_assoc(); 207 209 $Monthly = 0; … … 259 261 $DbResult2 = $this->Database->query('SELECT * FROM NetworkSegment WHERE Id='.$ID); 260 262 $Row4 = $DbResult2->fetch_array(); 261 $this->Database->update('NetworkSegment', 'Id='.$Row4['Id'], array('Users' => ($Row4['Users'] + $Row3[0]), 'UsersOverheads' => ($Row4['UsersOverheads'] + $Row3[0]))); 263 $this->Database->update('NetworkSegment', 'Id='.$Row4['Id'], 264 array('Users' => ($Row4['Users'] + $Row3[0]), 'UsersOverheads' => ($Row4['UsersOverheads'] + $Row3[0]))); 262 265 $ID = $Row4['Parent']; 263 266 } 264 $this->Database->update('NetworkSegment', 'Id='.$NetworkSegment['Id'], array('Price' => $Row2['Price'], 'Users' => ($Row3[0] + $RowP['Users']), 'Consumption' => $Row2['Consumption'], 'UsersOverheads' => ($Row3[0] + $RowP2['UsersOverheads']))); 267 $this->Database->update('NetworkSegment', 'Id='.$NetworkSegment['Id'], 268 array('Price' => $Row2['Price'], 'Users' => ($Row3[0] + $RowP['Users']), 'Consumption' => $Row2['Consumption'], 'UsersOverheads' => ($Row3[0] + $RowP2['UsersOverheads']))); 265 269 } 266 270 … … 268 272 $DbResult = $this->Database->select('Member', 'COUNT(*)'); 269 273 $Row = $DbResult->fetch_array(); 270 $DbResult = $this->Database->update('NetworkSegment', 'Id='.$this->InternetSegmentId, array('Users' => $Row[0], 'UsersOverheads' => $Row[0])); 274 $DbResult = $this->Database->update('NetworkSegment', 'Id='.$this->InternetSegmentId, 275 array('Users' => $Row[0], 'UsersOverheads' => $Row[0])); 271 276 $this->System->Modules['Log']->NewRecord('Finance', 'RecalculateSegmentParameters'); 272 277 return($Output); -
trunk/finance/manage.php
r486 r497 71 71 $Output .= '<a href="?Operation=ConvertPDFToFile">Převést data z databáze do souborů</a><br />'; 72 72 $Output .= '<a href="?Operation=Bills">Správa dokladů</a><br />'; 73 $Output .= '<a href="?Operation=Recalculate">Přepočet financí</a><br />';73 //$Output .= '<a href="?Operation=Recalculate">Přepočet financí</a><br />'; 74 74 $Output .= '<a href="?Operation=ShowMonthlyPayment">Měsíční vyúčtování</a><br />'; 75 $Output .= '<a href="clenove.php">Seznam členů</a><br />';75 //$Output .= '<a href="clenove.php">Seznam členů</a><br />'; 76 76 $Output .= '<a href="zivnost.php">Živnost</a><br />'; 77 77 $Output .= '<a href="?Operation=GenerateBills">Generovat chybějící doklady</a><br />'; … … 135 135 $DbResult = $this->Database->select('FinanceInvoice', '*', 'Subject='.$Subject. 136 136 ' AND TimePayment IS NULL AND Value > 0 ORDER BY TimeCreation LIMIT 1'); 137 //echo($Database->error);138 137 if($DbResult->num_rows > 0) 139 138 { … … 147 146 'TimeCreation' => TimeToMysqlDateTime($LastInsertTime), 148 147 'CashFlowId' => $OpenedClaim['Id'], 'Direction' => 'In')); 149 //echo($Database->LastQuery);150 148 } else break; 151 149 } else break; … … 153 151 } 154 152 155 function Insert Liability($Subject, $Value, $TimeCreation, $TimeDue, $Text,153 function InsertInvoice($Subject, $TimeCreation, $TimeDue, $Items, 156 154 $DocumentLine, $PeriodFrom, $PeriodTo) 157 155 { … … 159 157 160 158 $BillCode = $this->System->Modules['Finance']->GetNextDocumentLineNumber($DocumentLine); 159 $SumValue = 0; 160 foreach($Items as $Item) 161 $SumValue = $SumValue + $Item['Price']; 161 162 $this->Database->insert('FinanceInvoice', array( 162 163 'Subject' => $Subject, 'TimeCreation' => TimeToMysqlDateTime($TimeCreation), 163 'TimeDue' => TimeToMysqlDateTime($TimeDue), 'Value' => $ Value, 'BillCode' => $BillCode,164 'TimeDue' => TimeToMysqlDateTime($TimeDue), 'Value' => $SumValue, 'BillCode' => $BillCode, 164 165 'PeriodFrom' => TimeToMysqlDate($PeriodFrom), 'PeriodTo' => TimeToMysqlDate($PeriodTo))); 165 166 $InvoiceId = $this->Database->insert_id; 166 $this->Database->insert('FinanceInvoice', array('FinanceInvoice' => $InvoiceId,167 'Description' => $Text, 'Price' => $Value, 'Quantity' => 1, 'VAT' => 0));168 $Output = '.'; //$this->Database->LastQuery.'<br />';167 foreach($Items as $Item) 168 $this->Database->insert('FinanceInvoiceItem', array('FinanceInvoice' => $InvoiceId, 169 'Description' => $Item['Description'], 'Price' => $Item['Price'], 'Quantity' => $Item['Quantity'], 'VAT' => $Item['VAT'])); 169 170 //$LastInsertTime = $Time; 170 171 //$this->CheckAdvancesAndLiabilities($Subject); 171 return($ Output);172 return($InvoiceId); 172 173 } 173 174 … … 256 257 $Form = new Form('NewInvoice'); 257 258 $Form->LoadvaluesFromForm(); 258 //print_r($Form->Values); 259 $this->InsertLiability($Form->Values['Subject'], $Form->Values['Value'], 260 $Form->Values['TimeCreation'], $Form->Values['TimeDue'], $Form->Values['Text'], 259 $Items = array(array('Price' => $Form->Values['Value'], 260 'Description' => $Form->Values['Text'], 'Quantity' => 1, 'VAT' => 21)); 261 $LastId = $this->InsertInvoice($Form->Values['Subject'], 262 $Form->Values['TimeCreation'], $Form->Values['TimeDue'], $Items, 261 263 $Form->Values['DocumentLine'], NULL, NULL); 262 $LastId = $this->Database->insert_id;263 264 $DbResult = $this->Database->select('FinanceInvoice', 'BillCode', 'Id='.$LastId); 264 265 $DbRow = $DbResult->fetch_assoc(); … … 304 305 'MemberPayment.Cash AS Cash, '. 305 306 '(SELECT GROUP_CONCAT(Service.Name) FROM ServiceCustomerRel LEFT JOIN Service '. 306 'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND ServiceCustomerRel.Period=1) AS ServicesNextMonth, '. 307 'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer=Member.Id AND '. 308 'ServiceCustomerRel.Action IS NULL) AS ServicesNextMonth, '. 307 309 'UNIX_TIMESTAMP(Member.BillingPeriodLastDate) AS LastDate, Subject.Name AS SubjectName, '. 308 310 'FinanceBillingPeriod.Name AS BillingPeriodName '. … … 350 352 } 351 353 354 function ProduceInvoices() 355 { 356 $Output = ''; 357 358 // Generuj účetní položky 359 $DbResult = $this->Database->query('SELECT Member.*, MemberPayment.MonthlyTotal, UNIX_TIMESTAMP(Member.BillingPeriodLastDate), Subject.Name AS SubjectName FROM MemberPayment JOIN Member ON Member.Id=MemberPayment.Member JOIN Subject ON Subject.Id=Member.Subject'); 360 while($Member = $DbResult->fetch_assoc()) 361 { 362 $Output .= $Member['SubjectName'].': '; 363 $Period = $this->GetBillingPeriod($Member['BillingPeriodNext']); 364 if($Period['From'] > $Member['UNIX_TIMESTAMP(Member.BillingPeriodLastDate)']) 365 { 366 $this->Database->update('Member', 'Id='.$Member['Id'], 367 array('BillingPeriod' => $Member['BillingPeriodNext'])); 368 $Member['BillingPeriod'] = $Member['BillingPeriodNext']; 369 } 370 $Period = $this->GetBillingPeriod($Member['BillingPeriod']); 371 if(($Period['From'] > $Member['UNIX_TIMESTAMP(Member.BillingPeriodLastDate)']) and 372 ($Member['Blocked'] == 0)) 373 { 374 $InvoiceItems = array(); 375 $MonthlyTotal = 0; 376 $DbResult2 = $this->Database->query('SELECT Service.* FROM ServiceCustomerRel LEFT JOIN Service '. 377 'ON Service.Id=ServiceCustomerRel.Service WHERE (ServiceCustomerRel.Customer='. 378 $Member['Id'].') AND (ServiceCustomerRel.Action IS NULL)'); 379 while($Service = $DbResult2->fetch_assoc()) 380 { 381 $InvoiceItems[] = array('Description' => $Service['Name'], 'Price' => $Service['Price'], 382 'Quantity' => $Period['MonthCount'], 'VAT' => 21); 383 $MonthlyTotal += $Service['Price']; 384 } 385 if($Member['Hire'] != 0) 386 { 387 $Output .= '<tr><td>Nájem</td><td>'.(-$Member['Hire']).'</td></tr>'; 388 $MonthlyTotal -= $Member['Hire']; 389 } 390 if($Member['MonthlyPlus'] != 0) 391 { 392 $MonthlyTotal -= $Member['MonthlyPlus']; 393 } 394 $PayPerPeriod = $MonthlyTotal * $Period['MonthCount']; 395 396 $TimePeriodText = date('j.n.Y', $Period['From']).' - '.date('j.n.Y', $Period['To']); 397 $Output .= $TimePeriodText.': '.$MonthlyTotal.' * '.$Period['MonthCount'].' = '.$PayPerPeriod.'<br />'; 398 $this->InsertInvoice($Member['Subject'], 'NOW()', 'DATE_ADD(NOW(), INTERVAL '.INVOICE_DUE_DAYS.' DAY)', 399 $InvoiceItems, INVOICE_OUT_DOC_LINE, $Period['From'], $Period['To']); 400 401 $Output .= $this->SendPaymentEmail($Member['Id']); 402 $this->Database->update('Member', 'Id='.$Member['Id'], array('BillingPeriodLastDate' => TimeToMysqlDateTime($Period['To']))); 403 } else $Output .= '<br />'; 404 } 405 return($Output); 406 } 407 408 function TableUpdatePeriod($Table) 409 { 410 $DbResult = $this->Database->select($Table, '*', '`Action` IS NOT NULL'); 411 while($Service = $DbResult->fetch_array()) 412 { 413 if($Service['Action'] == 'add') 414 { 415 unset($Service['Id']); 416 unset($Serivce['ReplaceId']); 417 unset($Serivce['Action']); 418 $this->Database->insert($Table, $Service); 419 } else 420 if($Service['Action'] == 'modify') 421 { 422 unset($Service['Id']); 423 unset($Service['Action']); 424 $ReplaceId = $Service['ReplaceId']; 425 unset($Service['ReplaceId']); 426 $this->Database->update($Table, 'Id='.$ReplaceId, $Service); 427 } else 428 if($Service['Action'] == 'delete') 429 { 430 $this->Database->delete($Table, '`Id`='.$Service['ReplaceId']); 431 } 432 } 433 $this->Database->delete($Table, '`Action` IS NOT NULL'); 434 } 435 352 436 function ProcessMonthlyPayment() 353 437 { … … 363 447 $Output -= 'Datum: '.date('j.n.Y').'<br />'; 364 448 365 $Datum = explode('-', $Overall['Date']); 366 $Mesic = date('m') + 0; 449 $DateParts = explode('-', $Overall['Date']); 450 $MonthLast = $DateParts[1]; 451 $MonthCurrent = date('m') + 0; 367 452 368 453 $Output .= $Finance->RecalculateSegmentParameters(); … … 402 487 403 488 // Zkontrolovat odečtení měsíčního poplatku 404 //$Mesic = '1'; 405 $Output .= 'Kontrola odečtení poplatků: Poslední měsíc-'.round($Datum[1]).' Aktuální měsíc-'.$Mesic.'<br />'; 406 if($Mesic != $Datum[1]) 489 $Output .= 'Kontrola odečtení poplatků: Poslední měsíc-'.$MonthLast.' Aktuální měsíc-'.$MonthCurrent.'<br />'; 490 //if($MonthCurrent != $MonthLast) 407 491 { 408 492 $Output .= 'Odečítám měsíční poplatek...<br />'; 409 410 // Generuj účetní položky 411 $DbResult = $this->Database->query('SELECT Member.*, MemberPayment.MonthlyTotal, UNIX_TIMESTAMP(Member.BillingPeriodLastDate), Subject.Name AS SubjectName FROM MemberPayment JOIN Member ON Member.Id=MemberPayment.Member JOIN Subject ON Subject.Id=Member.Subject'); 412 while($Member = $DbResult->fetch_assoc()) 413 { 414 $Output .= $Member['SubjectName'].': '; 415 //$Member['UNIX_TIMESTAMP(Member.BillingPeriodLastDate)'] = MysqlDateTimeToTime('2009-04-01 1:1:1'); 416 $Period = $this->GetBillingPeriod($Member['BillingPeriodNext']); 417 if($Period['From'] > $Member['UNIX_TIMESTAMP(Member.BillingPeriodLastDate)']) 418 { 419 $this->Database->update('Member', 'Id='.$Member['Id'], 420 array('BillingPeriod' => $Member['BillingPeriodNext'])); 421 $Member['BillingPeriod'] = $Member['BillingPeriodNext']; 422 } 423 $Period = $this->GetBillingPeriod($Member['BillingPeriod']); 424 if(($Period['From'] > $Member['UNIX_TIMESTAMP(Member.BillingPeriodLastDate)']) and ($Member['InternetTariffCurrentMonth'] != TARIFF_FREE) and ($PayPerPeriod > 0) and 425 ($Member['Blocked'] == 0)) 426 { 427 $BillItems = array(); 428 $MonthlyTotal = 0; 429 $DbResult2 = $this->Database->query('(SELECT Service.* FROM ServiceCustomerRel LEFT JOIN Service '. 430 'ON Service.Id=ServiceCustomerRel.Service WHERE ServiceCustomerRel.Customer='.$Member['Id'].') AND (ServiceCustomerRel.Period=0)'); 431 while($Service = $DbResult2->fetch_assoc()) 432 { 433 $BillItems[] = array('Description' => $Service['Name'], 'Price' => $Service['Price'], 434 'Quantity' => $Period['MonthCount']); 435 $MonthlyTotal += $ServicePrice['Price']; 436 $this->Database->update('ServiceCustomerRel', 'Id='); 437 } 438 if($Member['Hire'] != 0) 439 { 440 $Output .= '<tr><td>Nájem</td><td>'.(-$Member['Hire']).'</td></tr>'; 441 $MonthlyTotal -= $Member['Hire']; 442 } 443 if($Member['MonthlyPlus'] != 0) 444 { 445 $MonthlyTotal -= $Member['MonthlyPlus']; 446 } 447 $PayPerPeriod = $MonthlyTotal * $Period['MonthCount']; 448 449 //echo($Mesic.'%'.$MonthCount.'='.($Mesic % $MonthCount).' '); 450 $TimePeriodText = date('j.n.Y', $Period['From']).' - '.date('j.n.Y', $Period['To']); 451 $Output .= $TimePeriodText.': '.$MonthlyTotal.' * '.$Period['MonthCount'].' = '.$PayPerPeriod.'<br />'; 452 $BillCode = $Finance->GetNextDocumentLineNumber(INVOICE_OUT_DOC_LINE); 453 $BillId = $this->System->Modules['Bill']->CreateBill($Member['Subject'], 454 $BillItems, time(), time() + 3600 * 24 * INVOICE_DUE_DAYS, $BillCode, $Period['From'], $Period['To']); 455 $this->Database->insert('FinanceInvoice', array( 456 'Subject' => $Member['Subject'], 'TimeCreation' => 'NOW()', 457 'TimeDue' => 'DATE_ADD(NOW(), INTERVAL '.INVOICE_DUE_DAYS.' DAY)', 458 'Bill' => $BillId, 'BillCode' => $BillCode)); 459 $InvoiceId = $this->Database->insert_id; 460 $this->Database->insert('FinanceInvoiceItem', array('FinanceInvoice' => $InvoiceId, 461 'Value' => $PayPerPeriod, 'Text' => 'Vyúčtování služeb za období '.$TimePeriodText, 462 'Quantity' => 1, 'VAT' => 0)); 463 464 $Output .= $this->SendPaymentEmail($Member['Id']); 465 $this->Database->update('Member', 'Id='.$Member['Id'], array('BillingPeriodLastDate' => TimeToMysqlDateTime($Period['To']))); 466 } else $Output .= '<br />'; 467 } 493 $this->ProduceInvoices(); 468 494 469 495 // Update finance charge 470 496 $Output .= 'Měním aktuální parametry sítě...<br>'; 471 $this->Database->delete('FinanceCharge', 'Period = 0'); 472 $DbResult = $this->Database->select('FinanceCharge', '*', 'Period = 1'); 473 $Charge = $DbResult->fetch_assoc(); 474 //print_r($Charge); 475 $DbResult = $this->Database->insert('FinanceCharge', array('Period' => 0, 'Internet' => $Charge['Internet'], 'InternetSpeed' => $Charge['InternetSpeed'], 'InternetSpeedReserve' => $Charge['InternetSpeedReserve'], 'AdministrationPerUser' => $Charge['AdministrationPerUser'], 'kWh' => $Charge['kWh'], 'BaseSpeedElement' => $Charge['BaseSpeedElement'], 'BaseTariffPrice' => $Charge['BaseTariffPrice'], 'TopTariffPrice' => $Charge['TopTariffPrice'])); 497 $this->TableUpdatePeriod('FinanceCharge'); 476 498 477 499 $Output .= 'Přidávám měsíční přehled...<br />'; 478 $this->Database->insert('FinanceMonthlyOverall', array('Date' => 'NOW()', 'Money' => $Finance->Internet, 'kWh' => $Finance->kWh, 'Administration' => $Finance->Sprava, 'AdministrationTotal' => $SpravaCelkem, 'ConsumptionTotal' => $TotalConsumptionCost, 'TotalPaid' => $Finance->TotalPaid, 'BaseTariffPrice' => $Charge['BaseTariffPrice'], 'TopTariffPrice' => $Charge['TopTariffPrice'], 'MemberCount' => $Finance->InternetUsers)); 500 $this->Database->insert('FinanceMonthlyOverall', array('Date' => 'NOW()', 501 'Money' => $Finance->Internet, 'kWh' => $Finance->kWh, 502 'Administration' => $Finance->Sprava, 'AdministrationTotal' => $SpravaCelkem, 503 'ConsumptionTotal' => $TotalConsumptionCost, 'TotalPaid' => $Finance->TotalPaid, 504 'BaseTariffPrice' => $Charge['BaseTariffPrice'], 505 'TopTariffPrice' => $Charge['TopTariffPrice'], 'MemberCount' => $Finance->InternetUsers)); 479 506 480 507 // Update services 481 $Output .= 'Měním aktuální tarify....<br>'; 482 $DbResult = $this->Database->select('Service', '*', '`ReplaceId` IS NOT NULL'); 483 while($Service = $DbResult->fetch_array()) 484 { 485 $Service['Id'] = $Service['ReplaceId']; 486 $Service['ReplaceId'] = ''; 487 $this->Database->update('Service', 'Id='.$Service['ReplaceId'], $Service); 488 } 489 $this->Database->delete('Service', '`ReplaceId` IS NOT NULL'); 490 508 $Output .= 'Aktualizuji služby....<br>'; 509 $this->TableUpdatePeriod('Service'); 510 // Update customer service selections 511 $Output .= 'Aktualizuji výběr služeb zákazníků....<br>'; 512 $this->TableUpdatePeriod('ServiceCustomerRel'); 513 491 514 $Finance->RecalculateMemberPayment(); 492 515 //CreateMonthlyOverallBill(); -
trunk/form_classes.php
r496 r497 14 14 */ 15 15 16 17 16 $FormClasses = array( 17 'MemberPayment' => array( 18 'Title' => 'Placení zákazníků', 19 'Table' => 'MemberPayment', 20 'Items' => array( 21 'Member' => array('Type' => 'TMember', 'Caption' => 'Zákazník', 'Default' => '', 'ReadOnly' => true), 22 'MonthlyTotal' => array('Type' => 'Integer', 'Caption' => 'Celkem měsíčně', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true), 23 'MonthlyInternet' => array('Type' => 'Integer', 'Caption' => 'Internet měsíčně', 'Default' => '', 'Suffix' => 'Kč', 'ReadOnly' => true), 24 'MonthlyConsumption' => array('Type' => 'Integer', 'Caption' => 'Spotřeba měsíčně', 'Default' => '', 'Suffix' => 'Kč', 'ReadOnly' => true), 25 'NetworkDevice' => array('Type' => 'Integer', 'Caption' => 'Podíl na zařízení', 'Default' => '', 'Suffix' => 'Kč', 'ReadOnly' => true), 26 'MonthlyPlus' => array('Type' => 'Integer', 'Caption' => 'Měsíčně plus', 'Default' => '', 'Suffix' => 'Kč', 'ReadOnly' => true), 27 'Cash' => array('Type' => 'Integer', 'Caption' => 'Kredit', 'Default' => '', 'Suffix' => 'Kč', 'ReadOnly' => true), 28 ), 29 'Actions' => array( 30 array('Caption' => 'Přepočítat', 'URL' => '/finance/manage.php?Operation=Recalculate'), 31 ), 32 ), 33 'NetworkSegment' => array( 34 'Title' => 'Úsek sítě', 35 'Table' => 'NetworkSegment', 36 'Items' => array( 37 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''), 38 'Price' => array('Type' => 'Integer', 'Caption' => 'Cena', 'Default' => '0', 'Suffix' => 'Kč', 'ReadOnly' => true), 39 'Parent' => array('Type' => 'TNetworkSegment', 'Caption' => 'Nadřazený', 'Default' => '', 'Null' => true), 40 'Users' => array('Type' => 'Integer', 'Caption' => 'Uživatelů', 'Default' => '0', 'ReadOnly' => true), 41 'Consumption' => array('Type' => 'Integer', 'Caption' => 'Spotřeba', 'Default' => '0', 'ReadOnly' => true, 'Suffix' => 'Wattů'), 42 'UsersOverheads' => array('Type' => 'Integer', 'Caption' => 'Podílníků', 'Default' => '0', 'ReadOnly' => true), 43 ), 44 ), 45 'FinanceCharge' => array( 46 'Title' => 'Parametry účtování', 47 'Table' => 'FinanceCharge', 48 'Items' => array( 49 'Internet' => array('Type' => 'Integer', 'Caption' => 'Platba Internetu', 'Default' => '0', 'Suffix' => 'Kč'), 50 'InternetSpeed' => array('Type' => 'Integer', 'Caption' => 'Rychlost Internetu', 'Default' => '0', 'Suffix' => 'Mbit/s'), 51 'InternetSpeedReserve' => array('Type' => 'Integer', 'Caption' => 'Rezerva rychlosti', 'Default' => '0', 'Suffix' => 'Mbit/s'), 52 'AdministrationPerUser' => array('Type' => 'Integer', 'Caption' => 'Správa za uživatele', 'Default' => '0', 'Suffix' => 'Kč'), 53 'kWh' => array('Type' => 'Integer', 'Caption' => 'Cena kWh', 'Default' => '0', 'Suffix' => 'Kč'), 54 'BaseSpeedElement' => array('Type' => 'Integer', 'Caption' => 'Základní díl rychlosti', 'Default' => '0', 'Suffix' => 'Mbit/s'), 55 'BaseTariffPrice' => array('Type' => 'Integer', 'Caption' => 'Základní cena tarifu', 'Default' => '0', 'Suffix' => 'Kč'), 56 'TopTariffPrice' => array('Type' => 'Integer', 'Caption' => 'Nejvyšší cena tarifu', 'Default' => '0', 'Suffix' => 'Kč'), 57 'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => ''), 58 'ReplaceId' => array('Type' => 'TFinanceCharge', 'Caption' => 'Cílová položka', 'Default' => '0', 'Null' => true), 59 ), 60 ), 18 61 'File' => array( 19 62 'Title' => 'Soubor', … … 94 137 'Service' => array('Type' => 'TService', 'Caption' => 'Služba', 'Default' => ''), 95 138 'Customer' => array('Type' => 'TMember', 'Caption' => 'Zákazník', 'Default' => ''), 96 'Period' => array('Type' => 'Integer', 'Caption' => 'Období', 'Default' => ''), 139 'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => ''), 140 'ReplaceId' => array('Type' => 'TServiceCustomerRel', 'Caption' => 'Cílová položka', 'Default' => '', 'Null' => true), 97 141 ), 98 142 ), … … 309 353 'Storage' => array('Type' => 'Integer', 'Caption' => 'Úložiště', 'Default' => '0', 'Suffix' => 'GB'), 310 354 'CPUCount' => array('Type' => 'Integer', 'Caption' => 'Počet jader', 'Default' => '0', 'Suffix' => ''), 311 'ReplaceId' => array('Type' => 'TService', 'Caption' => 'Nahradit', 'Default' => '', 'Null' => true), 355 'Action' => array('Type' => 'TActionEnum', 'Caption' => 'Změna období', 'Default' => ''), 356 'ReplaceId' => array('Type' => 'TService', 'Caption' => 'Cílová položka', 'Default' => '', 'Null' => true), 312 357 ), 313 358 ), … … 536 581 ), 537 582 'FinanceInvoice' => array( 538 'Title' => ' Závazky a pohledávky',583 'Title' => 'Faktury', 539 584 'Table' => 'FinanceInvoice', 540 585 'DefaultSortColumn' => 'TimeCreation', … … 556 601 'FinanceInvoice' => array('Type' => 'TFinanceInvoice', 'Caption' => 'Faktura', 'Default' => '0'), 557 602 'Description' => array('Type' => 'String', 'Caption' => 'Popis', 'Default' => 'Položka'), 558 'Price' => array('Type' => 'Float', 'Caption' => 'Částka [Kč]', 'Default' => '0', 'Suffix' => 'Kč'),603 'Price' => array('Type' => 'Float', 'Caption' => 'Částka', 'Default' => '0', 'Suffix' => 'Kč'), 559 604 'Quantity' => array('Type' => 'Integer', 'Caption' => 'Množství', 'Default' => '1'), 560 'VAT' => array('Type' => 'Integer', 'Caption' => 'Daň [%]', 'Default' => '19', 'Suffix' => '%'),605 'VAT' => array('Type' => 'Integer', 'Caption' => 'Daň', 'Default' => '19', 'Suffix' => '%'), 561 606 ), 562 607 ), … … 720 765 'States' => array('Zakoupeno', 'Prodáno', 'Zařazeno do použití', 'Vyřazeno z použití', 'Zasláno do reklamace', 'Přijato z reklamace'), 721 766 ), 767 'TActionEnum' => array( 768 'Type' => 'Enumeration', 769 'States' => array('' => '', 'add' => 'Přidat', 'modify' => 'Upravit', 'remove' => 'Odstranit'), 770 ), 722 771 'TService' => array( 723 772 'Type' => 'Reference', … … 813 862 'Filter' => '1', 814 863 ), 864 'TServiceCustomerRel' => array( 865 'Type' => 'Reference', 866 'Table' => 'ServiceCustomerRel', 867 'Id' => 'Id', 868 'Name' => 'Id', 869 'Filter' => '1', 870 ), 815 871 'TNetworkSegment' => array( 816 872 'Type' => 'Reference', … … 991 1047 'Type' => 'Reference', 992 1048 'Table' => 'PermissionOperation', 1049 'Id' => 'Id', 1050 'Name' => 'Id', 1051 'Filter' => '1', 1052 ), 1053 'TFinanceCharge' => array( 1054 'Type' => 'Reference', 1055 'Table' => 'FinanceCharge', 993 1056 'Id' => 'Id', 994 1057 'Name' => 'Id',
Note:
See TracChangeset
for help on using the changeset viewer.