private static function createInvoicesView(order $seoOrder)
 {
     $invoices = $seoOrder->invoices;
     $robinInvoices = Invoices::make();
     foreach ($invoices as $invoice) {
         $robinInvoices->push(Invoice::make($invoice->getEditUrl($seoOrder->id), $invoice->status, $invoice->priceIncl));
     }
     return $robinInvoices;
 }
Esempio n. 2
0
 public function testAddsInvoicesToDetailsView()
 {
     $robinOrder = $this->getRobinOrder();
     $invoices = Invoices::make();
     $invoices->push(Invoice::make("#", "Paid", "12,50"));
     $robinOrder->detailsView->addRows($invoices, "Invoices");
     $shipmentsView = $robinOrder->detailsView->get(1);
     $this->assertInstanceOf(DetailViewItem::class, $shipmentsView);
     $this->assertArrayHasKey("display_as", $shipmentsView->toArray());
     $this->assertEquals("rows", $shipmentsView->displayAs);
     $this->assertInstanceOf(Invoices::class, $shipmentsView->data);
     $this->assertInstanceOf(Invoice::class, $shipmentsView->data->first());
 }