Ignore:
Timestamp:
Feb 22, 2016, 11:17:22 PM (9 years ago)
Author:
chronos
Message:
  • Modified: StockSerialNumber info transformed to separate table so multiple history items with different time can be added to track serial number history.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Stock/Stock.php

    r738 r800  
    3131        'UnitOfMeasure' => array('Type' => 'TUnitOfMeasure', 'Caption' => 'Měrná jednotka', 'Default' => '', 'Null' => true),
    3232        'StockSerialNumbers' => array('Type' => 'TStockSerialNumberListProduct', 'Caption' => 'Položky na skladě', 'Default' => '', 'Suffix' => 'ks'),
     33        'StockState' => array('Type' => 'Integer', 'Caption' => 'Síťová zařízení', 'Default' => '', 'ReadOnly' => true,
     34          'SQL' => 'SELECT SUM(`Amount`) FROM `StockMoveItem` WHERE `StockMoveItem`.`Product`=#Id'),
     35        'StockMoves' => array('Type' => 'TStockMoveItemListProduct', 'Caption' => 'Pohyby na skladě', 'Default' => ''),
    3336        'NetworkDevices' => array('Type' => 'TNetworkDeviceListProduct', 'Caption' => 'Síťová zařízení', 'Default' => ''),
    3437      ),
     
    4952        'RegNumber' => array('Type' => 'String', 'Caption' => 'Evidenční číslo', 'Default' => '', 'Null' => true),
    5053        'Location' => array('Type' => 'TMember', 'Caption' => 'Umístění', 'Default' => '', 'Null' => true),
    51         'Info' => array('Type' => 'Text', 'Caption' => 'Informace', 'Default' => ''),
    5254        'Esemble' => array('Type' => 'TStockSerialNumber', 'Caption' => 'Celek', 'Default' => ''),
    5355        'Parts' => array('Type' => 'TStockSerialNumberListStockSerialNumber', 'Caption' => 'Části', 'Default' => ''),
     56        'History' => array('Type' => 'TStockItemHistoryListStockSerialNumber', 'Caption' => 'Historie', 'Default' => ''),
    5457      ),
    5558    ));
     
    121124      ),
    122125    ));
     126    $this->System->FormManager->RegisterClass('StockItemHistory', array(
     127      'Title' => 'Historie skladové položky',
     128      'Table' => 'StockItemHistory',
     129      'DefaultSortColumn' => 'Time',
     130      'Items' => array(
     131        'Time' => array('Type' => 'DateTime', 'Caption' => 'Čas', 'Default' => ''),
     132        'StockSerialNumber' => array('Type' => 'TStockSerialNumber', 'Caption' => 'Sériové číslo', 'Default' => ''),
     133        'Text' => array('Type' => 'Text', 'Caption' => 'Text', 'Default' => ''),
     134      ),
     135    ));
    123136    $this->System->FormManager->RegisterFormType('TStockMoveItemListStockMove', array(
    124137      'Type' => 'ManyToOne',
     
    128141      'Filter' => '1',
    129142    ));
     143    $this->System->FormManager->RegisterFormType('TStockMoveItemListProduct', array(
     144      'Type' => 'ManyToOne',
     145      'Table' => 'StockMoveItem',
     146      'Id' => 'Id',
     147      'Ref' => 'Product',
     148      'Filter' => '1',
     149    ));
    130150    $this->System->FormManager->RegisterFormType('TStockMoveStock', array(
    131151      'Type' => 'ManyToOne',
     
    161181      'Id' => 'Id',
    162182      'Name' => 'RegNumber',
     183      'Filter' => '1',
     184    ));
     185    $this->System->FormManager->RegisterFormType('TStockItemHistoryListStockSerialNumber', array(
     186      'Type' => 'ManyToOne',
     187      'Table' => 'StockItemHistory',
     188      'Id' => 'Id',
     189      'Ref' => 'StockSerialNumber',
    163190      'Filter' => '1',
    164191    ));
Note: See TracChangeset for help on using the changeset viewer.