From d9da272be5caee983f166d484bd050fb7fc73b79 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 16 Aug 2017 16:11:28 +0300 Subject: [PATCH] Country not updated in PDF preview #1608 --- resources/views/invoices/edit.blade.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 8ca9195653b4..2c7082e32b5b 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -930,11 +930,9 @@ ko.applyBindings(model); onItemChange(true); - - $('#country_id').combobox().on('change', function(e) { - var countryId = $('input[name=country_id]').val(); - var country = _.findWhere(countries, {id: countryId}); - console.log(countryId + ' - ' + country); + $('#client\\[country_id\\]').on('change', function(e) { + var countryId = $(e.currentTarget).val(); + var country = _.findWhere(countries, {id: parseInt(countryId)}); if (country) { model.invoice().client().country = country; model.invoice().client().country_id(countryId);