44 "comment"=>
"tva_comment",
45 "account"=>
"tva_poste",
46 "both_side"=>
'tva_both_side',
47 'tva_reverse_account'=>
'tva_reverse_account',
48 'tva_code'=>
'tva_code',
49 "tva_peppol_code"=>
"tva_peppol_code",
73 $this->tva_id=$p_tva_id;
74 $this->tva_label=&$this->tva_rate_sql->tva_label;
75 $this->tva_rate=&$this->tva_rate_sql->tva_rate;
76 $this->tva_comment=&$this->tva_rate_sql->tva_comment;
77 $this->tva_poste=&$this->tva_rate_sql->tva_poste;
78 $this->tva_both_side=&$this->tva_rate_sql->tva_both_side;
79 $this->tva_code=&$this->tva_rate_sql->tva_code;
80 $this->tva_reverse_account=&$this->tva_rate_sql->tva_reverse_account;
81 $this->tva_peppol_code=&$this->tva_rate_sql->tva_peppol_code;
82 $this->vx_code=&$this->tva_rate_sql->vx_code;
104 if ( array_key_exists($p_string,self::$variable) )
106 $idx=self::$variable[$p_string];
110 throw new Exception(
"ACC98".
"Attribut inexistant $p_string",
EXC_INVALID);
114 if ( array_key_exists($p_string,self::$variable) )
116 $idx=self::$variable[$p_string];
117 $this->
$idx=$p_value;
120 throw new Exception(
"ACC108".
"Attribut inexistant $p_string",
EXC_INVALID);
133 $this->tva_rate_sql->setp(
"tva_id",$this->tva_id);
135 if ( ! $this->tva_rate_sql->load() )
return -1;
145 if ( strlen($this->tva_poste??
"") == 0 ) $this->
load();
146 list(
$deb,
$cred)=explode(
",",$this->tva_poste);
156 throw (
new Exception (__FILE__.
':'.__LINE__.
" param est d ou c, on a recu [ $p_side ]"));
169 $tva_id = $db->get_value(
"select tva_id from public.tva_rate where tva_code=upper(trim($1))",[$p_code]);
170 if ( $db->size() == 1) {
171 return new Acc_Tva($db,$tva_id);
174 $exist = $db->get_value(
"select count(*) from public.tva_rate where tva_id=$1",[$p_code]);
176 return new Acc_Tva($db,$p_code);
if(!headers_sent())
– pour utiliser unoconv démarrer un server libreoffice commande libreoffice –headless –accept="socket...
Acc_Tva is used for to map the table tva_rate parameter are.
setTvaRateSql(Tva_Rate_SQL $tva_rate_sql)
static build($db, $p_code)
retrieve TVA rate thanks the code that could be the tva_id or tva_code.
__construct(Database $cn, $p_tva_id=-1)
set_parameter($p_string, $p_value)
load()
Load the VAT, return 0 if the TVA_ID exists otherwise -1.
get_side($p_side)
get the account of the side (debit or credit)
Tva_Rate_SQL $tva_rate_sql
contains the class for connecting to Noalyss
for($i=0;$i< $nb_jrn;$i++) $deb