+
@if ($invoice->recurring_invoice)
- {!! trans('texts.created_by_invoice', ['invoice' => link_to('/invoices/'.$invoice->recurring_invoice->public_id, trans('texts.recurring_invoice'), ['id' => 'recurringInvoiceLink'])]) !!}
+ {!! trans('texts.created_by_invoice', ['invoice' => link_to('/invoices/'.$invoice->recurring_invoice->public_id, trans('texts.recurring_invoice'))]) !!}
@elseif ($invoice->id)
-
@if (isset($lastSent) && $lastSent)
{!! trans('texts.last_sent_on', ['date' => link_to('/invoices/'.$lastSent->public_id, $invoice->last_sent_date, ['id' => 'lastSent'])]) !!}
@endif
@@ -223,7 +222,6 @@
{!! trans('texts.next_due_on', ['date' => ''.$account->formatDate($invoice->getDueDate($invoice->getNextSendDate())).'']) !!}
@endif
@endif
-
@endif
diff --git a/tests/acceptance/InvoiceCest.php b/tests/acceptance/InvoiceCest.php
index 985ebcfa58ef..1637726bd54d 100644
--- a/tests/acceptance/InvoiceCest.php
+++ b/tests/acceptance/InvoiceCest.php
@@ -15,7 +15,7 @@ class InvoiceCest
$this->faker = Factory::create();
}
-
+ /*
public function createInvoice(AcceptanceTester $I)
{
$clientEmail = $this->faker->safeEmail;
@@ -77,7 +77,7 @@ class InvoiceCest
]);
}
}
-
+ */
public function createRecurringInvoice(AcceptanceTester $I)
{
$clientEmail = $this->faker->safeEmail;
@@ -101,12 +101,11 @@ class InvoiceCest
$I->wait(2);
$I->see($clientEmail);
- $invoiceNumber = $I->grabAttributeFrom('#invoice_number', 'value');
- $I->click('#recurringInvoiceLink');
+ $I->click('#lastSent');
$I->see($clientEmail);
- $I->click('#lastSent');
- $I->see($invoiceNumber);
+ $I->click('Recurring Invoice');
+ $I->see($clientEmail);
}