Changeset 377 for trunk/Modules/Finance/Manage.php
- Timestamp:
- Jan 20, 2012, 3:05:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Manage.php
r375 r377 279 279 280 280 // 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'); 282 282 $Overall = $DbResult->fetch_array(); 283 283 284 284 $Output -= 'Datum: '.date('j.n.Y').'<br />'; 285 285 286 $Datum = explode('-', $Overall[' date']);286 $Datum = explode('-', $Overall['Date']); 287 287 $Mesic = date('m') + 0; 288 288 … … 359 359 // Update finance charge 360 360 $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'); 363 363 $Charge = $DbResult->fetch_assoc(); 364 364 //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'])); 366 371 367 372 $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)); 369 378 370 379 // Update tarrifs
Note:
See TracChangeset
for help on using the changeset viewer.