Select the types of activity you want to include in your feed.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
Select the types of activity you want to include in your feed.
Correct use of "trigger.this-epoch" vs "trigger.next-epoch"
These parameters were set inconsistently. Use the value that the storage task uses. Also, allow `bin/phortune invoice` to invoice in the past and future to aid testing.
···187187 // creation date as the start of the billing period.
188188 $last_epoch = $subscription->getDateCreated();
189189 }
190190- $this_epoch = idx($data, 'trigger.next-epoch');
190190+ $this_epoch = idx($data, 'trigger.this-epoch');
191191192192 if (!$last_epoch || !$this_epoch) {
193193 throw new PhabricatorWorkerPermanentFailureException(
···202202 'Subscription has invalid billing period.'));
203203 }
204204205205- if (PhabricatorTime::getNow() < $this_epoch) {
206206- throw new Exception(
207207- pht(
208208- 'Refusing to generate a subscription invoice for a billing period '.
209209- 'which ends in the future.'));
205205+ if (empty($data['manual'])) {
206206+ if (PhabricatorTime::getNow() < $this_epoch) {
207207+ throw new Exception(
208208+ pht(
209209+ 'Refusing to generate a subscription invoice for a billing period '.
210210+ 'which ends in the future.'));
211211+ }
210212 }
211213212214 return array($last_epoch, $this_epoch);