- Vous pouvez utiliser ceci comme des étiquettes pour marquer des documents ou
+
show_list();
diff --git a/include/class_acc_account.php b/include/class_acc_account.php
index 16033ff63..db3e8457e 100644
--- a/include/class_acc_account.php
+++ b/include/class_acc_account.php
@@ -63,7 +63,7 @@ class Acc_Account
return $this->$idx;
}
else
- exit (__FILE__.":".__LINE__.'Erreur attribut inexistant');
+ exit (__FILE__.":".__LINE__._('Erreur attribut inexistant'));
}
function set_parameter($p_string,$p_value)
@@ -74,7 +74,7 @@ class Acc_Account
if ($this->check($idx,$p_value) == true ) $this->$idx=$p_value;
}
else
- exit (__FILE__.":".__LINE__.'Erreur attribut inexistant');
+ exit (__FILE__.":".__LINE__._('Erreur attribut inexistant'));
}
@@ -94,7 +94,7 @@ class Acc_Account
}
else
{
- $this->pcm_lib="Poste inconnu";
+ $this->pcm_lib=_("Poste inconnu");
}
return $this->pcm_lib;
}
@@ -133,9 +133,9 @@ class Acc_Account
if ( strcmp ($k['value'],$p_value) == 0 ) return true;
}
- throw new Exception('type de compte incorrect '.$p_value);
+ throw new Exception(_('type de compte incorrect ').$p_value);
}
- throw new Exception ('Donnee member inconnue '.$p_member);
+ throw new Exception (_('Donnee member inconnue ').$p_member);
}
}
@@ -219,7 +219,7 @@ class Acc_Account
array($p_old)
);
if ($count != 0)
- throw new Exception('Impossible de changer la valeur: poste déjà utilisé');
+ throw new Exception(_('Impossible de changer la valeur: poste déjà utilisé'));
}
$this->pcm_lib=mb_substr($this->pcm_lib,0,150);
$this->check();
diff --git a/include/class_acc_bilan.php b/include/class_acc_bilan.php
index db4d2fde7..cbdab052a 100644
--- a/include/class_acc_bilan.php
+++ b/include/class_acc_bilan.php
@@ -131,10 +131,10 @@ class Acc_Bilan
if ( $count <> 0 )
{
echo '
'.$ret.' ';
- echo '
Nbres anomalies : '.$count.' ';
+ echo '
'._("Nbres anomalies").' : '.$count.' ';
}
else
- echo " Pas d'anomalie détectée";
+ echo _("Pas d'anomalie détectée");
echo '';
@@ -143,18 +143,18 @@ class Acc_Bilan
function verify()
{
bcscale(2);
- echo '
Comptes normaux ';
- $this->warning('Actif avec un solde crediteur','ACT','D');
- $this->warning('Passif avec un solde debiteur','PAS','C');
- $this->warning('Compte de resultat : Charge avec un solde crediteur','CHA','D');
- $this->warning('Compte de resultat : produit avec un solde debiteur','PRO','C');
+ echo '
'._("Comptes normaux").' ';
+ $this->warning(_('Actif avec un solde crediteur'),'ACT','D');
+ $this->warning(_('Passif avec un solde debiteur'),'PAS','C');
+ $this->warning(_('Compte de resultat : Charge avec un solde crediteur'),'CHA','D');
+ $this->warning(_('Compte de resultat : produit avec un solde debiteur'),'PRO','C');
echo '
';
- echo '
Comptes inverses ';
- $this->warning('Compte inverse : actif avec un solde debiteur','ACTINV','C');
- $this->warning('Compte inverse : passif avec un solde crediteur','PASINV','D');
- $this->warning('Compte inverse : Charge avec un solde debiteur','CHAINV','C');
- $this->warning('Compte inverse : produit avec un solde crediteur','PROINV','D');
- echo '
Solde ';
+ echo '
'._("Comptes inverses").' ';
+ $this->warning(_('Compte inverse : actif avec un solde debiteur'),'ACTINV','C');
+ $this->warning(_('Compte inverse : passif avec un solde crediteur'),'PASINV','D');
+ $this->warning(_('Compte inverse : Charge avec un solde debiteur'),'CHAINV','C');
+ $this->warning(_('Compte inverse : produit avec un solde crediteur'),'PROINV','D');
+ echo '
';
/* set the periode filter */
$sql_periode=sql_filter_per($this->db,$this->from,$this->to,'p_id','j_tech_per');
/* debit Actif */
@@ -172,7 +172,7 @@ class Acc_Bilan
$credit_actif=$this->db->get_value($sql);
$total_actif=abs(bcsub($debit_actif,$credit_actif));
echo ' ';
- echo tr(td( 'Total actif ').td($total_actif,'style="text-align:right"'));
+ echo tr(td(_('Total actif')).td($total_actif,'style="text-align:right"'));
/* debit passif */
$sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)".
@@ -189,7 +189,7 @@ class Acc_Bilan
$total_passif=abs(bcsub($debit_passif,$credit_passif));
/* diff actif / passif */
- echo tr(td('Total passif ').td($total_passif,'style="text-align:right"'));
+ echo tr(td(_('Total passif')).td($total_passif,'style="text-align:right"'));
if ( $total_actif != $total_passif )
{
$diff=bcsub($total_actif,$total_passif);
@@ -208,7 +208,7 @@ class Acc_Bilan
$sql.="and $sql_periode";
$credit_charge=$this->db->get_value($sql);
$total_charge=abs(bcsub($debit_charge,$credit_charge));
- echo tr(td('Total charge ').td($total_charge,'style="text-align:right"'));
+ echo tr(td(_('Total charge ')).td($total_charge,'style="text-align:right"'));
/* debit prod */
@@ -223,11 +223,11 @@ class Acc_Bilan
$sql.="and $sql_periode";
$credit_pro=$this->db->get_value($sql);
$total_pro=abs(bcsub($debit_pro,$credit_pro));
- echo tr(td('Total produit ').td($total_pro,'style="text-align:right"'));
+ echo tr(td(_('Total produit')).td($total_pro,'style="text-align:right"'));
$diff=bcsub($total_pro,$total_charge);
- echo tr( td("Difference Produit - Charge",'style="padding-right:20px"').td($diff,'style="text-align:right"'),'style="font-weight:bolder"');
+ echo tr( td(_("Difference Produit - Charge"),'style="padding-right:20px"').td($diff,'style="text-align:right"'),'style="font-weight:bolder"');
echo '
';
}
/*!
@@ -253,7 +253,7 @@ class Acc_Bilan
$res=$this->db->exec_sql($sql);
if ( Database::num_row($res)==0)
- throw new Exception ('Aucun enregistrement trouve');
+ throw new Exception (_('Aucun enregistrement trouve'));
$array=Database::fetch_array($res,0);
foreach ($array as $name=>$value)
$this->$name=$value;
@@ -345,7 +345,7 @@ class Acc_Bilan
$work_file=basename($file_base);
if ( copy ($file_base,$work_file) == false )
{
- echo "Je ne peux pas ouvrir ce fichier ";
+ echo _("erreur Ouverture fichier");
exit();
}
ob_start();
@@ -653,13 +653,13 @@ class Acc_Bilan
$p_file=fopen($dirname.DIRECTORY_SEPARATOR.'content.xml','wb');
if ( $p_file == false )
{
- exit('Je ne peux pas ouvrir content.xml');
+ exit ( _("erreur Ouverture fichier").' content.xml');
}
$a=fwrite($p_file,$p_result);
if ( $a==false)
{
- echo "Je ne peux pas ecrire dans content.xml";
+ echo _("erreur écriture fichier").' content.xml';
exit();
}
// repack
@@ -678,7 +678,7 @@ class Acc_Bilan
$fdoc=fopen($dirname.DIRECTORY_SEPARATOR.$this->b_name.'.'.$this->b_type,'r');
if ( $fdoc == false )
{
- exit('Je ne peux pas ouvrir ce document');
+ exit (_("erreur Ouverture fichier"));
}
$buffer=fread ($fdoc,filesize($dirname.DIRECTORY_SEPARATOR.$this->b_name.'.'.$this->b_type));
echo $buffer;
diff --git a/include/class_acc_compute.php b/include/class_acc_compute.php
index 0082a4fcb..88d3c3763 100644
--- a/include/class_acc_compute.php
+++ b/include/class_acc_compute.php
@@ -91,7 +91,7 @@ class Acc_Compute
return $this->$idx;
}
else
- exit (__FILE__.":".__LINE__.'Erreur attribut inexistant');
+ exit (__FILE__.":".__LINE__._('Erreur attribut inexistant'));
}
public function set_parameter($p_string,$p_value)
{
@@ -101,7 +101,7 @@ class Acc_Compute
$this->$idx=$p_value;
}
else
- exit (__FILE__.":".__LINE__.'Erreur attribut inexistant');
+ exit (__FILE__.":".__LINE__._('Erreur attribut inexistant'));
}
@@ -191,7 +191,7 @@ class Acc_Compute
{
foreach (self::$variable as $key=>$value)
if ( $this->$value < 0 )
- throw new Exception ("Montant invalide ");
+ throw new Exception (_("Montant invalide"));
if ( $p_obj != null )
{
@@ -202,7 +202,7 @@ class Acc_Compute
$cmp=bcadd($p_obj->amount,$p_obj->amount_vat);
$diff=bcsub($sum,$cmp);
if ( $diff != 0.0 )
- throw new Exception ("ECHEC VERIFICATION : valeur totale = $sum valeur attendue = $cmp diff = $diff");
+ throw new Exception (_("ECHEC VERIFICATION : valeur totale = $sum valeur attendue = $cmp diff = $diff"));
}
}
function display()
diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php
index cbc781dea..4fe479eb0 100644
--- a/include/class_acc_ledger.php
+++ b/include/class_acc_ledger.php
@@ -104,7 +104,7 @@ class Acc_Ledger extends jrn_def_sql
{
if ($this->id == 0)
{
- $this->name = " Tous les journaux";
+ $this->name = _(" Tous les journaux");
$this->type = "GL";
return "GL";
}
@@ -184,7 +184,7 @@ class Acc_Ledger extends jrn_def_sql
{
$this->db->start();
if (!isset($this->jr_id) || $this->jr_id == '')
- throw new Exception("this->jr_id is not set ou opération inconnue");
+ throw new Exception(_("this->jr_id is not set ou opération inconnue"));
/* check if the date is valid */
if (isDate($p_date) == null)
@@ -243,7 +243,7 @@ class Acc_Ledger extends jrn_def_sql
$Res = $this->db->exec_sql($sql, array($p_date, $grp_new, $p_internal, $g_user->id, $per->p_id, $row));
// Check return code
if ($Res == false)
- throw (new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"));
+ throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]"));
$aj_id = $this->db->fetch(0);
$j_id = $aj_id['j_id'];
@@ -271,7 +271,7 @@ class Acc_Ledger extends jrn_def_sql
FROM quant_purchase where j_id=$3", array($p_internal, $j_id, $row));
if ($Res == false)
- throw (new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"));
+ throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]"));
}
$sql = "insert into jrn (
jr_id,
@@ -292,14 +292,14 @@ class Acc_Ledger extends jrn_def_sql
$Res = $this->db->exec_sql($sql, array($seq, $p_date, $grp_new, $p_internal, $per->p_id, $this->jr_id));
// Check return code
if ($Res == false)
- throw (new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"));
+ throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]"));
// reverse in QUANT_FIN table
$Res = $this->db->exec_sql(" INSERT INTO quant_fin(
qf_bank, qf_other, qf_amount,jr_id)
SELECT qf_bank, qf_other, qf_amount*(-1),$1
FROM quant_fin where jr_id=$2", array($seq, $this->jr_id));
if ($Res == false)
- throw (new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"));
+ throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR[ $sql ]"));
// Add a "concerned operation to bound these op.together
//
@@ -310,7 +310,7 @@ class Acc_Ledger extends jrn_def_sql
// Check return code
if ($Res == false)
{
- throw (new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"));
+ throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]"));
}
@@ -321,7 +321,7 @@ class Acc_Ledger extends jrn_def_sql
from stock_goods natural join jrnx where j_grpt=" . $this->jr_grpt_id . ")";
$Res = $this->db->exec_sql($sql);
if ($Res == false)
- throw (new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"));
+ throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]"));
}
catch (Exception $e)
{
@@ -339,7 +339,7 @@ class Acc_Ledger extends jrn_def_sql
{
if ($this->id == 0)
{
- $this->name = " Grand Livre ";
+ $this->name = _("Grand Livre");
return $this->name;
}
@@ -652,20 +652,20 @@ class Acc_Ledger extends jrn_def_sql
$r.="
";
- $r.="Selection ";
- $r.="Internal ";
+ $r.=""._("Selection")." ";
+ $r.=""._("Internal")." ";
if ($this->type == 'ALL')
{
- $r.=th('Journal');
+ $r.=th(_('Journal'));
}
- $r.='Date ';
- $r.='Pièce';
- $r.=th('tiers');
- $r.=' Description ';
- $r.=th('Notes', ' ');
- $r.='Montant ';
+ $r.=''._("Date").' ';
+ $r.=''._("Pièce").'';
+ $r.=th(_('tiers'));
+ $r.=' '._("Description").' ';
+ $r.=th(_('Notes'), ' ');
+ $r.=''._("Montant").' ';
$r.="" . _('Concerne') . " ";
$r.=" ";
// Total Amount
@@ -759,7 +759,7 @@ class Acc_Ledger extends jrn_def_sql
if ($row['jr_valid'] == 'f')
{
- $r.="
Opération annulée ";
+ $r.="
"._("Opération annulée")." ";
}
// end row
$r.="";
@@ -813,13 +813,13 @@ class Acc_Ledger extends jrn_def_sql
// Sort
$url = "?" . CleanUrl();
$str_dossier = dossier::get();
- $table->add("Date", $url, 'order by jr_date asc,substring(jr_pj_number,\'[0-9]+$\')::numeric asc', 'order by jr_date desc,substring(jr_pj_number,\'[0-9]+$\')::numeric desc', "da", "dd");
- $table->add('Echeance', $url, " order by jr_ech asc", " order by jr_ech desc", 'ea', 'ed');
- $table->add('Paiement', $url, " order by jr_date_paid asc", " order by jr_date_paid desc", 'eap', 'edp');
- $table->add('PJ', $url, ' order by substring(jr_pj_number,\'[0-9]+$\')::numeric asc ', ' order by substring(jr_pj_number,\'[0-9]+$\')::numeric desc ', "pja", "pjd");
- $table->add('Tiers', $url, " order by name asc", " order by name desc", 'na', 'nd');
- $table->add('Montant', $url, " order by jr_montant asc", " order by jr_montant desc", "ma", "md");
- $table->add("Description", $url, "order by jr_comment asc", "order by jr_comment desc", "ca", "cd");
+ $table->add(_("Date"), $url, 'order by jr_date asc,substring(jr_pj_number,\'[0-9]+$\')::numeric asc', 'order by jr_date desc,substring(jr_pj_number,\'[0-9]+$\')::numeric desc', "da", "dd");
+ $table->add(_('Echeance'), $url, " order by jr_ech asc", " order by jr_ech desc", 'ea', 'ed');
+ $table->add(_('Paiement'), $url, " order by jr_date_paid asc", " order by jr_date_paid desc", 'eap', 'edp');
+ $table->add(_('Pièce'), $url, ' order by substring(jr_pj_number,\'[0-9]+$\')::numeric asc ', ' order by substring(jr_pj_number,\'[0-9]+$\')::numeric desc ', "pja", "pjd");
+ $table->add(_('Tiers'), $url, " order by name asc", " order by name desc", 'na', 'nd');
+ $table->add(_('Montant'), $url, " order by jr_montant asc", " order by jr_montant desc", "ma", "md");
+ $table->add(_("Description"), $url, "order by jr_comment asc", "order by jr_comment desc", "ca", "cd");
$ord = (!isset($_GET['ord'])) ? 'da' : $_GET['ord'];
$order = $table->get_sql_order($ord);
@@ -846,7 +846,7 @@ class Acc_Ledger extends jrn_def_sql
$r.="
";
- $r.="Internal ";
+ $r.=""._("n° interne")." ";
if ($this->type == 'ALL')
{
$r.=th('Journal');
@@ -987,7 +987,7 @@ class Acc_Ledger extends jrn_def_sql
if ($row['jr_valid'] == 'f')
{
- $r.=" Opération annulée ";
+ $r.=""._("Opération annulée")." ";
}
else
{
@@ -1016,11 +1016,11 @@ class Acc_Ledger extends jrn_def_sql
if ($p_paid != 0)
{
$r.=" ";
- $r.='Payé ';
+ $r.=''._("Payé").' ';
$r.='' . nbm($amount_paid) . " ";
$r.=" ";
$r.="
";
- $r.='Non payé ';
+ $r.=''._("Non payé").' ';
$r.='' . nbm($amount_unpaid) . " ";
$r.=" ";
}
@@ -1418,7 +1418,7 @@ class Acc_Ledger extends jrn_def_sql
$ret = "";
if (!empty($msg))
{
- $ret.=$this->display_warning($msg, "Attention : il vaut mieux utiliser les fiches que les postes comptables pour");
+ $ret.=$this->display_warning($msg, _("Attention : il vaut mieux utiliser les fiches que les postes comptables"));
}
$ret.="
";
$ret.="" . _('Date') . " : $e_date ";
@@ -1889,7 +1889,7 @@ class Acc_Ledger extends jrn_def_sql
$f->quick_code = ${'qc_' . $i};
if ($f->belong_ledger($p_jrn) < 0)
throw new Exception("La fiche quick_code = " .
- $f->quick_code . " n\'est pas dans ce journal", 4);
+ $f->quick_code . " n'est pas dans ce journal", 4);
if (strlen(trim(${'qc_' . $i})) != 0 && isNumber(${'amount' . $i}) == 0)
throw new Exception('Montant invalide', 3);
@@ -1980,7 +1980,7 @@ class Acc_Ledger extends jrn_def_sql
$msg = $this->verify($p_array);
if (!empty($msg))
{
- echo $this->display_warning($msg, "Attention : il vaut mieux utiliser les fiches que les postes comptables pour");
+ echo $this->display_warning($msg, _("Attention : il vaut mieux utiliser les fiches que les postes comptables "));
}
$this->db->start();
@@ -2080,7 +2080,7 @@ class Acc_Ledger extends jrn_def_sql
$jr_id = $acc_end->insert_jrn();
$this->jr_id = $jr_id;
if ($jr_id == false)
- throw new Exception('Balance incorrecte');
+ throw new Exception(_('Balance incorrecte'));
$acc_end->pj = $e_pj;
/* if e_suggest != e_pj then do not increment sequence */
@@ -2117,7 +2117,7 @@ class Acc_Ledger extends jrn_def_sql
catch (Exception $e)
{
$this->db->rollback();
- echo 'OPERATION ANNULEE ';
+ echo _('OPERATION ANNULEE ');
echo ' ';
echo __FILE__ . __LINE__ . $e->getMessage();
exit();
@@ -2373,7 +2373,7 @@ class Acc_Ledger extends jrn_def_sql
$empl->get_by_qcode($e_mp_qcode);
if ($empl->empty_attribute(ATTR_DEF_ACCOUNT) == true)
{
- throw new Exception('Celui qui paie n\' a pas de poste comptable', 20);
+ throw new Exception(_("Celui qui paie n' a pas de poste comptable"), 20);
}
/* get the account and explode if necessary */
$sposte = $empl->strAttribut(ATTR_DEF_ACCOUNT);
@@ -2390,7 +2390,7 @@ class Acc_Ledger extends jrn_def_sql
$poste = new Acc_Account_Ledger($this->db, $poste_val);
if ($poste->load() == false)
{
- throw new Exception('Pour la fiche' . $empl->quick_code . ' le poste comptable [' . $poste->id . 'n\'existe pas', 9);
+ throw new Exception(sprintf(_("Pour la fiche %s le poste comptable [%s] n'existe pas"),$empl->quick_code,$poste->id ), 9);
}
}
}
@@ -3229,10 +3229,10 @@ class Acc_Ledger extends jrn_def_sql
static function array_cat()
{
$r = array(
- array('cat' => 'VEN', 'name' => 'Journaux de vente'),
- array('cat' => 'ACH', 'name' => 'Journaux d\'achat'),
- array('cat' => 'FIN', 'name' => 'Journaux Financier'),
- array('cat' => 'ODS', 'name' => 'Journaux d\'Opérations diverses')
+ array('cat' => 'VEN', 'name' => _("Journaux de vente")),
+ array('cat' => 'ACH', 'name' => _("'Journaux d'achat")),
+ array('cat' => 'FIN', 'name' => _("'Journaux Financier")),
+ array('cat' => 'ODS', 'name' => _("'Journaux d'Opérations diverses"))
);
return $r;
}
@@ -3403,17 +3403,17 @@ class Acc_Ledger extends jrn_def_sql
if (isNumber($p_jrn) == 0)
throw new Exception("Id invalide");
if (isNumber($p_jrn_deb_max_line) == 0)
- throw new Exception("Nombre de ligne incorrect");
+ throw new Exception(_("Nombre de ligne incorrect"));
if (trim($p_jrn_name) == "")
throw new Exception("Nom de journal invalide");
if ($this->db->get_value("select count(*) from jrn_def where jrn_def_name=$1 and jrn_Def_id<>$2", array($p_jrn_name, $p_jrn)) > 0)
- throw new Exception("Un journal avec ce nom existe déjà");
+ throw new Exception(_("Un journal avec ce nom existe déjà"));
if ($p_jrn_type == 'FIN')
{
$a = new Fiche($this->db);
$result = $a->get_by_qcode(trim(strtoupper($_POST['bank'])), false);
if ($result == 1)
- throw new Exception("Aucun compte en banque n'est donné");
+ throw new Exception(_("Aucun compte en banque n'est donné"));
}
}
catch (Exception $e)
@@ -3458,7 +3458,7 @@ class Acc_Ledger extends jrn_def_sql
$bank = $a->id;
$this->jrn_def_bank = $bank;
if ($result == -1)
- throw new Exception("Aucun compte en banque n'est donné");
+ throw new Exception(_("Aucun compte en banque n'est donné"));
$this->jrn_def_num_op = (isset($numb_operation)) ? 1 : 0;
break;
}
@@ -3524,7 +3524,7 @@ class Acc_Ledger extends jrn_def_sql
$name = "";
$code = "";
$wType = new ISelect();
- $a_jrn= $this->db->make_array("select '-1',' -- choix du type de journal -- ' union select jrn_type_id,jrn_desc from jrn_type");
+ $a_jrn= $this->db->make_array("select '-1',' -- "._("choix du type de journal")." -- ' union select jrn_type_id,jrn_desc from jrn_type");
$wType->selected='-1';
$wType->value =$a_jrn;
$wType->name = "p_jrn_type";
@@ -3591,7 +3591,7 @@ class Acc_Ledger extends jrn_def_sql
$bank = $a->id;
$this->jrn_def_bank = $bank;
if ($result == -1)
- throw new Exception("Aucun compte en banque n'est donné");
+ throw new Exception(_("Aucun compte en banque n'est donné"));
$this->jrn_def_num_op = (isset($numb_operation)) ? 1 : 0;
break;
}
@@ -3608,7 +3608,7 @@ class Acc_Ledger extends jrn_def_sql
try
{
if ($this->db->get_value("select count(jr_id) from jrn where jr_def_id=$1", array($this->jrn_def_id)) > 0)
- throw new Exception("Impossible d'effacer un journal qui contient des opérations");
+ throw new Exception(_("Impossible d'effacer un journal qui contient des opérations"));
parent::delete();
}
catch (Exception $e)
@@ -3681,7 +3681,7 @@ class Acc_Ledger extends jrn_def_sql
{
global $g_user;
if (isNumber($p_ag_id)==0) return null;
- if (! $g_user->can_read_action($p_ag_id)) die ('Action non accessible');
+ if (! $g_user->can_read_action($p_ag_id)) die (_('Action non accessible'));
$array=array();
// retrieve info from action_gestion
diff --git a/include/constant.php b/include/constant.php
index 9ec8504d5..e7c63b3d2 100644
--- a/include/constant.php
+++ b/include/constant.php
@@ -84,7 +84,7 @@ define ('MAX_FORECAST_ITEM',10);
define ('MAX_PREDEFINED_OPERATION',50);
define ('MAX_COMPTE_CARD',4);
define ('COMPTA_MAX_YEAR',2100);
-define ('COMPTA_MIN_YEAR',1990);
+define ('COMPTA_MIN_YEAR',1900);
define ('MAX_RECONCILE',25);
define ('MAX_QCODE',4);
define ('MAX_SEARCH_CARD',20);
@@ -98,7 +98,7 @@ if ( DEBUG ) {
error_reporting(0);
ini_set("display_errors",1);
ini_set("html_errors",1);
-
+
}
// Erreur
define ("NOERROR",0);
@@ -177,6 +177,7 @@ define ("FICHE_TYPE_ADM_TAX",14);
define ("FICHE_TYPE_ACH_MAR",2);
define ("FICHE_TYPE_ACH_SER",3);
define ("FICHE_TYPE_ACH_MAT",7);
+define ("FICHE_TYPE_PROJET",26);
/** -- pour utiliser unoconv démarrer un server libreoffice
* commande
* libreoffice --headless --accept="socket,host=127.0.0.1,port=2002;urp;" --nofirststartwizard
diff --git a/include/database.item.php b/include/database.item.php
new file mode 100644
index 000000000..ab507a838
--- /dev/null
+++ b/include/database.item.php
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
diff --git a/include/menu.inc.php b/include/menu.inc.php
index fe3683fb7..01bc0a4cc 100644
--- a/include/menu.inc.php
+++ b/include/menu.inc.php
@@ -109,14 +109,14 @@ global $cn;
$table=new Sort_Table();
$url=$_SERVER['REQUEST_URI'];
-$table->add('Code',$url,"order by me_code asc","order by me_code desc","codea","coded");
-$table->add('Menu',$url,"order by me_menu asc","order by me_menu desc","menua","menud");
-$table->add('Description',$url,"order by me_description asc","order by me_description desc","desa","desd");
-$table->add('Type',$url,"order by me_type asc","order by me_type desc","ta","td");
-$table->add('Fichier',$url,"order by me_file asc","order by me_file desc","fa","fd");
-$table->add('URL',$url,"order by me_url asc","order by me_url desc","urla","urld");
-$table->add('Paramètre',$url,"order by me_parametere asc","order by me_parameter desc","paa","pad");
-$table->add('Javascript',$url,"order by me_javascript asc","order by me_javascript desc","jsa","jsd");
+$table->add(_('Code'),$url,"order by me_code asc","order by me_code desc","codea","coded");
+$table->add(_('Menu'),$url,"order by me_menu asc","order by me_menu desc","menua","menud");
+$table->add(_('Description'),$url,"order by me_description asc","order by me_description desc","desa","desd");
+$table->add(_('Type'),$url,"order by me_type asc","order by me_type desc","ta","td");
+$table->add(_('Fichier'),$url,"order by me_file asc","order by me_file desc","fa","fd");
+$table->add(_('URL'),$url,"order by me_url asc","order by me_url desc","urla","urld");
+$table->add(_('Paramètre'),$url,"order by me_parametere asc","order by me_parameter desc","paa","pad");
+$table->add(_('Javascript'),$url,"order by me_javascript asc","order by me_javascript desc","jsa","jsd");
$ord=(isset($_REQUEST['ord']))?$_REQUEST['ord']:'codea';
@@ -126,11 +126,11 @@ $order=$table->get_sql_order($ord);
$iselect=new ISelect('p_type');
$iselect->value=array(
- array("value"=>'',"label"=>"Tout"),
- array("value"=>'ME',"label"=>"Menu"),
- array("value"=>'PR',"label"=>"Impression"),
- array("value"=>'PL',"label"=>"Extension / Plugin"),
- array("value"=>'SP',"label"=>"Valeurs spéciales")
+ array("value"=>'',"label"=>_("Tout")),
+ array("value"=>'ME',"label"=>_("Menu")),
+ array("value"=>'PR',"label"=>_("Impression")),
+ array("value"=>'PL',"label"=>_("Extension / Plugin")),
+ array("value"=>'SP',"label"=>_("Valeurs spéciales"))
);
$iselect->selected=(isset($_REQUEST['p_type']))?$_REQUEST['p_type']:'';
$sql="";
@@ -144,15 +144,15 @@ $ret=$menu->seek($sql.$order);
Recherche
- Filtre
+
';
echo '';
@@ -182,8 +182,8 @@ for ($i = 0; $i < Database::num_row($ret); $i++)
$class = ( $i % 2 == 0) ? $class = ' class="odd"' : $class = ' class="even"';
echo " ";
echo td($js);
- echo td($row->me_menu);
- echo td(h($row->me_description));
+ echo td(_($row->me_menu));
+ echo td(h(_($row->me_description)));
echo td(h($row->me_type));
echo td(h($row->me_file));
echo td(h($row->me_url));
diff --git a/include/template/action_other_action.php b/include/template/action_other_action.php
index 35c0a2d46..8f6d855cf 100644
--- a/include/template/action_other_action.php
+++ b/include/template/action_other_action.php
@@ -4,7 +4,7 @@
?>
-
- Sélectionner les documents et l' action :
+
+
value="IMP"; $radio->selected=true;echo $radio->input(); ?>
- Impression
+
value="ST";$radio->selected=false;echo $radio->input(); ?>
- Changement des états
+
value=$cn->make_array('select s_id,s_value from document_state order by s_value');
@@ -32,7 +32,7 @@ echo HtmlInput::request_to_hidden(array("closed_action","remind_date_end","remin
value="ETIADD";echo $radio->input(); ?>
- Ajout d'étiquettes
+
@@ -40,7 +40,7 @@ echo HtmlInput::request_to_hidden(array("closed_action","remind_date_end","remin
value="ETIREM";echo $radio->input(); ?>
- Enlever des étiquettes
+
@@ -48,11 +48,11 @@ echo HtmlInput::request_to_hidden(array("closed_action","remind_date_end","remin
value="ETICLEAR";echo $radio->input(); ?>
- Enlever toutes les étiquettes des documents choisis
+
value="DOCREM";echo $radio->input(); ?>
- Effacer les documents choisis
+
diff --git a/include/template/action_search.php b/include/template/action_search.php
index 543858fb2..b1bcdfbf3 100644
--- a/include/template/action_search.php
+++ b/include/template/action_search.php
@@ -28,11 +28,11 @@
?>
-
+
-
+
@@ -48,19 +48,19 @@
- Date de rappel après
+
input();?>
- Date de rappel avant
+
input();?>
- Affiche aussi les actions fermées
+
input();?>
@@ -79,13 +79,13 @@
- Référence
+
input();?>
- Numéro document
+
input();?>
diff --git a/include/template/action_search_result.php b/include/template/action_search_result.php
index 24602a293..9b5c30d89 100644
--- a/include/template/action_search_result.php
+++ b/include/template/action_search_result.php
@@ -29,7 +29,7 @@
?>
@@ -85,5 +85,5 @@
-
+
\ No newline at end of file
diff --git a/include/template/anc_balance_group.php b/include/template/anc_balance_group.php
index 61a4b99a4..32d8a6873 100644
--- a/include/template/anc_balance_group.php
+++ b/include/template/anc_balance_group.php
@@ -46,9 +46,9 @@ if ( $prev != $array[$i]['ga_id'])
?>
Activité
-Débit
-Crébit
-Solde
+
+
+
';
-echo td('Solde');
+echo td(_('Solde'));
echo td(nbm($tot_group_deb),' class="num"');
echo td(nbm($tot_group_cred),' class="num"');
echo td(nbm(bcsub($tot_group_cred,$tot_group_deb)),' class="num"');
diff --git a/include/template/dashboard.php b/include/template/dashboard.php
index f9931cd1f..fbd9f0372 100644
--- a/include/template/dashboard.php
+++ b/include/template/dashboard.php
@@ -64,10 +64,6 @@ if ( ! empty ($array) ) {
-
-
-
-
@@ -208,7 +204,7 @@ endif;
0) :
@@ -233,13 +229,13 @@ endif;
-
Aucune action en retard
+
-
-
-
-
+
+
+
+
@@ -340,4 +336,4 @@ for (i=0;i < array.length;i++) {
new Draggable(array[i],{});
}
} catch (e) { alert(e.getMessage);}
-
\ No newline at end of file
+
diff --git a/include/template/detail-action.php b/include/template/detail-action.php
index 8adc58161..751e9b31f 100644
--- a/include/template/detail-action.php
+++ b/include/template/detail-action.php
@@ -156,7 +156,7 @@
$rmOperation=sprintf("javascript:if ( confirm('"._('Voulez-vous effacer cette opération ')."')==true ) {remove_operation('%s','%s');}",
dossier::id(),
$operation[$o]['ago_id']);
- $js= 'Effacer ';
+ $js= ''._("Effacer").' ';
echo ''.$operation[$o]['str_date']." ".HtmlInput::detail_op($operation[$o]['jr_id'],$operation[$o]['jr_internal'])." ".h($operation[$o]['jr_comment'])." "
.$js.' ';
}
@@ -173,7 +173,7 @@
diff --git a/include/template/fiche_def_input.php b/include/template/fiche_def_input.php
index 3fd8d8734..524fa2d55 100644
--- a/include/template/fiche_def_input.php
+++ b/include/template/fiche_def_input.php
@@ -3,7 +3,7 @@
//see licence.txt
?>
diff --git a/include/template/fiche_list.php b/include/template/fiche_list.php
index f85756950..1be5edfe8 100644
--- a/include/template/fiche_list.php
+++ b/include/template/fiche_list.php
@@ -27,27 +27,26 @@
*/
?>
-