- Timestamp:
- Apr 12, 2024, 9:43:27 PM (8 months ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r967 r968 1 1 <?php 2 2 3 $Revision = 96 7; // Subversion revision3 $Revision = 968; // Subversion revision 4 4 $DatabaseRevision = 967; // SQL structure revision 5 $ReleaseTime = strtotime('2024-0 3-06');5 $ReleaseTime = strtotime('2024-04-12'); -
trunk/Modules/Customer/Customer.php
r961 r968 46 46 'ItemActions' => array( 47 47 array('Caption' => 'Klientská sekce', 'URL' => '/finance/platby/?i=#RowId'), 48 array('Caption' => 'Email s vyúčtováním do fronty', 'URL' => '/finance/sprava/?Operation=SendPaymentEmail&i=#RowId'), 48 49 ), 49 50 )); -
trunk/Modules/Finance/Finance.php
r967 r968 42 42 $this->System->RegisterPage(['finance', 'platby'], 'PageFinanceUserState'); 43 43 $this->System->RegisterPage(['finance', 'import'], 'PageFinanceImportPayment'); 44 $this->System->RegisterPage(['finance', 'zivnost'], 'PageFinanceTaxFiling'); 44 $this->System->RegisterPage(['finance', 'zivnost'], 'PageFinanceTaxFiling'); 45 45 46 46 $this->System->FormManager->RegisterClass('FinanceOperation', array( -
trunk/Modules/Finance/FinanceModels.php
r960 r968 40 40 $DbResult = $this->Database->query('SELECT * FROM `FinanceBillingPeriod`'); 41 41 while ($BillingPeriod = $DbResult->fetch_assoc()) 42 { 42 43 $this->BillingPeriods[$BillingPeriod['Id']] = $BillingPeriod; 44 } 43 45 44 46 // Period parameter is not used as it have to be determined from item replacement … … 65 67 66 68 $DbResult = $this->Database->query('SELECT SUM(`MemberPayment`.`MonthlyInternet`) AS `MonthlyInternet`, '. 67 68 69 'SUM(`MemberPayment`.`MonthlyTotal`) AS `MonthlyTotal` '. 70 'FROM `MemberPayment` JOIN `Member` ON `Member`.`Id`=`MemberPayment`.`Member` WHERE `Member`.`Blocked`=0'); 69 71 $Row = $DbResult->fetch_assoc(); 70 72 $this->TotalInternetPaid = $Row['MonthlyInternet']; -
trunk/Modules/Finance/Import.php
r929 r968 6 6 { 7 7 parent::__construct($System); 8 $this-> itle = 'Import plateb';8 $this->Title = 'Import plateb'; 9 9 $this->ParentClass = 'PageFinance'; 10 10 } … … 68 68 array_shift($Data); 69 69 $Automatic = ''; 70 $Manual = '';71 70 $Output = '<form action="?Operation=insert" method="post">'; 72 71 $I = 0; -
trunk/Modules/Finance/Manage.php
r939 r968 37 37 case 'RegenerateOperation': 38 38 $Output = $this->GenerateOperation('AND (Id='.$_GET['i'].')'); 39 break; 40 case 'SendPaymentEmail': 41 $Output = $this->SendPaymentEmail($_GET['i']); 39 42 break; 40 43 default: … … 171 174 $Period = $this->GetBillingPeriod($Member['BillingPeriod']); 172 175 173 / * Check if need to produce new invoice for customer */176 // Check if need to produce new invoice for customer 174 177 if (($Period['MonthCount'] > 0) and ($Member['Blocked'] == 0) and 175 178 ($Period['From'] > $Member['BillingPeriodLastUnixTime'])) … … 195 198 { 196 199 $InvoiceGroupId = INVOICE_GROUP_OUT; 197 } else { 200 } else 201 { 198 202 $InvoiceGroupId = INVOICE_GROUP_IN; 199 203 } … … 215 219 $Output .= $this->SendPaymentEmail($Member['Id']); 216 220 } 217 / * Update last billing day */221 // Update last billing day 218 222 $this->Database->update('Member', '`Id`='.$Member['Id'], 219 223 array('BillingPeriodLastDate' => TimeToMysqlDateTime($Period['To']))); … … 346 350 function SendPaymentEmail(string $MemberId, string $FileId = ''): string 347 351 { 352 $Finance = &ModuleFinance::Cast($this->System->GetModule('Finance'))->Finance; 353 $Finance->LoadMonthParameters(0); 354 355 if (!ModuleUser::Cast($this->System->GetModule('User'))->User->CheckPermission('Finance', 'Manage')) return 'Nemáte oprávnění'; 348 356 global $Config; 349 357 … … 362 370 $DbResult = $this->Database->select('Subject', '*', '`Id`='.$Config['Finance']['MainSubjectId']); 363 371 $MainSubject = $DbResult->fetch_assoc(); 372 373 $DbResult = $this->Database->select('Company', '*', '`Id`='.$Config['Finance']['MainCompanyId']); 374 $MainCompany = $DbResult->fetch_assoc(); 364 375 365 376 $Period = $this->GetBillingPeriod($Member['BillingPeriod']); … … 374 385 if ($User['Email'] != '') 375 386 { 376 $Title = 'Pravidelné vyúčtování služeb'; 377 $Content = 'Vyúčtovaní zákazníka <strong>'.$Subject['Name'].'</strong> zastoupeného uživatelem <strong>'. 387 $Title = 'Pravidelné vyúčtování služeb '.$MainCompany['Name']; 388 $Content = 'Dobrý den,<br/><br/>'. 389 'Zasíláme vyúčtování klienta <strong>'.$Subject['Name'].'</strong> zastoupeného uživatelem <strong>'. 378 390 $User['Name'].'</strong> ke dni <strong>'.Core::Cast($this->System)->HumanDate(time()).'</strong>.<br/><br/>'."\n". 379 391 'Vaše aktuální služby: '; … … 414 426 'Pro aktuální informace, prohlížení elektronických dokladů a možnost změny údajů se prosím přihlaste na stránkách '. 415 427 '<a href="https://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'">https://'. 416 $Config['Web']['Host'].$Config['Web']['RootFolder'].'</a>.<br /><br />'."\n"; 417 418 $Content .= '<br />Tento email je generován automaticky. V případě zjištění nesrovnalostí napište zpět.'; 428 $Config['Web']['Host'].$Config['Web']['RootFolder'].'</a>.<br/><br/>'."\n"; 429 430 $Content .= '<br/>Tento email je generován automaticky. V případě zjištění nesrovnalostí prosím napište zpět.'; 431 432 $Content .= '<br/><br/>S pozdravem,<br/>'.$MainCompany['Name'].'<br/><a href="'.$MainSubject['WWW'].'">'. 433 str_replace(array('https:', '/'), '', $MainSubject['WWW']).'</a>'; 434 419 435 ModuleEmailQueue::Cast($this->System->GetModule('EmailQueue'))->AddItem($User['Name'].' <'.$User['Email'].'>', $Title, $Content, 420 436 $Config['Web']['Admin'].' <'.$Config['Web']['AdminEmail'].'>'); -
trunk/Modules/Finance/Trade.php
r929 r968 501 501 { 502 502 $TimeDue = $Time + 15 * 24 * 3600; // 15 dnů 503 504 503 } 505 504 }
Note:
See TracChangeset
for help on using the changeset viewer.