Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4747

Domain Manager: Domains that are scheduled for cancellation may renew due to renewal offset

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.5.0
    • Fix Version/s: 5.5.1
    • Component/s: Plugins, Staff Interface
    • Labels:
      None

      Description

      Under Packages > Domain Options > Configuration you can now set the "Renew Days Before Expiration". This causes the renew date to be offset from the domains expiry date so that domains can be invoiced further in advance, such that invoices are due before the domain actually expires.

      However, if the domain has a scheduled cancellation date, and then the renew date is sync'd to an earlier time, the domain is invoiced because the cancellation date is in advance of the renew date.

      The solution we discussed that seems viable is to skip any adjustment of the renew date if a cancellation date is set at all.

        Activity

        Hide
        jonathan Jonathan Reissmueller added a comment -

        Possible solution (untested)

        In plugins/domains/domains_plugin.php around line 1054 change

                foreach ($services as $service) {
        

        To

                foreach ($services as $service) {
                    if ($service->date_canceled != null) {
                        continue;
                    }
        

        In plugins/domains/domains_plugin.php around line 1497 change

                if (!($this->DomainsDomains->isManagedDomain($params['service_id'] ?? null)
                    && $this->serviceActivationOccuring($event))
                ) {
                    return;
                }
        

        To

                if (!($this->DomainsDomains->isManagedDomain($params['service_id'] ?? null)
                        && $this->serviceActivationOccuring($event)
                        && ($service = $this->Services->get($params['service_id'] ?? null))
                        && $service->date_canceled == null
                    )
                ) {
                    return;
                }
        
        Show
        jonathan Jonathan Reissmueller added a comment - Possible solution (untested) In plugins/domains/domains_plugin.php around line 1054 change foreach ($services as $service) { To foreach ($services as $service) { if ($service->date_canceled != null ) { continue ; } In plugins/domains/domains_plugin.php around line 1497 change if (!($ this ->DomainsDomains->isManagedDomain($params['service_id'] ?? null ) && $ this ->serviceActivationOccuring($event)) ) { return ; } To if (!($ this ->DomainsDomains->isManagedDomain($params['service_id'] ?? null ) && $ this ->serviceActivationOccuring($event) && ($service = $ this ->Services->get($params['service_id'] ?? null )) && $service->date_canceled == null ) ) { return ; }

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              22/Aug/22

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour, 30 minutes
              1h 30m

                Agile