Ignore:
Timestamp:
Aug 2, 2022, 9:26:10 AM (2 years ago)
Author:
chronos
Message:
  • Fixed: Incorrectly used member date BillingPeriodLastDate for determining new payments log for payment notification email.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UpdateTrace.php

    r934 r939  
    22172217  $Manager->Execute('UPDATE `PermissionGroup` SET `SysName`="other-users" WHERE `Description`="Ostatní"');
    22182218  $Manager->Execute('UPDATE `PermissionGroup` SET `SysName`="customers" WHERE `Description`="Zákazníci"');
     2219}
     2220
     2221function UpdateTo939(UpdateManager $Manager): void
     2222
     2223  $Manager->Execute('ALTER TABLE `Member` ADD `PaymentEmailTime` DATETIME NULL DEFAULT NULL AFTER `Contract`;');
     2224  $Manager->Execute('UPDATE `Member` SET `PaymentEmailTime`=DATE_SUB(`BillingPeriodLastDate`, INTERVAL 1 MONTH) WHERE BillingPeriod=2 AND BillingPeriodLastDate<>"0000-00-00"');
     2225  $Manager->Execute('UPDATE `Member` SET `PaymentEmailTime`=DATE_SUB(`BillingPeriodLastDate`, INTERVAL 3 MONTH) WHERE BillingPeriod=3 AND BillingPeriodLastDate<>"0000-00-00"');
     2226  $Manager->Execute('UPDATE `Member` SET `PaymentEmailTime`=DATE_SUB(`BillingPeriodLastDate`, INTERVAL 6 MONTH) WHERE BillingPeriod=4 AND BillingPeriodLastDate<>"0000-00-00"');
     2227  $Manager->Execute('UPDATE `Member` SET `PaymentEmailTime`=DATE_SUB(`BillingPeriodLastDate`, INTERVAL 12 MONTH) WHERE BillingPeriod=5 AND BillingPeriodLastDate<>"0000-00-00"');
     2228  $Manager->Execute('ALTER TABLE `UserOnline` ENGINE = InnoDB;');
    22192229}
    22202230
     
    23282338      911 => array('Revision' => 921, 'Function' => 'UpdateTo921'),
    23292339      921 => array('Revision' => 933, 'Function' => 'UpdateTo933'),
     2340      933 => array('Revision' => 939, 'Function' => 'UpdateTo939'),
    23302341    );
    23312342  }
Note: See TracChangeset for help on using the changeset viewer.