Merge remote-tracking branch 'Upstream/develop' into develop-search

This commit is contained in:
aspangaro 2014-11-06 06:41:09 +01:00
commit 16126891a6
71 changed files with 1517 additions and 1326 deletions

View File

@ -26,7 +26,7 @@ TCPDF 6.0.093 LGPL-3+ Yes
JS libraries: JS libraries:
jQuery 1.8.2 MIT License Yes JS library jQuery 1.8.2 MIT License Yes JS library
jQuery UI 1.9.1 GPL and MIT License Yes JS library plugin UI jQuery UI 1.9.1 GPL and MIT License Yes JS library plugin UI
jQuery UI Multiselect ? GPL and MIT License Yes JS library plugin for sexier multiselect jQuery multiple-select 1.1.0 MIT License Yes JS library plugin for sexier multiselect
jQuery blockUI 2.43 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups) jQuery blockUI 2.43 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
jQuery DataTables 1.9.4 BSD Yes JS library for tables output jQuery DataTables 1.9.4 BSD Yes JS library for tables output

View File

@ -163,18 +163,20 @@ Dolibarr better:
***** ChangeLog for 3.6.2 compared to 3.6.1 ***** ***** ChangeLog for 3.6.2 compared to 3.6.1 *****
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice - Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
- Fix: bug 1588 : relative discount - Fix: bug 1588 : relative discount.
- Fix: label of input method not tranlated. - Fix: label of input method not tranlated.
- Fix: box of customer and propsects were not correctly disabled. - Fix: box of customer and propsects were not correctly disabled.
- Fix: right and error management #1961
- Fix: Fix Error when trying to clone an Order #1943
- Fix: [ bug #1618 ] PHP Error thrown when saving a barcode - Fix: [ bug #1618 ] PHP Error thrown when saving a barcode
- Fix: Civility & birthdate wasn't save into adherent module.
- Fix: webservice Thirdparty parameter lastname for invidual creation is now lastname and not ref
- Fix: Chars - is no more allowed into value for code for extra fields.
( Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache
***** ChangeLog for 3.6.1 compared to 3.6.* ***** ***** ChangeLog for 3.6.1 compared to 3.6.* *****
For users: For users:
- Fix: Can upload files on services. - Fix: Can upload files on services.
- Fix: sql errors on updat fichinter. - Fix: sql errors on update fichinter.
- Fix: debian script syntax error. - Fix: debian script syntax error.
- Fix: error "menu param is not inside list" into pos module. - Fix: error "menu param is not inside list" into pos module.
- Fix: Salary payments are not reflected on the reporting sheets. - Fix: Salary payments are not reflected on the reporting sheets.
@ -310,6 +312,9 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
- Remove add_photo_web() that is ot used anymore by core code. - Remove add_photo_web() that is ot used anymore by core code.
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
Fix: Avoid missing class error for fetch_thirdparty method #1973
***** ChangeLog for 3.5.5 compared to 3.5.4 ***** ***** ChangeLog for 3.5.5 compared to 3.5.4 *****
Fix: Holiday module was broken. Initializaion of amount of holidays failed. Fix: Holiday module was broken. Initializaion of amount of holidays failed.
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas. Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.

View File

@ -7,7 +7,7 @@
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -17,6 +17,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/ */
/** /**

View File

@ -723,7 +723,7 @@ else
{ {
/* ************************************************************************** */ /* ************************************************************************** */
/* */ /* */
/* Fiche creation */ /* Creation card */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
$object->canvas=$canvas; $object->canvas=$canvas;

View File

@ -5,6 +5,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -124,7 +125,7 @@ class Adherent extends CommonObject
/** /**
* Fonction envoyant un email a l'adherent avec le texte fourni en parametre. * Function sending an email has the adherent with the text supplied in parameter.
* *
* @param string $text Content of message (not html entities encoded) * @param string $text Content of message (not html entities encoded)
* @param string $subject Subject of message * @param string $subject Subject of message
@ -247,9 +248,9 @@ class Adherent extends CommonObject
/** /**
* Renvoie le libelle traduit de la nature d'un adherent (physique ou morale) * Return translated label by the nature of a adherent (physical or moral)
* *
* @param string $morphy Nature physique ou morale de l'adherent * @param string $morphy Nature of the adherent (physical or moral)
* @return string Label * @return string Label
*/ */
function getmorphylib($morphy='') function getmorphylib($morphy='')

View File

@ -165,6 +165,16 @@ else if ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK')
exit; exit;
} }
if ($action == 'maj_pattern')
{
dolibarr_set_const($db, "USER_PASSWORD_PATTERN", GETPOST("pattern"),'chaine',0,'',$conf->entity);
header("Location: security.php");
exit;
}
@ -265,6 +275,113 @@ foreach ($arrayhandler as $key => $module)
print '</table>'; print '</table>';
print '</form>'; print '</form>';
//if($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK == 1)
// Patter for Password Perso
if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){
$var=!$var;
$tabConf = explode(";",$conf->global->USER_PASSWORD_PATTERN);
/*$this->length2 = $tabConf[0];
$this->NbMaj = $tabConf[1];
$this->NbNum = $tabConf[2];
$this->NbSpe = $tabConf[3];
$this->NbRepeat = $tabConf[4];
$this->WithoutAmbi = $tabConf[5];
*/
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="3"> '.$langs->trans("PasswordPatternDesc").'</td>';
print '</tr>';
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td>' . $langs->trans("MinLength")."</td>";
print '<td colspan="2"><input type="number" value="'.$tabConf[0].'" id="minlenght" min="1"></td>';
print '</tr>';
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td>' . $langs->trans("NbMajMin")."</td>";
print '<td colspan="2"><input type="number" value="'.$tabConf[1].'" id="NbMajMin" min="0"></td>';
print '</tr>';
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td>' . $langs->trans("NbNumMin")."</td>";
print '<td colspan="2"><input type="number" value="'.$tabConf[2].'" id="NbNumMin" min="0"></td>';
print '</tr>';
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td>' . $langs->trans("NbSpeMin")."</td>";
print '<td colspan="2"><input type="number" value="'.$tabConf[3].'" id="NbSpeMin" min="0"></td>';
print '</tr>';
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td>' . $langs->trans("NbIteConsecutive")."</td>";
print '<td colspan="2"><input type="number" value="'.$tabConf[4].'" id="NbIteConsecutive" min="0"></td>';
print '</tr>';
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td>' . $langs->trans("NoAmbiCaracAutoGeneration")."</td>";
print '<td colspan="2"><input type="checkbox" id="NoAmbiCaracAutoGeneration" '.($tabConf[5] ? "checked" : "").' min="0"> <span id="textcheckbox">'.($tabConf[5] ? $langs->trans("Activated") : $langs->trans("Disabled")).'</span></td>';
print '</tr>';
$var=!$var;
print "<tr ".$bc[$var].">";
print '<td colspan="2"></td><td width="103" align="center"><a id="linkChangePattern">'.$langs->trans("Save").'</a></td>';
print '</tr>';
print '</table>';
print '<script type="text/javascript">';
print ' function getStringArg(){';
print ' var pattern = "";';
print ' pattern += $("#minlenght").val() + ";";';
print ' pattern += $("#NbMajMin").val() + ";";';
print ' pattern += $("#NbNumMin").val() + ";";';
print ' pattern += $("#NbSpeMin").val() + ";";';
print ' pattern += $("#NbIteConsecutive").val() + ";";';
print ' pattern += $("#NoAmbiCaracAutoGeneration")[0].checked ? "1" : "0";';
print ' return pattern;';
print ' }';
print ' function valuePossible(){';
print ' var length = parseInt($("#minlenght").val());';
print ' var length_mini = parseInt($("#NbMajMin").val()) + parseInt($("#NbNumMin").val()) + parseInt($("#NbSpeMin").val());';
print ' return length >= length_mini;';
print ' }';
print ' function generatelink(){';
print ' return "security.php?action=maj_pattern&pattern="+getStringArg();';
print ' }';
print ' function valuePatternChange(){';
print ' var lang_save = "'.$langs->trans("Save").'";';
print ' var lang_error = "'.$langs->trans("Error").'";';
print ' var lang_Disabled = "'.$langs->trans("Disabled").'";';
print ' var lang_Activated = "'.$langs->trans("Activated").'";';
print ' $("#textcheckbox").html($("#NoAmbiCaracAutoGeneration")[0].checked ? unescape(lang_Activated) : unescape(lang_Disabled));';
print ' if(valuePossible()){';
print ' $("#linkChangePattern").attr("href",generatelink()).text(lang_save);';
print ' }';
print ' else{';
print ' $("#linkChangePattern").attr("href", null).text(lang_error);';
print ' }';
print ' }';
print ' $("#minlenght").change(function(){valuePatternChange();});';
print ' $("#NbMajMin").change(function(){valuePatternChange();});';
print ' $("#NbNumMin").change(function(){valuePatternChange();});';
print ' $("#NbSpeMin").change(function(){valuePatternChange();});';
print ' $("#NbIteConsecutive").change(function(){valuePatternChange();});';
print ' $("#NoAmbiCaracAutoGeneration").change(function(){valuePatternChange();});';
print '</script>';
}
// Cryptage mot de passe // Cryptage mot de passe
print '<br>'; print '<br>';
$var=true; $var=true;

View File

@ -553,146 +553,19 @@ else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST(
} }
} }
// Add file in email form
if (GETPOST('addfile')) {
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
// Set tmp user directory TODO Use a dedicated directory for temp mails files
$vardir = $conf->user->dir_output . "/" . $user->id;
$upload_dir_tmp = $vardir . '/temp';
dol_add_file_process($upload_dir_tmp, 0, 0);
$action = 'presend';
}
// Remove file in email form
if (GETPOST('removedfile')) {
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
// Set tmp user directory
$vardir = $conf->user->dir_output . "/" . $user->id;
$upload_dir_tmp = $vardir . '/temp';
// TODO Delete only files that was uploaded from email form
dol_remove_file_process($_POST['removedfile'], 0);
$action = 'presend';
}
/* /*
* Send mail * Send mail
*/ */
if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! GETPOST('cancel')) {
$langs->load('mails');
if ($object->id > 0) { // Actions to send emails
if ($_POST['sendto']) {
// Le destinataire a ete fourni via le champ libre
$sendto = $_POST['sendto'];
$sendtoid = 0;
} elseif ($_POST['receiver'] != '-1') {
// Recipient was provided from combo list
if ($_POST['receiver'] == 'thirdparty') // Id of third party
{
$sendto = $object->thirdparty->email;
$sendtoid = 0;
} else // Id du contact
{
$sendto = $object->thirdparty->contact_get_property($_POST['receiver'], 'email');
$sendtoid = $_POST['receiver'];
}
}
if (dol_strlen($sendto)) {
$langs->load("commercial");
$from = $_POST['fromname'] . ' <' . $_POST['frommail'] . '>';
$replyto = $_POST['replytoname'] . ' <' . $_POST['replytomail'] . '>';
$message = $_POST['message'];
$sendtocc = $_POST['sendtocc'];
$sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO);
$deliveryreceipt = $_POST['deliveryreceipt'];
if (dol_strlen($_POST['subject']))
$subject = $_POST['subject'];
else
$subject = $langs->transnoentities('Propal') . ' ' . $object->ref;
$actiontypecode='AC_PROP'; $actiontypecode='AC_PROP';
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto; $trigger_name='PROPAL_SENTBYMAIL';
if ($message) { $paramname='id';
if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); $mode='emailfromproposal';
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg = dol_concatdesc($actionmsg, $message);
}
$actionmsg2 = $langs->transnoentities('Action' . $actiontypecode);
// Create form object
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$attachedfiles = $formmail->get_attached_files();
$filepath = $attachedfiles ['paths'];
$filename = $attachedfiles ['names'];
$mimetype = $attachedfiles ['mimes'];
// Envoi de la propal
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, - 1);
if ($mailfile->error) {
setEventMessage($mailfile->error, 'errors');
} else {
$result = $mailfile->sendfile();
if ($result) {
// Initialisation donnees
$object->sendtoid = $sendtoid;
$object->actiontypecode = $actiontypecode;
$object->actionmsg = $actionmsg;
$object->actionmsg2 = $actionmsg2;
$object->fk_element = $object->id;
$object->elementtype = $object->element;
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface = new Interfaces($db);
$result = $interface->run_triggers('PROPAL_SENTBYMAIL', $object, $user, $langs, $conf);
if ($result < 0) {
$error++;
$object->errors = $interface->errors;
}
// Fin appel triggers
if (! $error) {
// Redirect here
// This avoid sending mail twice if going out and then back to page
$mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2));
setEventMessage($mesg);
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
exit();
} else {
dol_print_error($db);
}
} else {
$langs->load("other");
if ($mailfile->error) {
$mesg .= $langs->trans('ErrorFailedToSendMail', $from, $sendto);
$mesg .= '<br>' . $mailfile->error;
} else {
$mesg .= 'No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS';
}
setEventMessage($mesg, 'errors');
}
}
} else {
$langs->load("other");
setEventMessage($langs->trans('ErrorMailRecipientIsEmpty') . '!', 'errors');
dol_syslog($langs->trans('ErrorMailRecipientIsEmpty'));
}
} else {
$langs->load("other");
setEventMessage($langs->trans('ErrorFailedToReadEntity', $langs->trans("Proposal")), 'errors');
dol_syslog($langs->trans('ErrorFailedToReadEntity', $langs->trans("Proposal")));
}
}
// Go back to draft // Go back to draft
if ($action == 'modif' && $user->rights->propal->creer) if ($action == 'modif' && $user->rights->propal->creer)

View File

@ -1151,162 +1151,18 @@ else if ($action == 'update_extras') {
$action = 'edit_extras'; $action = 'edit_extras';
} }
/*
* Add file in email form
*/
if (GETPOST('addfile')) {
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
// Set tmp user directory TODO Use a dedicated directory for temp mails files
$vardir = $conf->user->dir_output . "/" . $user->id;
$upload_dir_tmp = $vardir . '/temp';
dol_add_file_process($upload_dir_tmp, 0, 0);
$action = 'presend';
}
/*
* Remove file in email form
*/
if (GETPOST('removedfile')) {
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
// Set tmp user directory
$vardir = $conf->user->dir_output . "/" . $user->id;
$upload_dir_tmp = $vardir . '/temp';
// TODO Delete only files that was uploaded from email form
dol_remove_file_process(GETPOST('removedfile'), 0);
$action = 'presend';
}
/* /*
* Send mail * Send mail
*/ */
if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! GETPOST('cancel')) {
$langs->load('mails');
if ($object->id > 0) { // Actions to send emails
// $ref = dol_sanitizeFileName($object->ref);
// $file = $conf->commande->dir_output . '/' . $ref . '/' . $ref . '.pdf';
// if (is_readable($file))
// {
if (GETPOST('sendto')) {
// Le destinataire a ete fourni via le champ libre
$sendto = GETPOST('sendto');
$sendtoid = 0;
} elseif (GETPOST('receiver') != '-1') {
// Recipient was provided from combo list
if (GETPOST('receiver') == 'thirdparty') // Id of third party
{
$sendto = $object->thirdparty->email;
$sendtoid = 0;
} else // Id du contact
{
$sendto = $object->thirdparty->contact_get_property(GETPOST('receiver'), 'email');
$sendtoid = GETPOST('receiver');
}
}
if (dol_strlen($sendto)) {
$langs->load("commercial");
$from = GETPOST('fromname') . ' <' . GETPOST('frommail') . '>';
$replyto = GETPOST('replytoname') . ' <' . GETPOST('replytomail') . '>';
$message = GETPOST('message');
$sendtocc = GETPOST('sendtocc');
$sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO);
$deliveryreceipt = GETPOST('deliveryreceipt');
if ($action == 'send') {
if (dol_strlen(GETPOST('subject')))
$subject = GETPOST('subject');
else
$subject = $langs->transnoentities('Order') . ' ' . $object->ref;
$actiontypecode='AC_COM'; $actiontypecode='AC_COM';
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto; $trigger_name='ORDER_SENTBYMAIL';
if ($message) { $paramname='id';
if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); $mode='emailfromorder';
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg = dol_concatdesc($actionmsg, $message);
}
$actionmsg2 = $langs->transnoentities('Action' . $actiontypecode);
}
// Create form object
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$attachedfiles = $formmail->get_attached_files();
$filepath = $attachedfiles ['paths'];
$filename = $attachedfiles ['names'];
$mimetype = $attachedfiles ['mimes'];
// Send mail
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, - 1);
if ($mailfile->error) {
setEventMessage($mailfile->error, 'errors');
} else {
$result = $mailfile->sendfile();
if ($result) {
//Must not contain quotes
$mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2));
setEventMessage($mesg);
$error = 0;
// Initialisation donnees
$object->sendtoid = $sendtoid;
$object->actiontypecode = $actiontypecode;
$object->actionmsg = $actionmsg;
$object->actionmsg2 = $actionmsg2;
$object->fk_element = $object->id;
$object->elementtype = $object->element;
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface = new Interfaces($db);
$result = $interface->run_triggers('ORDER_SENTBYMAIL', $object, $user, $langs, $conf);
if ($result < 0) {
$error ++;
$this->errors = $interface->errors;
}
// Fin appel triggers
if ($error) {
dol_print_error($db);
} else {
// Redirect here
// This avoid sending mail twice if going out and then back to page
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
exit();
}
} else {
$langs->load("other");
if ($mailfile->error) {
$mesg .= $langs->trans('ErrorFailedToSendMail', $from, $sendto);
$mesg .= '<br>' . $mailfile->error;
} else {
$mesg .= 'No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS';
}
setEventMessage($mesg, 'errors');
}
}
} else {
$langs->load("other");
setEventMessage($langs->trans('ErrorMailRecipientIsEmpty') . '!', 'errors');
dol_syslog($langs->trans('ErrorMailRecipientIsEmpty'));
}
} else {
$langs->load("other");
setEventMessage($langs->trans('ErrorFailedToReadEntity', $langs->trans("Order")), 'errors');
dol_syslog($langs->trans('ErrorFailedToReadEntity', $langs->trans("Order")));
}
}
if (! $error && ! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->commande->creer) { if (! $error && ! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->commande->creer) {
if ($action == 'addcontact') { if ($action == 'addcontact') {

View File

@ -1550,178 +1550,24 @@ if (GETPOST('linkedOrder')) {
$result = $object->add_object_linked('commande', GETPOST('linkedOrder')); $result = $object->add_object_linked('commande', GETPOST('linkedOrder'));
} }
/*
* Add file in email form
*/
if (GETPOST('addfile')) {
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
// Set tmp user directory
$vardir = $conf->user->dir_output . "/" . $user->id;
$upload_dir_tmp = $vardir . '/temp';
dol_add_file_process($upload_dir_tmp, 0, 0);
$action = 'presend';
}
/*
* Remove file in email form
*/
if (! empty($_POST['removedfile'])) {
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
// Set tmp user directory
$vardir = $conf->user->dir_output . "/" . $user->id;
$upload_dir_tmp = $vardir . '/temp';
// TODO Delete only files that was uploaded from email form
dol_remove_file_process($_POST['removedfile'], 0);
$action = 'presend';
}
/* /*
* Send mail * Send mail
*/ */
if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_POST['cancel']) {
$langs->load('mails');
$actiontypecode = ''; // Actions to send emails
$subject = ''; if (empty($id)) $id=$facid;
$actionmsg = '';
$actionmsg2 = '';
$result = $object->fetch($id);
$result = $object->fetch_thirdparty();
if ($result > 0) {
// $ref = dol_sanitizeFileName($object->ref);
// $file = $conf->facture->dir_output . '/' . $ref . '/' . $ref . '.pdf';
// if (is_readable($file))
// {
if ($_POST['sendto']) {
// Le destinataire a ete fourni via le champ libre
$sendto = $_POST['sendto'];
$sendtoid = 0;
} elseif ($_POST['receiver'] != '-1') {
// Recipient was provided from combo list
if ($_POST['receiver'] == 'thirdparty') // Id of third party
{
$sendto = $object->thirdparty->email;
$sendtoid = 0;
} else // Id du contact
{
$sendto = $object->thirdparty->contact_get_property($_POST['receiver'], 'email');
$sendtoid = $_POST['receiver'];
}
}
if (dol_strlen($sendto))
{
$langs->load("commercial");
$from = $_POST['fromname'] . ' <' . $_POST['frommail'] . '>';
$replyto = $_POST['replytoname'] . ' <' . $_POST['replytomail'] . '>';
$message = $_POST['message'];
$sendtocc = $_POST['sendtocc'];
$sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO);
$deliveryreceipt = $_POST['deliveryreceipt'];
if ($action == 'send' || $action == 'relance')
{
if (dol_strlen($_POST['subject']))
$subject = $_POST['subject'];
else
$subject = $langs->transnoentities('Bill') . ' ' . $object->ref;
$actiontypecode='AC_FAC'; $actiontypecode='AC_FAC';
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto; $trigger_name='BILL_SENTBYMAIL';
if ($message) { $paramname='id';
if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); $mode='emailfrominvoice';
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg = dol_concatdesc($actionmsg, $message);
}
// $actionmsg2=$langs->transnoentities('Action'.$actiontypecode);
}
// Create form object
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$attachedfiles = $formmail->get_attached_files();
$filepath = $attachedfiles['paths'];
$filename = $attachedfiles['names'];
$mimetype = $attachedfiles['mimes'];
// Send mail
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, - 1);
if ($mailfile->error) {
setEventMessage($mailfile->error, 'errors');
} else {
$result = $mailfile->sendfile();
if ($result) {
$error = 0;
// Initialisation donnees
$object->sendtoid = $sendtoid;
$object->actiontypecode = $actiontypecode;
$object->actionmsg = $actionmsg; // Long text
$object->actionmsg2 = $actionmsg2; // Short text
$object->fk_element = $object->id;
$object->elementtype = $object->element;
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface = new Interfaces($db);
$result = $interface->run_triggers('BILL_SENTBYMAIL', $object, $user, $langs, $conf);
if ($result < 0) {
$error++;
$object->errors = $interface->errors;
}
// Fin appel triggers
if ($error) {
dol_print_error($db);
} else {
// Redirect here
// This avoid sending mail twice if going out and then back to page
$mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2));
setEventMessage($mesg);
header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id);
exit();
}
} else {
$langs->load("other");
if ($mailfile->error) {
$mesg .= $langs->trans('ErrorFailedToSendMail', $from, $sendto);
$mesg .= '<br>' . $mailfile->error;
} else {
$mesg .= 'No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS';
}
setEventMessage($mesg, 'errors');
}
}
} else {
$langs->load("other");
setEventMessage($langs->trans('ErrorMailRecipientIsEmpty') . '!', 'errors');
dol_syslog($langs->trans('ErrorMailRecipientIsEmpty'));
}
} else {
$langs->load("other");
setEventMessage($langs->trans('ErrorFailedToReadEntity', $langs->trans("Invoice")), 'errors');
dol_syslog('Impossible de lire les donnees de la facture. Le fichier facture n\'a peut-etre pas ete genere.');
}
$action = 'presend';
}
/* /*
* Generate document * Generate document
*/ */
else if ($action == 'builddoc') // En get ou en post if ($action == 'builddoc') // En get ou en post
{ {
$object->fetch($id); $object->fetch($id);
$object->fetch_thirdparty(); $object->fetch_thirdparty();

View File

@ -1,103 +0,0 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/compta/prelevement/bon.php
* \ingroup prelevement
* \brief Fiche apercu du bon de prelevement
*/
require('../../main.inc.php');
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->load("banks");
$langs->load("categories");
$langs->load("bills");
$langs->load("categories");
// Security check
$socid=0;
$id = GETPOST('id','int');
$ref = GETPOST('ref','alpha');
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'prelevement', $id);
llxHeader('','Bon de prelevement');
$form = new Form($db);
if ($id > 0 || ! empty($ref))
{
$object = new BonPrelevement($db,"");
if ($object->fetch($id) == 0)
{
$head = prelevement_prepare_head($object);
dol_fiche_head($head, 'preview', 'Prelevement : '. $object->ref);
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$object->ref.'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($object->amount).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
$relativepath = 'bon/'.$object->ref;
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart=prelevement&amp;file='.urlencode($relativepath).'">'.$object->ref.'</a>';
print '</td></tr>';
print '</table><br>';
$fileimage = $conf->prelevement->dir_output.'/receipts/'.$object->ref.'.ps.png.0';
$fileps = $conf->prelevement->dir_output.'/receipts/'.$object->ref.'.ps';
// Conversion du PDF en image png si fichier png non existant
if (!file_exists($fileimage))
{
if (class_exists("Imagick"))
{
$ret = dol_convert_file($file,'png',$fileimage);
if ($ret < 0) $error++;
}
else
{
$langs->load("errors");
print '<font class="error">'.$langs->trans("ErrorNoImagickReadimage").'</font>';
}
}
if (file_exists($fileimage))
{
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=prelevement&file='.urlencode(basename($fileimage)).'">';
}
dol_fiche_end();
}
else
{
dol_print_error($db);
}
}
llxFooter();

View File

@ -821,7 +821,9 @@ class BonPrelevement extends CommonObject
{ {
$bac = new CompanyBankAccount($this->db); $bac = new CompanyBankAccount($this->db);
$bac->fetch(0,$soc->id); $bac->fetch(0,$soc->id);
if ($bac->verif() >= 1) if ($bac->verif() >= 1)
//if (true)
{ {
$factures_prev[$i] = $fac; $factures_prev[$i] = $fac;
/* second tableau necessaire pour BonPrelevement */ /* second tableau necessaire pour BonPrelevement */
@ -1226,26 +1228,24 @@ class BonPrelevement extends CommonObject
* @return int 0 if OK, <0 if KO * @return int 0 if OK, <0 if KO
*/ */
//TODO: Optimize code to read lines in a single function //TODO: Optimize code to read lines in a single function
function Generate() function generate()
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
$result = 0; $result = 0;
dol_syslog(get_class($this)."::Generate build file ".$this->filename); dol_syslog(get_class($this)."::generate build file ".$this->filename);
$this->file = fopen($this->filename,"w"); $this->file = fopen($this->filename,"w");
$found=0; $found=0;
// Build file for European countries // Build file for European countries
if (! $mysoc->isInEEC()) if ($mysoc->isInEEC())
{ {
$found++; $found++;
/** /**
* SECTION CREATION FICHIER SEPA
* SECTION CREATION FICHIER SEPA
* SECTION CREATION FICHIER SEPA * SECTION CREATION FICHIER SEPA
*/ */
// SEPA Initialisation // SEPA Initialisation
@ -1308,8 +1308,6 @@ class BonPrelevement extends CommonObject
} }
/** /**
* SECTION CREATION FICHIER SEPA
* SECTION CREATION FICHIER SEPA
* SECTION CREATION FICHIER SEPA * SECTION CREATION FICHIER SEPA
*/ */
// SEPA File Header // SEPA File Header
@ -1404,8 +1402,11 @@ class BonPrelevement extends CommonObject
{ {
$result = -2; $result = -2;
} }
$langs->load('withdrawals'); $langs->load('withdrawals');
fputs($this->file, $langs->trans('WithdrawalFileNotCapable'));
// TODO Add here code to generate a generic file
fputs($this->file, $langs->trans('WithdrawalFileNotCapable', $mysoc->country_code));
} }
fclose($this->file); fclose($this->file);

View File

@ -173,7 +173,8 @@ class RejetPrelevement
} }
//Tag invoice as unpaid //Tag invoice as unpaid
dol_syslog("RejetPrelevement::Create set_unpaid fac ".$fac->ref); dol_syslog("RejetPrelevement::Create set_unpaid fac ".$fac->ref);
$fac->set_unpaid($fac->id, $user);
$fac->set_unpaid($user);
//TODO: Must be managed by notifications module //TODO: Must be managed by notifications module
// Send email to sender of the standing order request // Send email to sender of the standing order request
@ -194,7 +195,7 @@ class RejetPrelevement
} }
/** /**
* Envoi mail * Send email to all users that has asked the withdraw request
* *
* @param Facture $fac Invoice object * @param Facture $fac Invoice object
* @return void * @return void

View File

@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->load("banks"); $langs->load("banks");
$langs->load("categories"); $langs->load("categories");
$langs->load("widthdrawals"); $langs->load("withdrawals");
$langs->load("companies"); $langs->load("companies");
// Security check // Security check

View File

@ -213,6 +213,7 @@ else
dol_print_error($db); dol_print_error($db);
} }
$db->close();
llxFooter(); llxFooter();
$db->close();

View File

@ -105,10 +105,13 @@ if ($action == 'confirm_rejet')
} }
} }
/* /*
* View * View
*/ */
$invoicestatic=new Facture($db);
llxHeader('',$langs->trans("StandingOrder")); llxHeader('',$langs->trans("StandingOrder"));
$h = 0; $h = 0;
@ -134,9 +137,7 @@ if ($id)
print '<a href="card.php?id='.$lipre->bon_rowid.'">'.$lipre->bon_ref.'</a></td></tr>'; print '<a href="card.php?id='.$lipre->bon_rowid.'">'.$lipre->bon_ref.'</a></td></tr>';
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>'; print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($lipre->amount).'</td></tr>'; print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($lipre->amount).'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Status").'</td><td>'; print '<tr><td width="20%">'.$langs->trans("Status").'</td><td>'.$lipre->LibStatut($lipre->statut,1).'</td></tr>';
print $lipre->LibStatut($lipre->statut,1).'</td></tr>';
if ($lipre->statut == 3) if ($lipre->statut == 3)
{ {
@ -215,7 +216,7 @@ if ($id)
print '</table><br>'; print '</table><br>';
//Confirm Button //Confirm Button
print '<center><input type="submit" class="valid" value='.$langs->trans("Confirm").'><center>'; print '<center><input type="submit" class="button" value='.$langs->trans("Confirm").'><center>';
print '</form>'; print '</form>';
} }
@ -229,13 +230,20 @@ if ($id)
if ($action == '') if ($action == '')
{ {
if ($bon->statut == 2 && $lipre->statut == 2 && $user->rights->prelevement->bons->credit) if ($bon->statut == 2 && $lipre->statut == 2)
{
if ($user->rights->prelevement->bons->credit)
{ {
print "<a class=\"butAction\" href=\"ligne.php?action=rejet&amp;id=$lipre->id\">".$langs->trans("StandingOrderReject")."</a>"; print "<a class=\"butAction\" href=\"ligne.php?action=rejet&amp;id=$lipre->id\">".$langs->trans("StandingOrderReject")."</a>";
} }
else else
{ {
print "<a class=\"butActionRefused\" href=\"#\">".$langs->trans("StandingOrderReject")."</a>"; print "<a class=\"butActionRefused\" href=\"#\" title=\"".$langs->trans("NotAllowed")."\">".$langs->trans("StandingOrderReject")."</a>";
}
}
else
{
print "<a class=\"butActionRefused\" href=\"#\" title=\"".$langs->trans("NotPossibleForThisStatusOfWithdrawReceiptORLine")."\">".$langs->trans("StandingOrderReject")."</a>";
} }
} }
@ -256,7 +264,7 @@ if ($id)
* Liste des factures * Liste des factures
*/ */
$sql = "SELECT pf.rowid"; $sql = "SELECT pf.rowid";
$sql.= " ,f.rowid as facid, f.facnumber as ref, f.total_ttc"; $sql.= " ,f.rowid as facid, f.facnumber as ref, f.total_ttc, f.paye, f.fk_statut";
$sql.= " , s.rowid as socid, s.nom as name"; $sql.= " , s.rowid as socid, s.nom as name";
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql.= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
$sql.= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl"; $sql.= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
@ -287,7 +295,7 @@ if ($id)
print"\n<!-- debut table -->\n"; print"\n<!-- debut table -->\n";
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Invoice").'</td><td>'.$langs->trans("ThirdParty").'</td><td align="right">'.$langs->trans("Amount").'</td>'; print '<td>'.$langs->trans("Invoice").'</td><td>'.$langs->trans("ThirdParty").'</td><td align="right">'.$langs->trans("Amount").'</td><td align="right">'.$langs->trans("Status").'</td>';
print '</tr>'; print '</tr>';
$var=True; $var=True;
@ -312,6 +320,11 @@ if ($id)
print '<td align="right">'.price($obj->total_ttc)."</td>\n"; print '<td align="right">'.price($obj->total_ttc)."</td>\n";
print '<td align="right">';
$invoicestatic->fetch($obj->facid);
print $invoicestatic->getLibStatut(5);
print "</td>\n";
print "</tr>\n"; print "</tr>\n";
$i++; $i++;

View File

@ -87,10 +87,10 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
if ($result > 0) if ($result > 0)
{ {
if ($_POST['sendto']) if (trim($_POST['sendto']))
{ {
// Recipient is provided into free text // Recipient is provided into free text
$sendto = $_POST['sendto']; $sendto = trim($_POST['sendto']);
$sendtoid = 0; $sendtoid = 0;
} }
elseif ($_POST['receiver'] != '-1') elseif ($_POST['receiver'] != '-1')
@ -107,6 +107,22 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$sendtoid = $_POST['receiver']; $sendtoid = $_POST['receiver'];
} }
} }
if (trim($_POST['sendtocc']))
{
$sendtocc = trim($_POST['sendtocc']);
}
elseif ($_POST['receivercc'] != '-1')
{
// Recipient was provided from combo list
if ($_POST['receivercc'] == 'thirdparty') // Id of third party
{
$sendtocc = $thirdparty->email;
}
else // Id du contact
{
$sendtocc = $thirdparty->contact_get_property($_POST['receivercc'],'email');
}
}
if (dol_strlen($sendto)) if (dol_strlen($sendto))
{ {
@ -115,8 +131,8 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
$from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>';
$replyto = $_POST['replytoname']. ' <' . $_POST['replytomail'].'>'; $replyto = $_POST['replytoname']. ' <' . $_POST['replytomail'].'>';
$message = $_POST['message']; $message = $_POST['message'];
$sendtocc = $_POST['sendtocc']; $sendtocc = $sendtocc;
$sendtobcc=''; $sendtobcc= GETPOST('sendtoccc');
if ($mode == 'emailfromproposal') $sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO); if ($mode == 'emailfromproposal') $sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO);
if ($mode == 'emailfromorder') $sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO); if ($mode == 'emailfromorder') $sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO);
if ($mode == 'emailfrominvoice') $sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO); if ($mode == 'emailfrominvoice') $sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO);
@ -172,7 +188,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
// Appel des triggers // Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db); $interface=new Interfaces($db);
$result=$interface->run_triggers('COMPANY_SENTBYMAIL',$object,$user,$langs,$conf); $result=$interface->run_triggers($trigger_name,$object,$user,$langs,$conf);
if ($result < 0) { if ($result < 0) {
$error++; $this->errors=$interface->errors; $error++; $this->errors=$interface->errors;
} }

View File

@ -609,6 +609,8 @@ abstract class CommonObject
if (empty($this->socid) && empty($this->fk_soc) && empty($this->fk_thirdparty)) return 0; if (empty($this->socid) && empty($this->fk_soc) && empty($this->fk_thirdparty)) return 0;
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$thirdparty = new Societe($this->db); $thirdparty = new Societe($this->db);
$result=$thirdparty->fetch(isset($this->socid)?$this->socid:(isset($this->fk_soc)?$this->fk_soc:$this->fk_thirdparty)); $result=$thirdparty->fetch(isset($this->socid)?$this->socid:(isset($this->fk_soc)?$this->fk_soc:$this->fk_thirdparty));
$this->client = $thirdparty; // deprecated $this->client = $thirdparty; // deprecated

View File

@ -157,7 +157,7 @@ class ExtraFields
{ {
$table=$elementtype.'_extrafields'; $table=$elementtype.'_extrafields';
if (! empty($attrname) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname) && ! is_numeric($attrname)) if (! empty($attrname) && preg_match("/^\w[a-zA-Z0-9_]*$/",$attrname) && ! is_numeric($attrname))
{ {
if ($type=='boolean') { if ($type=='boolean') {
$typedb='int'; $typedb='int';
@ -752,15 +752,17 @@ class ExtraFields
if (strpos($InfoFieldList[4], 'extra')!==false) if (strpos($InfoFieldList[4], 'extra')!==false)
{ {
$sql.= ' as main, '.MAIN_DB_PREFIX .$InfoFieldList[0].'_extrafields as extra'; $sql.= ' as main, '.MAIN_DB_PREFIX .$InfoFieldList[0].'_extrafields as extra';
$sqlwhere.= ' AND extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4]; $sqlwhere.= ' WHERE extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4];
} }
else else
{ {
$sqlwhere.= ' AND '.$InfoFieldList[4]; $sqlwhere.= ' WHERE '.$InfoFieldList[4];
} }
}else {
$sqlwhere.= ' WHERE 1';
} }
if (in_array($InfoFieldList[0],array('tablewithentity'))) $sqlwhere.= ' AND entity = '.$conf->entity; // Some tables may have field, some other not. For the moment we disable it. if (in_array($InfoFieldList[0],array('tablewithentity'))) $sqlwhere.= ' AND entity = '.$conf->entity; // Some tables may have field, some other not. For the moment we disable it.
$sql.=preg_replace('/^ AND /','',$sqlwhere); //$sql.=preg_replace('/^ AND /','',$sqlwhere);
//print $sql; //print $sql;
dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG); dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG);
@ -988,7 +990,10 @@ class ExtraFields
{ {
foreach ($fields_label as $field_toshow) foreach ($fields_label as $field_toshow)
{ {
$translabel='';
if (!empty($obj->$field_toshow)) {
$translabel=$langs->trans($obj->$field_toshow); $translabel=$langs->trans($obj->$field_toshow);
}
if ($translabel!=$field_toshow) { if ($translabel!=$field_toshow) {
$value.=dol_trunc($translabel,18).' '; $value.=dol_trunc($translabel,18).' ';
}else { }else {
@ -998,7 +1003,10 @@ class ExtraFields
} }
else else
{ {
$translabel='';
if (!empty($obj->$InfoFieldList[1])) {
$translabel=$langs->trans($obj->$InfoFieldList[1]); $translabel=$langs->trans($obj->$InfoFieldList[1]);
}
if ($translabel!=$obj->$InfoFieldList[1]) { if ($translabel!=$obj->$InfoFieldList[1]) {
$value=dol_trunc($translabel,18); $value=dol_trunc($translabel,18);
}else { }else {

View File

@ -1835,11 +1835,12 @@ class Form
* @param string $filterkey Filtre des produits * @param string $filterkey Filtre des produits
* @param int $statut -1=Return all products, 0=Products not on sell, 1=Products on sell * @param int $statut -1=Return all products, 0=Products not on sell, 1=Products on sell
* @param int $outputmode 0=HTML select string, 1=Array * @param int $outputmode 0=HTML select string, 1=Array
* @param int $limit Limit of line number
* @return array Array of keys for json * @return array Array of keys for json
*/ */
function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0) function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0,$limit=100)
{ {
global $langs,$conf; global $langs,$conf,$db;
$out=''; $out='';
$outarray=array(); $outarray=array();
@ -1877,6 +1878,7 @@ class Form
$sql.=')'; $sql.=')';
} }
$sql.= " ORDER BY pfp.ref_fourn DESC, pfp.quantity ASC"; $sql.= " ORDER BY pfp.ref_fourn DESC, pfp.quantity ASC";
$sql.= $db->plimit($limit);
// Build output string // Build output string
@ -4035,6 +4037,7 @@ class Form
* @param int $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' = Do not sort * @param int $sort 'ASC' or 'DESC' = Sort on label, '' or 'NONE' = Do not sort
* @param string $morecss Add more class to css styles * @param string $morecss Add more class to css styles
* @return string HTML select string. * @return string HTML select string.
* @see multiselectarray
*/ */
static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='') static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='')
{ {
@ -4092,54 +4095,65 @@ class Form
* *
* @param string $htmlname Name of select * @param string $htmlname Name of select
* @param array $array Array with key+value * @param array $array Array with key+value
* @param array $selected Preselected keys * @param array $selected Array with key+value preselected
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value" * @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
* @param int $value_as_key 1 to use value as key * @param int $value_as_key 1 to use value as key
* @param string $option Valeur de l'option en fonction du type choisi * @param string $option Valeur de l'option en fonction du type choisi
* @param int $translate Translate and encode value * @param int $translate Translate and encode value
* @param int $width Force width of select box. May be used only when using jquery couch.
* @return string HTML multiselect string * @return string HTML multiselect string
* @see selectarray
*/ */
function multiselectarray($htmlname, $array, $selected=array(), $key_in_label=0, $value_as_key=0, $option='', $translate=0) static function multiselectarray($htmlname, $array, $selected=array(), $key_in_label=0, $value_as_key=0, $option='', $translate=0, $width=0)
{ {
global $conf, $langs; global $conf, $langs;
$out = '<select id="'.$htmlname.'" class="multiselect" multiple="multiple" name="'.$htmlname.'[]"'.$option.'>'."\n"; // Add code for jquery to use multiselect
// Note: Plugin "multiselect" is no more provided by Dolibarr. You must include it and load it into your module to use it.
if ((! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && ($conf->global->MAIN_USE_JQUERY_MULTISELECT == 'multiselect'))
|| (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT')))
{
print '<!-- JS CODE FOR multiselect -->
<script type="text/javascript">
$(document).ready(function () {
$.extend($.ui.multiselect.locale, {
addAll:\''.$langs->transnoentities("AddAll").'\',
removeAll:\''.$langs->transnoentities("RemoveAll").'\',
itemsCount:\''.$langs->transnoentities("ItemsCount").'\'
});
$(function(){
$("#'.$htmlname.'").multiselect({
searchable: false,
width: '.($width?$width:300).',
height: 120
});
});
});
</script>';
}
// Add code for jquery to use multiple-select
// Note: Plugin "multiselect" is no more provided by Dolibarr. You must include it and load it into your module to use it.
if ((! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && ($conf->global->MAIN_USE_JQUERY_MULTISELECT == 'multiple-select'))
|| (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT')))
{
print '<!-- JS CODE FOR multiple-select -->
<script src="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiple-select/jquery.multiple.select.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$(\'#'.$htmlname.'\').multipleSelect();
});
</script>';
}
// Try also magic suggest
$out = '<select id="'.$htmlname.'" class="multiselect" multiple="multiple" name="'.$htmlname.'[]"'.$option.($width?' style="width: '.$width.'px"':'').'>'."\n";
if (is_array($array) && ! empty($array)) if (is_array($array) && ! empty($array))
{ {
if ($value_as_key) $array=array_combine($array, $array); if ($value_as_key) $array=array_combine($array, $array);
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && is_array($selected) && ! empty($selected))
{
foreach ($selected as $selected_value)
{
foreach($array as $key => $value)
{
if ($selected_value == $key)
{
$value=$array[$selected_value];
$out.= '<option value="'.$key.'" selected="selected">';
$newval = ($translate ? $langs->trans(ucfirst($value)) : $value);
$newval = ($key_in_label ? $key.' - '.$newval : $newval);
$out.= dol_htmlentitiesbr($newval);
$out.= '</option>'."\n";
unset($array[$key]);
}
}
}
if (! empty($array)) if (! empty($array))
{
foreach ($array as $key => $value)
{
$out.= '<option value="'.$key.'">';
$newval = ($translate ? $langs->trans(ucfirst($value)) : $value);
$newval = ($key_in_label ? $key.' - '.$newval : $newval);
$out.= dol_htmlentitiesbr($newval);
$out.= '</option>'."\n";
}
}
}
else
{ {
foreach ($array as $key => $value) foreach ($array as $key => $value)
{ {
@ -4150,7 +4164,7 @@ class Form
} }
$out.= '>'; $out.= '>';
$newval = ($translate ? $langs->trans(ucfirst($value)) : $value); $newval = ($translate ? $langs->trans($value) : $value);
$newval = ($key_in_label ? $key.' - '.$newval : $newval); $newval = ($key_in_label ? $key.' - '.$newval : $newval);
$out.= dol_htmlentitiesbr($newval); $out.= dol_htmlentitiesbr($newval);
$out.= '</option>'."\n"; $out.= '</option>'."\n";

View File

@ -4,7 +4,7 @@
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,6 +14,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/ */
/** /**

View File

@ -173,6 +173,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
} }
$("#search_'.$htmlname.'").trigger("change"); // To tell that input text field was modified $("#search_'.$htmlname.'").trigger("change"); // To tell that input text field was modified
} }
,delay: 500
}).data( "autocomplete" )._renderItem = function( ul, item ) { }).data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li></li>" ) return $( "<li></li>" )
.data( "item.autocomplete", item ) .data( "item.autocomplete", item )

View File

@ -4,7 +4,7 @@
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -14,6 +14,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/ */
/** /**

View File

@ -44,14 +44,6 @@ function prelevement_prepare_head($object)
$head[$h][2] = 'prelevement'; $head[$h][2] = 'prelevement';
$h++; $h++;
if (! empty($conf->global->MAIN_USE_PREVIEW_TABS))
{
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/bon.php?id='.$object->id;
$head[$h][1] = $langs->trans("Preview");
$head[$h][2] = 'preview';
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$object->id;
$head[$h][1] = $langs->trans("Lines"); $head[$h][1] = $langs->trans("Lines");
$head[$h][2] = 'lines'; $head[$h][2] = 'lines';

View File

@ -210,6 +210,7 @@ class CommActionRapport
$sql.= " WHERE c.id=a.fk_action AND a.fk_user_author = u.rowid"; $sql.= " WHERE c.id=a.fk_action AND a.fk_user_author = u.rowid";
$sql.= " AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($this->year,$this->month,false))."'"; $sql.= " AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($this->year,$this->month,false))."'";
$sql.= " AND '".$this->db->idate(dol_get_last_day($this->year,$this->month,false))."'"; $sql.= " AND '".$this->db->idate(dol_get_last_day($this->year,$this->month,false))."'";
$sql.= " AND a.entity = ".$conf->entity;
$sql.= " ORDER BY a.datep DESC"; $sql.= " ORDER BY a.datep DESC";
$eventstatic=new ActionComm($this->db); $eventstatic=new ActionComm($this->db);

View File

@ -0,0 +1,219 @@
<?php
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
/**
* \file htdocs/core/modules/security/generate/modGeneratePassPerso.class.php
* \ingroup core
* \brief File to manage no password generation.
*/
require_once DOL_DOCUMENT_ROOT .'/core/modules/security/generate/modules_genpassword.php';
/**
* \class modGeneratePassPerso
* \brief Class to generate a password according to personal rules
*/
class modGeneratePassPerso extends ModeleGenPassword
{
var $id;
var $length;
var $length2; // didn't overright display
var $NbMaj;
var $NbNum;
var $NbSpe;
var $NbRepeat;
var $WithoutAmbi;
var $db;
var $conf;
var $lang;
var $user;
var $Maj;
var $Min;
var $Nb;
var $Spe;
var $Ambi;
var $All;
/**
* Constructor
*
* @param DoliDB $db Database handler
* @param Conf $conf Handler de conf
* @param Translate $langs Handler de langue
* @param User $user Handler du user connecte
*/
function __construct($db, $conf, $langs, $user)
{
$this->id = "Perso";
$this->length = $langs->trans("SetupPerso");
$this->db=$db;
$this->conf=$conf;
$this->langs=$langs;
$this->user=$user;
if(empty($conf->global->USER_PASSWORD_PATTERN)){
// default value (8carac, 1maj, 1digit, 1spe, 3 repeat, no ambi at auto generation.
dolibarr_set_const($db, "USER_PASSWORD_PATTERN", '8;1;1;1;3;1','chaine',0,'',$conf->entity);
}
$this->Maj = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$this->Min = strtolower($this->Maj);
$this->Nb = "0123456789";
$this->Spe = "!@#$%&*()_-+={}[]\\|:;'/";
$this->Ambi = array("1","I","l","|","O","0");
$tabConf = explode(";",$conf->global->USER_PASSWORD_PATTERN);
$this->length2 = $tabConf[0];
$this->NbMaj = $tabConf[1];
$this->NbNum = $tabConf[2];
$this->NbSpe = $tabConf[3];
$this->NbRepeat = $tabConf[4];
$this->WithoutAmbi = $tabConf[5];
if ($this->WithoutAmbi)
{
$this->Maj = str_replace($this->Ambi,"",$this->Maj);
$this->Min = str_replace($this->Ambi,"",$this->Min);
$this->Nb = str_replace($this->Ambi,"",$this->Nb);
$this->Spe = str_replace($this->Ambi,"",$this->Spe);
}
$this->All = str_shuffle($this->Maj. $this->Min. $this->Nb. $this->Spe);
//$this->All = $this->Maj. $this->Min. $this->Nb. $this->Spe;
//$this->All = $this->Spe;
}
/**
* Return description of module
*
* @return string Description of text
*/
function getDescription()
{
global $langs;
return $langs->trans("PasswordGenerationPerso");
}
/**
* Return an example of password generated by this module
*
* @return string Example of password
*/
function getExample()
{
return $this->getNewGeneratedPassword();
}
/**
* Build new password
*
* @return string Return a new generated password
*/
function getNewGeneratedPassword()
{
$pass = "";
for($i=0; $i<$this->NbMaj; $i++){ // Y
$pass .= $this->Maj[rand(0,strlen($this->Maj) - 1)];
}
for($i=0; $i<$this->NbNum; $i++){ // X
$pass .= $this->Nb[rand(0,strlen($this->Nb) - 1)];
}
for($i=0; $i<$this->NbSpe; $i++){ // @
$pass .= $this->Spe[rand(0,strlen($this->Spe) - 1)];
}
for($i=strlen($pass);$i<$this->length2; $i++){ // y
$pass .= $this->All[rand(0,strlen($this->All) -1)];
}
$pass = str_shuffle($pass);
if ($this->validatePassword($pass))
{
return $pass;
}
return $this->getNewGeneratedPassword();
}
/**
* Validate a password
*
* @param string $password Password to check
* @return int 0 if KO, >0 if OK
*/
function validatePassword($password)
{
$password_a = str_split($password);
$maj = str_split($this->Maj);
$num = str_split($this->Nb);
$spe = str_split($this->Spe);
if(count(array_intersect($password_a, $maj)) < $this->NbMaj){
return 0;
}
if(count(array_intersect($password_a, $num)) < $this->NbNum){
return 0;
}
if(count(array_intersect($password_a, $spe)) < $this->NbSpe){
return 0;
}
if(!$this->consecutiveInterationSameCharacter($password)){
return 0;
}
return 1;
}
/**
* consecutive iterations of the same character
*
* @param string $password Password to check
* @return int 0 if KO, >0 if OK
*/
function consecutiveInterationSameCharacter($password){
$last = "";
$count = 0;
$char = str_split($password);
foreach($char as $c){
if($c != $last){
$last = $c;
$count = 0;
}else{
$count++;
}
if($count >= $this->NbRepeat) {
return 0;
}
}
return 1;
}
}

View File

@ -0,0 +1,21 @@
(The MIT License)
Copyright (c) 2012-2014 Zhixin Wen <wenzhixin2010@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -0,0 +1,96 @@
# Multiple Select
Multiple select is a jQuery plugin to select multiple elements with checkboxes :).
To get started checkout examples and documentation at http://wenzhixin.net.cn/p/multiple-select
## Contributors
Multiple select is due to the excellent work of the following contributors:
<table>
<tbody>
<tr><th align="left">文翼</th><td><a href="https://github.com/wenzhixin">GitHub/wenzhixin</a></td></tr>
<tr><th align="left">Gaurav Jassal</th><td><a href="https://github.com/creativeaura">GitHub/creativeaura</a></td><</tr>
<tr><th align="left">guli</th><td><a href="https://github.com/guli">GitHub/guli</a></td></tr>
<tr><th align="left">jwheadon</th><td><a href="https://github.com/jwheadon">GitHub/jwheadon</a></td></tr>
<tr><th align="left">yx</th><td><a href="https://github.com/qqfish">GitHub/qqfish</a></td></tr>
<tr><th align="left">Tobias Macey</th><td><a href="https://github.com/blarghmatey">GitHub/blarghmatey</a></td></tr>
<tr><th align="left">Jona Goldman</th><td><a href="https://github.com/jonagoldman">GitHub/jonagoldman</a></td></tr>
<tr><th align="left">Alex Jeffrey</th><td><a href="https://github.com/ajeffrey">GitHub/ajeffrey</a></td></tr>
</tbody>
</table>
## Changelog
### 1.1.0
* Fix #63: Add ```keepOpen``` option.
* Fix #62: Fix ```isOpen``` and ```filter``` options are both true bug.
* Fix #57: Fire onCheckAll event when literally select.
* Add data attributes for support.
* Fix #55: Add ```name``` option.
### 1.0.9
* Fix #42: Add ```styler``` option to custom item style.
* Fix firefox click bug.
* Add ```allSelected```, ```minumimCountSelected``` and ```countSelected``` options.
* Fix #35: Add ```onFocus``` and ```onBlur``` events.
* Fix #25: Add ```focus``` and ```blur``` methods.
* Fix #31: Trigger the onCheckAll & onUncheckAll events when use filter to select all.
### 1.0.8
* Update the license to The MIT License.
* Fix #47: Add ```No matches found``` message when there are no results found.
* Fix #43: Add ```position``` option.
### 1.0.7
* Fix #44: The filters not working bugs.
### 1.0.6
* Fix #21: Add ```single``` option.
* Add ```override``` option.
* Add ```container``` option.
* Fix #29: Update the optgroups select text.
* Fix #30: Image is not shown in Firefox 25.0.1.
* Fix #22: fix group filter problem.
### 1.0.5
* Update the button text witdh.
* Add keyboard support.
### 1.0.4
* Fix #12: Add ```width``` option.
* Fix #11: Add callback events.
* Add ```maxHeight``` option.
### 1.0.3
* Fix #4: Add ```filter``` option.
* Support mobile devices.
* Fix #6: Add ```refresh``` method.
### 1.0.2
* Fix #7: Add ```selected``` and ```disabled``` options.
* Fix #5: Add ```checkAll``` and ```uncheckAll``` methods.
### 1.0.1
* Fix #3: Add optgroups support.
* Add ```placeholder``` option.
* Fix #2: use prop method instead of attr.
### 1.0.0
* Initial release
## LICENSE
[The MIT License](https://github.com/wenzhixin/multiple-select/blob/master/LICENSE)

View File

@ -0,0 +1,466 @@
/**
* @author zhixin wen <wenzhixin2010@gmail.com>
* @version 1.1.0
*
* http://wenzhixin.net.cn/p/multiple-select/
*/
(function($) {
'use strict';
function MultipleSelect($el, options) {
var that = this,
name = $el.attr('name') || options.name || '',
elWidth = $el.width();
this.$el = $el.hide();
this.options = options;
this.$parent = $('<div class="ms-parent"></div>');
this.$choice = $('<button type="button" class="ms-choice"><span class="placeholder">' +
options.placeholder + '</span><div></div></button>');
this.$drop = $('<div class="ms-drop ' + options.position + '"></div>');
this.$el.after(this.$parent);
this.$parent.append(this.$choice);
this.$parent.append(this.$drop);
if (this.$el.prop('disabled')) {
this.$choice.addClass('disabled');
}
this.$choice.css('width', elWidth + 'px');
this.$drop.css({
width: (options.width || elWidth) + 'px'
});
if (!this.options.keepOpen) {
$('body').click(function(e) {
if ($(e.target)[0] === that.$choice[0] ||
$(e.target).parents('.ms-choice')[0] === that.$choice[0]) {
return;
}
if (($(e.target)[0] === that.$drop[0] ||
$(e.target).parents('.ms-drop')[0] !== that.$drop[0]) &&
that.options.isOpen) {
that.close();
}
});
}
this.selectAllName = 'name="selectAll' + name + '"';
this.selectGroupName = 'name="selectGroup' + name + '"';
this.selectItemName = 'name="selectItem' + name + '"';
}
MultipleSelect.prototype = {
constructor : MultipleSelect,
init: function() {
var that = this,
html = [];
if (this.options.filter) {
html.push(
'<div class="ms-search">',
'<input type="text" autocomplete="off" autocorrect="off" autocapitilize="off" spellcheck="false">',
'</div>'
);
}
html.push('<ul>');
if (this.options.selectAll && !this.options.single) {
html.push(
'<li>',
'<label>',
'<input type="checkbox" ' + this.selectAllName + ' /> ',
'[' + this.options.selectAllText + ']',
'</label>',
'</li>'
);
}
$.each(this.$el.children(), function(i, elm) {
html.push(that.optionToHtml(i, elm));
});
html.push('<li class="ms-no-results">No matches found</li>');
html.push('</ul>');
this.$drop.html(html.join(''));
this.$drop.find('ul').css('max-height', this.options.maxHeight + 'px');
this.$drop.find('.multiple').css('width', this.options.multipleWidth + 'px');
this.$searchInput = this.$drop.find('.ms-search input');
this.$selectAll = this.$drop.find('input[' + this.selectAllName + ']');
this.$selectGroups = this.$drop.find('input[' + this.selectGroupName + ']');
this.$selectItems = this.$drop.find('input[' + this.selectItemName + ']:enabled');
this.$disableItems = this.$drop.find('input[' + this.selectItemName + ']:disabled');
this.$noResults = this.$drop.find('.ms-no-results');
this.events();
this.update();
if (this.options.isOpen) {
this.open();
}
},
optionToHtml: function(i, elm, group, groupDisabled) {
var that = this,
$elm = $(elm),
html = [],
multiple = this.options.multiple,
disabled,
type = this.options.single ? 'radio' : 'checkbox';
if ($elm.is('option')) {
var value = $elm.val(),
text = $elm.text(),
selected = $elm.prop('selected'),
style = this.options.styler(value) ? ' style="' + this.options.styler(value) + '"' : '';
disabled = groupDisabled || $elm.prop('disabled');
html.push(
'<li' + (multiple ? ' class="multiple"' : '') + style + '>',
'<label' + (disabled ? ' class="disabled"' : '') + '>',
'<input type="' + type + '" ' + this.selectItemName + ' value="' + value + '"' +
(selected ? ' checked="checked"' : '') +
(disabled ? ' disabled="disabled"' : '') +
(group ? ' data-group="' + group + '"' : '') +
'/> ',
text,
'</label>',
'</li>'
);
} else if (!group && $elm.is('optgroup')) {
var _group = 'group_' + i,
label = $elm.attr('label');
disabled = $elm.prop('disabled');
html.push(
'<li class="group">',
'<label class="optgroup' + (disabled ? ' disabled' : '') + '" data-group="' + _group + '">',
'<input type="checkbox" ' + this.selectGroupName +
(disabled ? ' disabled="disabled"' : '') + ' /> ',
label,
'</label>',
'</li>');
$.each($elm.children(), function(i, elm) {
html.push(that.optionToHtml(i, elm, _group, disabled));
});
}
return html.join('');
},
events: function() {
var that = this;
this.$choice.off('click').on('click', function(e) {
e.preventDefault();
that[that.options.isOpen ? 'close' : 'open']();
})
.off('focus').on('focus', this.options.onFocus)
.off('blur').on('blur', this.options.onBlur);
this.$parent.off('keydown').on('keydown', function(e) {
switch (e.which) {
case 27: // esc key
that.close();
that.$choice.focus();
break;
}
});
this.$searchInput.off('keyup').on('keyup', function() {
that.filter();
});
this.$selectAll.off('click').on('click', function() {
var checked = $(this).prop('checked'),
$items = that.$selectItems.filter(':visible');
if ($items.length === that.$selectItems.length) {
that[checked ? 'checkAll' : 'uncheckAll']();
} else { // when the filter option is true
that.$selectGroups.prop('checked', checked);
$items.prop('checked', checked);
that.options[checked ? 'onCheckAll' : 'onUncheckAll']();
that.update();
}
});
this.$selectGroups.off('click').on('click', function() {
var group = $(this).parent().attr('data-group'),
$items = that.$selectItems.filter(':visible'),
$children = $items.filter('[data-group="' + group + '"]'),
checked = $children.length !== $children.filter(':checked').length;
$children.prop('checked', checked);
that.updateSelectAll();
that.update();
that.options.onOptgroupClick({
label: $(this).parent().text(),
checked: checked,
children: $children.get()
});
});
this.$selectItems.off('click').on('click', function() {
that.updateSelectAll();
that.update();
that.updateOptGroupSelect();
that.options.onClick({
label: $(this).parent().text(),
value: $(this).val(),
checked: $(this).prop('checked')
});
});
},
open: function() {
if (this.$choice.hasClass('disabled')) {
return;
}
this.options.isOpen = true;
this.$choice.find('>div').addClass('open');
this.$drop.show();
if (this.options.container) {
var offset = this.$drop.offset();
this.$drop.appendTo($(this.options.container));
this.$drop.offset({ top: offset.top, left: offset.left });
}
if (this.options.filter) {
this.$searchInput.val('');
this.filter();
}
this.options.onOpen();
},
close: function() {
this.options.isOpen = false;
this.$choice.find('>div').removeClass('open');
this.$drop.hide();
if (this.options.container) {
this.$parent.append(this.$drop);
this.$drop.css({
'top': 'auto',
'left': 'auto'
})
}
this.options.onClose();
},
update: function() {
var selects = this.getSelects('text'),
$span = this.$choice.find('>span');
if (selects.length === this.$selectItems.length + this.$disableItems.length && this.options.allSelected) {
$span.removeClass('placeholder').html(this.options.allSelected);
} else if (selects.length > this.options.minumimCountSelected && this.options.countSelected) {
$span.removeClass('placeholder').html(this.options.countSelected
.replace('#', selects.length)
.replace('%', this.$selectItems.length + this.$disableItems.length));
} else if (selects.length) {
$span.removeClass('placeholder').html(selects.join(', '));
} else {
$span.addClass('placeholder').html(this.options.placeholder);
}
// set selects to select
this.$el.val(this.getSelects());
},
updateSelectAll: function() {
var $items = this.$selectItems.filter(':visible');
this.$selectAll.prop('checked', $items.length &&
$items.length === $items.filter(':checked').length);
if (this.$selectAll.prop('checked')) {
this.options.onCheckAll();
}
},
updateOptGroupSelect: function() {
var $items = this.$selectItems.filter(':visible');
$.each(this.$selectGroups, function(i, val) {
var group = $(val).parent().attr('data-group'),
$children = $items.filter('[data-group="' + group + '"]');
$(val).prop('checked', $children.length &&
$children.length === $children.filter(':checked').length);
});
},
//value or text, default: 'value'
getSelects: function(type) {
var that = this,
texts = [],
values = [];
this.$drop.find('input[' + this.selectItemName + ']:checked').each(function() {
texts.push($(this).parent().text());
values.push($(this).val());
});
if (type === 'text' && this.$selectGroups.length) {
texts = [];
this.$selectGroups.each(function() {
var html = [],
text = $.trim($(this).parent().text()),
group = $(this).parent().data('group'),
$children = that.$drop.find('[' + that.selectItemName + '][data-group="' + group + '"]'),
$selected = $children.filter(':checked');
if ($selected.length === 0) {
return;
}
html.push('[');
html.push(text);
if ($children.length > $selected.length) {
var list = [];
$selected.each(function() {
list.push($(this).parent().text());
});
html.push(': ' + list.join(', '));
}
html.push(']');
texts.push(html.join(''));
});
}
return type === 'text' ? texts : values;
},
setSelects: function(values) {
var that = this;
this.$selectItems.prop('checked', false);
$.each(values, function(i, value) {
that.$selectItems.filter('[value="' + value + '"]').prop('checked', true);
});
this.$selectAll.prop('checked', this.$selectItems.length ===
this.$selectItems.filter(':checked').length);
this.update();
},
enable: function() {
this.$choice.removeClass('disabled');
},
disable: function() {
this.$choice.addClass('disabled');
},
checkAll: function() {
this.$selectItems.prop('checked', true);
this.$selectGroups.prop('checked', true);
this.$selectAll.prop('checked', true);
this.update();
this.options.onCheckAll();
},
uncheckAll: function() {
this.$selectItems.prop('checked', false);
this.$selectGroups.prop('checked', false);
this.$selectAll.prop('checked', false);
this.update();
this.options.onUncheckAll();
},
focus: function() {
this.$choice.focus();
this.options.onFocus();
},
blur: function() {
this.$choice.blur();
this.options.onBlur();
},
refresh: function() {
this.init();
},
filter: function() {
var that = this,
text = $.trim(this.$searchInput.val()).toLowerCase();
if (text.length === 0) {
this.$selectItems.parent().show();
this.$disableItems.parent().show();
this.$selectGroups.parent().show();
} else {
this.$selectItems.each(function() {
var $parent = $(this).parent();
$parent[$parent.text().toLowerCase().indexOf(text) < 0 ? 'hide' : 'show']();
});
this.$disableItems.parent().hide();
this.$selectGroups.each(function() {
var $parent = $(this).parent();
var group = $parent.attr('data-group'),
$items = that.$selectItems.filter(':visible');
$parent[$items.filter('[data-group="' + group + '"]').length === 0 ? 'hide' : 'show']();
});
//Check if no matches found
if (this.$selectItems.filter(':visible').length) {
this.$selectAll.parent().show();
this.$noResults.hide();
} else {
this.$selectAll.parent().hide();
this.$noResults.show();
}
}
this.updateOptGroupSelect();
this.updateSelectAll();
}
};
$.fn.multipleSelect = function() {
var option = arguments[0],
args = arguments,
value,
allowedMethods = [
'getSelects', 'setSelects',
'enable', 'disable',
'checkAll', 'uncheckAll',
'focus', 'blur',
'refresh'
];
this.each(function() {
var $this = $(this),
data = $this.data('multipleSelect'),
options = $.extend({}, $.fn.multipleSelect.defaults,
$this.data(), typeof option === 'object' && option);
if (!data) {
data = new MultipleSelect($this, options);
$this.data('multipleSelect', data);
}
if (typeof option === 'string') {
if ($.inArray(option, allowedMethods) < 0) {
throw "Unknown method: " + option;
}
value = data[option](args[1]);
} else {
data.init();
}
});
return value ? value : this;
};
$.fn.multipleSelect.defaults = {
name: '',
isOpen: false,
placeholder: '',
selectAll: true,
selectAllText: 'Select all',
allSelected: 'All selected',
minumimCountSelected: 3,
countSelected: '# of % selected',
multiple: false,
multipleWidth: 80,
single: false,
filter: false,
width: undefined,
maxHeight: 250,
container: null,
position: 'bottom',
keepOpen: false,
styler: function() {return false;},
onOpen: function() {return false;},
onClose: function() {return false;},
onCheckAll: function() {return false;},
onUncheckAll: function() {return false;},
onFocus: function() {return false;},
onBlur: function() {return false;},
onOptgroupClick: function() {return false;},
onClick: function() {return false;}
};
})(jQuery);

View File

@ -0,0 +1,183 @@
/**
* @author zhixin wen <wenzhixin2010@gmail.com>
*/
.ms-parent {
display: inline-block;
position: relative;
vertical-align: middle;
}
.ms-choice {
display: block;
height: 26px;
padding: 0;
overflow: hidden;
cursor: pointer;
border: 1px solid #aaa;
text-align: left;
white-space: nowrap;
line-height: 26px;
color: #444;
text-decoration: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background-color: #fff;
}
.ms-choice.disabled {
background-color: #f4f4f4;
background-image: none;
border: 1px solid #ddd;
cursor: default;
}
.ms-choice > span {
position: absolute;
top: 0;
left: 0;
right: 20px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
padding-left: 8px;
}
.ms-choice > span.placeholder {
color: #999;
}
.ms-choice > div {
position: absolute;
top: 0;
right: 0;
width: 20px;
height: 25px;
background: url('multiple-select.png') right top no-repeat;
}
.ms-choice > div.open {
background: url('multiple-select.png') left top no-repeat;
}
.ms-drop {
overflow: hidden;
display: none;
margin-top: -1px;
padding: 0;
position: absolute;
z-index: 1000;
background: #fff;
color: #000;
border: 1px solid #aaa;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.ms-drop.bottom {
top: 100%;
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
-moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
}
.ms-drop.top {
bottom: 100%;
-webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
-moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
}
.ms-search {
display: inline-block;
margin: 0;
min-height: 26px;
padding: 4px;
position: relative;
white-space: nowrap;
width: 100%;
z-index: 10000;
}
.ms-search input {
width: 100%;
height: auto !important;
min-height: 24px;
padding: 0 20px 0 5px;
margin: 0;
outline: 0;
font-family: sans-serif;
font-size: 1em;
border: 1px solid #aaa;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background: #fff url('multiple-select.png') no-repeat 100% -22px;
background: url('multiple-select.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
background: url('multiple-select.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
background: url('multiple-select.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
background: url('multiple-select.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
background: url('multiple-select.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
background: url('multiple-select.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
}
.ms-search, .ms-search input {
-webkit-box-sizing: border-box;
-khtml-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
}
.ms-drop ul {
overflow: auto;
margin: 0;
padding: 5px 8px;
}
.ms-drop ul > li {
list-style: none;
display: list-item;
background-image: none;
position: static;
}
.ms-drop ul > li .disabled {
opacity: .35;
filter: Alpha(Opacity=35);
}
.ms-drop ul > li.multiple {
display: block;
float: left;
}
.ms-drop ul > li.group {
clear: both;
}
.ms-drop ul > li.multiple label {
width: 100%;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ms-drop ul > li label.optgroup {
font-weight: bold;
}
.ms-drop input[type="checkbox"] {
vertical-align: middle;
}
.ms-drop .ms-no-results {
display: none;
}

View File

@ -0,0 +1,28 @@
{
"name": "multiple-select",
"version": "1.1.0",
"title": "Multiple Select",
"description": "Multiple select is a jQuery plugin to select multiple elements with checkboxes :).",
"author": {
"name": "zhixin wen",
"email": "wenzhixin2010@gmail.com",
"url": "http://wenzhixin.net.cn/"
},
"licenses": [
{
"type": "MIT License",
"url": "http://opensource.org/licenses/MIT"
}
],
"dependencies": {
"jquery": ">=1.7"
},
"keywords": ["multiple.select", "select.list", "multiple.choose", "checkbox"],
"homepage": "http://wenzhixin.net.cn/p/multiple-select/",
"demo": "http://wenzhixin.net.cn/p/multiple-select/#examples",
"bugs": {
"url": "https://github.com/wenzhixin/multiple-select/issues"
},
"docs": "http://wenzhixin.net.cn/p/multiple-select/#documentation",
"download": "https://github.com/wenzhixin/multiple-select/archive/master.zip"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1,20 +0,0 @@
Copyright (c) 2009 Michael Aufreiter, http://www.quasipartikel.at
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,31 +0,0 @@
/* Multiselect
----------------------------------*/
.ui-multiselect { border: solid 1px; font-size: 0.8em; }
.ui-multiselect ul { -moz-user-select: none; }
.ui-multiselect li { margin: 0; padding: 0; cursor: default; line-height: 20px; height: 20px; font-size: 11px; list-style: none; padding-right: 18px; overflow: hidden; }
.ui-multiselect li a { color: #999; text-decoration: none; padding: 0; display: block; float: left; cursor: pointer;}
.ui-multiselect li.ui-draggable-dragging { padding-left: 10px; }
.ui-multiselect div.selected { position: relative; padding: 0; margin: 0; border: 0; float:left; }
.ui-multiselect ul.selected { position: relative; padding: 0; overflow: auto; overflow-x: hidden; background: #fff; margin: 0; list-style: none; border: 0; position: relative; width: 100%; }
.ui-multiselect div.available { position: relative; padding: 0; margin: 0; border: 0; float:left; }
.ui-multiselect ul.available { position: relative; padding: 0; overflow: auto; overflow-x: hidden; background: #fff; margin: 0; list-style: none; border: 0; width: 100%; }
.ui-multiselect ul.available li { padding-left: 10px; }
.ui-multiselect div.right-column { border-left: 1px solid; }
.ui-multiselect .ui-state-default { border: none; margin-bottom: 1px; position: relative; padding-left: 20px;}
.ui-multiselect .ui-state-hover { border: none; }
.ui-multiselect .ui-widget-header {border: none; font-size: 11px; margin-bottom: 1px;}
.ui-multiselect .add-all { float: right; padding: 7px;}
.ui-multiselect .remove-all { float: right; padding: 7px;}
.ui-multiselect .search { float: left; padding: 4px;}
.ui-multiselect .count { float: left; padding: 7px;}
.ui-multiselect li span.ui-icon-arrowthick-2-n-s { position: absolute; left: 2px; }
.ui-multiselect li a.action { position: absolute; right: 2px; top: 2px; }
.ui-multiselect input.search { height: 14px; padding: 1px; opacity: 0.5; margin: 4px; width: 100px; }

View File

@ -1,480 +0,0 @@
/*
* jQuery UI Multiselect
*
* Authors:
* Michael Aufreiter (quasipartikel.at)
* Yanick Rochon (yanick.rochon[at]gmail[dot]com)
*
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://www.quasipartikel.at/multiselect/
*
*
* Depends:
* ui.core.js
* ui.sortable.js
*
* Optional:
* localization (http://plugins.jquery.com/project/localisation)
* scrollTo (http://plugins.jquery.com/project/ScrollTo)
*
* Todo:
* Make batch actions faster
* Implement dynamic insertion through remote calls
*/
(function($) {
$.widget("ui.multiselect", {
options: {
sortable: true,
dragToAdd: true,
searchable: true,
doubleClickable: true,
animated: 'fast',
show: 'slideDown',
hide: 'slideUp',
dividerLocation: 0.6,
selectedContainerOnLeft: true,
width: null,
height: null,
nodeComparator: function(node1,node2) {
var text1 = node1.text(),
text2 = node2.text();
return text1 == text2 ? 0 : (text1 < text2 ? -1 : 1);
},
includeRemoveAll: true,
includeAddAll: true,
pressEnterKeyToAddAll: false
},
_create: function() {
this.element.hide();
this.id = this.element.attr("id");
this.container = $('<div class="ui-multiselect ui-helper-clearfix ui-widget"></div>').insertAfter(this.element);
this.count = 0; // number of currently selected options
this.selectedContainer = $('<div class="selected"></div>');
if (this.options.selectedContainerOnLeft) {
this.selectedContainer.appendTo(this.container);
this.availableContainer = $('<div class="available"></div>').appendTo(this.container);
this.availableContainer.addClass('right-column');
}
else
{
this.availableContainer = $('<div class="available"></div>').appendTo(this.container);
this.selectedContainer.appendTo(this.container);
this.selectedContainer.addClass('right-column');
}
this.selectedActions = $('<div class="actions ui-widget-header ui-helper-clearfix"><span class="count">0 '+$.ui.multiselect.locale.itemsCount+'</span>'+(this.options.includeRemoveAll?'<a href="#" class="remove-all">'+$.ui.multiselect.locale.removeAll+'</a>':'<span class="remove-all">&nbsp;</span>')+'</div>').appendTo(this.selectedContainer);
this.availableActions = $('<div class="actions ui-widget-header ui-helper-clearfix"><input type="text" class="search empty ui-widget-content ui-corner-all"/>'+(this.options.includeAddAll?'<a href="#" class="add-all">'+$.ui.multiselect.locale.addAll+'</a>':'<span class="add-all">&nbsp;</span>')+'</div>').appendTo(this.availableContainer);
this.selectedList = $('<ul class="selected connected-list"><li class="ui-helper-hidden-accessible"></li></ul>').bind('selectstart', function(){return false;}).appendTo(this.selectedContainer);
this.availableList = $('<ul class="available connected-list"><li class="ui-helper-hidden-accessible"></li></ul>').bind('selectstart', function(){return false;}).appendTo(this.availableContainer);
var that = this;
var width = this.options.width;
if (!width) {
width = this.element.width();
}
var height = this.options.height;
if (!height) {
height = this.element.height();
}
// set dimensions
this.container.width(width-2);
if (this.options.selectedContainerOnLeft) {
this.selectedContainer.width(Math.floor(width*this.options.dividerLocation)-1);
this.availableContainer.width(Math.floor(width*(1-this.options.dividerLocation))-2);
}
else
{
this.selectedContainer.width(Math.floor(width*this.options.dividerLocation)-2);
this.availableContainer.width(Math.floor(width*(1-this.options.dividerLocation))-1);
}
// fix list height to match <option> depending on their individual header's heights
this.selectedList.height(Math.max(height-this.selectedActions.height(),1));
this.availableList.height(Math.max(height-this.availableActions.height(),1));
if ( !this.options.animated ) {
this.options.show = 'show';
this.options.hide = 'hide';
}
// init lists
this._populateLists(this.element.find('option'));
// make selection sortable
if (this.options.sortable) {
this.selectedList.sortable({
placeholder: 'ui-state-highlight',
axis: 'y',
update: function(event, ui) {
// apply the new sort order to the original selectbox
that.selectedList.find('li').each(function() {
if ($(this).data('optionLink'))
$(this).data('optionLink').remove().appendTo(that.element);
});
},
beforeStop: function (event, ui) {
// This lets us recognize which item was just added to
// the list in receive, per the workaround for not being
// able to reference the new element.
ui.item.addClass('dropped');
},
receive: function(event, ui) {
ui.item.data('optionLink').attr('selected', true);
// increment count
that.count += 1;
that._updateCount();
// workaround, because there's no way to reference
// the new element, see http://dev.jqueryui.com/ticket/4303
that.selectedList.children('.dropped').each(function() {
$(this).removeClass('dropped');
$(this).data('optionLink', ui.item.data('optionLink'));
$(this).data('idx', ui.item.data('idx'));
that._applyItemState($(this), true);
});
// workaround according to http://dev.jqueryui.com/ticket/4088
setTimeout(function() { ui.item.remove(); }, 1);
},
stop: function (event, ui) { that.element.change(); }
});
}
// set up livesearch
if (this.options.searchable) {
this._registerSearchEvents(this.availableContainer.find('input.search'));
} else {
$('.search').hide();
}
// batch actions
this.container.find(".remove-all").click(function() {
that._populateLists(that.element.find('option').removeAttr('selected'));
that.element.trigger('change');
return false;
});
this.container.find(".add-all").click(function() {
var options = that.element.find('option').not(":selected");
if (that.availableList.children('li:hidden').length > 1) {
that.availableList.children('li').each(function(i) {
if ($(this).is(":visible")) $(options[i-1]).attr('selected', 'selected');
});
} else {
options.attr('selected', 'selected');
}
that._populateLists(that.element.find('option'));
that.element.trigger('change');
if (that.options.pressEnterKeyToAddAll) {
//clear input after add all
$('input.search').val("");
}
return false;
});
},
destroy: function() {
this.element.show();
this.container.remove();
$.Widget.prototype.destroy.apply(this, arguments);
},
addOption: function(option) {
// Append the option
option = $(option);
var select = this.element;
select.append(option);
var item = this._getOptionNode(option).appendTo(option.attr('selected') ? this.selectedList : this.availableList).show();
if (option.attr('selected')) {
this.count += 1;
}
this._applyItemState(item, option.attr('selected'));
item.data('idx', this.count);
// update count
this._updateCount();
this._filter.apply(this.availableContainer.find('input.search'), [this.availableList]);
},
// Redisplay the lists of selected/available options.
// Call this after you've selected/unselected some options programmatically.
// GRIPE This is O(n) where n is the length of the list - seems like
// there must be a smarter way of doing this, but I have not been able
// to come up with one. I see no way to detect programmatic setting of
// the option's selected property, and without that, it seems like we
// can't have a general-case listener that does its thing every time an
// option is selected.
refresh: function() {
// Redisplay our lists.
this._populateLists(this.element.find('option'));
},
_populateLists: function(options) {
this.selectedList.children('.ui-element').remove();
this.availableList.children('.ui-element').remove();
this.count = 0;
var that = this;
var groups = $(this.element).find("optgroup").map(function(i) {
return that._getOptionGroup($(this));
});
groups.appendTo(this.selectedList.add(this.availableList));
var items = $(options.map(function(i) {
var item = that._getOptionNode(this).appendTo(that._getOptionList(this)).show();
if (this.selected) that.count += 1;
that._applyItemState(item, this.selected);
item.data('idx', i);
return item[0];
}));
// update count
this._updateCount();
that._filter.apply(this.availableContainer.find('input.search'), [that.availableList]);
},
_getOptionList: function(option) {
var selected = option.selected;
option = $(option);
var $list = selected ? this.selectedList : this.availableList;
var $group = option.closest("optgroup");
if ($group.length === 0) {
return $list;
} else {
var $groupList = $list.find("ul[title='" + $group.attr("label") + "']");
if ($groupList.length === 0) {
$groupList = $("<ul class='ui-state-default ui-element available' title='" + $group.attr("label") + "'>" + $group.attr("label") + "</ul>").appendTo($list);
}
$groupList.show();
return $groupList;
}
},
_getOptionGroup : function(optgroup) {
var groupNode = $("<ul class='ui-state-default ui-element available' title='" + optgroup.attr("label") + "'>" + optgroup.attr("label") + "</ul>").hide();
return groupNode[0];
},
_updateCount: function() {
this.selectedContainer.find('span.count').text(this.count+" "+$.ui.multiselect.locale.itemsCount);
},
_getOptionNode: function(option) {
option = $(option);
var node = $('<li class="ui-state-default ui-element" title="'+option.text()+'"><span class="ui-icon"/>'+option.text()+'<a href="#" class="action"><span class="ui-corner-all ui-icon"/></a></li>').hide();
node.data('optionLink', option);
return node;
},
// clones an item with associated data
// didn't find a smarter away around this
_cloneWithData: function(clonee) {
var clone = clonee.clone(false,false);
clone.data('optionLink', clonee.data('optionLink'));
clone.data('idx', clonee.data('idx'));
return clone;
},
_setSelected: function(item, selected) {
var temp = item.data('optionLink').attr('selected', selected);
var parent = temp.parent();
temp.detach().appendTo(parent);
this.element.trigger('change');
if (selected) {
var selectedItem = this._cloneWithData(item);
item[this.options.hide](this.options.animated, function() {
if (item.siblings().length === 0) {
item.closest("ul[title]").hide();
}
$(this).remove();
});
// get group to add it to...
var $list = this._getOptionList(selectedItem.data("optionLink")[0]);
selectedItem.appendTo($list).hide()[this.options.show](this.options.animated);
this._applyItemState(selectedItem, true);
return selectedItem;
} else {
// look for successor based on initial option index
var items = this.availableList.find('li'), comparator = this.options.nodeComparator;
var succ = null, i = item.data('idx'), direction = comparator(item, $(items[i]));
// TODO: test needed for dynamic list populating
if ( direction ) {
while (i>=0 && i<items.length) {
direction > 0 ? i++ : i--;
if ( direction != comparator(item, $(items[i])) ) {
// going up, go back one item down, otherwise leave as is
succ = items[direction > 0 ? i : i+1];
var group1 = item.closest("ul[title]"),
group2 = $(succ).closest("ul[title]");
if (group1.length !== 0 && group2.length !== 0) {
if (group1.attr("title") !== group2.attr("title")) {
succ = null;
}
}
break;
}
}
} else {
succ = items[i];
}
var availableItem = this._cloneWithData(item);
var $list = this._getOptionList(availableItem.data("optionLink")[0]);
succ ? availableItem.insertBefore($(succ)) : availableItem.appendTo($list);
item[this.options.hide](this.options.animated, function() {
if (item.siblings().length === 0) {
item.closest("ul[title]").hide();
}
$(this).remove();
});
availableItem.hide()[this.options.show](this.options.animated);
this._applyItemState(availableItem, false);
return availableItem;
}
},
_applyItemState: function(item, selected) {
if (selected) {
if (this.options.sortable)
item.children('span').addClass('ui-icon-arrowthick-2-n-s').removeClass('ui-helper-hidden').addClass('ui-icon');
else
item.children('span').removeClass('ui-icon-arrowthick-2-n-s').addClass('ui-helper-hidden').removeClass('ui-icon');
item.find('a.action span').addClass('ui-icon-minus').removeClass('ui-icon-plus');
this._registerRemoveEvents(item.find('a.action'));
} else {
item.children('span').removeClass('ui-icon-arrowthick-2-n-s').addClass('ui-helper-hidden').removeClass('ui-icon');
item.find('a.action span').addClass('ui-icon-plus').removeClass('ui-icon-minus');
this._registerAddEvents(item.find('a.action'));
}
this._registerDoubleClickEvents(item);
this._registerHoverEvents(item);
},
// taken from John Resig's liveUpdate script
_filter: function(list) {
var input = $(this);
var rows = list.find('li'),
cache = rows.map(function(){
return $(this).text().toLowerCase();
});
var term = $.trim(input.val().toLowerCase()), scores = [];
if (!term) {
rows.show();
} else {
rows.hide();
cache.each(function(i) {
if (this.indexOf(term)>-1) { scores.push(i); }
});
$.each(scores, function() {
$(rows[this]).show();
});
}
},
_registerDoubleClickEvents: function(elements) {
if (!this.options.doubleClickable) return;
elements.dblclick(function() {
elements.find('a.action').click();
});
},
_registerHoverEvents: function(elements) {
elements.removeClass('ui-state-hover');
elements.mouseover(function() {
$(this).addClass('ui-state-hover');
});
elements.mouseout(function() {
$(this).removeClass('ui-state-hover');
});
},
_registerAddEvents: function(elements) {
var that = this;
elements.click(function() {
var item = that._setSelected($(this).parent(), true);
that.count += 1;
that._updateCount();
// Prevent extra clicks from triggering bogus add events, if a user
// tries clicking during the removal process.
$(this).unbind('click');
return false;
});
// make draggable
if (this.options.sortable && this.options.dragToAdd) {
elements.each(function() {
$(this).parent().draggable({
connectToSortable: that.selectedList,
helper: function() {
var selectedItem = that._cloneWithData($(this)).width($(this).width() - 50);
selectedItem.width($(this).width());
return selectedItem;
},
appendTo: that.container,
containment: that.container,
revert: 'invalid'
});
});
}
},
_registerRemoveEvents: function(elements) {
var that = this;
elements.click(function() {
that._setSelected($(this).parent(), false);
that.count -= 1;
that._updateCount();
// Prevent extra clicks from triggering bogus remove events, if a
// user tries clicking during the removal process.
$(this).unbind('click');
return false;
});
},
_registerSearchEvents: function(input) {
var that = this;
input.focus(function() {
$(this).addClass('ui-state-active');
})
.blur(function() {
$(this).removeClass('ui-state-active');
})
.keypress(function(e) {
if (e.keyCode == 13) {
if (that.options.pressEnterKeyToAddAll) {
//on Enter, if a filter is present add all, then clear the input
var str = $('input.search').val();
if (str !== undefined && str !== null && str !== "") {
$('a.add-all').click();
$('input.search').val("");
}
}
return false;
}
})
.keyup(function() {
that._filter.apply(this, [that.availableList]);
});
}
});
$.extend($.ui.multiselect, {
locale: {
addAll:'Add all',
removeAll:'Remove all',
itemsCount:'items selected'
}
});
})(jQuery);

View File

@ -610,6 +610,21 @@ IMG;
closedir($handle); closedir($handle);
} }
} }
/**
* return the value present on odt in [valuename][/valuename]
* @param string $value name balise in the template
* @return string the value inside the balise
*
*/
public function getvalue($valuename)
{
$searchreg="/\\[".$valuename."\\](.*)\\[\\/".$valuename."\\]/";
preg_match($searchreg, $this->contentXml, $matches);
$this->contentXml = preg_replace($searchreg, "", $this->contentXml);
return $matches[1];
}
} }
?> ?>

View File

@ -187,3 +187,20 @@ UPDATE llx_projet_task_time set task_datehour = task_date where task_datehour IS
-- update llx_facturedet set total_tva = total_ttc - total_ht where total_vat = 0; -- update llx_facturedet set total_tva = total_ttc - total_ht where total_vat = 0;
-- update llx_facture set total = round(total_ttc / 1.2, 5) where total_ht = total_ttc; -- update llx_facture set total = round(total_ttc / 1.2, 5) where total_ht = total_ttc;
-- update llx_facture set tva = total_ttc - total where tva = 0; -- update llx_facture set tva = total_ttc - total where tva = 0;
-- To insert elements into a category
-- Search idcategory: select rowid from llx_categorie where type=0 and ref like '%xxx%'
-- Select all products to include: select * from llx_product where ref like '%xxx%'
-- If ok, insert: insert into llx_categorie_product(fk_categorie, fk_product) select idcategory, rowid from llx_product where ref like '%xxx%'
-- List of product with a category xxx: select distinct cp.fk_product from llx_categorie_product as cp, llx_categorie as c where cp.fk_categorie = c.rowid and c.label like 'xxx-%' order by fk_product;
-- List of product into 2 categories xxx: select cp.fk_product, count(cp.fk_product) as nb from llx_categorie_product as cp, llx_categorie as c where cp.fk_categorie = c.rowid and c.label like 'xxx-%' group by fk_product having nb > 1;
-- List of product with no category xxx yet: select rowid, ref from llx_product where rowid not in (select distinct cp.fk_product from llx_categorie_product as cp, llx_categorie as c where cp.fk_categorie = c.rowid and c.label like 'xxx-%' order by fk_product);
-- Replace xxx with your IP Address
-- bind-address = xxx.xxx.xxx.xxx
-- CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypass';
-- CREATE USER 'myuser'@'%' IDENTIFIED BY 'mypass';
-- GRANT ALL ON *.* TO 'myuser'@'localhost';
-- GRANT ALL ON *.* TO 'myuser'@'%';
-- flush privileges;

View File

@ -3,6 +3,7 @@
-- Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com> -- Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
-- Copyright (C) 2010 Juanjo Menent <dolibarr@2byte.es> -- Copyright (C) 2010 Juanjo Menent <dolibarr@2byte.es>
-- Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
-- --
-- This program is free software; you can redistribute it and/or modify -- 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 -- it under the terms of the GNU General Public License as published by
@ -91,7 +92,7 @@ create table llx_societe
default_lang varchar(6), -- default language default_lang varchar(6), -- default language
logo varchar(255), logo varchar(255),
canvas varchar(32), -- type of canvas if used (null by default) canvas varchar(32), -- type of canvas if used (null by default)
import_key varchar(14) -- import key import_key varchar(14), -- import key
webservices_url varchar(255), -- supplier webservice url webservices_url varchar(255), -- supplier webservice url
webservices_key varchar(128), -- supplier webservice key webservices_key varchar(128) -- supplier webservice key
)ENGINE=innodb; )ENGINE=innodb;

View File

@ -367,6 +367,7 @@ ActionsOnCompany=Events about this third party
ActionsOnMember=Events about this member ActionsOnMember=Events about this member
NActions=%s events NActions=%s events
NActionsLate=%s late NActionsLate=%s late
RequestAlreadyDone=Request already recorded
Filter=Filter Filter=Filter
RemoveFilter=Remove filter RemoveFilter=Remove filter
ChartGenerated=Chart generated ChartGenerated=Chart generated

View File

@ -33,3 +33,5 @@ TitleResourceCard=Resource card
ConfirmDeleteResource=Confirm to delete this resource ConfirmDeleteResource=Confirm to delete this resource
RessourceSuccessfullyDeleted=Resource successfully deleted RessourceSuccessfullyDeleted=Resource successfully deleted
DictionaryResourceType=Type of resources DictionaryResourceType=Type of resources
SelectResource=Select resource

View File

@ -16,6 +16,7 @@ WithdrawedBills=Withdrawn invoices
WithdrawalsLines=Withdrawal lines WithdrawalsLines=Withdrawal lines
RequestStandingOrderToTreat=Request for standing orders to process RequestStandingOrderToTreat=Request for standing orders to process
RequestStandingOrderTreated=Request for standing orders processed RequestStandingOrderTreated=Request for standing orders processed
NotPossibleForThisStatusOfWithdrawReceiptORLine=Not yet possible. Withdraw status must be set to 'credited' before declaring reject on specific lines.
CustomersStandingOrders=Customer standing orders CustomersStandingOrders=Customer standing orders
CustomerStandingOrder=Customer standing order CustomerStandingOrder=Customer standing order
NbOfInvoiceToWithdraw=Nb. of invoice with withdraw request NbOfInvoiceToWithdraw=Nb. of invoice with withdraw request
@ -76,7 +77,7 @@ WithBankUsingRIB=For bank accounts using RIB
WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT
BankToReceiveWithdraw=Bank account to receive withdraws BankToReceiveWithdraw=Bank account to receive withdraws
CreditDate=Credit on CreditDate=Credit on
WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported)
ShowWithdraw=Show Withdraw ShowWithdraw=Show Withdraw
IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one withdrawal payment not yet processed, it won't be set as paid to allow prior withdrawal management. IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one withdrawal payment not yet processed, it won't be set as paid to allow prior withdrawal management.
DoStandingOrdersBeforePayments=This tab allows you to request a standing order. Once it is complete, you can type the payment to close the invoice. DoStandingOrdersBeforePayments=This tab allows you to request a standing order. Once it is complete, you can type the payment to close the invoice.

View File

@ -484,7 +484,7 @@ Module500Desc=Gestión de los gastos especiales como impuestos, gastos sociales,
Module510Name=Salarios Module510Name=Salarios
Module510Desc=Gestión de salarios y pagos Module510Desc=Gestión de salarios y pagos
Module600Name=Notificaciones Module600Name=Notificaciones
Module600Desc=Envío de notificaciones (por correo electrónico) sobre los eventos de trabajo Dolibarr Module600Desc=Envío de notificaciones por e-mail en algunos eventos de negocio de Dolibarr a contactos de terceros (configurado en cada tercero)
Module700Name=Donaciones Module700Name=Donaciones
Module700Desc=Gestión de donaciones Module700Desc=Gestión de donaciones
Module1200Name=Mantis Module1200Name=Mantis
@ -514,7 +514,7 @@ Module5000Name=Multi-empresa
Module5000Desc=Permite gestionar varias empresas Module5000Desc=Permite gestionar varias empresas
Module6000Name=Flujo de trabajo Module6000Name=Flujo de trabajo
Module6000Desc=Gestión del flujo de trabajo Module6000Desc=Gestión del flujo de trabajo
Module20000Name=Días libres Module20000Name=Quitar gestión de vacaciones
Module20000Desc=Gestión de los días libres de los empleados Module20000Desc=Gestión de los días libres de los empleados
Module39000Name=Lotes de productos Module39000Name=Lotes de productos
Module39000Desc=Gestión de lotes y fechas de caducidad y venta de los productos Module39000Desc=Gestión de lotes y fechas de caducidad y venta de los productos
@ -611,10 +611,11 @@ Permission162=Crear/modificar contratos de servicio
Permission163=Activar los servicios de un contrato Permission163=Activar los servicios de un contrato
Permission164=Desactivar los servicios de un contrato Permission164=Desactivar los servicios de un contrato
Permission165=Eliminar contratos Permission165=Eliminar contratos
Permission171=Leer los desplazamientos Permission171=Leer honorarios (propios y de sus subordinados)
Permission172=Crear/modificar los desplazamientos Permission172=Crear/modificar honorarios
Permission173=Eliminar desplazamientos Permission173=Eliminar honorarios
Permission178=Exportar desplazamientos Permission174=Leer todos los honorarios
Permission178=Exportar honorarios
Permission180=Consultar proveedores Permission180=Consultar proveedores
Permission181=Consultar pedidos a proveedores Permission181=Consultar pedidos a proveedores
Permission182=Crear/modificar pedidos a proveedores Permission182=Crear/modificar pedidos a proveedores
@ -1074,7 +1075,7 @@ ModuleCompanyCodeAquarium=Devuelve un código contable compuesto de<br>%s seguid
ModuleCompanyCodePanicum=Devuelve un código contable vacío. ModuleCompanyCodePanicum=Devuelve un código contable vacío.
ModuleCompanyCodeDigitaria=Devuelve un código contable compuesto siguiendo el código de tercero. El código está formado por carácter ' C ' en primera posición seguido de los 5 primeros caracteres del código tercero. ModuleCompanyCodeDigitaria=Devuelve un código contable compuesto siguiendo el código de tercero. El código está formado por carácter ' C ' en primera posición seguido de los 5 primeros caracteres del código tercero.
UseNotifications=Usar notificaciones UseNotifications=Usar notificaciones
NotificationsDesc=La función de las notificaciones permite enviar automáticamente un correo electrónico para un determinado evento Dolibarr en las empresas configuradas para ello NotificationsDesc=La función de las notificaciones permite enviar automáticamente un e-mail para algunos eventos de Dolibarr. Los destinatarios de las notificaciones pueden definirse:<br>* por contactos de terceros (clientes o proveedores), un tercero a la vez.<br>* o configurando un destinatario global en la configuración del módulo.
ModelModules=Modelos de documentos ModelModules=Modelos de documentos
DocumentModelOdt=Generación desde los documentos OpenDocument (Archivo .ODT OpenOffice, KOffice, TextEdit,...) DocumentModelOdt=Generación desde los documentos OpenDocument (Archivo .ODT OpenOffice, KOffice, TextEdit,...)
WatermarkOnDraft=Marca de agua en los documentos borrador WatermarkOnDraft=Marca de agua en los documentos borrador
@ -1146,6 +1147,7 @@ HideTreadedOrders=Ocultar del listado los pedidos tratados o cancelados
ValidOrderAfterPropalClosed=Validar el pedido después del cierre del presupuesto, permite no pasar por el pedido provisional ValidOrderAfterPropalClosed=Validar el pedido después del cierre del presupuesto, permite no pasar por el pedido provisional
FreeLegalTextOnOrders=Texto libre en pedidos FreeLegalTextOnOrders=Texto libre en pedidos
WatermarkOnDraftOrders=Marca de agua en pedidos borrador (en caso de estar vacío) WatermarkOnDraftOrders=Marca de agua en pedidos borrador (en caso de estar vacío)
ShippableOrderIconInList=Añadir un icono en el listado de pedidos que indica si el pedido es enviable
##### Clicktodial ##### ##### Clicktodial #####
ClickToDialSetup=Configuración del módulo Click To Dial ClickToDialSetup=Configuración del módulo Click To Dial
ClickToDialUrlDesc=URL de llamada haciendo click en el icono teléfono. <br>La URL completa de llamada será: URL?login=...&password=...&caller=...&called=telellamada ClickToDialUrlDesc=URL de llamada haciendo click en el icono teléfono. <br>La URL completa de llamada será: URL?login=...&password=...&caller=...&called=telellamada
@ -1384,7 +1386,8 @@ MailingEMailError=E-Mail de respuesta (Errors-to) para las respuestas acerca de
##### Notification ##### ##### Notification #####
NotificationSetup=Configuración del módulo notificaciones NotificationSetup=Configuración del módulo notificaciones
NotificationEMailFrom=E-Mail emisor (From) de los correos enviados a través de notificaciones NotificationEMailFrom=E-Mail emisor (From) de los correos enviados a través de notificaciones
ListOfAvailableNotifications=Listado de notificaciones disponibles (depende de los módulos activados) ListOfAvailableNotifications=Listado de eventos que se pueden configurar para notificar para cada tercero (entrar a la ficha del tercero para configurar) o configurando un e-mail fijo (El listado depende de los módulos activados)
FixedEmailTarget=Destinatario fijo
##### Sendings ##### ##### Sendings #####
SendingsSetup=Configuración del módulo Expediciones SendingsSetup=Configuración del módulo Expediciones
SendingsReceiptModel=Modelo de notas de entrega SendingsReceiptModel=Modelo de notas de entrega
@ -1535,6 +1538,7 @@ DeleteFiscalYear=Eliminar año fiscal
ConfirmDeleteFiscalYear=¿Está seguro de querer eliminar este año fiscal? ConfirmDeleteFiscalYear=¿Está seguro de querer eliminar este año fiscal?
Opened=Abierto Opened=Abierto
Closed=Cerrado Closed=Cerrado
AlwaysEditable=Puede editarse siempre
Format=Formatear Format=Formatear
TypePaymentDesc=0:Pago cliente,1:Pago proveedor,2:Tanto pago de cliente como de proveedor TypePaymentDesc=0:Pago cliente,1:Pago proveedor,2:Tanto pago de cliente como de proveedor

View File

@ -7,10 +7,10 @@ Agendas=Agendas
Calendar=Calendario Calendar=Calendario
Calendars=Calendarios Calendars=Calendarios
LocalAgenda=Calendario interno LocalAgenda=Calendario interno
ActionsOwnedBy=Evento asignado a ActionsOwnedBy=Acontecimiento asignado a
AffectedTo=Asignada a AffectedTo=Asignada a
DoneBy=Realizado por DoneBy=Realizado por
Event=Evento Event=Acontecimiento
Events=Eventos Events=Eventos
EventsNb=Número de eventos EventsNb=Número de eventos
MyEvents=Mis eventos MyEvents=Mis eventos
@ -23,12 +23,12 @@ MenuToDoActions=Eventos incompletos
MenuDoneActions=Eventos terminados MenuDoneActions=Eventos terminados
MenuToDoMyActions=Mis eventos incompletos MenuToDoMyActions=Mis eventos incompletos
MenuDoneMyActions=Mis eventos terminados MenuDoneMyActions=Mis eventos terminados
ListOfEvents=Listado de eventos (calendario interno) ListOfEvents=lista de acontecimientos (calendario interno)
ActionsAskedBy=Eventos registrados por ActionsAskedBy=Eventos registrados por
ActionsToDoBy=Eventos asignados a ActionsToDoBy=Eventos asignados a
ActionsDoneBy=Eventos realizados por ActionsDoneBy=Eventos realizados por
ActionsForUser=Eventos del usuario ActionsForUser=Acontecimientos del usuario
ActionsForUsersGroup=Eventos de todos los usuarios del grupo ActionsForUsersGroup=Acontecimientos de todos los usuarios del grupo
AllMyActions= Todos mis eventos/tareas AllMyActions= Todos mis eventos/tareas
AllActions= Todos los eventos/tareas AllActions= Todos los eventos/tareas
ViewList=Vista listado ViewList=Vista listado
@ -72,7 +72,7 @@ AgendaUrlOptions1=Puede también añadir estos parámetros al filtro de salida:
AgendaUrlOptions2=<b>login=%s</b> para restringir inserciones a acciones creadas , que afecten o realizadas por el usuario <b>%s</b>. AgendaUrlOptions2=<b>login=%s</b> para restringir inserciones a acciones creadas , que afecten o realizadas por el usuario <b>%s</b>.
AgendaUrlOptions3=<b>logina=%s</b> para restringir inserciones a acciones creadas por el usuario <b>%s</b>. AgendaUrlOptions3=<b>logina=%s</b> para restringir inserciones a acciones creadas por el usuario <b>%s</b>.
AgendaUrlOptions4=<b>logint=%s</b> para restringir inserciones a acciones que afecten al usuario <b>%s</b>. AgendaUrlOptions4=<b>logint=%s</b> para restringir inserciones a acciones que afecten al usuario <b>%s</b>.
AgendaUrlOptions5=<b>logind=%s</b> para restringir inserciones a acciones realizadas por el usuario <b>%s</b>. AgendaUrlOptionsProject=<b>project=PROJECT_ID</b> para restringir inserciones a acciones asociadas al proyecto <b>PROJECT_ID</b>.
AgendaShowBirthdayEvents=Mostrar cumpleaños de los contactos AgendaShowBirthdayEvents=Mostrar cumpleaños de los contactos
AgendaHideBirthdayEvents=Ocultar cumpleaños de los contactos AgendaHideBirthdayEvents=Ocultar cumpleaños de los contactos
Busy=Ocupado Busy=Ocupado
@ -89,5 +89,5 @@ ExtSiteUrlAgenda=Url de acceso al archivo .ical
ExtSiteNoLabel=Sin descripción ExtSiteNoLabel=Sin descripción
WorkingTimeRange=Rango temporal WorkingTimeRange=Rango temporal
WorkingDaysRange=Rango diario WorkingDaysRange=Rango diario
AddEvent=Añadir evento AddEvent=Crear evento
MyAvailability=Mi disponibilidad MyAvailability=Mi disponibilidad

View File

@ -28,8 +28,8 @@ InvoiceAvoir=Abono
InvoiceAvoirAsk=Abono para corregir la factura InvoiceAvoirAsk=Abono para corregir la factura
InvoiceAvoirDesc=El <b>abono</b> es una factura negativa destinada a compensar un importe de factura que difiere del importe realmente pagado (por haber pagado de más o por devolución de productos, por ejemplo). InvoiceAvoirDesc=El <b>abono</b> es una factura negativa destinada a compensar un importe de factura que difiere del importe realmente pagado (por haber pagado de más o por devolución de productos, por ejemplo).
invoiceAvoirWithLines=Crear abono con las líneas de la factura original invoiceAvoirWithLines=Crear abono con las líneas de la factura original
invoiceAvoirWithPaymentRestAmount=Crear abono con el importe pendiente de la factura origen invoiceAvoirWithPaymentRestAmount=Crear abono con el resto a cobrar de la factura origen
invoiceAvoirLineWithPaymentRestAmount=Abono del importe pendiente de la factura invoiceAvoirLineWithPaymentRestAmount=Abono del resto por cobrar
ReplaceInvoice=Rectificar la factura %s ReplaceInvoice=Rectificar la factura %s
ReplacementInvoice=Rectificación factura ReplacementInvoice=Rectificación factura
ReplacedByInvoice=Rectificada por la factura %s ReplacedByInvoice=Rectificada por la factura %s
@ -156,9 +156,9 @@ ConfirmCancelBill=¿Está seguro de querer anular la factura <b>%s</b> ?
ConfirmCancelBillQuestion=¿Por qué razón quiere abandonar la factura? ConfirmCancelBillQuestion=¿Por qué razón quiere abandonar la factura?
ConfirmClassifyPaidPartially=¿Está seguro de querer clasificar la factura <b>%s</b> como pagada? ConfirmClassifyPaidPartially=¿Está seguro de querer clasificar la factura <b>%s</b> como pagada?
ConfirmClassifyPaidPartiallyQuestion=Esta factura no ha sido totalmente pagada. ¿Por qué quiere clasificarla como pagada? ConfirmClassifyPaidPartiallyQuestion=Esta factura no ha sido totalmente pagada. ¿Por qué quiere clasificarla como pagada?
ConfirmClassifyPaidPartiallyReasonAvoir=El resto a pagar <b>(%s %s)</b> se ha regularizado (ya que artículo se ha devuelto, olvidado entregar, descuento no definido...) mediante un abono ConfirmClassifyPaidPartiallyReasonAvoir=El resto a pagar <b>(%s %s)</b> es un descuento otorgado por pronto pago. Regularizaré el IVA con un abono.
ConfirmClassifyPaidPartiallyReasonDiscountNoVat=El resto a pagar <b>(%s %s)</b> es un descuento acordado después de la factura. Acepto perder el IVA de este descuento ConfirmClassifyPaidPartiallyReasonDiscountNoVat=El resto a pagar <b>(%s %s)</b> es un descuento otorgado por pronto pago. Acepto perder el IVA en este descuento.
ConfirmClassifyPaidPartiallyReasonDiscountVat=El resto a pagar<b>(%s %s)</b> es un descuento ConfirmClassifyPaidPartiallyReasonDiscountVat=El resto a pagar <b>(%s %s)</b> es un descuento otorgado por pronto pago. Recuperaré el IVA sin usar un abono.
ConfirmClassifyPaidPartiallyReasonBadCustomer=Cliente moroso ConfirmClassifyPaidPartiallyReasonBadCustomer=Cliente moroso
ConfirmClassifyPaidPartiallyReasonProductReturned=Productos devueltos en parte ConfirmClassifyPaidPartiallyReasonProductReturned=Productos devueltos en parte
ConfirmClassifyPaidPartiallyReasonOther=Por otra razón ConfirmClassifyPaidPartiallyReasonOther=Por otra razón
@ -191,9 +191,9 @@ AlreadyPaid=Ya pagado
AlreadyPaidBack=Ya reembolsado AlreadyPaidBack=Ya reembolsado
AlreadyPaidNoCreditNotesNoDeposits=Ya pagado (excluidos los abonos y anticipos) AlreadyPaidNoCreditNotesNoDeposits=Ya pagado (excluidos los abonos y anticipos)
Abandoned=Abandonada Abandoned=Abandonada
RemainderToPay=Queda por pagar RemainderToPay=Resta por pagar
RemainderToTake=Queda por cobrar RemainderToTake=Resta por cobrar
RemainderToPayBack=Queda por reembolsar RemainderToPayBack=Resta por reembolsar
Rest=Pendiente Rest=Pendiente
AmountExpected=Importe reclamado AmountExpected=Importe reclamado
ExcessReceived=Recibido en exceso ExcessReceived=Recibido en exceso
@ -225,13 +225,13 @@ NonPercuRecuperable=No percibido recuperable
SetConditions=Definir condiciones de pago SetConditions=Definir condiciones de pago
SetMode=Definir modo de pago SetMode=Definir modo de pago
Billed=Facturado Billed=Facturado
RepeatableInvoice=Factura recurrente RepeatableInvoice=Plantilla de factura
RepeatableInvoices=Facturas recurrentes RepeatableInvoices=Plantilla de facturas
Repeatable=Recurrente Repeatable=Plantilla
Repeatables=Recurrentes Repeatables=Plantillas
ChangeIntoRepeatableInvoice=Convertir en recurrente ChangeIntoRepeatableInvoice=Convertir en plantilla
CreateRepeatableInvoice=Crear factura recurrente CreateRepeatableInvoice=Crear plantilla de factura
CreateFromRepeatableInvoice=Crear desde factura recurrente CreateFromRepeatableInvoice=Crear desde plantilla de factura
CustomersInvoicesAndInvoiceLines=Facturas a clientes y líneas de facturas CustomersInvoicesAndInvoiceLines=Facturas a clientes y líneas de facturas
CustomersInvoicesAndPayments=Facturas a clientes y pagos CustomersInvoicesAndPayments=Facturas a clientes y pagos
ExportDataset_invoice_1=Facturas a clientes y líneas de factura ExportDataset_invoice_1=Facturas a clientes y líneas de factura

View File

@ -12,6 +12,7 @@ BoxLastProspects=Últimos clientes potenciales modificados
BoxLastCustomers=Últimos clientes modificados BoxLastCustomers=Últimos clientes modificados
BoxLastSuppliers=Últimos proveedores modificados BoxLastSuppliers=Últimos proveedores modificados
BoxLastCustomerOrders=Últimos pedidos BoxLastCustomerOrders=Últimos pedidos
BoxLastValidatedCustomerOrders=Últimos pedidos de clientes validados
BoxLastBooks=Últimos books BoxLastBooks=Últimos books
BoxLastActions=Últimos eventos BoxLastActions=Últimos eventos
BoxLastContracts=Últimos contratos BoxLastContracts=Últimos contratos
@ -27,26 +28,29 @@ BoxTitleNbOfCustomers=Número de clientes
BoxTitleLastRssInfos=Las %s últimas infos de %s BoxTitleLastRssInfos=Las %s últimas infos de %s
BoxTitleLastProducts=Los %s últimos productos/servicios registrados BoxTitleLastProducts=Los %s últimos productos/servicios registrados
BoxTitleProductsAlertStock=Productos en alerta de stock BoxTitleProductsAlertStock=Productos en alerta de stock
BoxTitleLastCustomerOrders=Los %s últimos pedidos de clientes modificados BoxTitleLastCustomerOrders=Últimos %s pedidos de clientes
BoxTitleLastModifiedCustomerOrders=Últimos %s pedidos de clientes modificados
BoxTitleLastSuppliers=Los %s últimos proveedores registrados BoxTitleLastSuppliers=Los %s últimos proveedores registrados
BoxTitleLastCustomers=Los %s últimos clientes registrados BoxTitleLastCustomers=Los %s últimos clientes registrados
BoxTitleLastModifiedSuppliers=Los %s últimos proveedores modificados BoxTitleLastModifiedSuppliers=Los %s últimos proveedores modificados
BoxTitleLastModifiedCustomers=Los %s últimos clientes modificados BoxTitleLastModifiedCustomers=Los %s últimos clientes modificados
BoxTitleLastCustomersOrProspects=Los %s últimos clientes o clientes potenciales registrados BoxTitleLastCustomersOrProspects=Últimos %s clientes o clientes potenciales
BoxTitleLastPropals=Los %s últimos presupuestos registrados BoxTitleLastPropals=Últimos %s presupuestos
BoxTitleLastModifiedPropals=Últimos %s presupuestos modificados
BoxTitleLastCustomerBills=Las %s últimas facturas a clientes modificadas BoxTitleLastCustomerBills=Las %s últimas facturas a clientes modificadas
BoxTitleLastModifiedCustomerBills=Últimas %s facturas a clientes modificadas
BoxTitleLastSupplierBills=Las %s últimas facturas de proveedores modificadas BoxTitleLastSupplierBills=Las %s últimas facturas de proveedores modificadas
BoxTitleLastProspects=Los %s últimos clientes potenciales registrados BoxTitleLastModifiedSupplierBills=Últimas %s facturas de proveedores modificadas
BoxTitleLastModifiedProspects=Los %s últimos clientes potenciales modificados BoxTitleLastModifiedProspects=Los %s últimos clientes potenciales modificados
BoxTitleLastProductsInContract=Los %s últimos productos/servicios contratados BoxTitleLastProductsInContract=Los %s últimos productos/servicios contratados
BoxTitleLastModifiedMembers=Los %s últimos miembros modificados BoxTitleLastModifiedMembers=Últimos %s miembros
BoxTitleLastFicheInter=Las %s últimas intervenciones modificadas BoxTitleLastFicheInter=Las %s últimas intervenciones modificadas
BoxTitleOldestUnpaidCustomerBills=Las %s facturas más antiguas a clientes pendientes de cobro BoxTitleOldestUnpaidCustomerBills=%s facturas a clientes más antiguras pendientes de cobro
BoxTitleOldestUnpaidSupplierBills=Las %s facturas más antiguas de proveedores pendientes de pago BoxTitleOldestUnpaidSupplierBills=%s facturas de proveedores más antiguas pendientes de pago
BoxTitleCurrentAccounts=Balances de cuentas abiertas BoxTitleCurrentAccounts=Balances de cuentas abiertas
BoxTitleSalesTurnover=Volumen de ventas realizado BoxTitleSalesTurnover=Volumen de ventas realizado
BoxTitleTotalUnpaidCustomerBills=Pendiente de clientes BoxTitleTotalUnpaidCustomerBills=Facturas a clientes pendientes de cobro
BoxTitleTotalUnpaidSuppliersBills=Pendiente a proveedores BoxTitleTotalUnpaidSuppliersBills=Facturas de proveedores pendientes de pago
BoxTitleLastModifiedContacts=Los %s últimos contactos/direcciones modificadas BoxTitleLastModifiedContacts=Los %s últimos contactos/direcciones modificadas
BoxMyLastBookmarks=Mis %s últimos marcadores BoxMyLastBookmarks=Mis %s últimos marcadores
BoxOldestExpiredServices=Servicios antiguos expirados BoxOldestExpiredServices=Servicios antiguos expirados
@ -76,7 +80,8 @@ NoContractedProducts=Sin productos/servicios contratados
NoRecordedContracts=Sin contratos registrados NoRecordedContracts=Sin contratos registrados
NoRecordedInterventions=Sin intervenciones guardadas NoRecordedInterventions=Sin intervenciones guardadas
BoxLatestSupplierOrders=Últimos pedidos a proveedores BoxLatestSupplierOrders=Últimos pedidos a proveedores
BoxTitleLatestSupplierOrders=Los %s últimos pedidos a proveedores BoxTitleLatestSupplierOrders=Últimos %s pedidos a proveedores
BoxTitleLatestModifiedSupplierOrders=Últimos %s pedidos a proveedores modificados
NoSupplierOrder=Sin pedidos a proveedores NoSupplierOrder=Sin pedidos a proveedores
BoxCustomersInvoicesPerMonth=Facturas a clientes por mes BoxCustomersInvoicesPerMonth=Facturas a clientes por mes
BoxSuppliersInvoicesPerMonth=Facturas de proveedores por mes BoxSuppliersInvoicesPerMonth=Facturas de proveedores por mes

View File

@ -379,7 +379,7 @@ DeliveryAddressLabel=Etiqueta de envío
DeleteDeliveryAddress=Eliminar una dirección de envío DeleteDeliveryAddress=Eliminar una dirección de envío
ConfirmDeleteDeliveryAddress=¿Está seguro de querer eliminar esta dirección de envío? ConfirmDeleteDeliveryAddress=¿Está seguro de querer eliminar esta dirección de envío?
NewDeliveryAddress=Nueva dirección de envío NewDeliveryAddress=Nueva dirección de envío
AddDeliveryAddress=Añadir la dirección AddDeliveryAddress=Crear dirección
AddAddress=Crear dirección AddAddress=Crear dirección
NoOtherDeliveryAddress=No hay direcciones alternativas definidas NoOtherDeliveryAddress=No hay direcciones alternativas definidas
SupplierCategory=Categoría de proveedor SupplierCategory=Categoría de proveedor

View File

@ -24,3 +24,5 @@ Deliverer=Destinatario :
Sender=Origen Sender=Origen
Recipient=Destinatario Recipient=Destinatario
ErrorStockIsNotEnough=No hay suficiente stock ErrorStockIsNotEnough=No hay suficiente stock
Shippable=Enviable
NonShippable=No enviable

View File

@ -4,7 +4,7 @@ Donations=Donaciones
DonationRef=Ref. donación DonationRef=Ref. donación
Donor=Donante Donor=Donante
Donors=Donantes Donors=Donantes
AddDonation=Añadir donación AddDonation=Crear una donación
NewDonation=Nueva donación NewDonation=Nueva donación
ShowDonation=Mostrar donación ShowDonation=Mostrar donación
DonationPromise=Promesa de donación DonationPromise=Promesa de donación

View File

@ -37,7 +37,7 @@ ErrorSupplierCodeRequired=Código proveedor obligatorio
ErrorSupplierCodeAlreadyUsed=Código de proveedor ya utilizado ErrorSupplierCodeAlreadyUsed=Código de proveedor ya utilizado
ErrorBadParameters=Parámetros incorrectos ErrorBadParameters=Parámetros incorrectos
ErrorBadValueForParameter=Valor '%s' incorrecto para el parámetro '%s' ErrorBadValueForParameter=Valor '%s' incorrecto para el parámetro '%s'
ErrorBadImageFormat=La imagen no tiene un formato reconocido ErrorBadImageFormat=El archivo de imagen es de un formato no soportado (Su PHP no soporta las funciones de conversión de este formato de imagen)
ErrorBadDateFormat=El valor '%s' tiene un formato de fecha no reconocido ErrorBadDateFormat=El valor '%s' tiene un formato de fecha no reconocido
ErrorWrongDate=¡La fecha no es correcta! ErrorWrongDate=¡La fecha no es correcta!
ErrorFailedToWriteInDir=Imposible escribir en el directorio %s ErrorFailedToWriteInDir=Imposible escribir en el directorio %s
@ -114,6 +114,7 @@ ErrorLoginDoesNotExists=La cuenta de usuario de <b>%s</b> no se ha encontrado.
ErrorLoginHasNoEmail=Este usuario no tiene e-mail. Imposible continuar. ErrorLoginHasNoEmail=Este usuario no tiene e-mail. Imposible continuar.
ErrorBadValueForCode=Valor incorrecto para el código. Vuelva a intentar con un nuevo valor... ErrorBadValueForCode=Valor incorrecto para el código. Vuelva a intentar con un nuevo valor...
ErrorBothFieldCantBeNegative=Los campos %s y %s no pueden ser negativos ErrorBothFieldCantBeNegative=Los campos %s y %s no pueden ser negativos
ErrorQtyForCustomerInvoiceCantBeNegative=Las cantidades en las líneas de facturas a clientes no pueden ser negativas
ErrorWebServerUserHasNotPermission=La cuenta de ejecución del servidor web <b>%s</b> no dispone de los permisos para esto ErrorWebServerUserHasNotPermission=La cuenta de ejecución del servidor web <b>%s</b> no dispone de los permisos para esto
ErrorNoActivatedBarcode=No hay activado ningún tipo de código de barras ErrorNoActivatedBarcode=No hay activado ningún tipo de código de barras
ErrUnzipFails=No se ha podido descomprimir el archivo %s con ZipArchive ErrUnzipFails=No se ha podido descomprimir el archivo %s con ZipArchive

View File

@ -53,7 +53,7 @@ CantUpdate=No puede actualizar esta petición de vacaciones.
NoDateDebut=Debe indicar una fecha de inicio. NoDateDebut=Debe indicar una fecha de inicio.
NoDateFin=Debe indicar una fecha de fin. NoDateFin=Debe indicar una fecha de fin.
ErrorDureeCP=Su petición de vacaciones no contiene ningún día hábil. ErrorDureeCP=Su petición de vacaciones no contiene ningún día hábil.
TitleValidCP=Validar la petición de vacaciones TitleValidCP=Aprobar la petición de vacaciones
ConfirmValidCP=¿Está seguro de querer validar esta petición de vacaciones? ConfirmValidCP=¿Está seguro de querer validar esta petición de vacaciones?
DateValidCP=Fecha de validación DateValidCP=Fecha de validación
TitleToValidCP=Enviar la petición de vacaciones TitleToValidCP=Enviar la petición de vacaciones
@ -61,7 +61,7 @@ ConfirmToValidCP=¿Está seguro de querer enviar la petición de vacaciones?
TitleRefuseCP=Rechazar la petición de vacaciones TitleRefuseCP=Rechazar la petición de vacaciones
ConfirmRefuseCP=¿Está seguro de querer rechazar la petición de vacaciones? ConfirmRefuseCP=¿Está seguro de querer rechazar la petición de vacaciones?
NoMotifRefuseCP=Debe seleccionar un motivo para rechazar esta petición. NoMotifRefuseCP=Debe seleccionar un motivo para rechazar esta petición.
TitleCancelCP=Anular la petición de vacaciones TitleCancelCP=Cancelar la petición de vacaciones
ConfirmCancelCP=¿Está seguro de querer anular la petición de vacaciones? ConfirmCancelCP=¿Está seguro de querer anular la petición de vacaciones?
DetailRefusCP=Motivo del rechazo DetailRefusCP=Motivo del rechazo
DateRefusCP=Fecha del rechazo DateRefusCP=Fecha del rechazo
@ -88,7 +88,7 @@ ManualUpdate=Actualización manual
HolidaysCancelation=Anulación vacaciones HolidaysCancelation=Anulación vacaciones
## Configuration du Module ## ## Configuration du Module ##
ConfCP=Configuración del módulo Vacaciones ConfCP=Configuración del módulo de vacaciones
DescOptionCP=Descripción de la opción DescOptionCP=Descripción de la opción
ValueOptionCP=Valor ValueOptionCP=Valor
GroupToValidateCP=Grupo con posibilidad de aprobar las vacaciones GroupToValidateCP=Grupo con posibilidad de aprobar las vacaciones
@ -97,13 +97,13 @@ LastUpdateCP=Última actualización automática de vacaciones
UpdateConfCPOK=Actualización efectuada correctamente. UpdateConfCPOK=Actualización efectuada correctamente.
ErrorUpdateConfCP=Se ha producido un error durante la actualización, vuélvalo a intentar. ErrorUpdateConfCP=Se ha producido un error durante la actualización, vuélvalo a intentar.
AddCPforUsers=Añada los saldos de vacaciones de los usuarios <a href="../define_holiday.php" style="font-weight: normal; color: red; text-decoration: underline;">haciendo clic aquí</a>. AddCPforUsers=Añada los saldos de vacaciones de los usuarios <a href="../define_holiday.php" style="font-weight: normal; color: red; text-decoration: underline;">haciendo clic aquí</a>.
DelayForSubmitCP=Antelación mínima para solicitar vacaciones DelayForSubmitCP=Fecha límite para realizar peticiones de vacaciones
AlertapprobatortorDelayCP=Advertir al validador si la petición no corresponde a la fecha límite AlertapprobatortorDelayCP=Advertir al validador si la petición no corresponde a la fecha límite
AlertValidatorDelayCP=Advertir al usuario validador si la petición no respeta el límite previsto AlertValidatorDelayCP=Advertir al usuario validador si la petición no respeta el límite previsto
AlertValidorSoldeCP=Advertir al usuario validador si el usuario pide vacaciones superiores a su saldo AlertValidorSoldeCP=Advertir al usuario validador si el usuario pide vacaciones superiores a su saldo
nbUserCP=Número de usuarios tomados en cuenta en el módulo vacaciones nbUserCP=Número de usuarios tomados en cuenta en el módulo vacaciones
nbHolidayDeductedCP=Número de días retribuídos a deducir por día de vacaciones nbHolidayDeductedCP=Número de días retribuídos a deducir por día de vacaciones
nbHolidayEveryMonthCP=Número de días de vacaciones añadidos por mes nbHolidayEveryMonthCP=Número de vacaciones añadidas por mes
Module27130Name= Gestion de las vacaciones Module27130Name= Gestion de las vacaciones
Module27130Desc= Gestión de días libres Module27130Desc= Gestión de días libres
TitleOptionMainCP=Ajustes principales de vacaciones TitleOptionMainCP=Ajustes principales de vacaciones

View File

@ -30,6 +30,7 @@ StatusInterInvoiced=Facturado
RelatedInterventions=Intervenciones adjuntas RelatedInterventions=Intervenciones adjuntas
ShowIntervention=Mostrar intervención ShowIntervention=Mostrar intervención
SendInterventionRef=Envío de la intervención %s SendInterventionRef=Envío de la intervención %s
SendInterventionByMail=Enviar intervención por e-mail
##### Types de contacts ##### ##### Types de contacts #####
TypeContact_fichinter_internal_INTERREPFOLL=Responsable seguimiento de la intervención TypeContact_fichinter_internal_INTERREPFOLL=Responsable seguimiento de la intervención
TypeContact_fichinter_internal_INTERVENING=Interventor TypeContact_fichinter_internal_INTERVENING=Interventor

View File

@ -133,6 +133,6 @@ Notifications=Notificaciones
NoNotificationsWillBeSent=Ninguna notificación por e-mail está prevista para este evento y empresa NoNotificationsWillBeSent=Ninguna notificación por e-mail está prevista para este evento y empresa
ANotificationsWillBeSent=1 notificación va a ser enviada por e-mail ANotificationsWillBeSent=1 notificación va a ser enviada por e-mail
SomeNotificationsWillBeSent=%s notificaciones van a ser enviadas por e-mail SomeNotificationsWillBeSent=%s notificaciones van a ser enviadas por e-mail
AddNewNotification=Activar una nueva solicitud de notificación AddNewNotification=Activar un nuevo objetivo de notificación
ListOfActiveNotifications=Lista de las solicitudes de notificaciones activas ListOfActiveNotifications=Listado de todos los objetivos de notificación
ListOfNotificationsDone=Lista de notificaciones de e-mails enviadas ListOfNotificationsDone=Lista de notificaciones de e-mails enviadas

View File

@ -58,12 +58,12 @@ ErrorCantLoadUserFromDolibarrDatabase=Imposible encontrar el usuario <b>%s</b> e
ErrorNoVATRateDefinedForSellerCountry=Error, ningún tipo de IVA definido para el país '%s'. ErrorNoVATRateDefinedForSellerCountry=Error, ningún tipo de IVA definido para el país '%s'.
ErrorNoSocialContributionForSellerCountry=Error, ningún tipo de carga social definida para el país '%s'. ErrorNoSocialContributionForSellerCountry=Error, ningún tipo de carga social definida para el país '%s'.
ErrorFailedToSaveFile=Error, el registro del archivo falló. ErrorFailedToSaveFile=Error, el registro del archivo falló.
ErrorOnlyPngJpgSupported=Error, solamente se soportan los formatos de imagen jpg y png.
ErrorImageFormatNotSupported=Su PHP no soporta las funciones de conversión de este formato de imagen.
SetDate=Fijar fecha SetDate=Fijar fecha
SelectDate=Seleccione una fecha SelectDate=Seleccione una fecha
SeeAlso=Ver también %s SeeAlso=Ver también %s
BackgroundColorByDefault=Color de fondo BackgroundColorByDefault=Color de fondo
FileNotUploaded=No se ha subido el archivo
FileUploaded=El archivo se ha subido correctamente
FileWasNotUploaded=Un archivo ha sido seleccionado para adjuntarlo, pero aún no se ha subido. Haga clic en "Adjuntar este archivo" para ello. FileWasNotUploaded=Un archivo ha sido seleccionado para adjuntarlo, pero aún no se ha subido. Haga clic en "Adjuntar este archivo" para ello.
NbOfEntries=Nº de entradas NbOfEntries=Nº de entradas
GoToWikiHelpPage=Consultar la ayuda (puede requerir acceso a Internet) GoToWikiHelpPage=Consultar la ayuda (puede requerir acceso a Internet)
@ -341,6 +341,7 @@ FullList=Listado completo
Statistics=Estadísticas Statistics=Estadísticas
OtherStatistics=Otras estadísticas OtherStatistics=Otras estadísticas
Status=Estado Status=Estado
Favorite=Favorito
ShortInfo=Info. ShortInfo=Info.
Ref=Ref. Ref=Ref.
RefSupplier=Ref. proveedor RefSupplier=Ref. proveedor

View File

@ -38,4 +38,6 @@ BuyingCost=Costos
UnitCharges=Carga unitaria UnitCharges=Carga unitaria
Charges=Cargas Charges=Cargas
AgentContactType=Tipo de contacto comisionado AgentContactType=Tipo de contacto comisionado
AgentContactTypeDetails=Indica el tipo de contacto enlazado a las facturas que serán asociados a los agentes comerciales AgentContactTypeDetails=Indique qué tipo de contacto (enlazado a las facturas) será el utilizado para el informe de márgenes de agentes comerciales
rateMustBeNumeric=El margen debe ser un valor numérico
markRateShouldBeLesserThan100=El margen tiene que ser menor que 100

View File

@ -85,7 +85,7 @@ SubscriptionLateShort=En retraso
SubscriptionNotReceivedShort=No recibida SubscriptionNotReceivedShort=No recibida
ListOfSubscriptions=Listado de afiliaciones ListOfSubscriptions=Listado de afiliaciones
SendCardByMail=Enviar ficha por e-mail SendCardByMail=Enviar ficha por e-mail
AddMember=Añadir miembro AddMember=Crear miembro
NoTypeDefinedGoToSetup=Ningún tipo de miembro definido. Vaya a Configuración -> Tipos de miembros NoTypeDefinedGoToSetup=Ningún tipo de miembro definido. Vaya a Configuración -> Tipos de miembros
NewMemberType=Nuevo tipo de miembro NewMemberType=Nuevo tipo de miembro
WelcomeEMail=E-mail WelcomeEMail=E-mail
@ -125,7 +125,7 @@ Date=Fecha
DateAndTime=Fecha y hora DateAndTime=Fecha y hora
PublicMemberCard=Ficha pública miembro PublicMemberCard=Ficha pública miembro
MemberNotOrNoMoreExpectedToSubscribe=No sometida a cotización MemberNotOrNoMoreExpectedToSubscribe=No sometida a cotización
AddSubscription=Añadir afiliación AddSubscription=Crear afiliación
ShowSubscription=Mostrar afiliación ShowSubscription=Mostrar afiliación
MemberModifiedInDolibarr=Miembro modificado en Dolibarr MemberModifiedInDolibarr=Miembro modificado en Dolibarr
SendAnEMailToMember=Enviar e-mail de información al miembro (E-mail: <b>%s</b>) SendAnEMailToMember=Enviar e-mail de información al miembro (E-mail: <b>%s</b>)

View File

@ -1,7 +1,6 @@
# Dolibarr language file - Source file is en_US - other # Dolibarr language file - Source file is en_US - other
SecurityCode=Código seguridad SecurityCode=Código seguridad
Calendar=Calendario Calendar=Calendario
AddTrip=Crear honorario
Tools=Utilidades Tools=Utilidades
ToolsDesc=Esta área está dedicada al reagrupamiento de diversas utilidades no disponibles en las otras entradas de menú.<br><br>La lista de estas utilidades es accesible mediante el menú de al lado. ToolsDesc=Esta área está dedicada al reagrupamiento de diversas utilidades no disponibles en las otras entradas de menú.<br><br>La lista de estas utilidades es accesible mediante el menú de al lado.
Birthday=Aniversario Birthday=Aniversario
@ -48,6 +47,7 @@ Notify_PROJECT_CREATE=Creación de proyecto
Notify_TASK_CREATE=Tarea creada Notify_TASK_CREATE=Tarea creada
Notify_TASK_MODIFY=Tarea modificada Notify_TASK_MODIFY=Tarea modificada
Notify_TASK_DELETE=Tarea eliminada Notify_TASK_DELETE=Tarea eliminada
SeeModuleSetup=Consulte la configuración del módulo
NbOfAttachedFiles=Número archivos/documentos adjuntos NbOfAttachedFiles=Número archivos/documentos adjuntos
TotalSizeOfAttachedFiles=Tamaño total de los archivos/documentos adjuntos TotalSizeOfAttachedFiles=Tamaño total de los archivos/documentos adjuntos
MaxSize=Tamaño máximo MaxSize=Tamaño máximo

View File

@ -117,12 +117,12 @@ ServiceLimitedDuration=Si el servicio es de duración limitada :
MultiPricesAbility=Varios niveles de precio por producto/servicio MultiPricesAbility=Varios niveles de precio por producto/servicio
MultiPricesNumPrices=Nº de precios MultiPricesNumPrices=Nº de precios
MultiPriceLevelsName=Categoría de precios MultiPriceLevelsName=Categoría de precios
AssociatedProductsAbility=Activar productos compuestos AssociatedProductsAbility=Activar la funcionalidad de productos compuestos
AssociatedProducts=Productos compuestos AssociatedProducts=Producto compuesto
AssociatedProductsNumber=Nº de productos que componen este producto AssociatedProductsNumber=Nº de productos que componen este producto
ParentProductsNumber=Nº de productos que este producto compone ParentProductsNumber=Nº de productos que este producto compone
IfZeroItIsNotAVirtualProduct=Si 0, este producto no es un producto virtual IfZeroItIsNotAVirtualProduct=Si 0, este producto no es un producto compuesto
IfZeroItIsNotUsedByVirtualProduct=Si 0, este producto no está siendo utilizado por ningún producto virtual IfZeroItIsNotUsedByVirtualProduct=Si 0, este producto no puede ser usado por ningún producto compuesto
EditAssociate=Componer EditAssociate=Componer
Translation=Traducción Translation=Traducción
KeywordFilter=Filtro por clave KeywordFilter=Filtro por clave
@ -179,7 +179,7 @@ CloneProduct=Clonar producto/servicio
ConfirmCloneProduct=¿Está seguro de querer clonar el producto o servicio <b>%s</b>? ConfirmCloneProduct=¿Está seguro de querer clonar el producto o servicio <b>%s</b>?
CloneContentProduct=Clonar solamente la información general del producto/servicio CloneContentProduct=Clonar solamente la información general del producto/servicio
ClonePricesProduct=Clonar la información general y los precios ClonePricesProduct=Clonar la información general y los precios
CloneCompositionProduct=Clonar producto/servicio virtual CloneCompositionProduct=Clonar productos/servicios compuestos
ProductIsUsed=Este producto es utilizado ProductIsUsed=Este producto es utilizado
NewRefForClone=Ref. del nuevo producto/servicio NewRefForClone=Ref. del nuevo producto/servicio
CustomerPrices=Precios clientes CustomerPrices=Precios clientes

View File

@ -45,7 +45,7 @@ TaskDateStart=Fecha inicio
TaskDateEnd=Fecha finalización TaskDateEnd=Fecha finalización
TaskDescription=Descripción tarea TaskDescription=Descripción tarea
NewTask=Nueva tarea NewTask=Nueva tarea
AddTask=Añadir tarea AddTask=Crear tarea
AddDuration=Indicar duración AddDuration=Indicar duración
Activity=Actividad Activity=Actividad
Activities=Tareas/actividades Activities=Tareas/actividades

View File

@ -55,8 +55,6 @@ NoOpenedPropals=Sin presupuestos abiertos
NoOtherOpenedPropals=Ningún otro presupuesto abierto NoOtherOpenedPropals=Ningún otro presupuesto abierto
RefProposal=Ref. presupuesto RefProposal=Ref. presupuesto
SendPropalByMail=Enviar presupuesto por e-mail SendPropalByMail=Enviar presupuesto por e-mail
FileNotUploaded=No se ha subido el archivo
FileUploaded=El archivo se ha subido correctamente
AssociatedDocuments=Documentos asociados al presupuesto: AssociatedDocuments=Documentos asociados al presupuesto:
ErrorCantOpenDir=Imposible abrir el directorio ErrorCantOpenDir=Imposible abrir el directorio
DatePropal=Fecha presupuesto DatePropal=Fecha presupuesto

View File

@ -1,7 +1,7 @@
# Dolibarr language file - Source file is en_US - suppliers # Dolibarr language file - Source file is en_US - suppliers
Suppliers=Proveedores Suppliers=Proveedores
Supplier=Proveedor Supplier=Proveedor
AddSupplier=Añadir proveedor AddSupplier=Crear un proveedor
SupplierRemoved=Proveedor eliminado SupplierRemoved=Proveedor eliminado
SuppliersInvoice=Factura proveedor SuppliersInvoice=Factura proveedor
NewSupplier=Nuevo proveedor NewSupplier=Nuevo proveedor

View File

@ -120,3 +120,4 @@ UseTypeFieldToChange=Modificar el campo Tipo para cambiar
OpenIDURL=Dirección OpenID OpenIDURL=Dirección OpenID
LoginUsingOpenID=Usar OpenID para iniciar sesión LoginUsingOpenID=Usar OpenID para iniciar sesión
WeeklyHours=Horas semanales WeeklyHours=Horas semanales
ColorUser=Color para el usuario

View File

@ -14,8 +14,8 @@ WithdrawalReceiptShort=Orden
LastWithdrawalReceipts=Las %s últimas órdenes de domiciliación LastWithdrawalReceipts=Las %s últimas órdenes de domiciliación
WithdrawedBills=Facturas domiciliadas WithdrawedBills=Facturas domiciliadas
WithdrawalsLines=Lineas de domiciliación WithdrawalsLines=Lineas de domiciliación
RequestStandingOrderToTreat=Pedidos de domiciliaciones a tratar RequestStandingOrderToTreat=Peticiones de domiciliaciones a procesar
RequestStandingOrderTreated=Pedidos de domiciliaciones procesados RequestStandingOrderTreated=Peticiones de domiciliaciones procesadas
CustomersStandingOrders=Domiciliaciones de clientes CustomersStandingOrders=Domiciliaciones de clientes
CustomerStandingOrder=Domiciliación cliente CustomerStandingOrder=Domiciliación cliente
NbOfInvoiceToWithdraw=Nº de facturas pendientes de domiciliación NbOfInvoiceToWithdraw=Nº de facturas pendientes de domiciliación

View File

@ -327,6 +327,12 @@ ModuleDisabled=Module désactivé
ModuleDisabledSoNoEvent=Module désactivé donc événement jamais créé ModuleDisabledSoNoEvent=Module désactivé donc événement jamais créé
ConfirmPurge=Êtes-vous sûr de vouloir réaliser cette purge ?<br>Ceci effacera définitivement tous vos fichiers (espace GED, pièces jointes, etc...). ConfirmPurge=Êtes-vous sûr de vouloir réaliser cette purge ?<br>Ceci effacera définitivement tous vos fichiers (espace GED, pièces jointes, etc...).
MinLength=Longueur minimale MinLength=Longueur minimale
NbMajMin=Nombre de majuscule minimum
NbNumMin=Nombre de chiffre minimum
NbSpeMin=Nombre de caractère speciaux minimum
NbIteConsecutive=Nombre maximum d'iterations consecutive du même caractère
NoAmbiCaracAutoGeneration=Ne pas utiliser les caractère ambigus pour la generation automatique ("1","I","l","|","0","O")
SetupPerso=Configuration personalisable
LanguageFilesCachedIntoShmopSharedMemory=Fichiers .lang en mémoire partagée LanguageFilesCachedIntoShmopSharedMemory=Fichiers .lang en mémoire partagée
ExamplesWithCurrentSetup=Exemples avec le paramétrage actif courant ExamplesWithCurrentSetup=Exemples avec le paramétrage actif courant
ListOfDirectories=Liste des répertoires des modèles OpenDocument ListOfDirectories=Liste des répertoires des modèles OpenDocument
@ -1057,6 +1063,8 @@ EmptyNumRefModelDesc=Code libre sans vérification. Peut être modifié à tout
##### Module password generation ##### Module password generation
PasswordGenerationStandard=Renvoie un mot de passe généré selon l'algorithme interne de Dolibarr : 8 caractères, chiffres et caractères en minuscules mélangés. PasswordGenerationStandard=Renvoie un mot de passe généré selon l'algorithme interne de Dolibarr : 8 caractères, chiffres et caractères en minuscules mélangés.
PasswordGenerationNone=Ne propose pas de mots de passe générés. Le mot de passe est à saisir manuellement. PasswordGenerationNone=Ne propose pas de mots de passe générés. Le mot de passe est à saisir manuellement.
PasswordGenerationPerso=Renvoie un mot de passe généré selon votre configuration.
PasswordPatternDesc=Pattern utilisé pour la génération de password personalisé
##### Users setup ##### ##### Users setup #####
UserGroupSetup=Configuration module utilisateurs et groupes UserGroupSetup=Configuration module utilisateurs et groupes
GeneratePassword=Proposer un mot de passe généré GeneratePassword=Proposer un mot de passe généré

View File

@ -33,3 +33,5 @@ TitleResourceCard=Fiche ressource
ConfirmDeleteResource=Confirmer la suppression de cette ressource? ConfirmDeleteResource=Confirmer la suppression de cette ressource?
RessourceSuccessfullyDeleted=Ressource effacée avec succès RessourceSuccessfullyDeleted=Ressource effacée avec succès
DictionaryResourceType=Type de ressources DictionaryResourceType=Type de ressources
SelectResource=Sélectionner la ressource

View File

@ -1015,10 +1015,14 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
//print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/css/ColVisAlt.css'.($ext?'?'.$ext:'').'" />'."\n"; //print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/css/ColVisAlt.css'.($ext?'?'.$ext:'').'" />'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/css/TableTools.css'.($ext?'?'.$ext:'').'" />'."\n"; print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/css/TableTools.css'.($ext?'?'.$ext:'').'" />'."\n";
} }
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT'))) // jQuery multiselect if ((! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && $conf->global->MAIN_USE_JQUERY_MULTISELECT == 'multiselect') || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT') == 'multiselect')) // jQuery multiselect
{ {
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiselect/css/ui.multiselect.css'.($ext?'?'.$ext:'').'" />'."\n"; print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiselect/css/ui.multiselect.css'.($ext?'?'.$ext:'').'" />'."\n";
} }
if ((! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && $conf->global->MAIN_USE_JQUERY_MULTISELECT == 'multiple-select') || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT') == 'multiple-select')) // jQuery multiple-select
{
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiple-select/multiple-select.css'.($ext?'?'.$ext:'').'" />'."\n";
}
// jQuery Timepicker // jQuery Timepicker
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER')) if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
{ {
@ -1178,11 +1182,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/js/ColVis.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/ColVis/js/ColVis.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/js/TableTools.min.js'.($ext?'?'.$ext:'').'"></script>'."\n"; print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/js/TableTools.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
} }
// jQuery Multiselect
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || (defined('REQUIRE_JQUERY_MULTISELECT') && constant('REQUIRE_JQUERY_MULTISELECT')))
{
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/multiselect/js/ui.multiselect.js'.($ext?'?'.$ext:'').'"></script>'."\n";
}
// jQuery Timepicker // jQuery Timepicker
if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER')) if (! empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER'))
{ {

View File

@ -770,7 +770,7 @@ class Task extends CommonObject
if ($this->db->query($sql) ) if ($this->db->query($sql) )
{ {
$tasktime_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_time"); $tasktime_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_time");
$ret = $tasktme_id; $ret = $tasktime_id;
if (! $notrigger) if (! $notrigger)
{ {
@ -800,11 +800,8 @@ class Task extends CommonObject
$this->error=$this->db->lasterror(); $this->error=$this->db->lasterror();
$this->db->rollback(); $this->db->rollback();
$ret = -2; $ret = -2;
}
} }
if ($ret >= 0)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."projet_task_time"; $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task_time";
$sql.= " SET thm = (SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".$this->timespent_fk_user.")"; $sql.= " SET thm = (SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".$this->timespent_fk_user.")";
$sql.= " WHERE rowid = ".$tasktime_id; $sql.= " WHERE rowid = ".$tasktime_id;

View File

@ -3,7 +3,7 @@
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
@ -13,6 +13,7 @@
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/ */
/** /**

View File

@ -23,8 +23,8 @@
*/ */
// Put here all includes required by your class file // Put here all includes required by your class file
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"); require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php";
require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php";
/** /**
* DAO Resource object * DAO Resource object
@ -500,9 +500,9 @@ class Resource extends CommonObject
$line->fk_user_create = $obj->fk_user_create; $line->fk_user_create = $obj->fk_user_create;
if($obj->resource_id && $obj->resource_type) if($obj->resource_id && $obj->resource_type)
$line->objresource = $this->fetchObjectByElement($obj->resource_id,$obj->resource_type); $line->objresource = fetchObjectByElement($obj->resource_id,$obj->resource_type);
if($obj->element_id && $obj->element_type) if($obj->element_id && $obj->element_type)
$line->objelement = $this->fetchObjectByElement($obj->element_id,$obj->element_type); $line->objelement = fetchObjectByElement($obj->element_id,$obj->element_type);
$this->lines[$i] = $line; $this->lines[$i] = $line;
$i++; $i++;
@ -584,7 +584,7 @@ class Resource extends CommonObject
$line->mandatory = $obj->mandatory; $line->mandatory = $obj->mandatory;
$line->fk_user_create = $obj->fk_user_create; $line->fk_user_create = $obj->fk_user_create;
$this->lines[$i] = $this->fetchObjectByElement($obj->resource_id,$obj->resource_type); $this->lines[$i] = fetchObjectByElement($obj->resource_id,$obj->resource_type);
$i++; $i++;
} }
@ -802,7 +802,7 @@ class Resource extends CommonObject
$i=0; $i=0;
foreach($resources as $nb => $resource) foreach($resources as $nb => $resource)
{ {
$this->lines[$i] = $this->fetchObjectByElement($resource['resource_id'],$resource['resource_type']); $this->lines[$i] = fetchObjectByElement($resource['resource_id'],$resource['resource_type']);
$i++; $i++;
} }
return $i; return $i;

View File

@ -520,6 +520,7 @@ if (empty($reshook))
// Actions to send emails // Actions to send emails
$id=$socid; $id=$socid;
$actiontypecode='AC_OTH_AUTO'; $actiontypecode='AC_OTH_AUTO';
$trigger_name='COMPANY_SENTBYMAIL';
$paramname='socid'; $paramname='socid';
$mode='emailfromthirdparty'; $mode='emailfromthirdparty';
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';

View File

@ -36,7 +36,8 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
if (! empty($conf->agenda->enabled))require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
//if (! empty($conf->agenda->enabled))require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
if (! empty($conf->ldap->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; if (! empty($conf->ldap->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
if (! empty($conf->multicompany->enabled)) dol_include_once('/multicompany/class/actions_multicompany.class.php'); if (! empty($conf->multicompany->enabled)) dol_include_once('/multicompany/class/actions_multicompany.class.php');

View File

@ -460,7 +460,7 @@ function createThirdParty($authentication,$thirdparty)
$result=$newobject->create($fuser); $result=$newobject->create($fuser);
if ($newobject->particulier && $result > 0) { if ($newobject->particulier && $result > 0) {
$newobject->firstname = $thirdparty['firstname']; $newobject->firstname = $thirdparty['firstname'];
$newobject->name_bis = $thirdparty['ref']; $newobject->name_bis = $thirdparty['lastname'];
$result = $newobject->create_individual($fuser); $result = $newobject->create_individual($fuser);
} }
if ($result <= 0) if ($result <= 0)