Page MenuHomePhabricator

Give Phortune carts a proper `isInvoice` flag
ClosedPublic

Authored by epriestley on Apr 20 2015, 4:12 PM.
Tags
None
Referenced Files
F14007899: D12480.id29947.diff
Tue, Oct 29, 12:53 PM
F14007898: D12480.id29942.diff
Tue, Oct 29, 12:53 PM
F14007896: D12480.id.diff
Tue, Oct 29, 12:53 PM
F14000999: D12480.id.diff
Fri, Oct 25, 3:10 AM
F13968124: D12480.diff
Oct 16 2024, 6:48 PM
F13955159: D12480.id29942.diff
Oct 14 2024, 12:22 AM
Unknown Object (File)
Sep 29 2024, 4:17 PM
Unknown Object (File)
Sep 5 2024, 5:22 AM
Subscribers

Details

Reviewers
btrahan
Commits
Restricted Diffusion Commit
rP01c99335fdd7: Give Phortune carts a proper `isInvoice` flag
Summary

See some earlier discussion in D11593:

One thing I'm vaguely thinking about is the possibilty that users may be able to invoice one another directly, eventually. For example, we might invoice a contracting client.
We might need an isInvoice flag eventually, but subscriptionPHID is a reasonable stand-in for now.

This adds such a flag.

Test Plan
  • Generated an ad-hoc invoice and verified it showed up in the right place.
  • Used bin/phortune invoice to invoice a subscription and verified it worked correctly.
  • Paid an invoice and saw it leave "pending invoices" status.

Screen_Shot_2015-04-20_at_9.05.49_AM.png (130×1 px, 25 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Give Phortune carts a proper `isInvoice` flag.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
btrahan added inline comments.
src/applications/phortune/storage/PhortuneCart.php
546

Since this was indexed, maybe isInvoice should be too? Practically these tables are tiny so kind of whatevs I think.

This revision is now accepted and ready to land.Apr 20 2015, 4:42 PM

Yeah, we currently always execute queries like:

accountPHID = X AND (some other junk with invoices or status)

...and accountPHID is sufficient to exclude the bulk of the table in most reasonable cases.

I'm going to to add an "unpaid invoices" view to merchants at some point and can see if adding a key does anything for that, since we have real-world cases where all activity on an instance belongs to a single merchant.

This revision was automatically updated to reflect the committed changes.