Changeset 407 for trunk/finance/manage.php
- Timestamp:
- Oct 4, 2012, 8:12:31 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/manage.php
r396 r407 280 280 281 281 // Načti poslední měsíční přehled a nastavení 282 $DbResult = $this->Database->select(' finance_monthly_overall', '*', '1 ORDER BY date DESC LIMIT 1');282 $DbResult = $this->Database->select('FinanceMonthlyOverall', '*', '1 ORDER BY Date DESC LIMIT 1'); 283 283 $Overall = $DbResult->fetch_array(); 284 284 285 285 $Output -= 'Datum: '.date('j.n.Y').'<br />'; 286 286 287 $Datum = explode('-', $Overall[' date']);287 $Datum = explode('-', $Overall['Date']); 288 288 $Mesic = date('m') + 0; 289 289 … … 360 360 // Update finance charge 361 361 $Output .= 'Měním aktuální parametry sítě...<br>'; 362 $this->Database->delete(' finance_charge', 'period = 0');363 $DbResult = $this->Database->select(' finance_charge', '*', 'period = 1');362 $this->Database->delete('FinanceCharge', 'Period = 0'); 363 $DbResult = $this->Database->select('FinanceCharge', '*', 'Period = 1'); 364 364 $Charge = $DbResult->fetch_assoc(); 365 365 //print_r($Charge); 366 $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']));366 $DbResult = $this->Database->insert('FinanceCharge', array('Period' => 0, 'Internet' => $Charge['Internet'], 'InternetSpeed' => $Charge['InternetSpeed'], 'InternetSpeedReserve' => $Charge['InternetSpeedReserve'], 'AdministrationPerUser' => $Charge['AdministrationPerUser'], 'kWh' => $Charge['kWh'], 'BaseSpeedElement' => $Charge['BaseSpeedElement'], 'BaseTariffPrice' => $Charge['BaseTariffPrice'], 'TopTariffPrice' => $Charge['TopTariffPrice'])); 367 367 368 368 $Output .= 'Přidávám měsíční přehled...<br />'; 369 $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));369 $this->Database->insert('FinanceMonthlyOverall', array('Date' => 'NOW()', 'Money' => $Finance->Internet, 'kWh' => $Finance->kWh, 'Administration' => $Finance->Sprava, 'AdministrationTotal' => $SpravaCelkem, 'ConsumptionTotal' => $TotalConsumptionCost, 'TotalPaid' => $Finance->TotalPaid, 'BaseTariffPrice' => $Charge['BaseTariffPrice'], 'TopTariffPrice' => $Charge['TopTariffPrice'], 'MemberCount' => $Finance->InternetUsers)); 370 370 371 371 // Update tarrifs
Note:
See TracChangeset
for help on using the changeset viewer.