Changeset 939 for trunk/Modules
- Timestamp:
- Aug 2, 2022, 9:26:10 AM (2 years ago)
- Location:
- trunk/Modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Customer/Customer.php
r914 r939 39 39 'Consumption' => array('Type' => 'TCustomerStockSerialNumber', 'Caption' => 'Spotřeba zařízení', 'Default' => ''), 40 40 'Contract' => array('Type' => 'TContract', 'Caption' => 'Smlouva', 'Default' => '', 'Null' => true), 41 'PaymentEmailTime' => array('Type' => 'DateTime', 'Caption' => 'Čas platebního emailu', 'Default' => 'NOW()', 'Null' => true, 'NotInList' => true), 41 42 'ChangeAction' => array('Type' => 'TActionEnum', 'Caption' => 'Změna - akce', 'Default' => '', 'Null' => true), 42 43 'ChangeTime' => array('Type' => 'DateTime', 'Caption' => 'Změna - čas', 'Default' => '', 'Null' => true, 'NotInList' => true), … … 92 93 'ChangeReplaceId' => array('Type' => 'TService', 'Caption' => 'Změna - položka', 'Default' => '', 'Null' => true), 93 94 'CustomerRel' => array('Type' => 'TServiceCustomerRelListService', 'Caption' => 'Placení zákazníky', 'Default' => ''), 95 'TvRel' => array('Type' => 'TServiceTvRelListService', 'Caption' => 'TV kanály', 'Default' => ''), 94 96 ), 95 97 )); … … 194 196 'Type' => 'ManyToOne', 195 197 'Table' => 'ServiceCustomerRel', 198 'Id' => 'Id', 199 'Ref' => 'Service', 200 'Filter' => '1', 201 )); 202 $this->System->FormManager->RegisterFormType('TServiceTvRelListService', array( 203 'Type' => 'ManyToOne', 204 'Table' => 'ServiceTvRel', 196 205 'Id' => 'Id', 197 206 'Ref' => 'Service', … … 338 347 $Desc->AddBoolean('Blocked'); 339 348 $Desc->AddInteger('PayDay'); 349 $Desc->AddDateTime('PaymentEmailTime'); 340 350 $Desc->AddChangeAction(); 341 351 return $Desc; -
trunk/Modules/Finance/Manage.php
r916 r939 393 393 '<th style="border-style: solid; border-width: 1px; padding: 1px 5px 1px 5px; text-align: center; font-weight: bold;">Popis</th>'. 394 394 '<th style="border-style: solid; border-width: 1px; padding: 1px 5px 1px 5px; text-align: center; font-weight: bold;">Částka [Kč]</th></tr>'."\n"; 395 if ($Member['PaymentEmailTime'] <> 'NULL') 396 { 397 $Where = ' WHERE (`T1`.`Time` > "'.$Member['PaymentEmailTime'].'")'; 398 } else 399 { 400 $Where = ''; 401 } 395 402 $DbResult = $this->Database->query('SELECT T1.* FROM ((SELECT `Text`, `Time`, `Value`, `File` FROM `FinanceOperation` WHERE (`Subject`='.$Member['Subject'].')) UNION ALL '. 396 403 '(SELECT (SELECT GROUP_CONCAT(`Description` SEPARATOR ", ") FROM `FinanceInvoiceItem` '. 397 404 'WHERE `FinanceInvoiceItem`.`FinanceInvoice` = `FinanceInvoice`.`Id`) AS `Text`, '. 398 '`Time`, -`Value`, `File` FROM `FinanceInvoice` WHERE (`Subject`='. 399 $Member['Subject'].')) ORDER BY `Time` DESC) AS `T1` WHERE (`T1`.`Time` > "'.$Member['BillingPeriodLastDate'].'")'); 405 '`Time`, -`Value`, `File` FROM `FinanceInvoice` WHERE (`Subject`='.$Member['Subject'].')) ORDER BY `Time` DESC) AS `T1`'.$Where); 400 406 while ($DbRow = $DbResult->fetch_assoc()) 401 407 { … … 413 419 ModuleEmailQueue::Cast($this->System->GetModule('EmailQueue'))->AddItem($User['Name'].' <'.$User['Email'].'>', $Title, $Content, 414 420 $Config['Web']['Admin'].' <'.$Config['Web']['AdminEmail'].'>'); 415 $Output = ''; 421 $this->Database->update('Member', 'Id='.$Member['Id'], array('PaymentEmailTime' => 'NOW()')); 422 $Output = ''; 416 423 } else $Output = 'Uživatel '.$User['Name'].' nemá email.'; 417 424 return $Output;
Note:
See TracChangeset
for help on using the changeset viewer.