Makes a more complete PDF looking invoice form for printing in Phortune.
Details
- Reviewers
epriestley - Commits
- rP5fd79479ecb4: Add a basic invoice view for printing to Phortune
Make an invoice, click print view, print.
Diff Detail
- Repository
- rP Phabricator
- Branch
- new-receipt
- Lint
Lint Passed Severity Location Code Message Advice src/applications/phortune/controller/PhortuneCartViewController.php:227 XHP16 TODO Comment - Unit
Tests Skipped - Build Status
Buildable 14275 Build 18568: Run Core Tests Build 18567: arc lint + arc unit
Event Timeline
This looks good except for the Phacility-specific text. We can put that on the Merchant instead, like the logo/contact info.
src/applications/phortune/view/PhortuneInvoiceView.php | ||
---|---|---|
139–146 | This can't go upstream. |
src/applications/phortune/view/PhortuneInvoiceView.php | ||
---|---|---|
139–146 | lol oops! |
I mean, unless you want to offer free support for all the Korean/Japanese consulting companies apparently using Phortune to do billing.
See inline discussion about orders vs invoices. I don't think it's hugely important to resolve, but I think using the word "Invoice" on the traditional "Order" flow is a bit confusing.
src/applications/phortune/controller/PhortuneCartViewController.php | ||
---|---|---|
289 | This isn't necessarily an invoice, exactly, per se. For example, if you support an initiative in Fund, you also end up here, but it's vaguely confusing/misleading to call that an invoice. If we later let you buy Phabricator Gold or conference sponsorships or something, you'll probably end up here on a traditional order flow too. You can call $cart->getIsInvoice() to get some details about the invoiciness of an order. There are currently three ways an order can be created:
Better might be to use language like "Invoice Status" only for invoices, and language like "Order Status" for non-invoices? | |
src/applications/phortune/editor/PhortuneMerchantEditor.php | ||
155 | (This isn't a missing field error -- the field isn't required, so this isn't "Required field X is missing".) |
src/applications/phortune/controller/PhortuneCartViewController.php | ||
---|---|---|
189 | We could reasonably use the word "Order" or "Invoice" (depending on invoiciness) instead of "Cart" for submitted carts, too. So the logic would be something like this: if ($cart->getIsInvoice()) { // This is a paid or unpaid invoice. $what = 'Invoice'; } else if ($cart->getStatus() == PhortuneCart::STATUS_READY) { // This is an unpaid cart on an "order" workflow which hasn't been charged yet. // Maybe still just call this an "Order"? $what = 'Cart'; } else { // This is a paid/charged/refunded/in-review cart on an "order" workflow, so we can safely // call it an "Order" now. Basically, the user clicked "Checkout" with some kind of payment method. $what = 'Order'; } That might be more clear. I think the backend treatment of these is correct (invoices, carts and orders are all really the same "thing") but it definitely defies expectation a bit on some flows to see "Cart" when you're thinking of the object as an "Invoice". |
I just put the name of the cart into the header instead of "Order Details" which was static.