diff --git a/app/controllers/CreditController.php b/app/controllers/CreditController.php index e769c51c3420..e00221283976 100755 --- a/app/controllers/CreditController.php +++ b/app/controllers/CreditController.php @@ -67,7 +67,7 @@ class CreditController extends \BaseController { 'url' => 'credits', 'title' => '- New Credit', 'currencies' => Currency::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(), - 'invoices' => Invoice::scope()->with('client')->where('balance','>',0)->orderBy('invoice_number')->get(), + 'invoices' => Invoice::scope()->with('client', 'invoice_status')->where('balance','>',0)->orderBy('invoice_number')->get(), 'clients' => Client::scope()->with('contacts')->orderBy('name')->get()); return View::make('credits.edit', $data); diff --git a/app/controllers/PaymentController.php b/app/controllers/PaymentController.php index 78d7c968af8e..70b8efd642f1 100755 --- a/app/controllers/PaymentController.php +++ b/app/controllers/PaymentController.php @@ -62,7 +62,7 @@ class PaymentController extends \BaseController 'clientPublicId' => $clientPublicId, 'invoicePublicId' => $invoicePublicId, 'invoice' => null, - 'invoices' => Invoice::scope()->with('client')->where('balance','>',0)->orderBy('invoice_number')->get(), + 'invoices' => Invoice::scope()->with('client', 'invoice_status')->where('balance','>',0)->orderBy('invoice_number')->get(), 'payment' => null, 'method' => 'POST', 'url' => 'payments', @@ -81,7 +81,7 @@ class PaymentController extends \BaseController $data = array( 'client' => null, 'invoice' => null, - 'invoices' => Invoice::scope()->with('client')->orderBy('invoice_number')->get(array('public_id','invoice_number')), + 'invoices' => Invoice::scope()->with('client', 'invoice_status')->orderBy('invoice_number')->get(array('public_id','invoice_number')), 'payment' => $payment, 'method' => 'PUT', 'url' => 'payments/' . $publicId, diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php index eae6cb1f2769..56bc622f456c 100755 --- a/app/views/invoices/edit.blade.php +++ b/app/views/invoices/edit.blade.php @@ -1198,7 +1198,7 @@ this.prettyQty = ko.computed({ read: function () { - return this.qty() ? parseFloat(this.qty()) : ''; + return parseFloat(this.qty()) ? parseFloat(this.qty()) : ''; }, write: function (value) { this.qty(value); diff --git a/public/js/script.js b/public/js/script.js index bc36922fabd1..e0c8848f1a88 100755 --- a/public/js/script.js +++ b/public/js/script.js @@ -830,7 +830,7 @@ function populateInvoiceComboboxes(clientId, invoiceId) { for (var i=0; i