noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
xmlinvoice-display_error.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * NOALYSS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * NOALYSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with NOALYSS; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19*/
20// Copyright Author Dany De Bontridder danydb@aevalys.eu 22/10/23
21
22
23/**
24 * @file
25 * @brief display errors for generating e-invoices, called from
26 * invoiceUBL21-display-error.php
27 */
28///@var $a_vat_error (array) contains error for VAT
29$a_vat_error=$this->check_VAT();
30
31///@var $total_error (int) total of errors found in e-invoice
32$total_error=count ($a_error['general'])
33 + count($a_error['operation'])
34 + count($a_error['customer'])
35 + count($a_error['company'])
36 +count($a_vat_error);
37
38if ( $total_error == 0 ) :
39 return;
41$error_message=new \Noalyss\XMLDocument\Error_Message($a_error);
42?>
43<button onclick="$('invoice_error_popover').show();return false" class="button bt-error "><i class="icon-attention"></i> <?=_("Erreurs Facture électronique {$total_error}")?></button>
44<div style="display:none" id="invoice_error_popover">
45 <?php
46 echo HtmlInput::title_box(_("Erreurs"), "invoice_error_popover","hide");
47//----------------------------------------------------------------------------
48// company
49//----------------------------------------------------------------------------
50 $nb_error=count($a_error['company']);
51 for ($i=0;$i<$nb_error;$i++):
52 ?>
53
54 <?php if ($i == 0 ):?>
55 <h3><?=_("Société")?></h3>
56 <p class="text-muted">
57 <?=_("A corriger dans COMPANY")?>
58 </p>
59 <ol>
60 <?php endif;?>
61 <li class="notice-item">
62 <?=$error_message->get_message_error(code:$a_error['company'][$i],type:'company')?>
63 </li>
64
65 <?php
67 if ( $nb_error!=0) print '</ol>';
68 ?>
69 <?php
70//----------------------------------------------------------------------------
71// Customer
72//----------------------------------------------------------------------------
73 $nb_error=count($a_error['customer']);
74 for ($i=0;$i<$nb_error;$i++):
75 ?>
76 <?php if ($i == 0) :?>
77 <h3><?=_("Client")?></h3>
78 <p class="text-muted">
79 <?=_("A corriger dans la fiche")?>
80 </p>
81 <p>
82 <?php
83 $card=new \Fiche ($this->cn,$this->data['customer']['card_id']);
84 echo \HtmlInput::card_detail($card->get_attribute(ATTR_DEF_QUICKCODE)
85 ,$card->get_attribute(ATTR_DEF_NAME));
86 ?>
87 </p>
88 <ol>
89 <?php endif;?>
90
91 <li class="notice-item">
92 <?=$error_message->get_message_error(code:$a_error['customer'][$i],type:'customer')?>
93 </li>
94
95 <?php
96 endfor;
97 if ( $nb_error!=0) print '</ol>';
98 ?>
99 <?php
100 //----------------------------------------------------------------------------
101// Item VAT
102//----------------------------------------------------------------------------
103 $a_vat_error=$this->check_VAT();
104 $nb_error=count($a_vat_error);
105 for ($i=0;$i<$nb_error;$i++):
106 ?>
107 <?php if ($i == 0) :?>
108 <h3><?=_("TVA")?></h3>
109 <p class="text-muted">
110 <?=_("A corriger dans la configuration TVA (C0TVA)")?>
111 </p>
112 <ol>
113 <?php endif;?>
114 <li class="notice-item">
115 <?=$a_vat_error[$i]?>
116 </li>
117
118 <?php
119 endfor;
120 if ( $nb_error!=0) print '</ol>';
121 ?>
122 <button onclick="$('invoice_error_popover').hide();return false" class="button"><?=_("Fermer")?></button>
123
124</div>
p($p_string, $p_extra='')
Definition ac_common.php:39
if(!headers_sent())
– pour utiliser unoconv démarrer un server libreoffice commande libreoffice –headless –accept="socket...
$opd_description style
$input_from cn
_("actif, passif,charge,...")
$input_from type
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
const ATTR_DEF_NAME
Definition constant.php:223
const ATTR_DEF_QUICKCODE
Definition constant.php:244
print
Type of printing.