Ignore:
Timestamp:
Jan 20, 2012, 3:05:24 PM (13 years ago)
Author:
chronos
Message:
  • Upraveno: Testována instalace čisté databáze na základě definic modulů a jejich modelů.
  • Opraveno: Doplněny definice modelů pro FinanceMonthlyOverall a FinanceCharge.
  • Přidáno: Podpora pro nastavitelnost NULL hodnoty u vlastností modelů.
  • Opraveno: Řešení správného kaskádového načítání závislostí modulů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Finance/Manage.php

    r375 r377  
    279279   
    280280    // Načti poslední měsíční přehled a nastavení
    281     $DbResult = $this->Database->select('finance_monthly_overall', '*', '1 ORDER BY date DESC LIMIT 1');
     281    $DbResult = $this->Database->select('FinanceMonthlyOverall', '*', '1 ORDER BY Date DESC LIMIT 1');
    282282    $Overall = $DbResult->fetch_array();
    283283
    284284    $Output -= 'Datum: '.date('j.n.Y').'<br />';
    285285   
    286     $Datum = explode('-', $Overall['date']);
     286    $Datum = explode('-', $Overall['Date']);
    287287    $Mesic = date('m') + 0;
    288288
     
    359359      // Update finance charge
    360360      $Output .= 'Měním aktuální parametry sítě...<br>';
    361       $this->Database->delete('finance_charge', 'period = 0');
    362       $DbResult = $this->Database->select('finance_charge', '*', 'period = 1');
     361      $this->Database->delete('FinanceCharge', 'Period = 0');
     362      $DbResult = $this->Database->select('FinanceCharge', '*', 'Period = 1');
    363363      $Charge = $DbResult->fetch_assoc();
    364364      //print_r($Charge);
    365       $DbResult = $this->Database->insert('finance_charge', array('period' => 0, 'internet' => $Charge['internet'], 'internet_speed' => $Charge['internet_speed'], 'internet_speed_reserve' => $Charge['internet_speed_reserve'], 'administration_per_user' => $Charge['administration_per_user'], 'kWh' => $Charge['kWh'], 'base_speed_element' => $Charge['base_speed_element'], 'BaseTariffPrice' => $Charge['BaseTariffPrice'], 'TopTariffPrice' => $Charge['TopTariffPrice']));
     365      $DbResult = $this->Database->insert('FinanceCharge', array('Period' => 0,
     366         'Internet' => $Charge['Internet'], 'InternetSpeed' => $Charge['InternetSpeed'],
     367          'InternetSpeedReserve' => $Charge['InternetSpeedReserve'],
     368          'AdministrationPerUser' => $Charge['AdministrationPerUser'],
     369          'kWh' => $Charge['kWh'], 'BaseSpeedElement' => $Charge['BaseSpeedElement'],
     370          'BaseTariffPrice' => $Charge['BaseTariffPrice'], 'TopTariffPrice' => $Charge['TopTariffPrice']));
    366371
    367372      $Output .= 'Přidávám měsíční přehled...<br />';
    368       $this->Database->insert('finance_monthly_overall', array('date' => 'NOW()', 'money' => $Finance->Internet, 'kWh' => $Finance->kWh, 'administration' => $Finance->Sprava, 'administration_total' => $SpravaCelkem, 'consumption_total' => $TotalConsumptionCost, 'total_paid' => $Finance->TotalPaid, 'BaseTariffPrice' => $Charge['BaseTariffPrice'], 'TopTariffPrice' => $Charge['TopTariffPrice'], 'member_count' => $Finance->InternetUsers));
     373      $this->Database->insert('FinanceMonthlyOverall', array('Date' => 'NOW()',
     374        'Money' => $Finance->Internet, 'kWh' => $Finance->kWh,
     375        'Administration' => $Finance->Sprava, 'AdministrationTotal' => $SpravaCelkem,
     376        'ConsumptionTotal' => $TotalConsumptionCost, 'TotalPaid' => $Finance->TotalPaid,
     377        'BaseTariffPrice' => $Charge['BaseTariffPrice'], 'TopTariffPrice' => $Charge['TopTariffPrice'], 'MemberCount' => $Finance->InternetUsers));
    369378
    370379      // Update tarrifs
Note: See TracChangeset for help on using the changeset viewer.