PageSourceSearch

https://www.powerplustools.de/themes/powerplus/js/tools/vatManagement.js

js powerplustools.de collected 2026-09-25 20:43:13 UTC 2,720 bytes, 90 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 ($('#company').length && ($('#company').val() != ''))
37		$('#vat_number, #vat_number_block').show();
38	else
39		$('#vat_number, #vat_number_block').hide();
40
41	if ($('#company_invoice').length && ($('#company_invoice').val() != ''))
42		$('#vat_number_block_invoice').show();
43	else
44		$('#vat_number_block_invoice').hide();
45}
46
47function vat_number_ajax()
48{
49	$(document).on('change', '#id_country', function()
50	{
51		if ($('#company').length && !$('#company').val())
52			return;
53		if (typeof vatnumber_ajax_call !== 'undefined' && vatnumber_ajax_call)
54			$.ajax({
55				type: 'POST',
56				headers: {"cache-control": "no-cache"},
57				url: baseDir + 'modules/vatnumber/ajax.php?id_country=' + parseInt($(this).val()) + '&rand=' + new Date().getTime(),
58				success: function(isApplicable){
59					if(isApplicable == "1")
60					{
61						$('#vat_area').show();
62						$('#vat_number').show();
63					}
64					else
65						$('#vat_area').hide();
66				}
67			});
68	});
69
70	$(document).on('change', '#id_country_invoice', function()
71	{
72		if ($('#company_invoice').length && !$('#company_invoice').val())
73			return;
74		if (typeof vatnumber_ajax_call !== 'undefined' && vatnumber_ajax_call)
75			$.ajax({
76				type: 'POST',
77				headers: {"cache-control": "no-cache"},
78				url: baseDir + 'modules/vatnumber/ajax.php?id_country=' + parseInt($(this).val()) + '&rand=' + new Date().getTime(),
79				success: function(isApplicable){
80					if(isApplicable == "1")
81					{
82						$('#vat_area_invoice').show();
83						$('#vat_number_invoice').show();
84					}
85					else
86						$('#vat_area_invoice').hide();
87				}
88			});
89	});
90}

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.