From 3d6530e83fe63f59865764923b48b7d6484abfa0 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 3 Apr 2014 20:54:06 +0300 Subject: [PATCH] Bug fixes --- README.md | 6 +- app/ninja/repositories/InvoiceRepository.php | 12 +- app/views/header.blade.php | 855 ++++++++++--------- public/js/script.js | 2 +- 4 files changed, 442 insertions(+), 433 deletions(-) diff --git a/README.md b/README.md index 0017b5bcb830..a62690ee93a0 100644 --- a/README.md +++ b/README.md @@ -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/) diff --git a/app/ninja/repositories/InvoiceRepository.php b/app/ninja/repositories/InvoiceRepository.php index 5f31ab7cc2c0..d3ae3497748e 100755 --- a/app/ninja/repositories/InvoiceRepository.php +++ b/app/ninja/repositories/InvoiceRepository.php @@ -176,8 +176,16 @@ class InvoiceRepository $total += $total * $invoice->tax_rate / 100; - $invoice->amount = $total; - $invoice->balance = $total; + if ($publicId) + { + $invoice->balance = $total - ($invoice->amount - $invoice->balance); + } + else + { + $invoice->balance = $total; + } + + $invoice->amount = $total; $invoice->save(); $invoice->invoice_items()->forceDelete(); diff --git a/app/views/header.blade.php b/app/views/header.blade.php index 901e47cccb88..d989f20b1a3e 100755 --- a/app/views/header.blade.php +++ b/app/views/header.blade.php @@ -3,499 +3,502 @@ @section('head') - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - + body { + /* background-color: #F6F6F6; */ + background-color: #EEEEEE; + } - + @stop @section('body') - -

 

-

 

- + + + +
+
-
-
- @if (!isset($showBreadcrumbs) || $showBreadcrumbs) - {{ HTML::breadcrumbs() }} + {{ HTML::breadcrumbs() }} @endif @if (Session::has('warning')) -
{{ Session::get('warning') }}
+
{{ Session::get('warning') }}
@endif @if (Session::has('message')) -
{{ Session::get('message') }}
+
{{ Session::get('message') }}
@endif @if (Session::has('error')) -
{{ Session::get('error') }}
+
{{ Session::get('error') }}
@endif - @yield('content') + @yield('content') -
-
- +
+ -
-
+ + +
+ + - @if (!Auth::check() || !Auth::user()->registered) -