Bug fixes

This commit is contained in:
Hillel Coren 2014-04-03 20:54:06 +03:00
parent 4c1b33f601
commit 3d6530e83f
4 changed files with 442 additions and 433 deletions

View File

@ -6,11 +6,9 @@
Most online invoicing sites are expensive. They shouldn't be. The aim of this project is to provide a free, open-source alternative. Additionally, the hope is the codebase will serve as a sample site for Laravel as well as other JavaScript technologies.
The high level instructions for setting up the site are below but there's also a [setup guide](http://hillelcoren.com/invoice-ninja/laravel-ubuntu-virtualbox/). For discussion of the code please use the [Google Group](https://groups.google.com/d/forum/invoiceninja).
The high level instructions for setting up the site are below but there's also a [setup guide](http://hillelcoren.com/invoice-ninja/laravel-ubuntu-virtualbox/). If you'd like to translate the site please use [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) for the starter files.
For updates follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja).
If you'd like to translate the site please use [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) for the starter files.
For updates follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja). For discussion of the code please use the [Google Group](https://groups.google.com/d/forum/invoiceninja).
Site design by [kantorp-wegl.in](http://kantorp-wegl.in/)

View File

@ -176,8 +176,16 @@ class InvoiceRepository
$total += $total * $invoice->tax_rate / 100;
$invoice->amount = $total;
if ($publicId)
{
$invoice->balance = $total - ($invoice->amount - $invoice->balance);
}
else
{
$invoice->balance = $total;
}
$invoice->amount = $total;
$invoice->save();
$invoice->invoice_items()->forceDelete();

View File

@ -95,6 +95,7 @@
</a>
</div>
@if (Auth::check())
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<ul class="nav navbar-nav" style="font-weight: bold">
{{ HTML::nav_link('dashboard', 'dashboard') }}
@ -104,6 +105,7 @@
{{ HTML::menu_link('credit') }}
{{-- HTML::nav_link('reports', 'Reports') --}}
</ul>
<div class="navbar-form navbar-right">
@if (Auth::check() && !Auth::user()->registered)
{{ Button::sm_success_primary('Sign up', array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal')) }} &nbsp;
@ -125,11 +127,10 @@
@endif
@if (Auth::check())
<div class="btn-group">
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
<span id="myAccountButton">
@if (Auth::check() && Auth::user()->registered)
@if (Auth::user()->registered)
{{ Auth::user()->getFullName() }}
@else
Guest
@ -147,7 +148,6 @@
<li>{{ link_to('#', 'Logout', array('onclick'=>'logout()')) }}</li>
</ul>
</div>
@endif
</div>
@ -171,8 +171,11 @@
</ul>
</li>
</ul>
@endif
</div><!-- /.navbar-collapse -->
</div>
</nav>

View File

@ -93,7 +93,7 @@ function GetReportTemplate4(doc, invoice, layout, checkMath) {
doc.setFontType("bold");
doc.text(layout.footerLeft, y, 'Balance Due');
total = formatMoney(invoice.balance_amount, currencyId)
total = formatMoney(invoice.balance_amount, currencyId);
var totalX = layout.headerRight - (doc.getStringUnitWidth(total) * doc.internal.getFontSize());
doc.text(totalX, y, total);