From 633cdfbe285b78c7244ec4af5484e8b0bd821960 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Dec 2008 18:04:54 +0000 Subject: [PATCH] Fix: Minor fix --- htdocs/compta/facture.php | 15 +++++++----- htdocs/contact.class.php | 44 +++++++++++++++++------------------ htdocs/langs/en_US/other.lang | 9 +++++++ htdocs/public/demo/index.php | 2 ++ 4 files changed, 42 insertions(+), 28 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index f1e00a7016d..612f0d8a7bc 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2205,7 +2205,7 @@ else print ''; /* - * Liste des paiements + * List of payments */ $sql = 'SELECT '.$db->pdate('datep').' as dp, pf.amount,'; $sql.= ' c.libelle as paiement_type, p.num_paiement, p.rowid'; @@ -2220,7 +2220,7 @@ else $i = 0; print ''; - // Liste des paiements ou remboursements + // List of payments already done print ''; print ''; print ''; @@ -2252,6 +2252,8 @@ else print ''; $resteapayeraffiche=$resteapayer; + $creditnoteamount=0; + // Loop on each credit note applied $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; $sql.= " re.description, re.fk_facture_source, re.fk_facture_source"; @@ -2275,6 +2277,7 @@ else print 'rowid.'">'.img_delete().''; print ''; $i++; + $creditnoteamount += $obj->amount_ttc; } } else @@ -2287,7 +2290,7 @@ else { print ''; + print ''; $resteapayeraffiche=0; } // Payé partiellement ou Abandon 'badcustomer' @@ -2295,7 +2298,7 @@ else { print ''; + print ''; //$resteapayeraffiche=0; } // Payé partiellement ou Abandon 'product_returned' @@ -2303,7 +2306,7 @@ else { print ''; + print ''; $resteapayeraffiche=0; } // Payé partiellement ou Abandon 'abandon' @@ -2313,7 +2316,7 @@ else $text=$langs->trans("HelpAbandonOther"); if ($fac->close_note) $text.='

'.$langs->trans("Reason").':'.$fac->close_note; print $html->textwithhelp($langs->trans("Abandoned").':',$text,-1); - print ''; + print ''; $resteapayeraffiche=0; } print '
'.($fac->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).''.$langs->trans('Type').'
'.$langs->trans("Billed").' :'.price($fac->total_ttc).' 
'; print $html->textwithhelp($langs->trans("Escompte").':',$langs->trans("HelpEscompte"),-1); - print ''.price($fac->total_ttc - $totalpaye).' 
'.price($fac->total_ttc - $creditnoteamount - $totalpaye).' 
'; print $html->textwithhelp($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1); - print ''.price($fac->total_ttc - $totalpaye).' 
'.price($fac->total_ttc - $creditnoteamount - $totalpaye).' 
'; print $html->textwithhelp($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1); - print ''.price($fac->total_ttc - $totalpaye).' 
'.price($fac->total_ttc - $creditnoteamount - $totalpaye).' 
'.price($fac->total_ttc - $totalpaye).' 
'.price($fac->total_ttc - $creditnoteamount - $totalpaye).' 
'; diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php index 40b6875a8ca..fd1fb894165 100644 --- a/htdocs/contact.class.php +++ b/htdocs/contact.class.php @@ -68,7 +68,7 @@ class Contact extends CommonObject /** * \brief Constructeur de l'objet contact - * \param DB Habler d'accès base + * \param DB Habler d'acc�s base * \param id Id contact */ function Contact($DB, $id=0) @@ -133,9 +133,9 @@ class Contact extends CommonObject } /* - * \brief Mise à jour des infos en base - * \param id Id du contact à mettre à jour - * \param user Objet utilisateur qui effectue la mise à jour + * \brief Mise � jour des infos en base + * \param id Id du contact � mettre � jour + * \param user Objet utilisateur qui effectue la mise � jour * \param notrigger 0=non, 1=oui * \return int <0 si erreur, >0 si ok */ @@ -291,7 +291,7 @@ class Contact extends CommonObject /* - * \brief Mise à jour des alertes + * \brief Mise � jour des alertes * \param id id du contact * \param user Utilisateur qui demande l'alerte */ @@ -362,7 +362,7 @@ class Contact extends CommonObject /* * \brief Charge l'objet contact * \param id id du contact - * \param user Utilisateur lié au contact pour une alerte + * \param user Utilisateur li� au contact pour une alerte * \return int -1 if KO, 0 if OK but not found, 1 if OK */ function fetch($id, $user=0) @@ -405,7 +405,7 @@ class Contact extends CommonObject $this->ville = $obj->ville; $this->fk_pays = $obj->fk_pays; $this->pays_code = $obj->fk_pays?$obj->pays_code:''; - $this->pays = ($obj->fk_pays > 0)?$langs->trans("Country".$obj->pays_code):$langs->trans("SelectCountry"); + $this->pays = ($obj->fk_pays > 0)?$langs->transnoentities("Country".$obj->pays_code):$langs->transnoentities("SelectCountry"); $this->societeid = $obj->fk_soc; $this->socid = $obj->fk_soc; @@ -429,7 +429,7 @@ class Contact extends CommonObject $this->user_id = $obj->user_id; $this->user_login = $obj->user_login; - // Recherche le user Dolibarr lié à ce contact + // Recherche le user Dolibarr li� � ce contact $sql = "SELECT u.rowid "; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE u.fk_socpeople = ". $this->id; @@ -496,7 +496,7 @@ class Contact extends CommonObject /* - * \brief Charge le nombre d'elements auquel est lié ce contact + * \brief Charge le nombre d'elements auquel est li� ce contact * ref_facturation * ref_contrat * ref_commande @@ -632,7 +632,7 @@ class Contact extends CommonObject /* * \brief Charge les informations sur le contact, depuis la base - * \param id id du contact à charger + * \param id id du contact � charger */ function info($id) { @@ -676,7 +676,7 @@ class Contact extends CommonObject } /* - * \brief Renvoi nombre d'emailings reçu par le contact avec son email + * \brief Renvoi nombre d'emailings re�u par le contact avec son email * \return int Nombre d'emailings */ function getNbOfEMailings() @@ -684,7 +684,7 @@ class Contact extends CommonObject $sql = "SELECT count(mc.email) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql.= " WHERE mc.email = '".addslashes($this->email)."'"; - $sql.= " AND mc.statut=1"; // -1 erreur, 0 non envoyé, 1 envoyé avec succès + $sql.= " AND mc.statut=1"; // -1 erreur, 0 non envoy�, 1 envoy� avec succ�s $resql=$this->db->query($sql); if ($resql) { @@ -732,7 +732,7 @@ class Contact extends CommonObject /** * \brief Retourne le libelle de civilite du contact - * \return string Nom traduit de la civilité + * \return string Nom traduit de la civilit� */ function getCivilityLabel() { @@ -775,9 +775,9 @@ class Contact extends CommonObject /** - * \brief Retourne le libellé du statut du contact - * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto - * \return string Libellé + * \brief Retourne le libell� du statut du contact + * \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto, 4=Picto + Libell� long, 5=Libell� court + Picto + * \return string Libell� */ function getLibStatut($mode) { @@ -785,10 +785,10 @@ class Contact extends CommonObject } /** - * \brief Renvoi le libellé d'un statut donné + * \brief Renvoi le libell� d'un statut donn� * \param statut Id statut - * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto - * \return string Libellé + * \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto, 4=Picto + Libell� long, 5=Libell� court + Picto + * \return string Libell� */ function LibStatut($statut,$mode) { @@ -853,13 +853,13 @@ class Contact extends CommonObject /** - * \brief Initialise le contact avec valeurs fictives aléatoire + * \brief Initialise le contact avec valeurs fictives al�atoire */ function initAsSpecimen() { global $user,$langs; - // Charge tableau des id de société socids + // Charge tableau des id de soci�t� socids $socids = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe LIMIT 10"; $resql = $this->db->query($sql); @@ -876,7 +876,7 @@ class Contact extends CommonObject } } - // Initialise paramètres + // Initialise param�tres $this->id=0; $this->specimen=1; $this->nom = 'DOLIBARR'; diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index e009ec26233..3b08cf5cef3 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -38,6 +38,15 @@ PredefinedMailContentSendInvoice=Veuillez trouver ci-joint la facture __FACREF__ PredefinedMailContentSendInvoiceReminder=Nous apportons à votre connaissance que la facture __FACREF__ ne semble pas avoir été réglée. La voici donc, pour rappel, en pièce jointe.\n\nCordialement\n\n PredefinedMailContentSendProposal=Veuillez trouver ci-joint la proposition commerciale __PROPREF__\n\nCordialement\n\n PredefinedMailContentSendOrder=Veuillez trouver ci-joint la commande __ORDERREF__\n\nCordialement\n\n +DemoDesc=Dolibarr is not a compact ERP but is built from several fonctionnal modules. A demo that includes all modules does not mean anything as this never occurs. So, several demo profiles are available. +ChooseYourDemoProfil=Choose the demo profil that match your activity... +DemoFundation=Manage members of a fundation +DemoFundation2=Manage members and bank account of a fundation +DemoCompanyServiceOnly=Manage a freelance activiy selling service only +DemoCompanyShopWithCashDesk=Manage a shop with a cash desk +DemoCompanyProductAndStocks=Manage a small or medium company selling products +DemoCompanyAll=Manage a small or medium company with multiple activities (all main modules) +GoToDemo=Go to demo ##### Bookmark ##### Bookmark=Bookmark Bookmarks=Bookmarks diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 3161254067d..09e14addf92 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -26,10 +26,12 @@ */ require("../../master.inc.php"); +$langs->setDefaultLang('auto'); $langs->load("main"); $langs->load("other"); + $demoprofiles=array( array('default'=>'-1', 'key'=>'profdemofun','label'=>'DemoFundation', 'disablemodules'=>'banque,barcode,bookmark,boutique,cashdesk,commercial,commande,comptabilite,contrat,expedition,facture,fournisseur,prelevement,produit,projet,service,societe,stock,tax'),