#631 Fixed: Add row button on Invoice and Bill

Fixed issue #631 by moving the variable initialization to the document ready block.
This commit is contained in:
JvanEst 2018-11-19 21:55:24 +01:00
parent 8823ba1312
commit ac415b9832
3 changed files with 6 additions and 3 deletions

View File

@ -172,10 +172,11 @@
<script type="text/javascript">
var focus = false;
var item_row = '{{ $item_row }}';
var currency_code = $('#currency_code').val();
var autocomplete_path = "{{ url('common/items/autocomplete') }}";
$(document).ready(function(){
var currency_code = $('#currency_code').val();
@if (old('item'))
$('#vendor_id').trigger('change');
@endif

View File

@ -153,7 +153,6 @@
<script type="text/javascript">
var focus = false;
var item_row = '{{ $item_row }}';
var currency_code = $('#currency_code').val();
var autocomplete_path = "{{ url('common/items/autocomplete') }}";
$(document).on('click', '#button-add-item', function (e) {
@ -222,6 +221,8 @@
});
$(document).ready(function(){
var currency_code = $('#currency_code').val();
$('#vendor_id').trigger('change');
itemTableResize();

View File

@ -172,7 +172,6 @@
<script type="text/javascript">
var focus = false;
var item_row = '{{ $item_row }}';
var currency_code = $('#currency_code').val();
var autocomplete_path = "{{ url('common/items/autocomplete') }}";
$(document).on('click', '#button-add-item', function (e) {
@ -223,6 +222,8 @@
});
$(document).ready(function(){
var currency_code = $('#currency_code').val();
itemTableResize();
@if (old('item'))