noalyss
Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
include
lib
ivatnumber.class.php
Go to the documentation of this file.
1
<?php
2
/*
3
* This file is part of NOALYSS.
4
*
5
* NOALYSS is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* NOALYSS is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with NOALYSS; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
*/
19
// Copyright Author Dany De Bontridder danydb@aevalys.eu 13/05/24
20
/*!
21
* \file
22
* \brief input of the VAT Number of a supplier / customer, propose a button to check VAT
23
*/
24
25
class
IVATNumber
extends
HtmlInput
26
{
27
private
$itext
;
28
29
function
__construct
(
$name
=
''
,
$value
=
''
,
$p_id
=
""
)
30
{
31
32
$p_id
= (
$p_id
==
""
)?uniqid(
"vatnumber"
):
$p_id
;
33
34
$this->itext =
new
IText
(
$name
,
$value
,
$p_id
);
35
$this->itext->title =
_
(
"Numéro TVA"
);
36
$this->itext->placeholder =
"CO9999999999"
;
37
$this->itext->extra =
""
;
38
$this->itext->style =
' class="input_text" '
;
39
$this->autofocus =
false
;
40
}
41
42
function
input
()
43
{
44
if
( $this->
readOnly
==
true
)
return
$this->
display
();
45
46
$return = $this->itext->input();
47
$return .= $this->
button_check_vat
();
48
$return.=sprintf(
'<div id="info%s" class="notice" style="margin:0px;font-size:80%%;width:auto"></div>'
,$this->itext->id);
49
return
$return;
50
}
51
52
public
function
getIText
():
IText
53
{
54
return
$this->itext
;
55
}
56
57
public
function
setIText
(
IText
$itext
):
IVATNumber
58
{
59
$this->itext =
$itext
;
60
return
$this;
61
}
62
63
function
button_check_vat
()
64
{
65
$button=new \IButton(uniqid());
66
$button->javascript=sprintf(
"category_card.check_vatnumber('%s')"
,
67
$this->itext->id);
68
$button->extra=
'style="padding-bottom:0px"'
;
69
$button->label=
_
(
"Vérifie"
);
70
return
$button->input();
71
72
73
}
74
function
display
()
75
{
76
return
$this->itext->display();
77
78
}
79
80
static
function
testme
()
81
{
82
$ivatnumber
=
new
IVATNumber
(
"av_text13"
);
83
84
echo
$ivatnumber
->input();
85
}
86
}
$p_id
$p_id
Definition
ajax_accounting.php:33
_
_("actif, passif,charge,...")
Definition
balance.inc.php:195
HtmlInput\$value
$value
Definition
html_input.class.php:59
HtmlInput\$name
$name
Definition
html_input.class.php:58
IText
Html Input.
Definition
itext.class.php:30
IVATNumber
Definition
ivatnumber.class.php:26
IVATNumber\getIText
getIText()
Definition
ivatnumber.class.php:52
IVATNumber\testme
static testme()
Definition
ivatnumber.class.php:80
IVATNumber\button_check_vat
button_check_vat()
Definition
ivatnumber.class.php:63
IVATNumber\display
display()
Definition
ivatnumber.class.php:74
IVATNumber\$itext
$itext
Definition
ivatnumber.class.php:27
IVATNumber\setIText
setIText(IText $itext)
Definition
ivatnumber.class.php:57
IVATNumber\input
input()
Definition
ivatnumber.class.php:42
IVATNumber\__construct
__construct($name='', $value='', $p_id="")
Definition
ivatnumber.class.php:29
readOnly
$icard readOnly
Definition
follow_up_detail_display.php:69
$ivatnumber
$ivatnumber
Definition
tax_detail-display_form.php:26
Generated on Wed Jun 25 2025 09:57:48 for noalyss by
1.13.2