From f03dde7b43673c5f977e919a0ac0039a7c510409 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Nov 2004 16:05:02 +0000 Subject: [PATCH] Trad: Quelques traductions de plus --- htdocs/commande/fiche.php | 2 +- htdocs/contrat/contrat.class.php | 143 +++++++++++++++---------------- htdocs/contrat/fiche.php | 21 ++--- htdocs/fourn/facture/fiche.php | 12 +-- htdocs/product/fiche.php | 2 +- 5 files changed, 88 insertions(+), 92 deletions(-) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index bee15a80b7b..ba117a8d635 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -657,7 +657,7 @@ else print ''; print "".''; print ''; - print $html->select_tva("tva_tx"); + print $html->select_tva("tva_tx",$conf->defaulttx); print ''; print ''; print ' %'; diff --git a/htdocs/contrat/contrat.class.php b/htdocs/contrat/contrat.class.php index 3549d127e9a..26ea81db8ba 100644 --- a/htdocs/contrat/contrat.class.php +++ b/htdocs/contrat/contrat.class.php @@ -21,7 +21,7 @@ * */ -/*! +/** \file htdocs/contrat/contrat.class.php \ingroup contrat \brief Fichier de la classe des contrats @@ -29,7 +29,7 @@ */ -/*! \class Contrat +/** \class Contrat \brief Classe permettant la gestion des contrats */ @@ -51,7 +51,7 @@ class Contrat $this->user_cloture = new User($DB); } - /* + /** * \brief Modifie date de mise en service d'un contrat * Si la duree est renseignée, date_start=date_start et date_end=date_start+duree * sinon date_start=date_start et date_end=date_end @@ -97,10 +97,11 @@ class Contrat } } - /* - * - * - * + /** + * \brief Active une ligne detail d'un contat + * \param user objet User qui avtice le contrat + * \param line_id id de la ligne de detail à activer + * \param date date d'ouverture */ function active_line($user, $line_id, $date) { @@ -126,7 +127,7 @@ class Contrat - /* + /** * \brief Cloture un contrat * \param user objet User qui cloture * @@ -140,7 +141,7 @@ class Contrat $result = $this->db->query($sql) ; } - /* + /** * \brief Annule un contrat * \param user objet User qui annule * @@ -154,7 +155,7 @@ class Contrat $result = $this->db->query($sql) ; } - /* + /** * \brief Charge de la base les données du contrat * \param id id du contrat à charger */ @@ -200,10 +201,9 @@ class Contrat return $result; } - /* - * - * - * + /** + * \brief Crée un contrat vierge + * \param user utilisateur qui crée */ function create($user) { @@ -219,68 +219,69 @@ class Contrat else { $result = 1; - dolibarr_syslog("Contrat::create_from_facture - 10"); - dolibarr_print_error($this->db,"Contrat::create_from_facture - 10"); + dolibarr_syslog("Contrat::create - 10"); + dolibarr_print_error($this->db,"Contrat::create - 10"); } return $result; } - /* + /** * \brief Crée autant de contrats que de lignes de facture, pour une facture donnée - * + * \param factureid id de la facture + * \param user utilisateur qui crée + * \param socid id société */ - function create_from_facture($factureid, $user, $socid) + function create_from_facture($factureid, $user, $socid) { - $sql = "SELECT p.rowid as rowid, fd.rowid as fdrowid FROM ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."facturedet as fd"; - $sql .= " WHERE p.rowid = fd.fk_product AND p.fk_product_type = 1 AND fd.fk_facture = ".$factureid; - - if ($this->db->query($sql)) - { - $num = $this->db->num_rows(); - - if ($num > 0) - { - $i = 0; - - while ($i < $num) - { - $objp = $this->db->fetch_object(); - $prowid[$i] = $objp->rowid; - $fdrowid[$i] = $objp->fdrowid; - $i++; - } - - $this->db->free(); - - while (list($i, $value) = each ($prowid)) - { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."contrat (fk_product, fk_facture, fk_facturedet, fk_soc, fk_user_author)"; - $sql .= " VALUES (".$prowid[$i].", $factureid, ".$fdrowid[$i].", $socid, $user->id)"; - if (! $this->db->query($sql)) - { - dolibarr_syslog("Contrat::create_from_facture - 10"); - dolibarr_print_error($this->db,"Contrat::create_from_facture - 10"); - } - } - } - else - { - $this->db->free(); - } - } - else - { - dolibarr_syslog("Contrat::create_from_facture - 20"); - dolibarr_print_error($this->db,"Contrat::create_from_facture - 20"); - } - - return $result; + $sql = "SELECT p.rowid as rowid, fd.rowid as fdrowid FROM ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."facturedet as fd"; + $sql .= " WHERE p.rowid = fd.fk_product AND p.fk_product_type = 1 AND fd.fk_facture = ".$factureid; + + if ($this->db->query($sql)) + { + $num = $this->db->num_rows(); + + if ($num > 0) + { + $i = 0; + + while ($i < $num) + { + $objp = $this->db->fetch_object(); + $prowid[$i] = $objp->rowid; + $fdrowid[$i] = $objp->fdrowid; + $i++; + } + + $this->db->free(); + while (list($i, $value) = each ($prowid)) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."contrat (fk_product, fk_facture, fk_facturedet, fk_soc, fk_user_author)"; + $sql .= " VALUES (".$prowid[$i].", $factureid, ".$fdrowid[$i].", $socid, $user->id)"; + if (! $this->db->query($sql)) + { + dolibarr_syslog("Contrat::create_from_facture - 10"); + dolibarr_print_error($this->db,"Contrat::create_from_facture - 10"); + } + } + } + else + { + $this->db->free(); + } + } + else + { + dolibarr_syslog("Contrat::create_from_facture - 20"); + dolibarr_print_error($this->db,"Contrat::create_from_facture - 20"); + } + + return $result; } /** - * Ajoute une ligne de commande + * \brief Ajoute une ligne de commande * */ function addline($desc, $pu, $qty, $txtva, $fk_product=0, $remise_percent=0) @@ -316,18 +317,12 @@ class Contrat $price = $pu - $remise; } - /* - * Insertion dans la base - */ - + // Insertion dans la base $sql = "INSERT INTO ".MAIN_DB_PREFIX."contratdet "; $sql .= "(fk_contrat,label,description,fk_product, price_ht,qty,tva_tx, remise_percent, subprice, remise)"; $sql .= " VALUES ($this->id, '" . addslashes($label) . "','" . addslashes($desc) . "',$fk_product,".ereg_replace(",",".",$price).", '$qty', $txtva, $remise_percent,'".ereg_replace(",",".",$subprice)."','".ereg_replace(",",".", $remise)."') ;"; - /* - * Retour - */ - + // Retour if ( $this->db->query( $sql) ) { //$this->update_price(); @@ -342,8 +337,8 @@ class Contrat } /** - * Supprime une ligne du contrat - * + * \brief Supprime une ligne de detail du contrat + * \param idligne id de la ligne detail de contrat à supprimer */ function delete_line($idligne) { diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index deeed17cc27..57dcc102550 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -602,7 +602,7 @@ else if ( $db->query($sql) ) { - $opt = ""; + $opt = ""; $num = $db->num_rows(); $i = 0; @@ -625,8 +625,8 @@ else print ""; print ''.$langs->trans("Description").''; - print 'Tva'; - print 'Quantité'; + print ''.$langs->trans("VAT").''; + print ''.$langs->trans("Qty").''; print 'Remise'; print 'P.U.'; print '  '."\n"; @@ -635,7 +635,7 @@ else /* print "".''; print ''; - print $html->select_tva("tva_tx"); + print $html->select_tva("tva_tx",$conf->defaulttx); print ''; print ''; print ' %'; @@ -670,7 +670,7 @@ else if ($contrat->statut == 0 && $user->rights->contrat->supprimer) { - print 'Supprimer'; + print ''.$langs->trans("Delete").''; } if ($contrat->statut > 0 && $contrat->statut < 3 && $user->rights->expedition->creer) @@ -683,7 +683,7 @@ else { if ($user->rights->contrat->valider) { - print 'Valider'; + print ''.$langs->trans("Valid").''; } } @@ -692,7 +692,7 @@ else $nb_expedition = $contrat->nb_expedition(); if ($user->rights->contrat->valider && $nb_expedition == 0) { - print 'Annuler la contrat'; + print ''.$langs->trans("Cancel").''; } } @@ -707,10 +707,11 @@ else */ if ($_GET["action"] == 'classer') { + $langs->load("project"); print '

'; print ''; - print ''; - print '
Projet'; + print ''; + print ''; } - print "".''; @@ -254,7 +254,7 @@ if ($_GET["action"] == 'create' or $_GET["action"] == 'copy') print "
'.$langs->trans("Project").''; $proj = new Project($db); $html->select_array("projetid",$proj->liste_array($contrat->soc_id)); @@ -726,7 +727,7 @@ else else { /* Contrat non trouvée */ - print "Contrat inexistante ou accés refusé"; + print "Contrat inexistant ou accés refusé"; } } } diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 7bbbadd78a1..1a3ab071125 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -246,7 +246,7 @@ if ($_GET["action"] == 'create' or $_GET["action"] == 'copy') { print '
'.$langs->trans("Label").'
Date'; + print '
'.$langs->trans("Date").''; $html->select_date(); print '

"; print ''; - print ''; + print ''; for ($i = 1 ; $i < 9 ; $i++) { @@ -344,7 +344,7 @@ else */ print "

id&action=add_ligne\" method=\"post\">"; print '

 '.$langs->trans("Label").'P.U. HTQuantitéTx TVA
 '.$langs->trans("Label").'P.U. HT'.$langs->trans("Qty").''.$langs->trans("VATRate").'
'; - print ''; + print ''; print ''; print ''; print ''; @@ -467,9 +467,9 @@ else $objp = $db->fetch_object(); $var=!$var; print ""; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; if ($fac->statut == 1 && $fac->paye == 0 && $user->societe_id == 0) { diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index fcebcd8e45c..53345d23324 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -273,7 +273,7 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer) $langs->load("bills"); print ''; print '
'.$langs->trans("Label").'P.U. HTQuantitéTotal HT
'.$langs->trans("Label").'P.U. HT'.$langs->trans("Qty").''.$langs->trans("TotalHT").''.$langs->trans("VATRate").''.$langs->trans("VAT").''.$langs->trans("TotalTTC").' 
".strftime("%d %B %Y",$objp->dp)."$objp->paiement_type $objp->num_paiement".price($objp->amount)."".MAIN_MONNAIE."".strftime("%d %B %Y",$objp->dp)."$objp->paiement_type $objp->num_paiement".price($objp->amount)."".MAIN_MONNAIE."
'.$langs->trans("VATRate").''; - print $html->select_tva("tva_tx"); + print $html->select_tva("tva_tx",$conf->defaulttx); print '
'.$langs->trans("Status").'';