Changeset 761


Ignore:
Timestamp:
Nov 4, 2015, 9:00:41 AM (9 years ago)
Author:
chronos
Message:
  • Fixed: Generation of new invoices.
  • Fixed: Presetting values for pairing imported operations from bank account.
  • Fixed: Firewall NAT rules error.
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r760 r761  
    11<?php
    22
    3 $Revision = 760; // Subversion revision
     3$Revision = 761; // Subversion revision
    44$DatabaseRevision = 759; // SQL structure revision
    55$ReleaseTime = strtotime('2015-10-26');
  • trunk/Common/Setup/Updates.php

    r759 r761  
    15831583  $Manager->Execute('ALTER TABLE `Scheduler` ADD `Duration` INT NOT NULL AFTER `Period`;');
    15841584}
     1585
     1586/*
     1587function UpdateTo761($Manager)
     1588{
     1589  $Manager->Execute('INSERT INTO `MACAddress` (SELECT "" AS `Id`,`MAC` AS `Value` FROM `NetworkSignal` GROUP BY `MAC`)');
     1590  $Manager->Execute('ALTER TABLE `NetworkSignal` ADD `Address` INT NOT NULL AFTER `MAC`;');
     1591  $Manager->Execute('UPDATE `NetworkSignal` SET `Address`=(SELECT `Id` FROM `MACAddress` WHERE `MACAddress`.`Value`=`NetworkSignal`.`MAC`)');
     1592}
     1593*/
    15851594
    15861595class Updates
  • trunk/Modules/Finance/Finance.php

    r760 r761  
    124124      $Group = $DbResult->fetch_assoc();
    125125      return($Group);
    126     } else die('Finance group not found');
     126    } else die('Finance group id '.$Id.' not found in table '.$Table);
    127127  }
    128128
     
    167167        $Consumption = 0;
    168168      }
     169      $Consumption = 0;
    169170      $this->Database->insert('MemberPayment', array('Member' => $Member['Id'],
    170171          'MonthlyInternet' => $MonthlyInet,
  • trunk/Modules/Finance/Manage.php

    r748 r761  
    177177
    178178        // Load invoice group
    179         $FinanceGroup = $this->System->Modules['Finance']->GetFinanceGroupById($InvoiceGroupId, 'FinanceInvoice');
     179        $FinanceGroup = $this->System->Modules['Finance']->GetFinanceGroupById($InvoiceGroupId, 'FinanceInvoiceGroup');
    180180        foreach($InvoiceItems as $Index => $Item) {
    181181          $InvoiceItems[$Index]['Price'] = $Item['Price'] * $FinanceGroup['ValueSign'];
     
    271271    $Row = $DbResult->fetch_row();
    272272    $TotalMemberCash = $Row[0];
    273     $Output .= 'Stav pokladny: Členové('.$TotalMemberCash.')';
     273    $Output .= 'Stav pokladny: Členové('.round($TotalMemberCash).')<br/>';
    274274
    275275    $DbResult = $this->Database->query('SELECT SUM(`Product`.`Consumption`) AS `Consumption` FROM `StockSerialNumber` '.
  • trunk/Modules/FinanceBankAPI/FinanceBankAPI.php

    r755 r761  
    8686    $Preset = array(
    8787      'presetTime' => $Item['Time'],
    88       'presetValue' => $Item['Value'],
     88      'presetValueUser' => abs($Item['Value']),
    8989      'presetTaxable' => 1,
    9090      'presetText' => $Item['Description'],
    9191      'presetNetwork' => 1,
    9292      'presetBankAccount' => $Item['BankAccount'],
    93       'presetDocumentLine' => $FinanceGroup['DocumentLine']);
     93      'presetGroup' => $FinanceGroup['Id']);
    9494    return($Preset);
    9595  }
  • trunk/Modules/NetworkConfigRouterOS/Generators/FirewallNAT.php

    r738 r761  
    119119// Redirect unregistred clients to free access activation page
    120120$Items[] = array('chain' => 'dstnat', 'dst-address' => '!10.145.0.0/16',
    121   'src-address-list' => 'unregistred', 'in-interface' => $LocalInterface,
     121  'src-address-list' => 'unregistred', 'in-interface' => $LocalInterface, 'protocol' => 'tcp',
    122122  'action' => 'dst-nat', 'to-addresses' => '10.145.64.8', 'to-ports' => 82, 'comment' => 'Redirect_unregistred');
    123123
  • trunk/Modules/Scheduler/Scheduler.php

    r760 r761  
    8282        $Duration = $StopTime - $StartTime;
    8383        $this->Database->update('Scheduler', 'Id='.$DbRow['Id'],
    84           array('Log' => $Output, 'LastExecutedTime' => TimeToMysqlDateTime($StartTime)));
     84          array('Log' => $Output, 'LastExecutedTime' => TimeToMysqlDateTime($StartTime),
     85            'Duration' => $Duration));
    8586        if($DbRow['Period'] != '') {
    8687          if($DbRow['ScheduledTime'] == '') $NewScheduledTime = $StartTime + $DbRow['Period'];
  • trunk/Modules/Subject/Subject.php

    r755 r761  
    3636        'Invoices' => array('Type' => 'TFinanceInvoiceListSubject', 'Caption' => 'Faktury', 'Default' => ''),
    3737        'Payment' => array('Type' => 'Float', 'Caption' => 'Placení', 'Default' => '',
    38           'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => 'IFNULL((SELECT SUM(`FinanceOperation`.`Value`) FROM `FinanceOperation` '.
     38          'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => 'ROUND(IFNULL((SELECT SUM(`FinanceOperation`.`Value`) FROM `FinanceOperation` '.
    3939          'WHERE `FinanceOperation`.`Subject`=#Id), 0) - IFNULL((SELECT SUM(`FinanceInvoice`.`Value`) FROM `FinanceInvoice` '.
    40           'WHERE `FinanceInvoice`.`Subject`=#Id), 0)'),
    41         'BankAccounts' => array('Type' => 'TFinanceBankAccountListSubject', 'Caption' => 'Bankovní účety', 'Default' => ''),
     40          'WHERE `FinanceInvoice`.`Subject`=#Id), 0))'),
     41        'BankAccounts' => array('Type' => 'TFinanceBankAccountListSubject', 'Caption' => 'Bankovní účty', 'Default' => ''),
    4242      ),
    4343    ));
Note: See TracChangeset for help on using the changeset viewer.