Page MenuHomePhabricator

Give Phortune carts a proper `isInvoice` flag
ClosedPublic

Authored by epriestley on Apr 20 2015, 4:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 2:09 PM
Unknown Object (File)
Mon, Apr 8, 12:22 AM
Unknown Object (File)
Mar 19 2024, 9:11 AM
Unknown Object (File)
Mar 19 2024, 9:11 AM
Unknown Object (File)
Mar 19 2024, 9:04 AM
Unknown Object (File)
Mar 19 2024, 8:41 AM
Unknown Object (File)
Feb 19 2024, 3:54 AM
Unknown Object (File)
Feb 19 2024, 3:54 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.