noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
Noalyss\XMLDocument\Error_Message Class Reference

Give the error message thanks the code for FacturX and UBL21. More...

+ Collaboration diagram for Noalyss\XMLDocument\Error_Message:

Public Member Functions

 __construct ($a_error)
 constructo
 
 get_a_error ()
 
 get_message_error ($code, $type)
 returns the text of an error
 
 set_a_error ($a_error)
 

Private Attributes

 $a_error
 
 $a_message_company
 
 $a_message_customer
 

Detailed Description

Give the error message thanks the code for FacturX and UBL21.

property $a_error (double array) keys :

  • general ,
  • customer,
    • ATTR_DEF_NAME=>'CUST_NAME'
    • ATTR_DEF_ADRESS=>'CUST_ADDR'
    • ATTR_DEF_POSTCODE=>'CUST_POSTCD'
    • ATTR_DEF_CITY=>'CUST_CITY'
    • ATTR_DEF_COUNTRY_CODE=>'CUST_CDCOUNTRY'
    • ATTR_DEF_NUMTVA=>'CUST_VAT'
    • ATTR_DEF_PEPPOLID=>'CUST_PEPPOLID'
  • company,
    • "INVOICE_EMAIL_COMPANY" company's email
    • 'INVOICE_CONTACT_NAME' contact name
    • 'COMPANY_LEGAL_ENTITY' legal form of company
    • 'COMPANY_LEGAL_REGISTRATION' full name
    • 'COMPANY_BANK_IBAN' IBAN bank account
    • 'COMPANY_BANK_BIC' BIC bank account
    • 'COMPANY_PEPPOL_ID' PEPPOL id ==> normalement c'est BE0999999999
    • 'MY_COUNTRY_CODE' country code (normally BE)
    • 'MY_NAME' short company name
    • 'MY_STREET' address
    • 'MY_CITY' address
    • 'MY_TVA' VAT number
    • 'SIREN'

Definition at line 62 of file error_message.class.php.

Constructor & Destructor Documentation

◆ __construct()

Noalyss\XMLDocument\Error_Message::__construct ( $a_error)

constructo

Parameters
$a_error(double array)

Definition at line 73 of file error_message.class.php.

74 {
75 $this->a_error = $a_error;
76 $this->a_message_company = array(
77 "INVOICE_EMAIL_COMPANY" => _("L'email de la société ")
78 , 'INVOICE_CONTACT_NAME' => _("Nom du contact")
79 , 'COMPANY_LEGAL_ENTITY' => _("Type de société (SRL,ASBL,...)")
80 , 'COMPANY_LEGAL_REGISTRATION' => _("Nom complet de la société")
81 , 'COMPANY_BANK_IBAN' => _("Compte en banque (IBAN) de la société")
82 , 'COMPANY_BANK_BIC' => _("Code BIC de compte en banque")
83 , 'COMPANY_PEPPOL_ID' => _("Identifiant PEPPOL")
84 , 'MY_COUNTRY_CODE' => _('Code Pays')
85 , 'MY_NAME' => _("Nom de la société")
86 , 'MY_STREET' => _("Adresse de la société")
87 , 'MY_CITY' => _("Ville")
88 , 'MY_TVA' => _("Numéro de TVA, vide ou invalide, il doit commencer par les 2 lettres du code pays")
89 , 'SIREN'=> 'SIREN'
90 // , 'SIRET'=> 'SIRET'
91 );
92 $this->a_message_customer = array(
93 'name' => _("Nom")
94 , 'street' => _("Adresse")
95 , 'postalzone' => _("Code postal")
96 , 'city' => _("Ville")
97 , 'country'=>_("Code pays")
98 , 'customer_vat_id' => _("Numéro de TVA, vide ou invalide, il doit commencer par les 2 lettres du code pays")
99 , 'endpoint_id' => _('Identifiant PEPPOL') // here 9925:BE....
100
101 );
102
103 }
_("actif, passif,charge,...")

References $a_error, and _.

Member Function Documentation

◆ get_a_error()

Noalyss\XMLDocument\Error_Message::get_a_error ( )

Definition at line 105 of file error_message.class.php.

106 {
107 return $this->a_error;
108 }

References $a_error.

◆ get_message_error()

Noalyss\XMLDocument\Error_Message::get_message_error ( $code,
$type )

returns the text of an error

Parameters
$code(string or number)
$type(string) customer , general or company

Definition at line 121 of file error_message.class.php.

122 {
123 if ($type == "customer")
124 {
125 $a_error = $this->a_error['customer'];
126 $a_message = $this->a_message_customer;
127 } else if ($type == "company")
128 {
129 $a_error = $this->a_error['company'];
130 $a_message = $this->a_message_company;
131 } else
132 {
133 throw new \Exception("EM116: unknow type");
134 }
135
136 return $a_message[$code];
137 }

References $a_error, $a_message_company, $a_message_customer, $code, and $type.

◆ set_a_error()

Noalyss\XMLDocument\Error_Message::set_a_error ( $a_error)

Definition at line 110 of file error_message.class.php.

111 {
112 $this->a_error = $a_error;
113 return $this;
114 }

References $a_error.

Field Documentation

◆ $a_error

Noalyss\XMLDocument\Error_Message::$a_error
private

Definition at line 65 of file error_message.class.php.

Referenced by __construct(), get_a_error(), get_message_error(), and set_a_error().

◆ $a_message_company

Noalyss\XMLDocument\Error_Message::$a_message_company
private

Definition at line 66 of file error_message.class.php.

Referenced by get_message_error().

◆ $a_message_customer

Noalyss\XMLDocument\Error_Message::$a_message_customer
private

Definition at line 67 of file error_message.class.php.

Referenced by get_message_error().


The documentation for this class was generated from the following file: