Differential D20733 Diff 49440 src/applications/phortune/controller/account/PhortuneAccountOverviewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phortune/controller/account/PhortuneAccountOverviewController.php
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | final class PhortuneAccountOverviewController | ||||
} | } | ||||
private function buildInvoicesSection( | private function buildInvoicesSection( | ||||
PhortuneAccount $account, | PhortuneAccount $account, | ||||
array $carts) { | array $carts) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
$phids = array(); | |||||
foreach ($carts as $cart) { | |||||
$phids[] = $cart->getPHID(); | |||||
$phids[] = $cart->getMerchantPHID(); | |||||
foreach ($cart->getPurchases() as $purchase) { | |||||
$phids[] = $purchase->getPHID(); | |||||
} | |||||
} | |||||
$handles = $this->loadViewerHandles($phids); | |||||
$table = id(new PhortuneOrderTableView()) | $table = id(new PhortuneOrderTableView()) | ||||
->setNoDataString(pht('You have no unpaid invoices.')) | ->setNoDataString(pht('You have no unpaid invoices.')) | ||||
->setIsInvoices(true) | ->setIsInvoices(true) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setCarts($carts) | ->setCarts($carts); | ||||
->setHandles($handles); | |||||
$header = id(new PHUIHeaderView()) | $header = id(new PHUIHeaderView()) | ||||
->setHeader(pht('Invoices Due')); | ->setHeader(pht('Invoices Due')); | ||||
return id(new PHUIObjectBoxView()) | return id(new PHUIObjectBoxView()) | ||||
->setHeader($header) | ->setHeader($header) | ||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | ||||
->setTable($table); | ->setTable($table); | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |