Changeset 679


Ignore:
Timestamp:
Jul 26, 2014, 9:25:03 PM (10 years ago)
Author:
chronos
Message:
  • Přidáno: U zařízení je možno nastavit ozančení použitého produktu.
  • Upraveno: Umožněno přidávat rozhraní bez IP adresy. Potřeba pro registraci wifi rozhraní bez ip zapoojených v mostu pro měření signálu.
Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/FormClasses.php

    r677 r679  
    576576    'Filter' => '1',
    577577  ),
     578  'TNetworkDeviceListProduct' => array(
     579    'Type' => 'ManyToOne',
     580    'Table' => 'NetworkDevice',
     581    'Id' => 'Id',
     582    'Ref' => 'Product',
     583    'Filter' => '1',
     584  ),
    578585  'TDocumentLine' => array(
    579586    'Type' => 'Reference',
  • trunk/Application/Version.php

    r678 r679  
    11<?php
    22
    3 $Revision = 678; // Subversion revision
    4 $DatabaseRevision = 678; // SQL structure revision
    5 $ReleaseTime = strtotime('2014-07-25');
     3$Revision = 679; // Subversion revision
     4$DatabaseRevision = 679; // SQL structure revision
     5$ReleaseTime = strtotime('2014-07-26');
  • trunk/Common/Global.php

    r668 r679  
    365365  global $Database;
    366366
    367   $DbResult = $Database->query('SELECT Id FROM Member WHERE (SELECT Member FROM NetworkDevice WHERE (SELECT Device FROM NetworkInterface WHERE LocalIP = "'.$IP.'") = NetworkDevice.Id) = Member.Id');
     367  $DbResult = $Database->query('SELECT Id FROM Member WHERE '.
     368  '(SELECT Member FROM NetworkDevice WHERE (SELECT Device FROM NetworkInterface '.
     369  'WHERE LocalIP = "'.$IP.'") = NetworkDevice.Id) = Member.Id');
    368370  if($DbResult->num_rows > 0)
    369371  {
  • trunk/Common/Setup/Updates.php

    r678 r679  
    879879}
    880880
     881function UpdateTo679($Manager)
     882{
     883  $Manager->Execute('ALTER TABLE `NetworkDevice` ADD `Product` INT NOT NULL AFTER `Id` ,
     884ADD INDEX ( `Product` ) ;');
     885}
     886
    881887class Updates
    882888{
     
    926932      674 => array('Revision' => 676, 'Function' => 'UpdateTo676'),
    927933      676 => array('Revision' => 678, 'Function' => 'UpdateTo678'),
     934      678 => array('Revision' => 679, 'Function' => 'UpdateTo679'),
    928935    ));
    929936  }
  • trunk/Modules/Network/Network.php

    r677 r679  
    156156        'Interfaces' => array('Type' => 'TInterfaceList', 'Caption' => 'Rozhraní', 'Default' => ''),
    157157        'MapPosition' => array('Type' => 'TMapPosition', 'Caption' => 'Pozice na mapě', 'Default' => '0', 'Null' => true),
     158        'Product' => array('Type' => 'TProduct', 'Caption' => 'Produkt', 'Default' => '', 'Null' => true),
    158159        'LoginName' => array('Type' => 'String', 'Caption' => 'Přihlašovací jméno', 'Default' => '', 'Null' => true),
    159160        'LoginPassword' => array('Type' => 'String', 'Caption' => 'Přihlašovací heslo', 'Default' => '', 'Null' => true),
     
    180181        'Type' => array('Type' => 'TNetworkInterfaceType', 'Caption' => 'Typ', 'Default' => '0'),
    181182        'MAC' => array('Type' => 'MacAddress', 'Caption' => 'Fyzická adresa (MAC)', 'Default' => ''),
    182         'LocalIP' => array('Type' => 'IPv4Address', 'Caption' => 'IPv4', 'Default' => ''),
     183        'LocalIP' => array('Type' => 'IPv4Address', 'Caption' => 'IPv4', 'Default' => '', 'Null' => true),
    183184        'IPv6' => array('Type' => 'IPv6Address', 'Caption' => 'IPv6', 'Default' => '', 'Null' => true),
    184185        'ExternalIP' => array('Type' => 'IPv4Address', 'Caption' => 'Veřejná IPv4', 'Default' => '', 'Null' => true),
  • trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php

    r676 r679  
    3737    echo($Device['LocalIP']."\n");
    3838    $Routerboard = new RouterosAPI();
     39    //$Routerboard->SSL = true;
     40    //$Routerboard->Port = 8729;
    3941    $Routerboard->Connect($Device['LocalIP'], $Config['API']['UserName'], $Config['API']['Password']);
    4042    $Routerboard->Write('/interface/wireless/registration-table/getall', false);
  • trunk/Modules/Stock/Stock.php

    r603 r679  
    1313    $this->Dependencies = array('User', 'Customer', 'Network');
    1414  }
    15  
     15
    1616  function DoStart()
    1717  {
     
    3131        'UnitOfMeasure' => array('Type' => 'TUnitOfMeasure', 'Caption' => 'Měrná jednotka', 'Default' => '', 'Null' => true),
    3232        'StockItems' => array('Type' => 'TStockItemListProduct', 'Caption' => 'Položky na skladě', 'Default' => '', 'Suffix' => 'ks'),
     33        'NetworkDevices' => array('Type' => 'TNetworkDeviceListProduct', 'Caption' => 'Síťová zařízení', 'Default' => ''),
    3334      ),
    3435    ));
     
    5152        'Info' => array('Type' => 'Text', 'Caption' => 'Informace', 'Default' => ''),
    5253        'Esemble' => array('Type' => 'TStockItem', 'Caption' => 'Celek', 'Default' => ''),
    53         'Parts' => array('Type' => 'TStockItemListStockItem', 'Caption' => 'Části', 'Default' => ''),         
     54        'Parts' => array('Type' => 'TStockItemListStockItem', 'Caption' => 'Části', 'Default' => ''),
    5455      ),
    5556    ));
     
    6263        'Location' => array('Type' => 'TMember', 'Caption' => 'Umístění', 'Default' => '', 'Null' => true),
    6364        'Items' => array('Type' => 'TStockItemListStock', 'Caption' => 'Položky', 'Default' => ''),
    64         'ItemsCount' => array('Type' => 'Integer', 'Caption' => 'Položek', 'Default' => '', 
     65        'ItemsCount' => array('Type' => 'Integer', 'Caption' => 'Položek', 'Default' => '',
    6566          'ReadOnly' => true, 'SQL' => '(SELECT COUNT(*) FROM `StockItem` WHERE '.
    6667          '(`StockItem`.`Stock`=#Id) AND (`StockItem`.`TimeElimination` IS NULL))'),
    67         'TotalPrice' => array('Type' => 'Integer', 'Caption' => 'Celková cena', 'Default' => '', 
     68        'TotalPrice' => array('Type' => 'Integer', 'Caption' => 'Celková cena', 'Default' => '',
    6869          'ReadOnly' => true, 'SQL' => '(SELECT SUM(`SellPrice`) FROM `StockItem` WHERE '.
    6970          '(`StockItem`.`Stock`=#Id) AND (`StockItem`.`TimeElimination` IS NULL))', 'Suffix' => 'Kč'),
    7071      ),
    7172    ));
    72   } 
     73  }
    7374}
Note: See TracChangeset for help on using the changeset viewer.