Changeset 446


Ignore:
Timestamp:
Oct 15, 2012, 9:32:09 PM (12 years ago)
Author:
chronos
Message:
  • Přidáno: Tabulky Správy dat pro TV kanály.
  • Upraveno: Systém tabulek produktů a skladových položek.
Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/form_classes.php

    r445 r446  
    22
    33$FormClasses = array(
     4  'TV' => array(
     5    'Title' => 'TV kanály',
     6    'Table' => 'TV',
     7    'DefaultSortColumn' => 'Name',
     8    'Items' => array(
     9      'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
     10      'Frequency' => array('Type' => 'Integer', 'Caption' => 'Frekvence', 'Default' => ''),
     11      'Norm' => array('Type' => 'String', 'Caption' => 'Video norma', 'Default' => ''),
     12      'Homepage' => array('Type' => 'Hyperlink', 'Caption' => 'Web', 'Default' => ''),
     13      'Language' => array('Type' => 'TLanguage', 'Caption' => 'Jazyk', 'Default' => ''),
     14      'ShortName' => array('Type' => 'String', 'Caption' => 'Zkratka', 'Default' => ''),
     15      'Stream' => array('Type' => 'Hyperlink', 'Caption' => 'Proud', 'Default' => ''),
     16      'StreamWeb' => array('Type' => 'Hyperlink', 'Caption' => 'Proud web', 'Default' => ''),
     17      'SourceType' => array('Type' => 'String', 'Caption' => 'Typ zdroje', 'Default' => ''),
     18      'Category' => array('Type' => 'TTVGroup', 'Caption' => 'Kategorie', 'Default' => ''),
     19    ),
     20  ),
     21  'TVGroup' => array(
     22    'Title' => 'Skupiny TV kanálů',
     23    'Table' => 'TVGroup',
     24    'DefaultSortColumn' => 'Name',
     25    'Items' => array(
     26      'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
     27    ),
     28  ),
     29  'Language' => array(
     30    'Title' => 'Jazyky',
     31    'Table' => 'Language',
     32    'DefaultSortColumn' => 'Name',
     33    'Items' => array(
     34      'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
     35    ),
     36  ),
    437  'Task' => array(
    538    'Title' => 'Úkoly',
     
    1952    ),
    2053  ),
     54  'UnitOfMeasure' => array(
     55    'Title' => 'Měrné jednotky',
     56    'Table' => 'UnitOfMeasure',
     57    'DefaultSortColumn' => 'Name',
     58    'Items' => array(
     59      'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
     60      'Unit' => array('Type' => 'String', 'Caption' => 'Jednotka', 'Default' => ''),
     61    ),
     62  ),
    2163  'TaskGroup' => array(
    2264    'Title' => 'Kategorie úkolu',
     
    3173  ),
    3274  'Product' => array(
    33     'Title' => 'Zboží',
     75    'Title' => 'Produkty',
    3476    'Table' => 'Product',
    3577    'DefaultSortColumn' => 'Name',
    3678    'Items' => array(
    3779      'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
    38       'Price' => array('Type' => 'Integer', 'Caption' => 'Cena', 'Default' => '0'),
    39       'Count' => array('Type' => 'Integer', 'Caption' => 'Počet', 'Default' => ''),
    40       'Date' => array('Type' => 'Date', 'Caption' => 'Datum', 'Default' => ''),
    41       'Segment' => array('Type' => 'TNetworkSegment', 'Caption' => 'Úsek', 'Default' => ''),
    42       'Used' => array('Type' => 'Boolean', 'Caption' => 'Použito', 'Default' => '0'),
    43       'Info' => array('Type' => 'Text', 'Caption' => 'Informace', 'Default' => ''),
    44       'User' => array('Type' => 'TMember', 'Caption' => 'Uživatel', 'Default' => ''),
     80      'SellPrice' => array('Type' => 'Integer', 'Caption' => 'Cena', 'Default' => '0'),
     81      'VAT' => array('Type' => 'Integer', 'Caption' => 'DPH', 'Default' => '0'),
    4582      'Consumption' => array('Type' => 'Integer', 'Caption' => 'Spotřeba', 'Default' => ''),
    46       'DeviceId' => array('Type' => 'String', 'Caption' => 'Označení', 'Default' => ''),
    47       'DeprecatedPrice' => array('Type' => 'Float', 'Caption' => 'Odpisová cena', 'Default' => ''),
    48       'StockCard' => array('Type' => 'TStockCard', 'Caption' => 'Zboží', 'Default' => ''),
     83      'Manufacturer' => array('Type' => 'TSubject', 'Caption' => 'Výrobce', 'Default' => ''),
     84      'Code' => array('Type' => 'String', 'Caption' => 'Kód', 'Default' => ''),
     85      'UnitOfMeasure' => array('Type' => 'TUnitOfMeasure', 'Caption' => 'Měrná jednotka', 'Default' => ''),
     86      'StockItems' => array('Type' => 'TStockItemListProduct', 'Caption' => 'Položky na skladě', 'Default' => ''),
     87    ),
     88  ),
     89  'StockItem' => array(
     90    'Title' => 'Skladové položky',
     91    'Table' => 'StockItem',
     92    'DefaultSortColumn' => 'Id',
     93    'Items' => array(
     94      'Stock' => array('Type' => 'TStock', 'Caption' => 'Sklad', 'Default' => ''),
     95      'Product' => array('Type' => 'TProduct', 'Caption' => 'Produkt', 'Default' => ''),
     96      'TimeEnlistment' => array('Type' => 'Date', 'Caption' => 'Datum zařazení', 'Default' => ''),
     97      'TimeElimination' => array('Type' => 'Date', 'Caption' => 'Datum vyřazení', 'Default' => ''),
     98      'Amount' => array('Type' => 'Integer', 'Caption' => 'Množství', 'Default' => '1'),
     99      'SerialNumber' => array('Type' => 'String', 'Caption' => 'Sériové číslo', 'Default' => ''),
     100      'Location' => array('Type' => 'TMember', 'Caption' => 'Umístění', 'Default' => ''),
     101      'Segment' => array('Type' => 'TNetworkSegment', 'Caption' => 'Úsek sítě', 'Default' => ''),
    49102    ),
    50103  ),
     
    55108    'Items' => array(
    56109      'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
     110      'Location' => array('Type' => 'TMember', 'Caption' => 'Umístění', 'Default' => ''),
     111      'Items' => array('Type' => 'TStockItemListStock', 'Caption' => 'Položky', 'Default' => ''),
    57112    ),
    58113  ),
     
    618673    'Filter' => '1',
    619674  ),
    620   'TStockCard' => array(
    621     'Type' => 'Reference',
    622     'Table' => 'StockCard',
     675  'TProduct' => array(
     676    'Type' => 'Reference',
     677    'Table' => 'Product',
    623678    'Id' => 'Id',
    624679    'Name' => 'Name',
     
    632687    'Filter' => '1',
    633688  ),
     689  'TStock' => array(
     690    'Type' => 'Reference',
     691    'Table' => 'Stock',
     692    'Id' => 'Id',
     693    'Name' => 'Name',
     694    'Filter' => '1',
     695  ),
     696  'TUnitOfMeasure' => array(
     697    'Type' => 'Reference',
     698    'Table' => 'UnitOfMeasure',
     699    'Id' => 'Id',
     700    'Name' => 'Name',
     701    'Filter' => '1',
     702  ),
     703  'TLanguage' => array(
     704    'Type' => 'Reference',
     705    'Table' => 'Language',
     706    'Id' => 'Id',
     707    'Name' => 'Name',
     708    'Filter' => '1',
     709  ),
     710  'TTVGroup' => array(
     711    'Type' => 'Reference',
     712    'Table' => 'TVGroup',
     713    'Id' => 'Id',
     714    'Name' => 'Name',
     715    'Filter' => '1',
     716  ),
     717  'TStockItemListStock' => array(
     718    'Type' => 'ManyToOne',
     719    'Table' => 'StockItem',
     720    'Id' => 'Id',
     721    'Ref' => 'Stock',
     722    'Filter' => '1',
     723  ),
     724  'TStockItemListProduct' => array(
     725    'Type' => 'ManyToOne',
     726    'Table' => 'StockItem',
     727    'Id' => 'Id',
     728    'Ref' => 'Product',
     729    'Filter' => '1',
     730  ),   
    634731);
    635732
  • trunk/tv/index.php

    r438 r446  
    1919
    2020    $Where =
    21     $DbResult = $this->Database->query('SELECT COUNT(*) FROM `TV` WHERE (`Stream` <> "") OR (`StreamWeb` <> "")');
     21    $DbResult = $this->Database->query('SELECT COUNT(*) FROM `TV` LEFT JOIN `TVGroup` ON `TVGroup`.`Id` = `TV`.`Category` '.
     22      ' LEFT JOIN `Language` ON `Language`.`Id` = `TV`.`Language` WHERE (`TV`.`Stream` <> "") OR (`TV`.`StreamWeb` <> "")');
    2223    $DbRow = $DbResult->fetch_row();
    2324    $PageList = GetPageList($DbRow[0]);   
     
    3637    $Output .= $Order['Output'];
    3738
    38     $Query = 'SELECT * FROM `TV` WHERE (`Stream` <> "") OR (`StreamWeb` <> "") '.$Order['SQL'].$PageList['SQLLimit'];
     39    $Query = 'SELECT `TV`.*, `TVGroup`.`Name` AS `Category`, `Language`.`Name` AS `Language` FROM `TV` LEFT JOIN `TVGroup` ON `TVGroup`.`Id` = `TV`.`Category` '.
     40      ' LEFT JOIN `Language` ON `Language`.`Id` = `TV`.`Language` WHERE (`TV`.`Stream` <> "") OR (`TV`.`StreamWeb` <> "") '.$Order['SQL'].$PageList['SQLLimit'];
    3941
    4042    $DbResult = $this->Database->query($Query);
Note: See TracChangeset for help on using the changeset viewer.