1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-18 09:04:35 +01:00

bug fixes

This commit is contained in:
Hillel Coren 2014-02-20 16:42:09 +02:00
parent da29bd8900
commit 99e4e40223
3 changed files with 13 additions and 4 deletions

View File

@ -388,10 +388,11 @@ class InvoiceController extends \BaseController {
$invoice = Invoice::with('invoice_items')->scope($publicId)->firstOrFail(); $invoice = Invoice::with('invoice_items')->scope($publicId)->firstOrFail();
$clone = Invoice::createNew(); $clone = Invoice::createNew();
foreach (['client_id', 'discount', 'invoice_date', 'due_date', 'is_recurring', 'frequency_id', 'start_date', 'end_date', 'terms'] as $field) $clone->balance = $invoice->amount;
foreach (['client_id', 'discount', 'invoice_date', 'due_date', 'is_recurring', 'frequency_id', 'start_date', 'end_date', 'terms', 'public_notes', 'invoice_design_id', 'tax_name', 'tax_rate', 'amount'] as $field)
{ {
$clone->$field = $invoice->$field; $clone->$field = $invoice->$field;
} }
if (!$clone->is_recurring) if (!$clone->is_recurring)
{ {

View File

@ -159,7 +159,15 @@ HTML::macro('image_data', function($imagePath) {
HTML::macro('breadcrumbs', function() { HTML::macro('breadcrumbs', function() {
$str = '<ol class="breadcrumb">'; $str = '<ol class="breadcrumb">';
$crumbs = explode('/', $_SERVER['REQUEST_URI']); $crumbs = explode('/', $_SERVER['REQUEST_URI']);
foreach ($crumbs as $key => $val)
{
if (is_numeric($val))
{
unset($crumbs[$key]);
}
}
for ($i=0; $i<count($crumbs); $i++) { for ($i=0; $i<count($crumbs); $i++) {
$crumb = trim($crumbs[$i]); $crumb = trim($crumbs[$i]);
if (!$crumb) continue; if (!$crumb) continue;

View File

@ -19,7 +19,7 @@
&nbsp;<label for="trashed" style="font-weight:normal"> &nbsp;<label for="trashed" style="font-weight:normal">
<input id="trashed" type="checkbox" onclick="setTrashVisible()" <input id="trashed" type="checkbox" onclick="setTrashVisible()"
{{ Session::get('show_trash') ? 'checked' : ''}}/> Show archived/deleted {{ Session::get('show_trash') ? 'checked' : ''}}/> Show archived/deleted {{ $entityType }}s
</label> </label>
<div id="top_right_buttons" class="pull-right"> <div id="top_right_buttons" class="pull-right">