Changeset 724 for trunk/Modules/Finance
- Timestamp:
- Jan 3, 2015, 8:40:52 PM (10 years ago)
- Location:
- trunk/Modules/Finance
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Finance.php
r722 r724 7 7 include_once(dirname(__FILE__).'/Zivnost.php'); 8 8 9 // TODO: Move constants to Finance module configuration 9 10 define('TARIFF_FREE', 7); 10 11 define('INVOICE_DUE_DAYS', 15); … … 34 35 var $TotalPaid; 35 36 var $TotalInternetPaid; 36 var $Tariffs;37 37 var $MainSubject; 38 38 var $BillingPeriods; 39 39 var $DirectoryId; 40 41 function LoadTariffs()42 {43 $this->Tariffs = array();44 $DbResult = $this->Database->select('Service', '*', '`ReplaceId` IS NULL ORDER BY `Name`, `InternetSpeedMax`');45 while($Tariff = $DbResult->fetch_array())46 {47 $Tariff['InternetSpeedMin'] = $Tariff['InternetSpeedMin'] * 1000;48 $Tariff['InternetSpeedMax'] = $Tariff['InternetSpeedMax'] * 1000;49 $this->Tariffs[$Tariff['Id']] = $Tariff;50 }51 }52 40 53 41 function LoadMonthParameters($Period = 1) // 0 - now, 1 - next month … … 85 73 $this->TotalInternetPaid = $Row['MonthlyInternet']; 86 74 $this->TotalPaid = $Row['MonthlyTotal']; 87 88 $this->LoadTariffs($Period);89 75 } 90 76 -
trunk/Modules/Finance/Manage.php
r720 r724 238 238 $MonthCurrent = date('m') + 0; 239 239 240 $Output .= $Finance->LoadTariffs();241 240 $Output .= $Finance->RecalculateMemberPayment(); 242 241 -
trunk/Modules/Finance/UserState.php
r721 r724 68 68 $Finance = &$this->System->Modules['Finance']; 69 69 $Finance->LoadMonthParameters(0); 70 $this->System->Modules['Finance']->LoadTariffs(1);71 70 72 71 // Determine which customer should be displayed -
trunk/Modules/Finance/Zivnost.php
r720 r724 55 55 { 56 56 if(!$this->System->User->CheckPermission('Finance', 'TradingStatus')) return('Nemáte oprávnění'); 57 $this->System->Modules['Finance']->LoadTariffs(1);58 //TransformFinance();59 57 60 58 $Output = '';
Note:
See TracChangeset
for help on using the changeset viewer.