#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:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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();
 | 
			
		||||
 
 | 
			
		||||
@@ -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'))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user