Fix: Minor fix

This commit is contained in:
Laurent Destailleur 2008-12-03 18:04:54 +00:00
parent 3ada34c736
commit 633cdfbe28
4 changed files with 42 additions and 28 deletions

View File

@ -2205,7 +2205,7 @@ else
print '<td rowspan="'.$nbrows.'" colspan="2" valign="top">'; print '<td rowspan="'.$nbrows.'" colspan="2" valign="top">';
/* /*
* Liste des paiements * List of payments
*/ */
$sql = 'SELECT '.$db->pdate('datep').' as dp, pf.amount,'; $sql = 'SELECT '.$db->pdate('datep').' as dp, pf.amount,';
$sql.= ' c.libelle as paiement_type, p.num_paiement, p.rowid'; $sql.= ' c.libelle as paiement_type, p.num_paiement, p.rowid';
@ -2220,7 +2220,7 @@ else
$i = 0; $i = 0;
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
// Liste des paiements ou remboursements // List of payments already done
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.($fac->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).'</td>'; print '<td>'.($fac->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).'</td>';
print '<td>'.$langs->trans('Type').'</td>'; print '<td>'.$langs->trans('Type').'</td>';
@ -2252,6 +2252,8 @@ else
print '<tr><td colspan="2" align="right">'.$langs->trans("Billed").' :</td><td align="right" style="border: 1px solid;">'.price($fac->total_ttc).'</td><td>&nbsp;</td></tr>'; print '<tr><td colspan="2" align="right">'.$langs->trans("Billed").' :</td><td align="right" style="border: 1px solid;">'.price($fac->total_ttc).'</td><td>&nbsp;</td></tr>';
$resteapayeraffiche=$resteapayer; $resteapayeraffiche=$resteapayer;
$creditnoteamount=0;
// Loop on each credit note applied // Loop on each credit note applied
$sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,";
$sql.= " re.description, re.fk_facture_source, re.fk_facture_source"; $sql.= " re.description, re.fk_facture_source, re.fk_facture_source";
@ -2275,6 +2277,7 @@ else
print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=unlinkdiscount&discountid='.$obj->rowid.'">'.img_delete().'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=unlinkdiscount&discountid='.$obj->rowid.'">'.img_delete().'</a>';
print '</td></tr>'; print '</td></tr>';
$i++; $i++;
$creditnoteamount += $obj->amount_ttc;
} }
} }
else else
@ -2287,7 +2290,7 @@ else
{ {
print '<tr><td colspan="2" align="right" nowrap="1">'; print '<tr><td colspan="2" align="right" nowrap="1">';
print $html->textwithhelp($langs->trans("Escompte").':',$langs->trans("HelpEscompte"),-1); print $html->textwithhelp($langs->trans("Escompte").':',$langs->trans("HelpEscompte"),-1);
print '</td><td align="right">'.price($fac->total_ttc - $totalpaye).'</td><td>&nbsp;</td></tr>'; print '</td><td align="right">'.price($fac->total_ttc - $creditnoteamount - $totalpaye).'</td><td>&nbsp;</td></tr>';
$resteapayeraffiche=0; $resteapayeraffiche=0;
} }
// Payé partiellement ou Abandon 'badcustomer' // Payé partiellement ou Abandon 'badcustomer'
@ -2295,7 +2298,7 @@ else
{ {
print '<tr><td colspan="2" align="right" nowrap="1">'; print '<tr><td colspan="2" align="right" nowrap="1">';
print $html->textwithhelp($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1); print $html->textwithhelp($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1);
print '</td><td align="right">'.price($fac->total_ttc - $totalpaye).'</td><td>&nbsp;</td></tr>'; print '</td><td align="right">'.price($fac->total_ttc - $creditnoteamount - $totalpaye).'</td><td>&nbsp;</td></tr>';
//$resteapayeraffiche=0; //$resteapayeraffiche=0;
} }
// Payé partiellement ou Abandon 'product_returned' // Payé partiellement ou Abandon 'product_returned'
@ -2303,7 +2306,7 @@ else
{ {
print '<tr><td colspan="2" align="right" nowrap="1">'; print '<tr><td colspan="2" align="right" nowrap="1">';
print $html->textwithhelp($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1); print $html->textwithhelp($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1);
print '</td><td align="right">'.price($fac->total_ttc - $totalpaye).'</td><td>&nbsp;</td></tr>'; print '</td><td align="right">'.price($fac->total_ttc - $creditnoteamount - $totalpaye).'</td><td>&nbsp;</td></tr>';
$resteapayeraffiche=0; $resteapayeraffiche=0;
} }
// Payé partiellement ou Abandon 'abandon' // Payé partiellement ou Abandon 'abandon'
@ -2313,7 +2316,7 @@ else
$text=$langs->trans("HelpAbandonOther"); $text=$langs->trans("HelpAbandonOther");
if ($fac->close_note) $text.='<br><br><b>'.$langs->trans("Reason").'</b>:'.$fac->close_note; if ($fac->close_note) $text.='<br><br><b>'.$langs->trans("Reason").'</b>:'.$fac->close_note;
print $html->textwithhelp($langs->trans("Abandoned").':',$text,-1); print $html->textwithhelp($langs->trans("Abandoned").':',$text,-1);
print '</td><td align="right">'.price($fac->total_ttc - $totalpaye).'</td><td>&nbsp;</td></tr>'; print '</td><td align="right">'.price($fac->total_ttc - $creditnoteamount - $totalpaye).'</td><td>&nbsp;</td></tr>';
$resteapayeraffiche=0; $resteapayeraffiche=0;
} }
print '<tr><td colspan="2" align="right">'; print '<tr><td colspan="2" align="right">';

View File

@ -68,7 +68,7 @@ class Contact extends CommonObject
/** /**
* \brief Constructeur de l'objet contact * \brief Constructeur de l'objet contact
* \param DB Habler d'accès base * \param DB Habler d'acc<EFBFBD>s base
* \param id Id contact * \param id Id contact
*/ */
function Contact($DB, $id=0) function Contact($DB, $id=0)
@ -133,9 +133,9 @@ class Contact extends CommonObject
} }
/* /*
* \brief Mise à jour des infos en base * \brief Mise <EFBFBD> jour des infos en base
* \param id Id du contact à mettre à jour * \param id Id du contact <EFBFBD> mettre <EFBFBD> jour
* \param user Objet utilisateur qui effectue la mise à jour * \param user Objet utilisateur qui effectue la mise <EFBFBD> jour
* \param notrigger 0=non, 1=oui * \param notrigger 0=non, 1=oui
* \return int <0 si erreur, >0 si ok * \return int <0 si erreur, >0 si ok
*/ */
@ -291,7 +291,7 @@ class Contact extends CommonObject
/* /*
* \brief Mise à jour des alertes * \brief Mise <EFBFBD> jour des alertes
* \param id id du contact * \param id id du contact
* \param user Utilisateur qui demande l'alerte * \param user Utilisateur qui demande l'alerte
*/ */
@ -362,7 +362,7 @@ class Contact extends CommonObject
/* /*
* \brief Charge l'objet contact * \brief Charge l'objet contact
* \param id id du contact * \param id id du contact
* \param user Utilisateur lié au contact pour une alerte * \param user Utilisateur li<EFBFBD> au contact pour une alerte
* \return int -1 if KO, 0 if OK but not found, 1 if OK * \return int -1 if KO, 0 if OK but not found, 1 if OK
*/ */
function fetch($id, $user=0) function fetch($id, $user=0)
@ -405,7 +405,7 @@ class Contact extends CommonObject
$this->ville = $obj->ville; $this->ville = $obj->ville;
$this->fk_pays = $obj->fk_pays; $this->fk_pays = $obj->fk_pays;
$this->pays_code = $obj->fk_pays?$obj->pays_code:''; $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->societeid = $obj->fk_soc;
$this->socid = $obj->fk_soc; $this->socid = $obj->fk_soc;
@ -429,7 +429,7 @@ class Contact extends CommonObject
$this->user_id = $obj->user_id; $this->user_id = $obj->user_id;
$this->user_login = $obj->user_login; $this->user_login = $obj->user_login;
// Recherche le user Dolibarr lié à ce contact // Recherche le user Dolibarr li<EFBFBD> <20> ce contact
$sql = "SELECT u.rowid "; $sql = "SELECT u.rowid ";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u";
$sql .= " WHERE u.fk_socpeople = ". $this->id; $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<EFBFBD> ce contact
* ref_facturation * ref_facturation
* ref_contrat * ref_contrat
* ref_commande * ref_commande
@ -632,7 +632,7 @@ class Contact extends CommonObject
/* /*
* \brief Charge les informations sur le contact, depuis la base * \brief Charge les informations sur le contact, depuis la base
* \param id id du contact à charger * \param id id du contact <EFBFBD> charger
*/ */
function info($id) 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<EFBFBD>u par le contact avec son email
* \return int Nombre d'emailings * \return int Nombre d'emailings
*/ */
function getNbOfEMailings() function getNbOfEMailings()
@ -684,7 +684,7 @@ class Contact extends CommonObject
$sql = "SELECT count(mc.email) as nb"; $sql = "SELECT count(mc.email) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
$sql.= " WHERE mc.email = '".addslashes($this->email)."'"; $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<EFBFBD>, 1 envoy<6F> avec succ<63>s
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
{ {
@ -732,7 +732,7 @@ class Contact extends CommonObject
/** /**
* \brief Retourne le libelle de civilite du contact * \brief Retourne le libelle de civilite du contact
* \return string Nom traduit de la civilité * \return string Nom traduit de la civilit<EFBFBD>
*/ */
function getCivilityLabel() function getCivilityLabel()
{ {
@ -775,9 +775,9 @@ class Contact extends CommonObject
/** /**
* \brief Retourne le libellé du statut du contact * \brief Retourne le libell<EFBFBD> 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 * \param mode 0=libell<EFBFBD> long, 1=libell<EFBFBD> court, 2=Picto + Libell<EFBFBD> court, 3=Picto, 4=Picto + Libell<EFBFBD> long, 5=Libell<EFBFBD> court + Picto
* \return string Libellé * \return string Libell<EFBFBD>
*/ */
function getLibStatut($mode) function getLibStatut($mode)
{ {
@ -785,10 +785,10 @@ class Contact extends CommonObject
} }
/** /**
* \brief Renvoi le libellé d'un statut donné * \brief Renvoi le libell<EFBFBD> d'un statut donn<EFBFBD>
* \param statut Id statut * \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 * \param mode 0=libell<EFBFBD> long, 1=libell<EFBFBD> court, 2=Picto + Libell<EFBFBD> court, 3=Picto, 4=Picto + Libell<EFBFBD> long, 5=Libell<EFBFBD> court + Picto
* \return string Libellé * \return string Libell<EFBFBD>
*/ */
function LibStatut($statut,$mode) 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<EFBFBD>atoire
*/ */
function initAsSpecimen() function initAsSpecimen()
{ {
global $user,$langs; global $user,$langs;
// Charge tableau des id de société socids // Charge tableau des id de soci<EFBFBD>t<EFBFBD> socids
$socids = array(); $socids = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe LIMIT 10"; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe LIMIT 10";
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
@ -876,7 +876,7 @@ class Contact extends CommonObject
} }
} }
// Initialise paramètres // Initialise param<EFBFBD>tres
$this->id=0; $this->id=0;
$this->specimen=1; $this->specimen=1;
$this->nom = 'DOLIBARR'; $this->nom = 'DOLIBARR';

View File

@ -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 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 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 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=Bookmark Bookmark=Bookmark
Bookmarks=Bookmarks Bookmarks=Bookmarks

View File

@ -26,10 +26,12 @@
*/ */
require("../../master.inc.php"); require("../../master.inc.php");
$langs->setDefaultLang('auto');
$langs->load("main"); $langs->load("main");
$langs->load("other"); $langs->load("other");
$demoprofiles=array( $demoprofiles=array(
array('default'=>'-1', 'key'=>'profdemofun','label'=>'DemoFundation', 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'), 'disablemodules'=>'banque,barcode,bookmark,boutique,cashdesk,commercial,commande,comptabilite,contrat,expedition,facture,fournisseur,prelevement,produit,projet,service,societe,stock,tax'),