Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.git

into task498_objectline

Conflicts:
	htdocs/install/mysql/migration/3.2.0-3.3.0.sql
This commit is contained in:
Regis Houssin 2012-08-23 17:19:05 +02:00
commit 6a60551fdd
33 changed files with 125 additions and 68 deletions

View File

@ -42,6 +42,7 @@ For users:
- Fix: Errors weren't being shown in customer's & supplier's orders
- New: Add conditional substitution IF/ELSEIF/ENDIF for ODT templates
- New: Basic implementation of hooks and triggers for a lot (most) of core modules: action/calendar, trips and expenses, dons, vat payment, contact/society, contract, product lines, expedition, order supplier and order invoice (lines included), intervention card, project, tasks
- Fix: [ bug #499 ]: Supplier order input method not translated
For developers:
- New: Add webservice for thirdparty creation and list.

View File

@ -4,5 +4,5 @@ README (English)
This directory contains samples of code to use Dolibarr business classes to build
external interfaces that need to read/update data from/into Dolibarr.
You can also have a look at the Dolibarr doxygen doc that describe all files and classes:
You can also have a look at the Dolibarr doxygen doc that describes all files and classes:
http://www.dolibarr.org/html_doxygen/index.html

View File

@ -17,9 +17,9 @@
*/
/**
* \file dev/examples/manage_order.php
* \file dev/examples/create_invoice.php
* \brief This file is an example for a command line script
* \author Put author name here
* \author Put author's name here
* \remarks Put here some comments
*/
@ -29,7 +29,7 @@ $path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
}

View File

@ -17,9 +17,9 @@
*/
/**
* \file dev/examples/manage_order.php
* \file dev/examples/create_order.php
* \brief This file is an example for a command line script
* \author Put author name here
* \author Put author's name here
* \remarks Put here some comments
*/
@ -29,7 +29,7 @@ $path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
}

View File

@ -19,7 +19,7 @@
/**
* \file dev/examples/create_product.php
* \brief This file is an example for a command line script
* \author Put author name here
* \author Put author's name here
* \remarks Put here some comments
*/
@ -29,7 +29,7 @@ $path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
}
@ -64,7 +64,7 @@ require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
// Create instance of object
$myproduct=new Product($db);
// Définition des propriétés de l'instance product
// Definition of product instance properties
$myproduct->ref = '1234';
$myproduct->libelle = 'libelle';
$myproduct->price = '10';

View File

@ -19,7 +19,7 @@
/**
* \file dev/examples/create_user.php
* \brief This file is an example for a command line script
* \author Put author name here
* \author Put author's name here
* \remarks Put here some comments
*/
@ -29,7 +29,7 @@ $path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
}

View File

@ -17,9 +17,9 @@
*/
/**
* \file dev/examples/manage_order.php
* \file dev/examples/get_contracts.php
* \brief This file is an example for a command line script
* \author Put author name here
* \author Put author's name here
* \remarks Put here some comments
*/
@ -29,7 +29,7 @@ $path=dirname(__FILE__).'/';
// Test if batch mode
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
exit;
}

View File

@ -305,7 +305,7 @@ if ($action == 'edit' || $action == 'updateedit')
print '</td></tr>'."\n";
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("Tel").'</td><td>';
print '<tr '.$bc[$var].'><td>'.$langs->trans("Phone").'</td><td>';
print '<input name="tel" value="'. $conf->global->MAIN_INFO_SOCIETE_TEL . '"></td></tr>';
print '</td></tr>'."\n";
@ -315,7 +315,7 @@ if ($action == 'edit' || $action == 'updateedit')
print '</td></tr>'."\n";
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("Mail").'</td><td>';
print '<tr '.$bc[$var].'><td>'.$langs->trans("EMail").'</td><td>';
print '<input name="mail" size="60" value="'. $conf->global->MAIN_INFO_SOCIETE_MAIL . '"></td></tr>';
print '</td></tr>'."\n";

View File

@ -385,12 +385,17 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$ok=0;
$fieldnamekey=$listfield[$f];
// We take translate key of field
if ($fieldnamekey == 'libelle') $fieldnamekey='Label';
if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey='Label';
if ($fieldnamekey == 'libelle_facture') $fieldnamekey = 'LabelOnDocuments';
if ($fieldnamekey == 'nbjour') $fieldnamekey='NbOfDays';
if ($fieldnamekey == 'decalage') $fieldnamekey='Offset';
if ($fieldnamekey == 'module') $fieldnamekey='Module';
if ($fieldnamekey == 'code') $fieldnamekey = 'Code';
if ($fieldnamekey == 'note') $fieldnamekey = 'Note';
if ($fieldnamekey == 'taux') $fieldnamekey = 'Rate';
if ($fieldnamekey == 'type') $fieldnamekey = 'Type';
if ($fieldnamekey == 'position') $fieldnamekey = 'Position';
if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode';
$msg.=$langs->trans("ErrorFieldRequired",$langs->transnoentities($fieldnamekey)).'<br>';
}

View File

@ -141,7 +141,7 @@ print $langs->trans("BackupDescY").'<br><br>';
</div>
<br>
<div class="formelementrow"><input type="radio" name="what" value="mysqlnobin" id="radio_dump_mysql_nobin" />
<label for="radio_dump_mysql">MySQL Dump (php) <?php print img_warning('Backup can\'t be guaranted with this method. Prefer previous one'); ?></label>
<label for="radio_dump_mysql">MySQL Dump (php) <?php print img_warning($langs->trans('BackupPHPWarning')) ?></label>
</div>
<?php
}
@ -218,7 +218,7 @@ print $langs->trans("BackupDescY").'<br><br>';
<br>
<fieldset><legend> <input type="checkbox" name="sql_structure"
value="structure" id="checkbox_sql_structure" checked="checked" /> <label
for="checkbox_sql_structure"> Structure</label> </legend> <input
for="checkbox_sql_structure"> <?php echo $langs->trans('ExportStructure') ?></label> </legend> <input
type="checkbox" name="drop" value="1" id="checkbox_dump_drop" /> <label
for="checkbox_dump_drop"><?php echo $langs->trans("AddDropTable"); ?></label><br>
</fieldset>
@ -268,12 +268,12 @@ print $langs->trans("BackupDescY").'<br><br>';
<div class="formelementrow"><input type="checkbox" name="nobin_disable_fk"
value="yes" id="checkbox_disable_fk" checked="checked" /> <label
for="checkbox_disable_fk"> <?php echo $langs->trans("CommandsToDisableForeignKeysForImport"); ?> <?php print img_info('Mandatory if you want to be able to restore your sql dump later'); ?></label>
for="checkbox_disable_fk"> <?php echo $langs->trans("CommandsToDisableForeignKeysForImport"); ?> <?php print img_info($langs->trans('CommandsToDisableForeignKeysForImportWarning')); ?></label>
</div>
</fieldset>
<br>
<fieldset><legend>Structure</legend> <input
<fieldset><legend><?php echo $langs->trans('ExportStructure') ?></legend> <input
type="checkbox" name="nobin_drop" value="1" id="checkbox_dump_drop" /> <label
for="checkbox_dump_drop"><?php echo $langs->trans("AddDropTable"); ?></label><br>
</fieldset>
@ -336,7 +336,7 @@ print $langs->trans("BackupDescY").'<br><br>';
<br>
<fieldset><legend> <input type="checkbox" name="sql_structure"
value="structure" id="checkbox_sql_structure" checked="checked" /> <label
for="checkbox_sql_structure"> Structure</label> </legend></fieldset>
for="checkbox_sql_structure"> <?php echo $langs->trans('ExportStructure') ?></label> </legend></fieldset>
<br>
<fieldset><legend> <input type="checkbox" name="sql_data" value="data"

View File

@ -116,7 +116,7 @@ if ($label == 'MySQL')
{
?>
<fieldset id="mysql_options">
<legend>Import MySql</legend>
<legend><?php echo $langs->trans('RestoreMySQL') ?></legend>
<div class="formelementrow">
<?php
// Parameteres execution

View File

@ -347,7 +347,7 @@ if ($object->fetch($id) >= 0)
print '</table>';
print '<br>';
print '<form action="'.$_SERVER['PHP_SELF'].'?action=clear&rowid='.$object->id.'" method="POST">';
print '<form action="'.$_SERVER['PHP_SELF'].'?action=clear&id='.$object->id.'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print_titre($langs->trans("ToClearAllRecipientsClickHere"));
print '<table class="noborder" width="100%">';

View File

@ -5,6 +5,7 @@
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@@2byte.es>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
*
* 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
@ -210,7 +211,7 @@ if ($id > 0 || ! empty($ref))
$mode_search = 1;
}
$sql = "SELECT count(*) as nb";
$sql = "SELECT count(*) as total";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= ", ".MAIN_DB_PREFIX."bank as b";
if ($mode_search)
@ -228,22 +229,22 @@ if ($id > 0 || ! empty($ref))
if ($result)
{
$obj = $db->fetch_object($result);
$nbline = $obj->nb;
$nbline = $obj->total;
$total_lines = $nbline;
if ($nbline > $viewline ) $limit = $nbline - $viewline ;
else $limit = $viewline;
$db->free($result);
}
else
{
dol_print_error($db);
}
//Total pages
$totalPages = ceil($total_lines/$viewline);
if ($page > 0)
{
$limitsql = $nbline - ($page * $viewline);
$limitsql = ($totalPages - $page) * $viewline;
if ($limitsql < $viewline) $limitsql = $viewline;
$nbline = $limitsql;
}
@ -284,21 +285,19 @@ if ($id > 0 || ! empty($ref))
$param.='&amp;account='.$object->id;
// Define transaction list navigation string
$navig='';
$navig.='<form action="'.$_SERVER["PHP_SELF"].'" name="newpage" method="GET">';
$nbpage=floor($total_lines/$viewline)+($total_lines % $viewline > 0?1:0); // Nombre de page total
//print 'nbpage='.$nbpage.' viewline='.$viewline.' limitsql='.$limitsql;
$navig = '<form action="'.$_SERVER["PHP_SELF"].'" name="newpage" method="GET">';
//print 'nbpage='.$totalPages.' viewline='.$viewline.' limitsql='.$limitsql;
if ($limitsql > $viewline) $navig.='<a href="account.php?'.$param.'&amp;page='.($page+1).'">'.img_previous().'</a>';
$navig.= $langs->trans("Page")." "; // ' Page ';
$navig.='<input type="text" name="negpage" size="1" class="flat" value="'.($nbpage-$page).'">';
$navig.='<input type="text" name="negpage" size="1" class="flat" value="'.($totalPages-$page).'">';
$navig.='<input type="hidden" name="req_nb" value="'.$req_nb.'">';
$navig.='<input type="hidden" name="req_desc" value="'.GETPOST("req_desc").'">';
$navig.='<input type="hidden" name="req_debit" value="'.GETPOST("req_debit").'">';
$navig.='<input type="hidden" name="req_credit" value="'.GETPOST("req_credit").'">';
$navig.='<input type="hidden" name="thirdparty" value="'.$thirdparty.'">';
$navig.='<input type="hidden" name="nbpage" value="'.$nbpage.'">';
$navig.='<input type="hidden" name="nbpage" value="'.$totalPages.'">';
$navig.='<input type="hidden" name="id" value="'.$object->id.'">';
$navig.='/'.$nbpage.' ';
$navig.='/'.$totalPages.' ';
if ($total_lines > $limitsql )
{
$navig.= '<a href="'.$_SERVER["PHP_SELF"].'?'.$param.'&amp;page='.($page-1).'">'.img_next().'</a>';
@ -481,7 +480,7 @@ if ($id > 0 || ! empty($ref))
{
$objp = $db->fetch_object($result);
$total = price2num($total + $objp->amount,'MT');
if ($i >= ($nbline - $viewline))
if ($i >= ($viewline * (($totalPages-$page)-1)))
{
$var=!$var;

View File

@ -221,19 +221,19 @@ if ($result)
}
$var=false;
$h=0;
$tabs = array(
array(
DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$rowid,
$langs->trans('Card')
),
array(
DOL_URL_ROOT.'/compta/bank/info.php?rowid='.$rowid,
$langs->trans('Info')
)
);
$head[$h][0] = $_SERVER['PHP_SELF'].'?rowid='.$rowid;
$head[$h][1] = $langs->trans('Card');
$hselected=$h;
$h++;
$head[$h][0] = DOL_URL_ROOT.'/compta/bank/info.php?rowid='.$rowid;
$head[$h][1] = $langs->trans("Info");
$h++;
dol_fiche_head($head, $hselected, $langs->trans('LineRecord'),0,'account');
dol_fiche_head($tabs, 0, $langs->trans('LineRecord'), 0, 'account');
dol_htmloutput_mesg($mesg);

View File

@ -72,6 +72,7 @@ class Contact extends CommonObject
var $birthday;
var $default_lang;
var $note; // Private note
var $no_email; // 1=Don't send e-mail to this contact, 0=do
var $ref_facturation; // Nb de reference facture pour lequel il est contact
var $ref_contrat; // Nb de reference contrat pour lequel il est contact
@ -250,6 +251,7 @@ class Contact extends CommonObject
$sql .= ", priv = '".$this->priv."'";
$sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"null");
$sql .= ", default_lang=".($this->default_lang?"'".$this->default_lang."'":"null");
$sql .= ", no_email=".($this->no_email?"'".$this->no_email."'":"null");
$sql .= " WHERE rowid=".$id;
dol_syslog(get_class($this)."::update sql=".$sql,LOG_DEBUG);
@ -468,7 +470,7 @@ class Contact extends CommonObject
$sql.= " c.fk_departement,";
$sql.= " c.birthday,";
$sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid,";
$sql.= " c.priv, c.note, c.default_lang, c.canvas,";
$sql.= " c.priv, c.note, c.default_lang, c.no_email, c.canvas,";
$sql.= " c.import_key,";
$sql.= " p.libelle as country, p.code as country_code,";
$sql.= " d.nom as state, d.code_departement as state_code,";
@ -536,6 +538,7 @@ class Contact extends CommonObject
$this->birthday = $this->db->jdate($obj->birthday);
$this->note = $obj->note;
$this->default_lang = $obj->default_lang;
$this->no_email = $obj->no_email;
$this->user_id = $obj->user_id;
$this->user_login = $obj->user_login;
$this->canvas = $obj->canvas;

View File

@ -146,6 +146,7 @@ if (empty($reshook))
$object->phone_mobile = $_POST["phone_mobile"];
$object->fax = $_POST["fax"];
$object->jabberid = $_POST["jabberid"];
$object->no_email = $_POST["no_email"];
$object->priv = $_POST["priv"];
$object->note = $_POST["note"];
@ -237,6 +238,7 @@ if (empty($reshook))
$object->phone_mobile = $_POST["phone_mobile"];
$object->fax = $_POST["fax"];
$object->jabberid = $_POST["jabberid"];
$object->no_email = $_POST["no_email"];
$object->priv = $_POST["priv"];
$object->note = $_POST["note"];
@ -448,8 +450,9 @@ else
if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party
print '<tr><td>'.$langs->trans("Email").'</td><td colspan="3"><input name="email" type="text" size="50" maxlength="80" value="'.(isset($_POST["email"])?$_POST["email"]:$object->email).'"></td></tr>';
// Instant message
print '<tr><td>'.$langs->trans("IM").'</td><td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td></tr>';
// Instant message and no email
print '<tr><td>'.$langs->trans("IM").'</td><td><input name="jabberid" type="text" size="50" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td>';
print '<td>'.$langs->trans("No_Email").'</td><td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td></tr>';
// Visibility
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
@ -623,7 +626,8 @@ else
print '</tr>';
// Jabberid
print '<tr><td>Jabberid</td><td colspan="3"><input name="jabberid" type="text" size="40" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td></tr>';
print '<tr><td>Jabberid</td><td><input name="jabberid" type="text" size="40" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td>';
print '<td>'.$langs->trans("No_Email").'</td><td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td></tr>';
// Visibility
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
@ -815,8 +819,9 @@ else
}
print '</tr>';
// Instant message
print '<tr><td>'.$langs->trans("IM").'</td><td colspan="3">'.$object->jabberid.'</td></tr>';
// Instant message and no email
print '<tr><td>'.$langs->trans("IM").'</td><td>'.$object->jabberid.'</td>';
print '<td>'.$langs->trans("No_Email").'</td><td>'.yn($object->no_email).'</td></tr>';
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
print $object->LibPubPriv($object->priv);

View File

@ -339,7 +339,7 @@ class FormAdmin
while ($i < $num)
{
$obj=$this->db->fetch_object($resql);
$paperformat[$obj->code]=$obj->label.' - '.round($obj->width).'x'.round($obj->height).' '.$obj->unit;
$paperformat[$obj->code]= $langs->trans('PaperFormat'.strtoupper($obj->code)).' - '.round($obj->width).'x'.round($obj->height).' '.$obj->unit;
$i++;
}

View File

@ -77,6 +77,7 @@ class mailing_contacts1 extends MailingTargets
$statssql[0].= " AND c.entity IN (".getEntity('societe', 1).")";
$statssql[0].= " AND s.client IN (1, 3)";
$statssql[0].= " AND c.email != ''"; // Note that null != '' is false
$statssql[0].= " AND c.no_email = 0";
return $statssql;
}
@ -99,6 +100,7 @@ class mailing_contacts1 extends MailingTargets
$sql .= " WHERE s.rowid = c.fk_soc";
$sql .= " AND c.entity IN (".getEntity('societe', 1).")";
$sql .= " AND c.email != ''"; // Note that null != '' is false
$sql .= " AND c.no_email = 0";
// La requete doit retourner un champ "nb" pour etre comprise
// par parent::getNbOfRecipients
@ -205,6 +207,7 @@ class mailing_contacts1 extends MailingTargets
$sql.= " WHERE s.rowid = c.fk_soc";
$sql.= " AND c.entity IN (".getEntity('societe', 1).")";
$sql.= " AND c.email != ''";
$sql.= " AND c.no_email = 0";
foreach($filtersarray as $key)
{
if ($key == 'prospects') $sql.= " AND s.client=2";

View File

@ -84,6 +84,7 @@ class mailing_contacts2 extends MailingTargets
$sql.= " ".MAIN_DB_PREFIX."societe as s";
$sql.= " WHERE s.rowid = sp.fk_soc";
$sql.= " AND sp.email != ''"; // Note that null != '' is false
$sql.= " AND sp.no_email = 0";
//$sql.= " AND sp.poste != ''";
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
if ($filtersarray[0]<>'all') $sql.= " AND sp.poste ='".$filtersarray[0]."'";
@ -165,6 +166,7 @@ class mailing_contacts2 extends MailingTargets
$sql.= " WHERE s.rowid = sp.fk_soc";
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
$sql.= " AND sp.email != ''"; // Note that null != '' is false
$sql.= " AND sp.no_email = 0";
//$sql.= " AND sp.poste != ''";
// La requete doit retourner un champ "nb" pour etre comprise
// par parent::getNbOfRecipients
@ -189,6 +191,7 @@ class mailing_contacts2 extends MailingTargets
$sql.= " WHERE s.rowid = sp.fk_soc";
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
$sql.= " AND sp.email != ''"; // Note that null != '' is false
$sql.= " AND sp.no_email = 0";
$sql.= " AND (sp.poste IS NOT NULL AND sp.poste != '')";
$sql.= " GROUP BY sp.poste";
$sql.= " ORDER BY sp.poste";

View File

@ -85,6 +85,7 @@ class mailing_contacts3 extends MailingTargets
if ($filtersarray[0] <> 'all') $sql.= " ".MAIN_DB_PREFIX."categorie_societe as cs";
$sql.= " WHERE s.rowid = sp.fk_soc";
$sql.= " AND sp.email != ''"; // Note that null != '' is false
$sql.= " AND sp.no_email = 0";
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
if ($filtersarray[0] <> 'all') $sql.= " AND cs.fk_categorie = c.rowid";
if ($filtersarray[0] <> 'all') $sql.= " AND cs.fk_societe = sp.fk_soc";
@ -171,6 +172,7 @@ class mailing_contacts3 extends MailingTargets
$sql.= " WHERE s.rowid = c.fk_soc";
$sql.= " AND c.entity IN (".getEntity('societe', 1).")";
$sql.= " AND c.email != ''"; // Note that null != '' is false
$sql.= " AND c.no_email = 0";
/*
$sql = "SELECT count(distinct(sp.email)) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,";
@ -207,6 +209,7 @@ class mailing_contacts3 extends MailingTargets
$sql.= " ".MAIN_DB_PREFIX."categorie_societe as cs";
$sql.= " WHERE s.rowid = sp.fk_soc";
$sql.= " AND sp.email != ''"; // Note that null != '' is false
$sql.= " AND sp.no_email = 0";
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
$sql.= " AND cs.fk_categorie = c.rowid";
$sql.= " AND cs.fk_societe = sp.fk_soc";

View File

@ -1118,7 +1118,25 @@ if ($id > 0 || ! empty($ref))
if ($object->methode_commande)
{
print '<tr><td>'.$langs->trans("Method").'</td><td colspan="2">'.$object->methode_commande.'</td></tr>';
$sql = "SELECT rowid, code, libelle";
$sql.= " FROM ".MAIN_DB_PREFIX.'c_input_method';
$sql.= " WHERE active=1 AND rowid = ".$db->escape($object->methode_commande_id);
$resql = $db->query($sql);
if ($resql && $db->num_rows($resql))
{
$obj = $db->fetch_object($resql);
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
$methode_commande = ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->libelle!='-'?$obj->libelle:''));
}
else
{
dol_print_error($db);
}
print '<tr><td>'.$langs->trans("Method").'</td><td colspan="2">'.$methode_commande.'</td></tr>';
}
}

View File

@ -72,6 +72,8 @@ INSERT INTO llx_const (name, value, type, note, visible) values ('PRODUCT_CODEPR
ALTER TABLE llx_c_barcode_type ADD UNIQUE INDEX uk_c_barcode_type(code, entity);
ALTER TABLE llx_socpeople ADD column no_email SMALLINT NOT NULL DEFAULT 0 AFTER priv;
ALTER TABLE llx_propaldet ADD COLUMN label varchar(255) DEFAULT NULL AFTER fk_product;
ALTER TABLE llx_commandedet ADD COLUMN label varchar(255) DEFAULT NULL AFTER fk_product;
ALTER TABLE llx_facturedet ADD COLUMN label varchar(255) DEFAULT NULL AFTER fk_product;

View File

@ -41,6 +41,7 @@ create table llx_socpeople
fax varchar(30),
email varchar(255),
jabberid varchar(255),
no_email smallint NOT NULL DEFAULT 0,
priv smallint NOT NULL DEFAULT 0,
fk_user_creat integer DEFAULT 0, -- user qui a creel'enregistrement
fk_user_modif integer,

View File

@ -305,7 +305,7 @@ DemandReasonTypeSRC_SHOP=Contacte botiga
DemandReasonTypeSRC_WOM=Boca a boca
DemandReasonTypeSRC_PARTNER=Soci
DemandReasonTypeSRC_EMPLOYEE=Empleat
DemandReasonTypeSRC_SPONSORSHIP=Patrocinador
DemandReasonTypeSRC_SPONSORING=Patrocinador
#### Paper formats ####=
PaperFormatEU4A0=Format 4A0
PaperFormatEU2A0=Format 2A0

View File

@ -157,6 +157,7 @@ ImportMySqlCommand=%s %s < mybackupfile.sql
ImportPostgreSqlCommand=%s %s mybackupfile.sql
FileNameToGenerate=File name to generate
CommandsToDisableForeignKeysForImport=Command to disable foreign keys on import
CommandsToDisableForeignKeysForImportWarning=Mandatory if you want to be able to restore your sql dump later
ExportCompatibility=Compatibility of generated export file
MySqlExportParameters=MySQL export parameters
PostgreSqlExportParameters= PostgreSQL export parameters
@ -166,6 +167,7 @@ FullPathToPostgreSQLdumpCommand=Full path to pg_dump command
ExportOptions=Export Options
AddDropDatabase=Add DROP DATABASE command
AddDropTable=Add DROP TABLE command
ExportStructure=Structure
Datas=Data
NameColumn=Name columns
ExtendedInsert=Extended INSERT
@ -844,9 +846,11 @@ BackupDesc2=* Save content of documents directory (<b>%s</b>) that contains all
BackupDesc3=* Save content of your database into a dump file. for this, you can use following assistant.
BackupDescX=Archived directory should be stored in a secure place.
BackupDescY=The generated dump file should be stored in a secure place.
BackupPHPWarning=Backup can't be guaranted with this method. Prefer previous one
RestoreDesc=To restore a Dolibarr backup, you must:
RestoreDesc2=* Restore archive file (zip file for example) of documents directory to extract tree of files in documents directory of a new Dolibarr installation or into this current documents directoy (<b>%s</b>).
RestoreDesc3=* Restore the data, from a backup dump file, into the database of the new Dolibarr installation or into the database of this current installation. Warning, once restore is finished, you must use a login/password, that existed when backup was made, to connect again. To restore a backup database into this current installation, you can follow this assistant.
RestoreMySQL=MySQL import
ForcedToByAModule= This rule is forced to <b>%s</b> by an activated module
PreviousDumpFiles=Available database backup dump files
WeekStartOnDay=First day of week

View File

@ -68,6 +68,7 @@ Phone=Phone
PhonePro=Prof. phone
PhonePerso=Pers. phone
PhoneMobile=Mobile
No_Email=Don't send e-mail
Fax=Fax
Zip=Zip Code
Town=City

View File

@ -305,4 +305,4 @@ DemandReasonTypeSRC_SHOP=Shop contact
DemandReasonTypeSRC_WOM=Word of mouth
DemandReasonTypeSRC_PARTNER=Partner
DemandReasonTypeSRC_EMPLOYEE=Employee
DemandReasonTypeSRC_SPONSORSHIP=Sponsorship
DemandReasonTypeSRC_SPONSORING=Sponsorship

View File

@ -141,9 +141,9 @@ PurgeNothingToDelete=Ningún directorio a eliminar
PurgeNDirectoriesDeleted=<b>%s</b> archivos o directorios eliminados
PurgeAuditEvents=Purgar los eventos de seguridad
ConfirmPurgeAuditEvents=¿Está seguro de querer purgar la lista de los eventos de auditoría de seguridad (Se borrará toda la lista, pero esto no afecta a sus datos)?
NewBackup=Nueva copia
GenerateBackup=Generar copia
Backup=Copia
NewBackup=Nueva copia de seguridad
GenerateBackup=Generar copia de seguridad
Backup=Copia de seguridad
Restore=Restauración
RunCommandSummary=La copia será realizada por el comando siguiente
RunCommandSummaryToLaunch=La copia puede ser realizada por el comando siguiente
@ -162,6 +162,7 @@ ImportPostgreSqlCommand=%s %s miarchivobackup.sql
FileNameToGenerate=Nombre del archivo a generar
Compression=Compresión
CommandsToDisableForeignKeysForImport=Comando para desactivar las claves excluyentes a la importación
CommandsToDisableForeignKeysForImportWarning=Obligatorio si quiere poder restaurar más tarde el dump SQL
ExportCompatibility=Compatibilidad del archivo de exportación generado
MySqlExportParameters=Parámetros de la exportación MySql
PostgreSqlExportParameters=Parámetros de la exportación PostgreSQL
@ -171,6 +172,7 @@ FullPathToPostgreSQLdumpCommand=ruta completa hacia el comando pg_dump
ExportOptions=Opciones de exportación
AddDropDatabase=Añadir órdenes DROP DATABASE
AddDropTable=Añadir órdenes DROP TABLE
ExportStructure=Estructura
Datas=Datos
NameColumn=Nombre las columnas
ExtendedInsert=Instrucciones INSERT extendidas
@ -823,7 +825,7 @@ LogEventDesc=Puede habilitar el registro de eventos de seguridad Dolibarr aquí.
AreaForAdminOnly=Estas funciones solo son accesibles a un usuario administrador.
SystemInfoDesc=La información del sistema es información técnica accesible solamente en solo lectura a los administradores.
SystemAreaForAdminOnly=Esta área solo es accesible a los usuarios de tipo administradores. Ningún permiso Dolibarr permite extender el círculo de usuarios autorizados a esta área.
CompanyFundationDesc=Editar en esta página toda la información conocida sobre la empresa o asociación a administrar (para ello haga clic en el botón "Modificar" a pié de página)
CompanyFundationDesc=Editar en esta página toda la información conocida sobre la empresa o asociación a administrar (para ello haga clic en el botón "Modificar" a pie de página)
DisplayDesc=Puede encontrar aquí todos los parámetros relacionados con la apariencia de Dolibarr
AvailableModules=Módulos disponibles
ToActivateModule=Para activar los módulos, vaya al área de Configuración (Inicio->Configuración->Módulos).
@ -858,9 +860,11 @@ BackupDesc2=* Guardar el contenido del directorio de documentos (<b>%s</b>) que
BackupDesc3=* Guardar el contenido de su base de datos en un archivo de volcado. Para ello puede utilizar el asistente a continuación.
BackupDescX=El directorio archivado deberá guardarse en un lugar seguro.
BackupDescY=El archivo de volcado generado deberá guardarse en un lugar seguro.
BackupPHPWarning=La copia de seguridad no puede ser garantizada con este método. Es preferible utilizar el anterior
RestoreDesc=Para restaurar una copia de seguridad de Dolibarr, usted debe:
RestoreDesc2=* Tomar el archivo (archivo zip, por ejemplo) del directorio de los documentos y descomprimirlo en el directorio de los documentos de una nueva instalación de Dolibarr directorio o en la carpeta de los documentos de esta instalación (<b>%s</b>).
RestoreDesc3=* Recargar el archivo de volcado guardado en la base de datos de una nueva instalación de Dolibarr o de esta instalación. Atención, una vez realizada la restauración, deberá utilizar un login/contraseña de administrador existente en el momento de la copia de seguridad para conectarse. Para restaurar la base de datos en la instalación actual, puede utilizar el asistente a continuación.
RestoreMySQL=Importación MySQL
ForcedToByAModule=Esta regla está forzada a <b>%s</b> por uno de los módulos activados
PreviousDumpFiles=Archivos de copia de seguridad de la base de datos disponibles
WeekStartOnDay=Primer día de la semana

View File

@ -308,7 +308,7 @@ DemandReasonTypeSRC_SHOP=Contacto tienda
DemandReasonTypeSRC_WOM=Boca a boca
DemandReasonTypeSRC_PARTNER=Socio
DemandReasonTypeSRC_EMPLOYEE=Empleado
DemandReasonTypeSRC_SPONSORSHIP=Patrocinador
DemandReasonTypeSRC_SPONSORING=Patrocinador
#### Paper formats ####
PaperFormatEU4A0=Formato 4A0

View File

@ -388,8 +388,8 @@ Paid=Pagado
Topic=Asunto
ByCompanies=Por empresa
ByUsers=Por usuario
Links=Links
Link=Link
Links=Enlaces
Link=Enlace
Receipts=Recibos
Rejects=Devoluciones
Preview=Vista previa

View File

@ -157,6 +157,7 @@ ImportMySqlCommand= %s %s < monfichierbackup.sql
ImportPostgreSqlCommand=%s %s monfichierbackup.sql
FileNameToGenerate= Nom du fichier à générer
CommandsToDisableForeignKeysForImport= Commande pour désactiver les clés étrangères à l'import
CommandsToDisableForeignKeysForImportWarning=Requis si vous voulez être en mesure de restaurer votre dump SQL plus tard
ExportCompatibility= Compatibilité du fichier export généré
MySqlExportParameters= Paramètres de l'export MySql
PostgreSqlExportParameters= Paramètres de l'export PostgreSQL
@ -166,6 +167,7 @@ FullPathToPostgreSQLdumpCommand= Chemin complet vers la commande pg_dump
ExportOptions= Options d'exportation
AddDropDatabase= Ajouter ordres DROP DATABASE
AddDropTable= Ajouter ordres DROP TABLE
Structure=Structure
Datas= Données
NameColumn= Nomme les colonnes
ExtendedInsert= Instructions INSERT étendues
@ -853,9 +855,11 @@ BackupDesc2= * Sauvegarder le contenu du répertoire document (<b>%s</b>) qui co
BackupDesc3= * Sauvegarder le contenu de votre base de données dans un fichier dump. Pour cela vous pouvez utiliser l'assistant ci-dessous.
BackupDescX= Le répertoire archivé devra être placé en lieu sûr.
BackupDescY= Le fichier dump généré devra être placé en lieu sûr.
BackupPHPWarning=La sauvegarde n'est pas garantie avec cette méthode. Préférez la méthode précédente.
RestoreDesc= Pour restaurer une sauvegarde de Dolibarr, vous devez:
RestoreDesc2= * Reprendre le fichier archive (fichier zip par exemple) du répertoire documents et en extraire l'arborescence dans le répertoire documents d'une nouvelle installation de dolibarr ou dans le répertoire documents de cette installation (<b>%s</b>).
RestoreDesc3= * Recharger depuis le fichier dump sauvegardé, la base de données d'une nouvelle installation de Dolibarr ou de cette installation. Attention, une fois la restauration faite, il faudra utiliser un login/mot de passe administrateur existant à l'époque de la sauvegarde pour se connecter. Pour restaurer la base dans l'installation actuelle, vous pouvez utiliser l'assistant suivant.
RestoreMySQL=Importation MySQL
ForcedToByAModule= Cette règle est forcée à <b>%s</b> par un des modules activés
PreviousDumpFiles=Fichiers disponibles de sauvegarde de la base de données
WeekStartOnDay=Premier jour de la semaine

View File

@ -70,6 +70,7 @@ Phone=Téléphone
PhonePro=Tél pro.
PhonePerso=Tél perso.
PhoneMobile=Tél portable
No_Email=Ne pas envoyer d'e-mail
Fax=Fax
Zip=Code postal
Town=Ville

View File

@ -309,7 +309,7 @@ DemandReasonTypeSRC_SHOP=Contact en magazin
DemandReasonTypeSRC_WOM=Bouche à oreille
DemandReasonTypeSRC_PARTNER=Partenaire
DemandReasonTypeSRC_EMPLOYEE=Employé
DemandReasonTypeSRC_SPONSORSHIP=Parrainage/Sponsoring
DemandReasonTypeSRC_SPONSORING=Parrainage/Sponsoring
#### Paper formats ####
PaperFormatEU4A0=Format 4A0