Changeset 803
- Timestamp:
- Feb 23, 2016, 7:18:38 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UpdateTrace.php
r802 r803 1887 1887 $Manager->Execute('ALTER TABLE `StockMove` DROP `BillCodeText`;'); 1888 1888 $Manager->Execute('ALTER TABLE `StockMoveItem` DROP `Text`;'); 1889 } 1890 1891 function UpdateTo803($Manager) 1892 { 1893 $Manager->Execute('CREATE TABLE IF NOT EXISTS `StockMoveItemSerialRel` ( 1894 `Id` int(11) NOT NULL, 1895 `StockMoveItem` int(11) NOT NULL, 1896 `StockSerialNumber` int(11) NOT NULL, 1897 PRIMARY KEY (`Id`), 1898 KEY `StockSerialNumber` (`StockSerialNumber`), 1899 KEY `StockMoveItem` (`StockMoveItem`) 1900 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;'); 1901 $Manager->Execute('ALTER TABLE `StockMoveItemSerialRel` ADD FOREIGN KEY (`StockMoveItem`) '. 1902 'REFERENCES `StockMoveItem`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;'); 1903 $Manager->Execute('ALTER TABLE `StockMoveItemSerialRel` ADD FOREIGN KEY (`StockSerialNumber`) '. 1904 'REFERENCES `StockSerialNumber`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;'); 1889 1905 } 1890 1906 … … 1974 1990 792 => array('Revision' => 800, 'Function' => 'UpdateTo800'), 1975 1991 800 => array('Revision' => 802, 'Function' => 'UpdateTo802'), 1992 802 => array('Revision' => 803, 'Function' => 'UpdateTo803'), 1976 1993 )); 1977 1994 } -
trunk/Application/Version.php
r802 r803 1 1 <?php 2 2 3 $Revision = 80 2; // Subversion revision4 $DatabaseRevision = 80 2; // SQL structure revision3 $Revision = 803; // Subversion revision 4 $DatabaseRevision = 803; // SQL structure revision 5 5 $ReleaseTime = strtotime('2016-02-23'); -
trunk/Common/Global.php
r791 r803 225 225 } 226 226 } 227 if( $Found == false)227 if(($_SESSION['OrderCol'] == '') or ($Found == false)) 228 228 { 229 229 $_SESSION['OrderCol'] = $DefaultColumn; -
trunk/Modules/Stock/Stock.php
r802 r803 17 17 { 18 18 global $Config; 19 19 20 20 $this->System->FormManager->RegisterClass('Product', array( 21 21 'Title' => 'Produkty', … … 57 57 'Parts' => array('Type' => 'TStockSerialNumberListStockSerialNumber', 'Caption' => 'Části', 'Default' => ''), 58 58 'History' => array('Type' => 'TStockItemHistoryListStockSerialNumber', 'Caption' => 'Historie', 'Default' => ''), 59 'Sériové čísla' => array('Type' => 'TStockMoveItemSerialListSerial', 'Caption' => 'Skladové pohyby', 'Default' => ''), 59 60 ), 60 61 )); … … 106 107 'Total' => array('Type' => 'Integer', 'Caption' => 'Celkem', 'Default' => '', 'Suffix' => 'Kč', 107 108 'ReadOnly' => true, 'SQL' => 'ROUND(`UnitPrice` * `Amount`, '.$Config['Finance']['Rounding'].')'), 109 'Položky pohybů' => array('Type' => 'TStockMoveItemSerialListItem', 'Caption' => 'Vztahy sériových čísel', 'Default' => ''), 110 'Sériové čísla' => array('Type' => 'String', 'Caption' => 'Sériové čísla', 'ReadOnly' => true, 111 'SQL' => 'SELECT GROUP_CONCAT(`StockSerialNumber`.`RegNumber` SEPARATOR ", ") FROM `StockMoveItemSerialRel` '. 112 'LEFT JOIN `StockSerialNumber` ON `StockSerialNumber`.`Id`=`StockMoveItemSerialRel`.`StockSerialNumber` '. 113 'WHERE `StockMoveItemSerialRel`.`StockMoveItem`=#Id'), 108 114 ), 109 115 )); … … 129 135 ), 130 136 )); 137 $this->System->FormManager->RegisterClass('StockMoveItemSerialRel', array( 138 'Title' => 'Vztah položky skladových pohybů a sériových čísel', 139 'Table' => 'StockMoveItemSerialRel', 140 'Items' => array( 141 'StockMoveItem' => array('Type' => 'TStockMoveItem', 'Caption' => 'Položky pohybu', 'Default' => ''), 142 'StockSerialNumber' => array('Type' => 'TStockSerialNumber', 'Caption' => 'Sériové číslo', 'Default' => ''), 143 ), 144 )); 131 145 $this->System->FormManager->RegisterFormType('TStockMoveItemListStockMove', array( 132 146 'Type' => 'ManyToOne', … … 157 171 'Filter' => '1', 158 172 )); 173 $this->System->FormManager->RegisterFormType('TStockMoveItemSerialListItem', array( 174 'Type' => 'ManyToOne', 175 'Table' => 'StockMoveItemSerialRel', 176 'Id' => 'Id', 177 'Ref' => 'StockMoveItem', 178 'Filter' => '1', 179 )); 180 $this->System->FormManager->RegisterFormType('TStockMoveItemSerialListSerial', array( 181 'Type' => 'ManyToOne', 182 'Table' => 'StockMoveItemSerialRel', 183 'Id' => 'Id', 184 'Ref' => 'StockSerialNumber', 185 'Filter' => '1', 186 )); 159 187 $this->System->FormManager->RegisterFormType('TStockMove', array( 160 188 'Type' => 'Reference', … … 162 190 'Id' => 'Id', 163 191 'Name' => '(SELECT `DocumentLineCode`.`Name` FROM `DocumentLineCode` WHERE `Id`=`StockMove`.`BillCode`)', 192 'Filter' => '1', 193 )); 194 $this->System->FormManager->RegisterFormType('TStockMoveItem', array( 195 'Type' => 'Reference', 196 'Table' => 'StockMoveItem', 197 'Id' => 'Id', 198 'Name' => '(SELECT `Name` FROM `Product` WHERE `Product`.`Id`=`StockMoveItem`.`Product`)', 164 199 'Filter' => '1', 165 200 ));
Note:
See TracChangeset
for help on using the changeset viewer.