From 74ec2a2529b09642e24c23f38b8d8fb344a520cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Mar 2005 16:00:00 +0000 Subject: [PATCH] Trad: Traductions messages diverses --- htdocs/langs/en_US/bills.lang | 1 + htdocs/langs/en_US/main.lang | 5 +- htdocs/langs/en_US/propal.lang | 4 +- htdocs/langs/fr_FR/bills.lang | 3 +- htdocs/langs/fr_FR/main.lang | 5 +- htdocs/langs/fr_FR/propal.lang | 2 + htdocs/product/fiche.php | 323 ++++++++++++++++++++------------- htdocs/product/photos.php | 16 +- 8 files changed, 222 insertions(+), 137 deletions(-) diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 4ce84eeec34..617ae0d487b 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -62,3 +62,4 @@ RemainderToTake=Remainder to take CreateDraft=Create draft SendBillRef=Send bill %s SendReminderBillRef=Send bill %s (reminder) +NoOtherBills=No other drafts bills diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index bba7df70db7..92ce7fd8101 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -183,4 +183,7 @@ Preview=Preview NextStep=Next step PreviousStep=Previous step None=None -Late=Late \ No newline at end of file +Late=Late +Photo=Picture +Photos=Pictures +AddPhoto=Add picture \ No newline at end of file diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index b93ac27e018..dd427e798e5 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -24,4 +24,6 @@ PropalsOpened=Opened PropalStatusDraft=Draft (need to be validated) PropalStatusValidated=Validated (proposal is opened) ListOfProposals=List of commercial proposals -ActionsOnPropal=Tasks on proposal \ No newline at end of file +ActionsOnPropal=Tasks on proposal +NoOpenedPropals=No opened commercial proposals +NoOtherOpenedPropals=No other opened commercial proposals \ No newline at end of file diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index 0e833582166..65c5a656149 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -64,4 +64,5 @@ SendBillRef=Envoi facture %s SendReminderBillRef=Relance facture %s ShowBill=Afficher facture StandingOrders=Prélèvements -StandingOrder=Prélèvement \ No newline at end of file +StandingOrder=Prélèvement +NoOtherBills=Pas d'autres factures brouillons \ No newline at end of file diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 48f31ecec04..b55e25bb960 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -184,4 +184,7 @@ Preview=Aper NextStep=Etape suivante PreviousStep=Etape précédente None=Aucun -Late=Retard \ No newline at end of file +Late=Retard +Photo=Photo +Photos=Photos +AddPhoto=Ajouter photo \ No newline at end of file diff --git a/htdocs/langs/fr_FR/propal.lang b/htdocs/langs/fr_FR/propal.lang index 68bfa3659df..11b84ff8883 100644 --- a/htdocs/langs/fr_FR/propal.lang +++ b/htdocs/langs/fr_FR/propal.lang @@ -25,3 +25,5 @@ PropalStatusDraft=Brouillon ( PropalStatusValidated=Validée (propale ouverte) ListOfProposals=Liste des devis/propositions commerciales ActionsOnPropal=Actions sur la proposition +NoOpenedPropals=Pas de propositions ouvertes +NoOtherOpenedPropals=Pas d'autres propositions ouvertes \ No newline at end of file diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index d254f920e3b..59267ade903 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -424,15 +424,16 @@ else $sql .=" WHERE pf.fk_soc = s.idp AND pf.fk_product = ".$product->id; $sql .= " ORDER BY lower(s.nom)"; - if ( $db->query($sql) ) + $result=$db->query($sql); + if ($result) { - $num_fournisseur = $db->num_rows(); + $num_fournisseur = $db->num_rows($result); $i = 0; print ''; $var=True; while ($i < $num_fournisseur) { - $objp = $db->fetch_object($i); + $objp = $db->fetch_object($result); $var=!$var; print ""; print ''; @@ -442,7 +443,7 @@ else $i++; } print '
'.$objp->nom.'
'; - $db->free(); + $db->free($result); } print ''; @@ -691,150 +692,228 @@ if ($_GET["action"] == '') print ''.$langs->trans("Edit").''; } - if ($product->type == 0 && $conf->stock->enabled) - { - print ''.$langs->trans("CorrectStock").''; - } } print "\n\n"; + /* * Photo * */ if ($_GET["id"] && $_GET["action"]=='') { - print $product->show_photo($conf->produit->dir_output); + print $product->show_photo($conf->produit->dir_output); } if ($_GET["id"] && $_GET["action"] == '' && $product->envente) { - $htmls = new Form($db); - $propal = New Propal($db); + $htmls = new Form($db); + $propal = New Propal($db); - print ''; - if($user->rights->propale->creer) + print '
'; + + // Propals + if($user->rights->propale->creer) { - print "".''; - print ''; - print ''; + $langs->load("propal"); + + print ''; + print ''; + print ''; - print "".''; - print ''; + print ''; - print ''; + // Liste de "Other propals" + print ''; + + print ''; } - if($user->rights->facture->creer) + // Factures + if($user->rights->facture->creer) { - $langs->load("bills"); + $langs->load("bills"); - print "".''; + print ''; - print "".'
'; - print_titre($langs->trans("AddToMyProposals")) . ''; - print_titre($langs->trans("AddToOtherProposals")) . '
'; + print_titre($langs->trans("AddToMyProposals")) . ''; + print_titre($langs->trans("AddToOtherProposals")) . '
'; - $sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.ref,".$db->pdate("p.datep")." as dp"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p"; - $sql .=" WHERE p.fk_soc = s.idp AND p.fk_statut = 0 AND p.fk_user_author = ".$user->id; - $sql .= " ORDER BY p.datec DESC, tms DESC"; - - if ( $db->query($sql) ) - { - $num = $db->num_rows(); - $i = 0; - print ''; - $var=True; - while ($i < $num) - { - $objp = $db->fetch_object($i); - $var=!$var; - print ""; - print "\n"; - print "\n"; - print "\n"; - print ''; - print ''; - print '"; - print ''; - $i++; - } - print "
propalid\">$objp->refidp\">$objp->nom". strftime("%d %b",$objp->dp)."
'; - print 'Rem.'; - print '%'; - print " ".$product->stock_proposition; - print ''; - print ''; - print "
"; - $db->free(); - } + // Liste de "Mes propals" + print '
'; + $sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.ref,".$db->pdate("p.datep")." as dp"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p"; + $sql .=" WHERE p.fk_soc = s.idp AND p.fk_statut = 0 AND p.fk_user_author = ".$user->id; + $sql .= " ORDER BY p.datec DESC, tms DESC"; - print ''; + $result=$db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + if ($num) { + $i = 0; + print ''; + $var=true; + while ($i < $num) + { + $objp = $db->fetch_object($result); + $var=!$var; + print ''; + print ""; + print "\n"; + print "\n"; + print "\n"; + print ''; + print ''; + print ''; + print ''; + $i++; + } + print "
propalid\">".img_object($langs->trans("ShowPropal"),"propal")." ".$objp->ref."idp\">$objp->nom". strftime("%d %b",$objp->dp)."'; + print ''.$langs->trans("Discount"); + print '%'; + print " ".$product->stock_proposition; + print ''; + print ''; + print '
"; + } + else { + print $langs->trans("NoOpenedPropals"); + } + $db->free($result); + } - $otherprop = $propal->liste_array(1, '<>'.$user->id); - if (sizeof($otherprop)) - { - print '
'; - print ''; - print ''; - print "".''; - print '
Autres Propositions'; - $htmls->select_array("propalid", $otherprop); - print ''; - print 'Rem.'; - print '%'; - print ''; - print ''; - print '
'; - } - print '
'; + + $otherprop = $propal->liste_array(1, ' <> s'.$user->id); + if (is_array($otherprop) && sizeof($otherprop)) + { + $var=false; + print '
'; + print ''.$otherprop; + print ''; + print ''; + print ''; + print '
'.$langs->trans("OtherPropals").''; + $htmls->select_array("propalid", $otherprop); + print '
'. strftime("%d %b",$objp->dp)."\n"; + print ''.$langs->trans("Discount"); + print '%'; + print ''; + print ''; + print '
'; + print '
'; + } + else { + print $langs->trans("NoOtherOpenedPropals"); + } + print '
'; - print_titre($langs->trans("AddToMyBills")); - print ''; - print_titre($langs->trans("AddToOtherBills")); - print '
'; + print_titre($langs->trans("AddToMyBills")); + print ''; + print_titre($langs->trans("AddToOtherBills")); + print '
'; - $sql = "SELECT s.nom, s.idp, f.rowid as factureid, f.facnumber,".$db->pdate("f.datef")." as df"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f"; - $sql .=" WHERE f.fk_soc = s.idp AND f.fk_statut = 0 AND f.fk_user_author = ".$user->id; - $sql .= " ORDER BY f.datec DESC, f.rowid DESC"; - - if ( $db->query($sql) ) - { - $num = $db->num_rows(); - $i = 0; - print ''; - $var=True; - while ($i < $num) - { - $objp = $db->fetch_object( $i); - - $var=!$var; - print ""; - print "\n"; - print "\n"; - print "\n"; - print ''; - print ''; - print '"; - print ''; - $i++; - } - print "
factureid\">$objp->facnumberidp\">$objp->nom". strftime("%d %b",$objp->df)."
'; - print 'Rem.'; - print '%'; - print ''; - print ''; - print "
"; - $db->free(); - } - else - { - dolibarr_print_error($db); - } - print '
'; - // \todo Ajouter liste des factures autres - print '
'; + // Liste de Mes factures + print ''; + $sql = "SELECT s.nom, s.idp, f.rowid as factureid, f.facnumber,".$db->pdate("f.datef")." as df"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f"; + $sql .=" WHERE f.fk_soc = s.idp AND f.fk_statut = 0 AND f.fk_user_author = ".$user->id; + $sql .= " ORDER BY f.datec DESC, f.rowid DESC"; + + $result=$db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + if ($num) { + $i = 0; + print ''; + $var=true; + while ($i < $num) + { + $objp = $db->fetch_object($result); + + $var=!$var; + print ''; + print ""; + print "\n"; + print "\n"; + print "\n"; + print ''; + print ''; + print ''; + print ''; + $i++; + } + print "
factureid\">".img_object($langs->trans("ShowBills"),"bill")." ".$objp->facnumber."idp\">$objp->nom". strftime("%d %b",$objp->df)."'; + print ''.$langs->trans("Discount"); + print '%'; + print ''; + print ''; + print '
"; + } + else { + print $langs->trans("NoBills"); + } + $db->free($result); + } + else + { + dolibarr_print_error($db); + } + + print ''; + + // Liste de Autres factures + $var=true; + + $sql = "SELECT s.nom, s.idp, f.rowid as factureid, f.facnumber,".$db->pdate("f.datef")." as df"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f"; + $sql .=" WHERE f.fk_soc = s.idp AND f.fk_statut = 0 AND f.fk_user_author <> ".$user->id; + $sql .= " ORDER BY f.datec DESC, f.rowid DESC"; + + $result=$db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + if ($num) { + $i = 0; + print ''; + $var=true; + while ($i < $num) + { + $objp = $db->fetch_object($result); + + $var=!$var; + print ''; + print ""; + print "\n"; + print "\n"; + print "\n"; + print ''; + print ''; + print ''; + print ''; + $i++; + } + print "
factureid\">$objp->facnumberidp\">$objp->nom". strftime("%d %b",$objp->df)."'; + print ''.$langs->trans("Discount"); + print '%'; + print ''; + print ''; + print '
"; + } + else { + print $langs->trans("NoOtherBills"); + } + $db->free($result); + } + else + { + dolibarr_print_error($db); + } + + print ''; } + + print ''; } diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index fd7e69d9a38..e582ac9737b 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,10 +22,10 @@ */ /** - \file htdocs/product/fiche.php - \ingroup product - \brief Page de la fiche produit - \version $Revision$ + \file htdocs/product/photos.php + \ingroup product + \brief Onglet photos de la fiche produit + \version $Revision$ */ require("./pre.inc.php"); @@ -78,10 +78,8 @@ if ($_GET["id"]) $product = new Product($db); $result = $product->fetch($_GET["id"]); - if ( $result ) { - /* * En mode visu @@ -162,10 +160,6 @@ else - - - - $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$");