PageSourceSearch

https://speedyneedle.dk/themes/vivoda-default/js/tools/vatManagement.js

js speedyneedle.dk collected 2026-09-26 16:27:29 UTC 2,922 bytes, 95 lines download raw bytes

1/*
2* 2007-2015 PrestaShop
3*
4* NOTICE OF LICENSE
5*
6* This source file is subject to the Academic Free License (AFL 3.0)
7* that is bundled with this package in the file LICENSE.txt.
8* It is also available through the world-wide-web at this URL:
9* http://opensource.org/licenses/afl-3.0.php
10* If you did not receive a copy of the license and are unable to
11* obtain it through the world-wide-web, please send an email
12* to [email protected] so we can send you a copy immediately.
13*
14* DISCLAIMER
15*
16* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
17* versions in the future. If you wish to customize PrestaShop for your
18* needs please refer to http://www.prestashop.com for more information.
19*
20*  @author PrestaShop SA <[email protected]>
21*  @copyright  2007-2015 PrestaShop SA
22*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
23*  International Registered Trademark & Property of PrestaShop SA
24*/
25$(document).ready(function(){
26	vat_number();
27	vat_number_ajax();
28
29	$(document).on('input', '#company, #company_invoice', function(){
30		vat_number();
31	});
32});
33
34function vat_number()
35{
36        if(typeof show_firm =="undefined")
37            show_firm = false;
38        
39	if ( ($('#company').length && ($('#company').val() != '')) || show_firm)
40		$('#vat_number, #vat_number_block').show();
41	else
42		$('#vat_number, #vat_number_block').hide();
43
44	if ( ($('#company_invoice').length && ($('#company_invoice').val() != '')) || show_firm)
45                $('#vat_number_block_invoice').show();
46        else if(show_firm)    
47		$('#vat_number_block_invoice').show();
48	else
49		$('#vat_number_block_invoice').hide();
50}
51
52function vat_number_ajax()
53{
54	$(document).on('change', '#id_country', function()
55	{
56		if ($('#company').length && !$('#company').val())
57			return;
58		if (typeof vatnumber_ajax_call !== 'undefined' && vatnumber_ajax_call)
59			$.ajax({
60				type: 'POST',
61				headers: {"cache-control": "no-cache"},
62				url: baseDir + 'modules/vatnumber/ajax.php?id_country=' + parseInt($(this).val()) + '&rand=' + new Date().getTime(),
63				success: function(isApplicable){
64					if(isApplicable == "1")
65					{
66						$('#vat_area').show();
67						$('#vat_number').show();
68					}
69					else
70						$('#vat_area').hide();
71				}
72			});
73	});
74
75	$(document).on('change', '#id_country_invoice', function()
76	{
77		if ($('#company_invoice').length && !$('#company_invoice').val() )
78			return;
79		if (typeof vatnumber_ajax_call !== 'undefined' && vatnumber_ajax_call)
80			$.ajax({
81				type: 'POST',
82				headers: {"cache-control": "no-cache"},
83				url: baseDir + 'modules/vatnumber/ajax.php?id_country=' + parseInt($(this).val()) + '&rand=' + new Date().getTime(),
84				success: function(isApplicable){
85					if(isApplicable == "1")
86					{
87						$('#vat_area_invoice').show();
88						$('#vat_number_invoice').show();
89					}
90					else
91						$('#vat_area_invoice').hide();
92				}
93			});
94	});
95}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.