Changeset 736 for trunk/Modules/Stock/Stock.php
- Timestamp:
- Apr 6, 2015, 11:08:10 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Stock/Stock.php
r715 r736 68 68 'ReadOnly' => true, 'SQL' => '(SELECT SUM(`SellPrice`) FROM `StockSerialNumber` WHERE '. 69 69 '(`StockSerialNumber`.`Stock`=#Id) AND (`StockSerialNumber`.`TimeElimination` IS NULL))', 'Suffix' => 'Kč'), 70 'Moves' => array('Type' => 'TStockMoveStock', 'Caption' => 'Pohyby', 'Default' => ''), 70 71 ), 71 72 )); … … 83 84 'Price' => array('Type' => 'Float', 'Caption' => 'Cena', 'Default' => '', 84 85 'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => '(SELECT SUM(`StockMoveItem`.`UnitPrice` * `StockMoveItem`.`Amount`) FROM `StockMoveItem` '. 86 'WHERE `StockMoveItem`.`StockMove`=#Id)'), 87 'Items' => array('Type' => 'TStockMoveItemListStockMove', 'Caption' => 'Položky', 'Default' => ''), 88 ), 89 'BeforeInsert' => array($this, 'BeforeInsertStockMove'), 90 )); 91 $this->System->FormManager->RegisterClass('StockMoveUnion', array( 92 'Title' => 'Skladový pohyb', 93 'BaseTable' => 'StockMove', 94 'DefaultSortColumn' => 'Time', 95 'SQL' => '(SELECT *, -1 AS `Direction`, `StockFrom` AS `Stock`, `StockTo` AS `StockOther` FROM `StockMove`) '. 96 'UNION (SELECT *, 1 AS `Direction`, `StockTo` AS `Stock`, `StockFrom` AS `StockOther` FROM `StockMove`)', 97 'Items' => array( 98 'DocumentLine' => array('Type' => 'TDocumentLine', 'Caption' => 'Dokladová řada', 'Default' => ''), 99 'BillCode' => array('Type' => 'String', 'Caption' => 'Označení', 'Default' => ''), 100 'Time' => array('Type' => 'DateTime', 'Caption' => 'Čas', 'Default' => ''), 101 'Stock' => array('Type' => 'TStock', 'Caption' => 'První sklad', 'Default' => '', 'Null' => true), 102 'StockOther' => array('Type' => 'TStock', 'Caption' => 'Druhý sklad', 'Default' => '', 'Null' => true), 103 'File' => array('Type' => 'TFile', 'Caption' => 'Doklad', 'Default' => '', 'Null' => true), 104 'Price' => array('Type' => 'Float', 'Caption' => 'Cena', 'Default' => '', 105 'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => '(SELECT `TX`.`Direction` * SUM(`StockMoveItem`.`UnitPrice` * `StockMoveItem`.`Amount`) FROM `StockMoveItem` '. 85 106 'WHERE `StockMoveItem`.`StockMove`=#Id)'), 86 107 'Items' => array('Type' => 'TStockMoveItemListStockMove', 'Caption' => 'Položky', 'Default' => ''), … … 107 128 'Filter' => '1', 108 129 )); 130 $this->System->FormManager->RegisterFormType('TStockMoveStock', array( 131 'Type' => 'ManyToOne', 132 'Table' => 'StockMoveUnion', 133 'Id' => 'Id', 134 'Ref' => 'Stock', 135 'Filter' => '1', 136 )); 109 137 $this->System->FormManager->RegisterFormType('TStockMove', array( 110 138 'Type' => 'Reference',
Note:
See TracChangeset
for help on using the changeset viewer.