From 3989f58c3ad0418fe321a4db074f0de04ef12beb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Sep 2004 12:33:45 +0000 Subject: [PATCH] =?UTF-8?q?Trad:=20Traductions=20suppl=E9mentaires=20dans?= =?UTF-8?q?=20le=20module=20facture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/facture.php | 176 +++++++++++++++------------- htdocs/compta/facture/fiche-rec.php | 6 +- htdocs/compta/facture/info.php | 22 ++-- htdocs/compta/facture/note.php | 24 ++-- 4 files changed, 121 insertions(+), 107 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index f90464a192e..4b1b2638dd8 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -367,13 +367,12 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance') if (! $db->query($sql) ) { - print $db->error(); - print "

$sql

"; + dolibarr_print_error($db->error()); } } else { - print "!! erreur d'envoi
$sendto
$replyto
$filename"; + print $langs->trans("ErrorFailedToSendMail",$replyto,$sendto); } } else @@ -403,7 +402,7 @@ if ($_GET["action"] == 'pdf') } -llxHeader('','Facture','Facture'); +llxHeader('',$langs->trans("Bill"),'Facture'); $html = new Form($db); @@ -415,6 +414,7 @@ $html = new Form($db); ************************************************************************/ if ($_GET["action"] == 'create') { + print_titre("Emettre une facture"); if ($propalid) @@ -455,20 +455,20 @@ if ($_GET["action"] == 'create') print ''; - print ''; - print ''; + print ''; + print ''; - print ""; + print ''; print ''; - print ""; - print ""; + print ''; + print ''; print ''; print ""; - print ""; - + if ($conf->projet->enabled) { + $langs->load("projects"); + print '"; + } + if ($_GET["propalid"] > 0) { $amount = ($obj->price); @@ -742,21 +745,21 @@ else $author->id = $fac->user_author; $author->fetch(); + $h = 0; + + $head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$fac->id; + $head[$h][1] = $langs->trans("Bill")." : $fac->ref"; + $hselected = $h; + $h++; + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$fac->id; + $head[$h][1] = $langs->trans("Note"); + $h++; + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/info.php?facid='.$fac->id; + $head[$h][1] = $langs->trans("Info"); + $h++; + + dolibarr_fiche_head($head, $hselected, $soc->nom); - $head[0][0] = DOL_URL_ROOT."/compta/facture.php?facid=".$fac->id; - $head[0][1] = "Facture : $fac->ref"; - $h = 1; - $a = 0; - - $head[$h][0] = DOL_URL_ROOT."/compta/facture/note.php?facid=".$fac->id; - $head[$h][1] = "Note"; - $h++; - $a = 0; - - $head[$h][0] = DOL_URL_ROOT.'/compta/facture/info.php?facid='.$fac->id; - $head[$h][1] = "Info"; - - dolibarr_fiche_head($head, $a, $soc->nom); /* * Confirmation de la suppression de la facture @@ -790,35 +793,41 @@ else * Facture */ print '
Client :'.$soc->nom.'Commentaire
'.$langs->trans("Customer").' :'.$soc->nom.''.$langs->trans("Comment").'
".$langs->trans("Author")." :".$user->fullname."
'.$langs->trans("Author").' :'.$user->fullname.''; print '
Date :"; + print '
'.$langs->trans("Date").' :'; print_date_select(time()); - print "
Numéro :Provisoire
'.$langs->trans("Ref").' :Provisoire
Conditions de réglement :"; $sql = "SELECT rowid, libelle FROM ".MAIN_DB_PREFIX."cond_reglement ORDER BY sortorder"; @@ -490,11 +490,14 @@ if ($_GET["action"] == 'create') $html->select_array("condid",$conds); print "
Projet :"; - $proj = new Project($db); - $html->select_array("projetid",$proj->liste_array($socidp)); - print "
'.$langs->trans("Project").' :'; + $proj = new Project($db); + $html->select_array("projetid",$proj->liste_array($socidp)); + print "
'; - print ""; - print "'; + print ''; print ""; - print ""; + print ''; print "\n"; print ""; - print '"; - + print ''; + if ($conf->projet->enabled) { + $langs->load("projects"); + print '"; + } else { + print '"; + } print '
Client"; + print '
'.$langs->trans("Customer").''; print ''.$soc->nom.'Conditions de réglement : " . $fac->cond_reglement ."
Date
'.$langs->trans("Date").'".strftime("%A %d %B %Y",$fac->date)."Date limite de réglement : " . strftime("%d %B %Y",$fac->date_lim_reglement) ."
Projet'; - if ($fac->projetid > 0) - { - $projet = New Project($db); - $projet->fetch($fac->projetid); - print ''.$projet->title.''; - } - else - { - print 'Classer la facture'; - } - print " 
'.$langs->trans("Project").''; + if ($fac->projetid > 0) + { + $projet = New Project($db); + $projet->fetch($fac->projetid); + print ''.$projet->title.''; + } + else + { + print 'Classer la facture'; + } + print "  '; + print " '; /* * Paiements */ - print 'Paiements :
'; + print $langs->trans("Payments").' :
'; $sql = "SELECT ".$db->pdate("datep")." as dp, pf.amount,"; $sql .= "c.libelle as paiement_type, p.num_paiement, p.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."paiement as p, ".MAIN_DB_PREFIX."c_paiement as c, ".MAIN_DB_PREFIX."paiement_facture as pf"; @@ -830,9 +839,9 @@ else { $num = $db->num_rows(); $i = 0; $total = 0; - echo ''; + print '
'; print ''; - print ""; + print ''; $var=True; while ($i < $num) @@ -873,18 +882,18 @@ else print ''; print ''; - print ''; + print ''; print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print ''; if ($fac->note) { - print '"; + print '"; } else { print ''; @@ -920,11 +929,11 @@ else { print ""; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print "\n"; } @@ -1019,7 +1028,7 @@ else } else { - print "Erreur : ".$db->error()."
".$sql; + dolibarr_print_error($db->error()); } /* @@ -1032,9 +1041,9 @@ else print ""; print ""; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -1204,8 +1213,9 @@ else $i = 0; $total = 0; print '
Date'.$langs->trans("Type").'Montant 
'.$langs->trans("Amount").' 
'.$fac->remise_percent.'%
Montant HT
'.$langs->trans("AmountHT").''.price($fac->total_ht).''.MAIN_MONNAIE.' HT
TVA'.price($fac->total_tva).'
'.$langs->trans("VAT").''.price($fac->total_tva).''.MAIN_MONNAIE.'
Montant TTC'.price($fac->total_ttc).'
'.$langs->trans("AmountTTC").''.price($fac->total_ttc).''.MAIN_MONNAIE.' TTC
'.$langs->trans("Status").''.($fac->get_libstatut()).'
Note : '.nl2br($fac->note)."
'.$langs->trans("Note").' : '.nl2br($fac->note)."
 
'.$langs->trans("Description").'Tva'.$langs->trans("VAT").'P.U. HTQuantité'.$langs->trans("Quantity").'RemiseMontant HT'.$langs->trans("AmountHT").'  
'.$langs->trans("Description").'Tva'.$langs->trans("VAT").'P.U. HTQuantité'.$langs->trans("Quantity").'Remise  
'; - print "\n"; - + print ''; + print "\n"; + $var=True; while ($i < $num) { @@ -1215,15 +1225,15 @@ else print "\n"; print ''; print ''; - print ""; + print "\n"; $i++; } - print "
DateActionPar
'.$langs->trans("Date").''.$langs->trans("Action").''.$langs->trans("By").'
".dolibarr_print_date($objp->da)."'.stripslashes($objp->note).''.$objp->code.'
"; + print "
\n"; } } else { - print $db->error(); + dolibarr_print_error($db); } print ""; @@ -1239,13 +1249,15 @@ else print ''; print ''; print ''; - print '"; - print '
Projet'; + + print '
'.$langs->trans("Project").''; $proj = new Project($db); $html->select_array("projetid",$proj->liste_array($soc->id)); print "

'; + + print '

'; } /* * @@ -1283,7 +1295,7 @@ else print "
\n"; - print "
\n"; + print "
trans("Send")."\">
\n"; } if ($_GET["action"] == 'prerelance') @@ -1311,14 +1323,14 @@ else $form->select_array("destinataire",$soc->contact_email_array()); print " ou email\">"; - print 'Message'; + print ''.$langs->trans("Message").''; print ""; print "
\n"; - print "
\n"; + print "
trans("Send")."\">
\n"; } /* @@ -1347,8 +1359,8 @@ else print ''; print ''; - print ""; - print ""; + print ''; + print ''; print ''; print "\n"; @@ -1357,10 +1369,10 @@ else { $objp = $db->fetch_object( $i); $var=!$var; - print ""; - print "\n"; - print "\n"; - print ''; + print ""; + print "\n"; + print "\n"; + print ''; print ""; $total = $total + $objp->price; $i++; @@ -1369,13 +1381,13 @@ else print "
NuméroDate'.$langs->trans("Ref").''.$langs->trans("Date").''.$langs->trans("Price").'
propalid\">$objp->ref".strftime("%d %B %Y",$objp->dp)."'.price($objp->price).'
propalid\">$objp->ref".strftime("%d %B %Y",$objp->dp)."'.price($objp->price).'
"; } } else { - print $db->error(); + dolibarr_print_error($db); } } else { /* Facture non trouvée */ - print "Facture inexistante ou accés refusé"; + print "Facture inexistante"; } } else { /*************************************************************************** @@ -1454,15 +1466,15 @@ else print ''; print ''; print '"; - print ""; + print ''; + print ''; - print ''; + print ''; print ''; diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 6637a7bd68b..f9de3d72ba0 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -44,23 +44,25 @@ $facture->info($_GET["facid"]); $soc = new Societe($db, $facture->socidp); $soc->fetch($facture->socidp); -$head[0][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$facture->id; -$head[0][1] = "Facture : $facture->ref"; -$h = 1; +$h = 0; + +$head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$facture->id; +$head[$h][1] = $langs->trans("Bill")." : $facture->ref"; +$h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$facture->id; -$head[$h][1] = "Note"; +$head[$h][1] = $langs->trans("Note"); $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/info.php?facid='.$facture->id; -$head[$h][1] = "Info"; -$a = 2; - -dolibarr_fiche_head($head, $a, $soc->nom); - - +$head[$h][1] = $langs->trans("Info"); +$hselected = $h; +$h++; +dolibarr_fiche_head($head, $hselected, $soc->nom); +print '
'; - print_liste_field_titre("Numéro",$_SERVER["PHP_SELF"],"f.facnumber","","&socidp=$socidp"); + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","","&socidp=$socidp"); print ''; - print_liste_field_titre("Date",$_SERVER["PHP_SELF"],"f.datef","","&socidp=$socidp"); + print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","","&socidp=$socidp"); print ''; - print_liste_field_titre("Société",$_SERVER["PHP_SELF"],"s.nom","","&socidp=$socidp"); + print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&socidp=$socidp"); print ''; - print_liste_field_titre("Montant HT",$_SERVER["PHP_SELF"],"f.total","","&socidp=$socidp"); + print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","","&socidp=$socidp"); print ''; - print_liste_field_titre("Montant TTC",$_SERVER["PHP_SELF"],"f.total_ttc","","&socidp=$socidp"); + print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","","&socidp=$socidp"); print ''; print_liste_field_titre("Reçu",$_SERVER["PHP_SELF"],"am","","&socidp=$socidp"); print ''; @@ -1567,7 +1579,7 @@ else } else { - print $db->error() . "
" . $sql; + dolibarr_print_error($db); } } diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 07cd37f6682..c3694ac3ed3 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -107,10 +107,10 @@ if ($_GET["action"] == 'create') $facture->fetch_client(); - print "
Client :".$facture->client->nom."Commentaire
'.$langs->trans("Customer").' :'.$facture->client->nom.''.$langs->trans("Comment").'
Titre :
'.$langs->trans("Title").' :'; print '
'; dolibarr_print_object_info($facture); +print '
'; print "
"; diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index edcd2d967fd..8fc4a7b2c19 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -34,9 +34,7 @@ $user->getrights('facture'); if (!$user->rights->facture->lire) accessforbidden(); -/* - * Modules optionnels - */ +$langs->load("companies"); /* * Sécurité accés client @@ -74,23 +72,25 @@ if ($_GET["facid"]) $soc = new Societe($db, $facture->socidp); $soc->fetch($facture->socidp); - $head[0][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$facture->id; - $head[0][1] = "Facture : $facture->ref"; - $h = 1; + $h=0; + + $head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$facture->id; + $head[$h][1] = $langs->trans("Bill")." : $facture->ref"; + $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$facture->id; - $head[$h][1] = "Note"; - $a = 1; + $head[$h][1] = $langs->trans("Note"); + $hselected = $h; $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/info.php?facid='.$facture->id; - $head[$h][1] = "Info"; + $head[$h][1] = $langs->trans("Info"); + $h++; - - dolibarr_fiche_head($head, $a, $soc->nom); + dolibarr_fiche_head($head, $hselected, $soc->nom); print ''; - print '
Société'; + print '
'.$langs->trans("Company").''; if ($societe->client == 1) { $url ='fiche.php?socid='.$societe->id;