Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
Cubexed 2014-08-26 17:29:42 +02:00
commit 00856eb277
1295 changed files with 472 additions and 266 deletions

View File

@ -5,6 +5,7 @@ English Dolibarr ChangeLog
***** ChangeLog for 3.7 compared to 3.6.* *****
For users:
- New: On contact list can set filter on both active and not active (no more exclusive select).
- New: Each user can include its own external ics calendar into dolibarr agenda view.
- New: Intervention documents are now available in ECM module.
- New: Can attach supplier order to a customer order.
@ -44,6 +45,7 @@ For users:
- New: Enable supplier price log table
- New: [ task #1204 ] add a External reference to contract
- New: [ task #1218 ] Can drag and drop an event from calendar to change its day.
- New: Optimize size of image static resources.
- Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
- Fix: [ bug #1470, #1472, #1473] User trigger problem
- Fix: [ bug #1489, #1491 ] Intervention trigger problem
@ -79,6 +81,9 @@ For developers:
- New: Added hook "formConfirm" and "doActions" for supplier invoice card
- New: [ task #1511, #1426 ] Added hook "doActions" for supplier card and supplier order card
- New: renamed table llx_c_pays to llx_c_country & libelle field to label
- Qual: Renamed table llx_c_civilite into llx_c_civility
field civilite into label in the same table
and field civilite into civility in other table
WARNING: Following change may create regression for some external modules, but was necessary to make
Dolibarr better:
@ -86,6 +91,8 @@ Dolibarr better:
- Changed the way parameters are provided to scripts sync_xxx_ldap2dolibarr.php
- Some field into database wwere renamed from "libelle" to "label".
- Table llx_c_pays were renamed into llx_c_country.
- Triggers *_BUILDDOC are removed. Building a doc is not a business event. For action after
creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead.
***** ChangeLog for 3.6 compared to 3.5.* *****

195
dev/optimize_images.sh Executable file
View File

@ -0,0 +1,195 @@
#!/bin/bash
# Borrowed from https://gist.github.com/lgiraudel/6065155
# Inplace mode added by Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
PROGNAME=${0##*/}
INPUT=''
QUIET='0'
NOSTATS='0'
INPLACE='0'
max_input_size=0
max_output_size=0
usage()
{
cat <<EO
Usage: $PROGNAME [options]
Script to optimize JPG and PNG images in a directory.
Options:
EO
cat <<EO | column -s\& -t
-h, --help & shows this help
-q, --quiet & disables output
-i, --input [dir] & specify input directory (current directory by default)
-o, --output [dir] & specify output directory ("output" by default)
-ns, --no-stats & no stats at the end
-p, --inplace & optimizes files inplace
EO
}
# $1: input image
# $2: output image
optimize_image()
{
input_file_size=$(stat -c%s "$1")
max_input_size=$(expr $max_input_size + $input_file_size)
if [ "${1##*.}" = "png" ]; then
optipng -o1 -clobber -quiet $1 -out $2.firstpass
pngcrush -q -rem alla -reduce $2.firstpass $2 >/dev/null
rm -fr $2.firstpass
fi
if [ "${1##*.}" = "jpg" -o "${1##*.}" = "jpeg" ]; then
jpegtran -copy none -progressive $1 > $2
fi
output_file_size=$(stat -c%s "$2")
max_output_size=$(expr $max_output_size + $output_file_size)
}
get_max_file_length()
{
local maxlength=0
IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v $OUTPUT)
for CURRENT_IMAGE in $IMAGES; do
filename=$(basename "$CURRENT_IMAGE")
if [[ ${#filename} -gt $maxlength ]]; then
maxlength=${#filename}
fi
done
echo "$maxlength"
}
main()
{
# If $INPUT is empty, then we use current directory
if [[ "$INPUT" == "" ]]; then
INPUT=$(pwd)
fi
# If $OUTPUT is empty, then we use the directory "output" in the current directory
if [[ "$OUTPUT" == "" ]]; then
OUTPUT=$(pwd)/output
fi
# If inplace, we use /tmp for output
if [[ "$INPLACE" == "1" ]]; then
OUTPUT='/tmp/optimize'
fi
# We create the output directory
mkdir -p $OUTPUT
# To avoid some troubles with filename with spaces, we store the current IFS (Internal File Separator)...
SAVEIFS=$IFS
# ...and we set a new one
IFS=$(echo -en "\n\b")
max_filelength=`get_max_file_length`
pad=$(printf '%0.1s' "."{1..600})
sDone=' [ DONE ]'
linelength=$(expr $max_filelength + ${#sDone} + 5)
# Search of all jpg/jpeg/png in $INPUT
# We remove images from $OUTPUT if $OUTPUT is a subdirectory of $INPUT
IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v $OUTPUT)
if [ "$QUIET" == "0" ]; then
echo --- Optimizing $INPUT ---
echo
fi
for CURRENT_IMAGE in $IMAGES; do
filename=$(basename $CURRENT_IMAGE)
if [ "$QUIET" == "0" ]; then
printf '%s ' "$filename"
printf '%*.*s' 0 $((linelength - ${#filename} - ${#sDone} )) "$pad"
fi
optimize_image $CURRENT_IMAGE $OUTPUT/$filename
# Replace file
if [[ "$INPLACE" == "1" ]]; then
mv $OUTPUT/$filename $CURRENT_IMAGE
fi
if [ "$QUIET" == "0" ]; then
printf '%s\n' "$sDone"
fi
done
# Cleanup
if [[ "$INPLACE" == "1" ]]; then
rm -rf $OUTPUT
fi
# we restore the saved IFS
IFS=$SAVEIFS
if [ "$NOSTATS" == "0" -a "$QUIET" == "0" ]; then
echo
echo "Input: " $(human_readable_filesize $max_input_size)
echo "Output: " $(human_readable_filesize $max_output_size)
space_saved=$(expr $max_input_size - $max_output_size)
echo "Space save: " $(human_readable_filesize $space_saved)
fi
}
human_readable_filesize()
{
echo -n $1 | awk 'function human(x) {
s=" b Kb Mb Gb Tb"
while (x>=1024 && length(s)>1)
{x/=1024; s=substr(s,4)}
s=substr(s,1,4)
xf=(s==" b ")?"%5d ":"%.2f"
return sprintf( xf"%s", x, s)
}
{gsub(/^[0-9]+/, human($1)); print}'
}
SHORTOPTS="h,i:,o:,q,s,p"
LONGOPTS="help,input:,output:,quiet,no-stats,inplace"
ARGS=$(getopt -s bash --options $SHORTOPTS --longoptions $LONGOPTS --name $PROGNAME -- "$@")
eval set -- "$ARGS"
while true; do
case $1 in
-h|--help)
usage
exit 0
;;
-i|--input)
shift
INPUT=$1
;;
-o|--output)
shift
OUTPUT=$1
;;
-q|--quiet)
QUIET='1'
;;
-s|--no-stats)
NOSTATS='1'
;;
-p|--inplace)
INPLACE='1'
;;
--)
shift
break
;;
*)
shift
break
;;
esac
shift
done
main

View File

@ -425,7 +425,7 @@ class Adherent extends CommonObject
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
$sql.= " civilite = ".(!is_null($this->civility_id)?"'".$this->civility_id."'":"null");
$sql.= " civility = ".(!is_null($this->civility_id)?"'".$this->civility_id."'":"null");
$sql.= ", firstname = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null");
$sql.= ", lastname=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null");
$sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null");
@ -1048,7 +1048,7 @@ class Adherent extends CommonObject
{
global $langs;
$sql = "SELECT d.rowid, d.ref_ext, d.civilite as civility_id, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note,";
$sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_id, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note,";
$sql.= " d.email, d.skype, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
$sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,";
$sql.= " d.datec as datec,";
@ -1539,7 +1539,7 @@ class Adherent extends CommonObject
$code=(empty($this->civility_id)?'':$this->civility_id);
if (empty($code)) return '';
return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civilite", "code", "civilite", $code);
return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civility", "code", "label", $code);
}
/**

View File

@ -78,7 +78,7 @@ $tabname[1] = MAIN_DB_PREFIX."c_forme_juridique";
$tabname[2] = MAIN_DB_PREFIX."c_departements";
$tabname[3] = MAIN_DB_PREFIX."c_regions";
$tabname[4] = MAIN_DB_PREFIX."c_country";
$tabname[5] = MAIN_DB_PREFIX."c_civilite";
$tabname[5] = MAIN_DB_PREFIX."c_civility";
$tabname[6] = MAIN_DB_PREFIX."c_actioncomm";
$tabname[7] = MAIN_DB_PREFIX."c_chargesociales";
$tabname[8] = MAIN_DB_PREFIX."c_typent";
@ -136,7 +136,7 @@ $tabsql[1] = "SELECT f.rowid as rowid, f.code, f.libelle, c.code as country_code
$tabsql[2] = "SELECT d.rowid as rowid, d.code_departement as code, d.nom as libelle, d.fk_region as region_id, r.nom as region, c.code as country_code, c.label as country, d.active FROM ".MAIN_DB_PREFIX."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_country as c WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid and r.active=1 and c.active=1";
$tabsql[3] = "SELECT r.rowid as rowid, r.code_region as code, r.nom as libelle, r.fk_pays as country_id, c.code as country_code, c.label as country, r.active FROM ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_country as c WHERE r.fk_pays=c.rowid and c.active=1";
$tabsql[4] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_country";
$tabsql[5] = "SELECT c.rowid as rowid, c.code as code, c.civilite AS libelle, c.active FROM ".MAIN_DB_PREFIX."c_civilite AS c";
$tabsql[5] = "SELECT c.rowid as rowid, c.code as code, c.label, c.active FROM ".MAIN_DB_PREFIX."c_civility AS c";
$tabsql[6] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.type, a.active, a.module, a.position FROM ".MAIN_DB_PREFIX."c_actioncomm AS a";
$tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.accountancy_code as accountancy_code, a.deductible, c.code as country_code, c.label as country, a.fk_pays as country_id, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_pays=c.rowid and c.active=1";
$tabsql[8] = "SELECT t.id as rowid, t.code as code, t.libelle, t.fk_country as country_id, c.code as country_code, c.label as country, t.active FROM ".MAIN_DB_PREFIX."c_typent as t LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON t.fk_country=c.rowid";
@ -165,7 +165,7 @@ $tabsqlsort[1] ="country ASC, code ASC";
$tabsqlsort[2] ="country ASC, code ASC";
$tabsqlsort[3] ="country ASC, code ASC";
$tabsqlsort[4] ="code ASC";
$tabsqlsort[5] ="libelle ASC";
$tabsqlsort[5] ="label ASC";
$tabsqlsort[6] ="a.type ASC, a.module ASC, a.position ASC, a.code ASC";
$tabsqlsort[7] ="country ASC, code ASC, a.libelle ASC";
$tabsqlsort[8] ="country DESC, libelle ASC";
@ -194,7 +194,7 @@ $tabfield[1] = "code,libelle,country";
$tabfield[2] = "code,libelle,region_id,region,country"; // "code,libelle,region,country_code-country"
$tabfield[3] = "code,libelle,country_id,country";
$tabfield[4] = "code,label";
$tabfield[5] = "code,libelle";
$tabfield[5] = "code,label";
$tabfield[6] = "code,libelle,type,position";
$tabfield[7] = "code,libelle,country_id,country,accountancy_code,deductible";
$tabfield[8] = "code,libelle,country_id,country";
@ -223,7 +223,7 @@ $tabfieldvalue[1] = "code,libelle,country";
$tabfieldvalue[2] = "code,libelle,region"; // "code,libelle,region"
$tabfieldvalue[3] = "code,libelle,country";
$tabfieldvalue[4] = "code,label";
$tabfieldvalue[5] = "code,libelle";
$tabfieldvalue[5] = "code,label";
$tabfieldvalue[6] = "code,libelle,type,position";
$tabfieldvalue[7] = "code,libelle,country,accountancy_code,deductible";
$tabfieldvalue[8] = "code,libelle,country";
@ -252,7 +252,7 @@ $tabfieldinsert[1] = "code,libelle,fk_pays";
$tabfieldinsert[2] = "code_departement,nom,fk_region";
$tabfieldinsert[3] = "code_region,nom,fk_pays";
$tabfieldinsert[4] = "code,label";
$tabfieldinsert[5] = "code,civilite";
$tabfieldinsert[5] = "code,label";
$tabfieldinsert[6] = "code,libelle,type,position";
$tabfieldinsert[7] = "code,libelle,fk_pays,accountancy_code,deductible";
$tabfieldinsert[8] = "code,libelle,fk_country";
@ -1045,7 +1045,7 @@ if ($id)
$key=$langs->trans(strtoupper($obj->code));
$valuetoshow=($key != strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_civilite') {
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') {
$key=$langs->trans("Civility".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]);
}

View File

@ -105,6 +105,13 @@ else if ($action == 'MAIN_ANTIVIRUS_PARAM')
if (! dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity)) dol_print_error($db);
else setEventMessage($langs->trans("RecordModifiedSuccessfully"));
}
else if ($action == 'MAIN_APPLICATION_TITLE')
{
if (! dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity)) dol_print_error($db);
else setEventMessage($langs->trans("RecordModifiedSuccessfully"));
}
// Delete file
else if ($action == 'delete')
@ -163,8 +170,24 @@ print '<input type="submit" class="button" name="button" value="'.$langs->trans(
print '</td>';
print '</tr></form>';
print '</table>';
$var=!$var;
$sessiontimeout=ini_get("session.gc_maxlifetime");
if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATION_TITLE="";
print '<form action="'.$_SERVER["PHP_SELF"].'?action=MAIN_APPLICATION_TITLE" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("HiddeNumVersion").'</td><td align="right">';
print $form->textwithpicto('',$langs->trans("HiddeNumVersionExample",ini_get("session.gc_probability"),ini_get("session.gc_divisor")));
print '</td>';
print '<td class="nowrap">';
print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="20" value="'.htmlentities($conf->global->MAIN_APPLICATION_TITLE).'"> ';
print '</td>';
print '<td align="right">';
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
print '</td>';
print '</tr></form>';
print '</table>';
print '<br>';
@ -333,6 +356,5 @@ $formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestF
$filearray=dol_dir_list($upload_dir, "files", 0, '', '', 'name', SORT_ASC, 1);
$formfile->list_of_documents($filearray, '', 'admin_temp', '');
llxFooter();
$db->close();

View File

@ -1192,23 +1192,20 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd;
// Defined style to disable drag and drop feature
if (empty($event->fulldayevent))
if ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar))
{
if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar)
{
$tmpyearend = date('Y',$event->date_end_in_calendar);
$tmpmonthend = date('m',$event->date_end_in_calendar);
$tmpdayend = date('d',$event->date_end_in_calendar);
if ($tmpyearend != $annee || $tmpmonthend != $mois || $tmpdayend != $jour)
{
$cssclass.= " unsortable";
}
}
if ($event->type_code =='AC_OTH_AUTO')
$tmpyearend = date('Y',$event->date_end_in_calendar);
$tmpmonthend = date('m',$event->date_end_in_calendar);
$tmpdayend = date('d',$event->date_end_in_calendar);
if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour)
{
$cssclass.= " unsortable";
}
}
if ($event->type_code =='AC_OTH_AUTO')
{
$cssclass.= " unsortable";
}
// Show rect of event
print '<div id="event_'.$ymd.'_'.$i.'" class="event '.$cssclass.'">';

View File

@ -98,11 +98,10 @@ if ($action == 'add')
$result=$obj->add_to_target($id,$filtersarray);
}
}
if ($result > 0)
{
setEventMessage($langs->trans("XTargetsAdded",$result),'mesgs');
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
exit;
}
@ -167,7 +166,6 @@ if ($_POST["button_removefilter"])
/*
* View
*/
llxHeader('',$langs->trans("Mailing"),'EN:Module_EMailing|FR:Module_Mailing|ES:M&oacute;dulo_Mailing');
$form = new Form($db);
@ -306,12 +304,14 @@ if ($object->fetch($id) >= 0)
print img_object($langs->trans("Module").': '.get_class($obj),$obj->picto).' '.$obj->getDesc();
print '</td>';
/*
print '<td width=\"100\">';
print $modulename;
print "</td>";
*/
$nbofrecipient=$obj->getNbOfRecipients('');
try {
$nbofrecipient=$obj->getNbOfRecipients('');
}
catch(Exception $e)
{
dol_syslog($e->getMessage(), LOG_ERR);
}
print '<td align="center">';
if ($nbofrecipient >= 0)
{
@ -324,7 +324,13 @@ if ($object->fetch($id) >= 0)
print '</td>';
print '<td align="left">';
$filter=$obj->formFilter();
try {
$filter=$obj->formFilter();
}
catch(Exception $e)
{
dol_syslog($e->getMessage(), LOG_ERR);
}
if ($filter) print $filter;
else print $langs->trans("None");
print '</td>';
@ -421,7 +427,7 @@ if ($object->fetch($id) >= 0)
print '<td class="liste_titre">';
print '&nbsp';
print '</td>';
print '</tr>';
// Ligne des champs de filtres
@ -446,7 +452,7 @@ if ($object->fetch($id) >= 0)
print '<td class="liste_titre">';
print '&nbsp';
print '</td>';
// Date sending
print '<td class="liste_titre">';
print '&nbsp';
@ -530,7 +536,7 @@ if ($object->fetch($id) >= 0)
print $object::libStatutDest($obj->statut,2);
print '</td>';
}
//Sreach Icon
print '<td></td>';
print '</tr>';

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
@ -9,7 +9,7 @@
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
*
* 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 3 of the License, or
* (at your option) any later version.
*
@ -301,13 +301,6 @@ class Commande extends CommonOrder
}
}
// Set new ref and current status
if (! $error)
{
$this->ref = $num;
$this->statut = 1;
}
if (! $error)
{
// Call trigger
@ -316,6 +309,13 @@ class Commande extends CommonOrder
// End call triggers
}
// Set new ref and current status
if (! $error)
{
$this->ref = $num;
$this->statut = 1;
}
if (! $error)
{
$this->db->commit();

View File

@ -1763,16 +1763,6 @@ class Facture extends CommonInvoice
}
}
// Set new ref and define current statut
if (! $error)
{
$this->ref = $num;
$this->facnumber=$num;
$this->statut=1;
$this->brouillon=0;
$this->date_validation=$now;
}
// Trigger calls
if (! $error)
{
@ -1782,6 +1772,16 @@ class Facture extends CommonInvoice
//TODO: Restoring ref, facnumber, statut, brouillon to previous value if trigger fail
// End call triggers
}
// Set new ref and define current statut
if (! $error)
{
$this->ref = $num;
$this->facnumber=$num;
$this->statut=1;
$this->brouillon=0;
$this->date_validation=$now;
}
}
else
{

View File

@ -249,7 +249,7 @@ class Contact extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET ";
if ($this->socid > 0) $sql .= " fk_soc='".$this->db->escape($this->socid)."',";
else if ($this->socid == -1) $sql .= " fk_soc=null,";
$sql .= " civilite='".$this->db->escape($this->civility_id)."'";
$sql .= " civility='".$this->db->escape($this->civility_id)."'";
$sql .= ", lastname='".$this->db->escape($this->lastname)."'";
$sql .= ", firstname='".$this->db->escape($this->firstname)."'";
$sql .= ", address='".$this->db->escape($this->address)."'";
@ -498,7 +498,7 @@ class Contact extends CommonObject
$langs->load("companies");
$sql = "SELECT c.rowid, c.fk_soc, c.ref_ext, c.civilite as civility_id, c.lastname, c.firstname,";
$sql = "SELECT c.rowid, c.fk_soc, c.ref_ext, c.civility as civility_id, c.lastname, c.firstname,";
$sql.= " c.address, c.statut, c.zip, c.town,";
$sql.= " c.fk_pays as country_id,";
$sql.= " c.fk_departement,";
@ -911,7 +911,7 @@ class Contact extends CommonObject
$code=(! empty($this->civility_id)?$this->civility_id:(! empty($this->civility_id)?$this->civility_id:''));
if (empty($code)) return '';
return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civilite", "code", "civilite", $code);
return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civility", "code", "label", $code);
}
/**

View File

@ -61,7 +61,7 @@ class box_contacts extends ModeleBoxes
if ($user->rights->societe->lire)
{
$sql = "SELECT sp.rowid, sp.lastname, sp.firstname, sp.civilite as civility_id, sp.datec, sp.tms, sp.fk_soc,";
$sql = "SELECT sp.rowid, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc,";
$sql.= " s.nom as socname";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid";

View File

@ -383,7 +383,7 @@ abstract class CommonObject
$sql = "SELECT ec.rowid, ec.statut, ec.fk_socpeople as id, ec.fk_c_type_contact"; // This field contains id of llx_socpeople or id of llx_user
if ($source == 'internal') $sql.=", '-1' as socid";
if ($source == 'external' || $source == 'thirdparty') $sql.=", t.fk_soc as socid";
$sql.= ", t.civilite as civility, t.lastname as lastname, t.firstname, t.email";
$sql.= ", t.civility as civility, t.lastname as lastname, t.firstname, t.email";
$sql.= ", tc.source, tc.element, tc.code, tc.libelle";
$sql.= " FROM ".MAIN_DB_PREFIX."c_type_contact tc";
$sql.= ", ".MAIN_DB_PREFIX."element_contact ec";

View File

@ -368,7 +368,7 @@ class FormCompany
$out='';
$sql = "SELECT rowid, code, civilite as civility_label, active FROM ".MAIN_DB_PREFIX."c_civilite";
$sql = "SELECT rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_civility";
$sql.= " WHERE active = 1";
dol_syslog("Form::select_civility", LOG_DEBUG);
@ -393,7 +393,7 @@ class FormCompany
$out.= '<option value="'.$obj->code.'">';
}
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
$out.= ($langs->trans("Civility".$obj->code)!="Civility".$obj->code ? $langs->trans("Civility".$obj->code) : ($obj->civility_label!='-'?$obj->civility_label:''));
$out.= ($langs->trans("Civility".$obj->code)!="Civility".$obj->code ? $langs->trans("Civility".$obj->code) : ($obj->label!='-'?$obj->label:''));
$out.= '</option>';
$i++;
}

View File

@ -363,7 +363,7 @@ class Translate
}
else if (preg_match('/^Civility([0-9A-Z]+)$/i',$key,$reg))
{
$newstr=$this->getLabelFromKey($db,$reg[1],'c_civilite','code','civilite');
$newstr=$this->getLabelFromKey($db,$reg[1],'c_civility','code','label');
}
else if (preg_match('/^OrderSource([0-9A-Z]+)$/i',$key,$reg))
{

View File

@ -634,7 +634,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
// Status
print '<td class="liste_titre maxwidthonsmartphone">';
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
print $form->selectarray('search_status', array('-1'=>'','0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
print '</td>';
// Copy to clipboard
@ -656,10 +656,10 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
$sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays as country_id, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.skype, p.statut ";
$sql .= ", p.civilite as civility_id, p.address, p.zip, p.town";
$sql .= ", p.civility as civility_id, p.address, p.zip, p.town";
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
$sql .= " WHERE p.fk_soc = ".$object->id;
if ($search_status!='') $sql .= " AND p.statut = ".$db->escape($search_status);
if ($search_status!='' && $search_status != '-1') $sql .= " AND p.statut = ".$db->escape($search_status);
if ($search_name) $sql .= " AND (p.lastname LIKE '%".$db->escape($search_name)."%' OR p.firstname LIKE '%".$db->escape($search_name)."%')";
$sql.= " ORDER BY $sortfield $sortorder";

View File

@ -651,7 +651,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
* @param int $marge_gauche Margin left (no more used)
* @param int $page_hauteur Page height (no more used)
* @param Object $object Object shown in PDF
* @param int $showdetails Show company details into footer. This param seems to not be used by standard version.
* @param int $showdetails Show company details into footer. This param seems to not be used by standard version. (1=Show address, 2=Show managers, 3=Both)
* @param int $hidefreetext 1=Hide free text, 0=Show free text
* @return int Return height of bottom margin including footer text
*/
@ -681,10 +681,10 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
}
// First line of company infos
$line1=""; $line2=""; $line3=""; $line4="";
if ($showdetails)
if ($showdetails && 1)
{
$line1="";
// Company name
if ($fromcompany->name)
{
@ -716,7 +716,6 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
$line1.=($line1?" - ":"").$outputlangs->transnoentities("Fax").": ".$fromcompany->fax;
}
$line2="";
// URL
if ($fromcompany->url)
{
@ -728,9 +727,16 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
$line2.=($line2?" - ":"").$fromcompany->email;
}
}
if (($showdetails && 2) || ($fromcompany->country_code == 'DE'))
{
// Managers
if ($fromcompany->managers)
{
$line2.=($line2?" - ":"").$fromcompany->managers;
}
}
// Line 3 of company infos
$line3="";
// Juridical status
if ($fromcompany->forme_juridique_code)
{
@ -757,7 +763,6 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
}
// Line 4 of company infos
$line4="";
// Prof Id 3
if ($fromcompany->idprof3)
{

View File

@ -11,8 +11,8 @@ delete from llx_menu where menu_handler=__HANDLER__ and entity=__ENTITY__;
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', 1__+MAX_llx_menu__, __HANDLER__, 'top', 'home', '', 0, '/index.php?mainmenu=home&amp;leftmenu=', 'Home', -1, '', '', '', 2, 10, __ENTITY__);
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('societe|fournisseur', '( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)', 2__+MAX_llx_menu__, __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&amp;leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__);
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('product|service', '$conf->product->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&amp;leftmenu=', 'Products/Services', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 30, __ENTITY__);
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|contrat|ficheinter', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&amp;leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__);
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|facture|deplacement|don|tax', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&amp;leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire', '', 2, 50, __ENTITY__);
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|contrat|ficheinter', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&amp;leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__);
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|facture|deplacement|don|tax|salaries', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&amp;leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read', '', 2, 50, __ENTITY__);
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/index.php?mainmenu=bank&amp;leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 60, __ENTITY__);
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&amp;leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 70, __ENTITY__);
insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('mailing|export|import|opensurvey', '$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&amp;leftmenu=', 'Tools', -1, 'other', '$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read', '', 2, 90, __ENTITY__);

View File

@ -134,9 +134,9 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
}
// Financial
$tmpentry=array('enabled'=>(! empty($conf->comptabilite->enabled) || ! empty($conf->accounting->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->don->enabled) || ! empty($conf->tax->enabled)),
'perms'=>(! empty($user->rights->compta->resultat->lire) || ! empty($user->rights->accounting->plancompte->lire) || ! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire)),
'module'=>'comptabilite|accounting|facture|don|tax');
$tmpentry=array('enabled'=>(! empty($conf->comptabilite->enabled) || ! empty($conf->accounting->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->don->enabled) || ! empty($conf->tax->enabled) || ! empty($conf->salaries->enabled)),
'perms'=>(! empty($user->rights->compta->resultat->lire) || ! empty($user->rights->accounting->plancompte->lire) || ! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire) || ! empty($user->rights->salaries->read)),
'module'=>'comptabilite|accounting|facture|don|tax|salaries');
$showmode=dol_eldy_showmenu($type_user, $tmpentry, $listofmodulesforexternal);
if ($showmode)
{
@ -1247,7 +1247,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
else dol_print_error($db);
$db->free($resql);
}
if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP
if (!empty($conf->ftp->enabled) && $mainmenu == 'ftp') // Entry for FTP
{
$MAXFTP=20;
$i=1;

View File

@ -352,7 +352,8 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
global $conf;
$default_font_size = pdf_getPDFFontSize($outputlangs);
//return pdf_pagefoot($pdf,$outputlangs,'BANK_CHEQUERECEIPT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
//$showdetails=0;
//return pdf_pagefoot($pdf,$outputlangs,'BANK_CHEQUERECEIPT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
$paramfreetext='BANK_CHEQUERECEIPT_FREE_TEXT';
$marge_basse=$this->marge_basse;
$marge_gauche=$this->marge_gauche;

View File

@ -482,6 +482,8 @@ class doc_generic_order_odt extends ModelePDFCommandes
}
}
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));

View File

@ -1271,7 +1271,8 @@ class pdf_einstein extends ModelePDFCommandes
*/
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
return pdf_pagefoot($pdf,$outputlangs,'COMMANDE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
$showdetails=0;
return pdf_pagefoot($pdf,$outputlangs,'COMMANDE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}

View File

@ -1228,7 +1228,8 @@ class pdf_proforma extends ModelePDFCommandes
*/
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
return pdf_pagefoot($pdf,$outputlangs,'COMMANDE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
$showdetails=0;
return pdf_pagefoot($pdf,$outputlangs,'COMMANDE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}

View File

@ -234,13 +234,6 @@ function commande_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0
// Success in building document. We build meta file.
dol_meta_create($object);
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('ORDER_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $obj->errors=$interface->errors; }
// Fin appel triggers
return 1;
}
else

View File

@ -610,7 +610,8 @@ class pdf_strato extends ModelePDFContract
*/
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
return pdf_pagefoot($pdf,$outputlangs,'CONTRACT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
$showdetails=0;
return pdf_pagefoot($pdf,$outputlangs,'CONTRACT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}

View File

@ -224,17 +224,10 @@ function contract_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0
// We delete old preview
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
dol_delete_preview($object);
// Success in building document. We build meta file.
dol_meta_create($object);
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('CONTRACT_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $obj->errors=$interface->errors; }
// Fin appel triggers
return 1;
}
else

View File

@ -482,6 +482,8 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
}
}
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));

View File

@ -657,7 +657,8 @@ class pdf_rouget extends ModelePdfExpedition
*/
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
return pdf_pagefoot($pdf,$outputlangs,'SHIPPING_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
$showdetails=0;
return pdf_pagefoot($pdf,$outputlangs,'SHIPPING_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}

View File

@ -191,7 +191,7 @@ function expedition_pdf_create($db, $object, $modele, $outputlangs)
{
$file = $prefix."_".$modele.".modules.php";
// We check the model location
// We check the model location
$file=dol_buildpath($reldir."core/modules/expedition/doc/".$file,0);
if (file_exists($file))
{
@ -223,15 +223,6 @@ function expedition_pdf_create($db, $object, $modele, $outputlangs)
//require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
//dol_delete_preview($object);
// Calls triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('SHIPPING_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) {
$error++; $obj->errors=$interface->errors;
}
// End calls triggers
return 1;
}
else

View File

@ -439,6 +439,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
}
}
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));

View File

@ -1455,7 +1455,8 @@ class pdf_crabe extends ModelePDFFactures
*/
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
return pdf_pagefoot($pdf,$outputlangs,'FACTURE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
$showdetails=0;
return pdf_pagefoot($pdf,$outputlangs,'FACTURE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}

View File

@ -235,13 +235,6 @@ function facture_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0,
// Success in building document. We build meta file.
dol_meta_create($object);
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('BILL_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $errors=$interface->errors; }
// Fin appel triggers
return 1;
}
else

View File

@ -595,7 +595,8 @@ class pdf_soleil extends ModelePDFFicheinter
*/
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
return pdf_pagefoot($pdf,$outputlangs,'FICHINTER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
$showdetails=0;
return pdf_pagefoot($pdf,$outputlangs,'FICHINTER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}

View File

@ -224,13 +224,6 @@ function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
dol_delete_preview($object);
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('FICHINTER_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $obj->errors=$interface->errors; }
// Fin appel triggers
return 1;
}
else

View File

@ -226,15 +226,6 @@ function delivery_order_pdf_create($db, $object, $modele, $outputlangs='')
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
dol_delete_preview($object);
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('DELIVERY_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) {
$error++; $obj->errors=$interface->errors;
}
// Fin appel triggers
return 1;
}
else

View File

@ -358,7 +358,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
//$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxqty, $curY);
$pdf->MultiCell($this->posxremainingqty - $this->posxqty, 3, $object->lines[$i]->qty_shipped, 0, 'R');
// Remaining to ship
$pdf->SetXY($this->posxremainingqty, $curY);
$qtyRemaining = $object->lines[$i]->qty_asked - $object->commande->expeditions[$object->lines[$i]->fk_origin_line];
@ -613,7 +613,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
$pdf->MultiCell($this->posxcomm - $this->posxdesc,2, $outputlangs->transnoentities("Designation"),'','L');
}
// Modif SEB pour avoir une col en plus pour les commentaires clients
$pdf->line($this->posxcomm, $tab_top, $this->posxcomm, $tab_top + $tab_height);
if (empty($hidetop)) {
@ -863,7 +863,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder
*/
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
return pdf_pagefoot($pdf,$outputlangs,'DELIVERY_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
$showdetails=0;
return pdf_pagefoot($pdf,$outputlangs,'DELIVERY_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}

View File

@ -197,7 +197,7 @@ class mailing_contacts1 extends MailingTargets
// La requete doit retourner: id, email, fk_contact, name, firstname, other
$sql = "SELECT c.rowid as id, c.email as email, c.rowid as fk_contact,";
$sql.= " c.lastname, c.firstname, c.civilite as civility_id,";
$sql.= " c.lastname, c.firstname, c.civility as civility_id,";
$sql.= " s.nom as companyname";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = c.fk_soc";
@ -239,7 +239,7 @@ class mailing_contacts1 extends MailingTargets
'firstname' => $obj->firstname,
'other' =>
($langs->transnoentities("ThirdParty").'='.$obj->companyname).';'.
($langs->transnoentities("UserTitle").'='.($obj->civilite_id?$langs->transnoentities("Civility".$obj->civilite_id):'')),
($langs->transnoentities("UserTitle").'='.($obj->civility_id?$langs->transnoentities("Civility".$obj->civility_id):'')),
'source_url' => $this->url($obj->id),
'source_id' => $obj->id,
'source_type' => 'contact'

View File

@ -79,7 +79,7 @@ class mailing_contacts2 extends MailingTargets
// La requete doit retourner: id, email, fk_contact, name, firstname, other
$sql = "SELECT sp.rowid as id, sp.email as email, sp.rowid as fk_contact,";
$sql.= " sp.lastname, sp.firstname as firstname, sp.civilite as civility_id,";
$sql.= " sp.lastname, sp.firstname as firstname, sp.civility as civility_id,";
$sql.= " s.nom as companyname";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = sp.fk_soc";

View File

@ -77,7 +77,7 @@ class mailing_contacts3 extends MailingTargets
// La requete doit retourner: id, email, fk_contact, name, firstname, other
$sql = "SELECT sp.rowid as id, sp.email as email, sp.rowid as fk_contact,";
$sql.= " sp.lastname, sp.firstname, sp.civilite as civility_id,";
$sql.= " sp.lastname, sp.firstname, sp.civility as civility_id,";
$sql.= " s.nom as companyname";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = sp.fk_soc";

View File

@ -77,7 +77,7 @@ class mailing_contacts4 extends MailingTargets
// La requete doit retourner: id, email, fk_contact, name, firstname, other
$sql = "SELECT sp.rowid as id, sp.email as email, sp.rowid as fk_contact,";
$sql.= " sp.lastname, sp.firstname, sp.civilite as civility_id,";
$sql.= " sp.lastname, sp.firstname, sp.civility as civility_id,";
$sql.= " s.nom as companyname";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
if ($filtersarray[0] <> 'all')$sql.= " INNER JOIN ".MAIN_DB_PREFIX."categorie_contact as cs ON cs.fk_socpeople=sp.rowid";

View File

@ -166,7 +166,7 @@ class mailing_fraise extends MailingTargets
// La requete doit retourner: id, email, fk_contact, name, firstname
$sql = "SELECT a.rowid as id, a.email as email, null as fk_contact, ";
$sql.= " a.lastname, a.firstname,";
$sql.= " a.datefin, a.civilite as civility_id, a.login, a.societe"; // Other fields
$sql.= " a.datefin, a.civility as civility_id, a.login, a.societe"; // Other fields
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
$sql.= " WHERE a.email <> ''"; // Note that null != '' is false
$sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";

View File

@ -64,7 +64,7 @@ class mailing_framboise extends MailingTargets
// Select the members from category
$sql = "SELECT a.rowid as id, a.email as email, a.lastname, null as fk_contact, a.firstname,";
$sql.= " a.datefin, a.civilite as civility_id, a.login, a.societe,"; // Other fields
$sql.= " a.datefin, a.civility as civility_id, a.login, a.societe,"; // Other fields
if ($_POST['filter']) $sql.= " c.label";
else $sql.=" null as label";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";

View File

@ -149,7 +149,7 @@ class mailing_pomme extends MailingTargets
// La requete doit retourner: id, email, fk_contact, lastname, firstname
$sql = "SELECT u.rowid as id, u.email as email, null as fk_contact,";
$sql.= " u.lastname, u.firstname as firstname, u.civilite as civility_id, u.login, u.office_phone";
$sql.= " u.lastname, u.firstname as firstname, u.civility as civility_id, u.login, u.office_phone";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE u.email <> ''"; // u.email IS NOT NULL est implicite dans ce test
$sql.= " AND u.entity IN (0,".$conf->entity.")";

View File

@ -173,9 +173,10 @@ class modAdherent extends DolibarrModules
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='MembersAndSubscriptions';
$this->export_permission[$r]=array(array("adherent","export"));
$this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.lastname'=>"Lastname",'a.firstname'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'d.nom'=>"State",'co.code'=>"CountryCode",'co.label'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.birth'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount');
$this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.zip'=>"Text",'a.town'=>"Text",'d.nom'=>"Text",'co.code'=>'Text','co.label'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.birth'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number');
$this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.zip'=>"member",'a.town'=>"member",'d.nom'=>"member",'co.code'=>"member",'co.label'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.birth'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
$this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civility'=>"UserTitle",'a.lastname'=>"Lastname",'a.firstname'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'d.nom'=>"State",'co.code'=>"CountryCode",'co.label'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.birth'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount');
$this->export_TypeFields_array[$r]=array('a.civility'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.zip'=>"Text",'a.town'=>"Text",'d.nom'=>"Text",'co.code'=>'Text','co.label'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.birth'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number');
$this->export_entities_array[$r]=array('a.rowid'=>'member','a.civility'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.zip'=>"member",'a.town'=>"member",'d.nom'=>"member",'co.code'=>"member",'co.label'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.birth'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
// Add extra fields
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
@ -210,7 +211,7 @@ class modAdherent extends DolibarrModules
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
$this->import_tables_array[$r]=array('a'=>MAIN_DB_PREFIX.'adherent','extra'=>MAIN_DB_PREFIX.'adherent_extrafields');
$this->import_tables_creator_array[$r]=array('a'=>'fk_user_author'); // Fields to store import user id
$this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.lastname'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'a.state_id'=>'StateId','a.country'=>"CountryId",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.birth'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription');
$this->import_fields_array[$r]=array('a.civility'=>"UserTitle",'a.lastname'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'a.state_id'=>'StateId','a.country'=>"CountryId",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.birth'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription');
// Add extra fields
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
@ -225,8 +226,8 @@ class modAdherent extends DolibarrModules
}
// End add extra fields
$this->import_fieldshidden_array[$r]=array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'adherent'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent)
$this->import_regex_array[$r]=array('a.civilite'=>'code@'.MAIN_DB_PREFIX.'c_civilite','a.fk_adherent_type'=>'rowid@'.MAIN_DB_PREFIX.'adherent_type','a.morphy'=>'(phy|mor)','a.statut'=>'^[0|1]','a.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','a.datefin'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
$this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.lastname'=>'Smith','a.firstname'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.zip'=>'55000','a.town'=>'New York','a.country'=>'1','a.email'=>'jsmith@example.com','a.birth'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d'));
$this->import_regex_array[$r]=array('a.civility'=>'code@'.MAIN_DB_PREFIX.'c_civility','a.fk_adherent_type'=>'rowid@'.MAIN_DB_PREFIX.'adherent_type','a.morphy'=>'(phy|mor)','a.statut'=>'^[0|1]','a.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','a.datefin'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
$this->import_examplevalues_array[$r]=array('a.civility'=>"MR",'a.lastname'=>'Smith','a.firstname'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.zip'=>'55000','a.town'=>'New York','a.country'=>'1','a.email'=>'jsmith@example.com','a.birth'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d'));
}

View File

@ -181,7 +181,7 @@ class modCategorie extends DolibarrModules
'u.label' => "Label",
'u.description' => "Description",
'p.rowid' => 'ContactId',
'p.civilite' => 'Civility',
'p.civility' => 'Civility',
'p.lastname' => 'LastName',
'p.firstname' => 'Firstname',
'p.address' => 'Address',
@ -211,7 +211,7 @@ class modCategorie extends DolibarrModules
'u.label' => "category",
'u.description' => "category",
'p.rowid' => 'contact',
'p.civilite' => 'contact',
'p.civility' => 'contact',
'p.lastname' => 'contact',
'p.firstname' => 'contact',
'p.address' => 'contact',

View File

@ -78,13 +78,13 @@ class modProductBatch extends DolibarrModules
$this->tabs = array();
// Dictionnaries
// Dictionaries
if (! isset($conf->productbatch->enabled))
{
$conf->productbatch=new stdClass();
$conf->productbatch->enabled=0;
}
$this->dictionnaries=array();
$this->dictionaries=array();
// Boxes
$this->boxes = array(); // List of boxes

View File

@ -320,8 +320,8 @@ class modSociete extends DolibarrModules
$this->export_label[$r]='ExportDataset_company_2';
$this->export_icon[$r]='contact';
$this->export_permission[$r]=array(array("societe","contact","export"));
$this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civilite'=>"CivilityCode",'c.lastname'=>'Lastname','c.firstname'=>'Firstname','c.poste'=>'PostOrFunction','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.zip'=>"Zip",'c.town'=>"Town",'d.nom'=>'State','co.label'=>"Country",'co.code'=>"CountryCode",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.phone_mobile'=>"Mobile",'c.email'=>"EMail",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode", 's.client'=>'Customer 0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'Supplier 0 or 1');
$this->export_TypeFields_array[$r]=array('c.civilite'=>"List:c_civilite:civilite:code",'c.lastname'=>'Text','c.firstname'=>'Text','c.poste'=>'Text','c.datec'=>"Date",'c.priv'=>"Boolean",'c.address'=>"Text",'c.cp'=>"Text",'c.ville'=>"Text",'d.nom'=>'Text','co.label'=>"List:c_country:label:rowid",'co.code'=>"Text",'c.phone'=>"Text",'c.fax'=>"Text",'c.email'=>"Text",'s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Status",'s.client'=>"Text",'s.fournisseur'=>"Text");
$this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civility'=>"CivilityCode",'c.lastname'=>'Lastname','c.firstname'=>'Firstname','c.poste'=>'PostOrFunction','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.zip'=>"Zip",'c.town'=>"Town",'d.nom'=>'State','p.libelle'=>"Country",'p.code'=>"CountryCode",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.phone_mobile'=>"Mobile",'c.email'=>"EMail",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode", 's.client'=>'Customer 0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'Supplier 0 or 1');
$this->export_TypeFields_array[$r]=array('c.civility'=>"List:c_civility:label:code",'c.lastname'=>'Text','c.firstname'=>'Text','c.poste'=>'Text','c.datec'=>"Date",'c.priv'=>"Boolean",'c.address'=>"Text",'c.cp'=>"Text",'c.ville'=>"Text",'d.nom'=>'Text','co.label'=>"List:c_country:label:rowid",'co.code'=>"Text",'c.phone'=>"Text",'c.fax'=>"Text",'c.email'=>"Text",'s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Status",'s.client'=>"Text",'s.fournisseur'=>"Text");
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company", 's.client'=>"company", 's.fournisseur'=>"company"); // We define here only fields that use another picto
if (empty($conf->fournisseur->enabled))
{
@ -417,7 +417,7 @@ class modSociete extends DolibarrModules
$this->import_icon[$r]='contact';
$this->import_entities_array[$r]=array('s.fk_soc'=>'company'); // We define here only fields that use another icon that the one defined into import_icon
$this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople','extra'=>MAIN_DB_PREFIX.'socpeople_extrafields'); // List of tables to insert into (insert done in same order)
$this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName','s.civilite'=>'UserTitle','s.lastname'=>"Lastname*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note_private'=>"Note",'s.note_public'=>"Note",'s.datec'=>"DateCreation");
$this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName','s.civility'=>'UserTitle','s.lastname'=>"Lastname*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note_private'=>"Note",'s.note_public'=>"Note",'s.datec'=>"DateCreation");
// Add extra fields
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
@ -438,7 +438,7 @@ class modSociete extends DolibarrModules
);
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
$this->import_regex_array[$r]=array('s.birthday'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
$this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civilite'=>"MR",'s.lastname'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.zip'=>'75000','s.town'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note_private'=>"My private note",'s.note_public'=>"My public note");
$this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civility'=>"MR",'s.lastname'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.zip'=>'75000','s.town'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note_private'=>"My private note",'s.note_public'=>"My public note");
// Import Bank Accounts
$r++;

View File

@ -225,13 +225,6 @@ function project_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0,
// Success in building document. We build meta file.
dol_meta_create($object);
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('PROJECT_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
return 1;
}
else

View File

@ -1019,6 +1019,8 @@ class doc_generic_project_odt extends ModelePDFProjects
}
}
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));

View File

@ -295,6 +295,18 @@ class pdf_baleine extends ModelePDFProjects
$pdf->Close();
$pdf->Output($file,'F');
// Add pdfgeneration hook
if (! is_object($hookmanager))
{
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
@ -442,7 +454,8 @@ class pdf_baleine extends ModelePDFProjects
*/
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
return pdf_pagefoot($pdf,$outputlangs,'PROJECT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
$showdetails=0;
return pdf_pagefoot($pdf,$outputlangs,'PROJECT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}

View File

@ -225,13 +225,6 @@ function task_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $h
// Success in building document. We build meta file.
dol_meta_create($object);
// Appel des triggers
/*include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('PROJECT_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }*/
// Fin appel triggers
return 1;
}
else

View File

@ -816,9 +816,31 @@ class doc_generic_task_odt extends ModelePDFTask
}
// Call the beforeODTSave hook
$parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
$reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
// Write new file
$odfHandler->saveToDisk($file);
if (!empty($conf->global->MAIN_ODT_AS_PDF)) {
try {
$odfHandler->exportAsAttachedPDF($file);
}catch (Exception $e){
$this->error=$e->getMessage();
return -1;
}
}
else {
try {
$odfHandler->saveToDisk($file);
}catch (Exception $e){
$this->error=$e->getMessage();
return -1;
}
}
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));

View File

@ -517,6 +517,8 @@ class doc_generic_proposal_odt extends ModelePDFPropales
}
}
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));

View File

@ -1362,7 +1362,8 @@ class pdf_azur extends ModelePDFPropales
*/
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
return pdf_pagefoot($pdf,$outputlangs,'PROPALE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
$showdetails=0;
return pdf_pagefoot($pdf,$outputlangs,'PROPALE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}

View File

@ -230,13 +230,6 @@ function propale_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0,
// Success in building document. We build meta file.
dol_meta_create($object);
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('PROPAL_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $obj->errors=$interface->errors; }
// Fin appel triggers
return 1;
}
else

View File

@ -416,6 +416,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc
}
}
$reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));

View File

@ -422,15 +422,6 @@ function thirdparty_doc_create($db, $object, $message, $modele, $outputlangs)
{
$outputlangs->charset_output=$sav_charset_output;
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('COMPANY_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) {
$error++; $obj->errors=$interface->errors;
}
// Fin appel triggers
return 1;
}
else

View File

@ -221,13 +221,6 @@ function supplier_invoice_pdf_create($db, $object, $modele, $outputlangs, $hided
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
dol_delete_preview($object);
// Calls triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('BILL_SUPPLIER_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $obj->errors=$interface->errors; }
// End calls triggers
return 1;
}
else

View File

@ -1052,7 +1052,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
*/
function _pagefoot(&$pdf, $object, $outputlangs,$hidefreetext=0)
{
return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
$showdetails=0;
return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}

View File

@ -120,7 +120,7 @@ abstract class ModeleNumRefSuppliersOrders
return $langs->trans("NotAvailable");
}
/** Returns version of the numbering model
/** Returns version of the numbering model
*
* @return string Value
*/
@ -196,7 +196,7 @@ function supplier_order_pdf_create($db, $object, $modele, $outputlangs, $hidedet
{
$file = $prefix."_".$modele.".modules.php";
// We check the model location
// We check the model location
$file=dol_buildpath($reldir."core/modules/supplier_order/pdf/".$file,0);
if (file_exists($file))
{
@ -226,15 +226,6 @@ function supplier_order_pdf_create($db, $object, $modele, $outputlangs, $hidedet
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
dol_delete_preview($object);
// Calls triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('ORDER_SUPPLIER_BUILDDOC',$object,$user,$langs,$conf);
if ($result < 0) {
$error++; $obj->errors=$interface->errors;
}
// End calls triggers
return 1;
}
else

View File

@ -701,7 +701,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
{
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
foreach( $localtax_rate as $tvakey => $tvaval )
{
if ($tvakey != 0) // On affiche pas taux 0
@ -733,7 +733,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
{
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
foreach( $localtax_rate as $tvakey => $tvaval )
{
if ($tvakey != 0) // On affiche pas taux 0
@ -1105,7 +1105,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
*/
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0)
{
return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_ORDER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
$showdetails=0;
return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_ORDER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}

View File

@ -30,6 +30,7 @@ if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1;
$arrayofjs=array('/core/js/dst.js'.(empty($conf->dol_use_jmobile)?'':'?version='.urlencode(DOL_VERSION))); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second
$titleofloginpage=$langs->trans('Login').' '.$title; // title is defined by dol_loginfunction in security2.lib.php
print top_htmlhead('',$titleofloginpage,0,0,$arrayofjs);
?>
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
@ -65,7 +66,7 @@ $(document).ready(function () {
<input type="hidden" name="dol_use_jmobile" id="dol_use_jmobile" value="<?php echo $dol_use_jmobile; ?>" />
<table class="login_table_title center" summary="<?php echo dol_escape_htmltag($title); ?>">
<tr class="vmenu"><td align="center"><?php echo $title; ?></td></tr>
<tr class="vmenu"><td align="center"><?php echo dol_escape_htmltag($title); ?></td></tr>
</table>
<br>

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
/* Copyright (C) 2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -118,7 +118,6 @@ class InterfaceDemo extends DolibarrTriggers
case 'ORDER_CLONE':
case 'ORDER_VALIDATE':
case 'ORDER_DELETE':
case 'ORDER_BUILDDOC':
case 'ORDER_SENTBYMAIL':
case 'ORDER_CLASSIFY_BILLED':
case 'LINEORDER_INSERT':
@ -134,7 +133,6 @@ class InterfaceDemo extends DolibarrTriggers
case 'ORDER_SUPPLIER_REFUSE':
case 'ORDER_SUPPLIER_CANCEL':
case 'ORDER_SUPPLIER_SENTBYMAIL':
case 'ORDER_SUPPLIER_BUILDDOC':
case 'LINEORDER_SUPPLIER_DISPATCH':
case 'LINEORDER_SUPPLIER_CREATE':
case 'LINEORDER_SUPPLIER_UPDATE':
@ -144,7 +142,6 @@ class InterfaceDemo extends DolibarrTriggers
case 'PROPAL_CLONE':
case 'PROPAL_MODIFY':
case 'PROPAL_VALIDATE':
case 'PROPAL_BUILDDOC':
case 'PROPAL_SENTBYMAIL':
case 'PROPAL_CLOSE_SIGNED':
case 'PROPAL_CLOSE_REFUSED':
@ -169,7 +166,6 @@ class InterfaceDemo extends DolibarrTriggers
case 'BILL_MODIFY':
case 'BILL_VALIDATE':
case 'BILL_UNVALIDATE':
case 'BILL_BUILDDOC':
case 'BILL_SENTBYMAIL':
case 'BILL_CANCEL':
case 'BILL_DELETE':
@ -227,7 +223,6 @@ class InterfaceDemo extends DolibarrTriggers
case 'PROJECT_CREATE':
case 'PROJECT_MODIFY':
case 'PROJECT_DELETE':
case 'PROJECT_BUILDDOC':
// Project tasks
case 'TASK_CREATE':
@ -245,7 +240,6 @@ class InterfaceDemo extends DolibarrTriggers
case 'SHIPPING_VALIDATE':
case 'SHIPPING_SENTBYMAIL':
case 'SHIPPING_DELETE':
case 'SHIPPING_BUILDDOC':
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
break;

View File

@ -224,7 +224,7 @@ class Fichinter extends CommonObject
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinter SET ";
$sql.= ", description = '".$this->db->escape($this->description)."'";
$sql.= "description = '".$this->db->escape($this->description)."'";
$sql.= ", duree = ".$this->duree;
$sql.= ", fk_projet = ".$this->fk_project;
$sql.= ", note_private = ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
@ -365,7 +365,7 @@ class Fichinter extends CommonObject
*/
function setValid($user)
{
global $langs, $conf;
global $conf;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$error=0;

View File

@ -154,7 +154,7 @@ class ProductFournisseur extends Product
*/
function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0)
{
global $conf,$mysoc;
global $conf;
// Clean parameter
if (empty($qty)) $qty=0;

View File

@ -161,10 +161,11 @@ else if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->
else if ($action == 'reopen' && $user->rights->fournisseur->commande->approuver)
{
if (in_array($object->statut, array(1, 5, 6, 7, 9)))
if (in_array($object->statut, array(1, 2, 5, 6, 7, 9)))
{
if ($object->statut == 1) $newstatus=0; // Validated->Draft
else if ($object->statut == 5) $newstatus=4; // Received->Received partially
else if ($object->statut == 2) $newstatus=0; // Approved->Draft
else if ($object->statut == 5) $newstatus=4; // Received->Received partially
else if ($object->statut == 6) $newstatus=2; // Canceled->Approved
else if ($object->statut == 7) $newstatus=3; // Canceled->Process running
else if ($object->statut == 9) $newstatus=1; // Refused->Validated
@ -1857,7 +1858,7 @@ elseif (! empty($object->id))
}
// Reopen
if (in_array($object->statut, array(5, 6, 7, 9)))
if (in_array($object->statut, array(2, 5, 6, 7, 9)))
{
if ($user->rights->fournisseur->commande->commander)
{

View File

@ -27,12 +27,12 @@
--
--
-- Civilites
-- Civilities
--
delete from llx_c_civilite;
insert into llx_c_civilite (rowid, code, civilite, active) values (1 , 'MME', 'Madame', 1);
insert into llx_c_civilite (rowid, code, civilite, active) values (3 , 'MR', 'Monsieur', 1);
insert into llx_c_civilite (rowid, code, civilite, active) values (5 , 'MLE', 'Mademoiselle', 1);
insert into llx_c_civilite (rowid, code, civilite, active) values (7 , 'MTRE', 'Maître', 1);
insert into llx_c_civilite (rowid, code, civilite, active) values (8 , 'DR', 'Docteur', 1);
delete from llx_c_civility;
insert into llx_c_civility (rowid, code, label, active) values (1 , 'MME', 'Madame', 1);
insert into llx_c_civility (rowid, code, label, active) values (3 , 'MR', 'Monsieur', 1);
insert into llx_c_civility (rowid, code, label, active) values (5 , 'MLE', 'Mademoiselle', 1);
insert into llx_c_civility (rowid, code, label, active) values (7 , 'MTRE', 'Maître', 1);
insert into llx_c_civility (rowid, code, label, active) values (8 , 'DR', 'Docteur', 1);

View File

@ -972,15 +972,23 @@ CREATE TABLE llx_holiday_types (
deleteAt DATETIME,
nbCongesDeducted varchar(255) NOT NULL,
nbCongesEveryMonth varchar(255) NOT NULL
);
-- Change on table c_civilite
DROP INDEX uk_c_civilite ON llx_c_civilite;
ALTER TABLE llx_c_civilite RENAME TO llx_c_civility;
ALTER TABLE llx_c_civility CHANGE civilite label VARCHAR(50);
ALTER TABLE llx_c_civility ADD UNIQUE INDEX uk_c_civility(code);
ALTER TABLE llx_adherent CHANGE civilite civility VARCHAR(6);
ALTER TABLE llx_socpeople CHANGE civilite civility VARCHAR(6);
ALTER TABLE llx_user CHANGE civilite civility VARCHAR(6);
) ENGINE=innodb;
ALTER TABLE llx_c_type_fees CHANGE libelle label VARCHAR(30);
ALTER TABLE llx_c_type_fees ADD COLUMN accountancy_code varchar(32) DEFAULT NULL AFTER label;
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_element (fk_element);
ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_task (fk_task);
ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_date (task_date);
ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_datehour (task_datehour);

View File

@ -30,7 +30,7 @@ create table llx_adherent
entity integer DEFAULT 1 NOT NULL, -- multi company id
ref_ext varchar(128), -- reference into an external system (not used by dolibarr)
civilite varchar(6),
civility varchar(6),
lastname varchar(50),
firstname varchar(50),
login varchar(50), -- login

View File

@ -16,4 +16,4 @@
--
-- ========================================================================
ALTER TABLE llx_c_civilite ADD UNIQUE INDEX uk_c_civilite(code);
ALTER TABLE llx_c_civility ADD UNIQUE INDEX uk_c_civility(code);

View File

@ -17,11 +17,11 @@
--
-- ========================================================================
create table llx_c_civilite
create table llx_c_civility
(
rowid integer PRIMARY KEY,
code varchar(6) NOT NULL,
civilite varchar(50),
label varchar(50),
active tinyint DEFAULT 1 NOT NULL,
module varchar(32) NULL
)ENGINE=innodb;

View File

@ -26,7 +26,7 @@ create table llx_socpeople
fk_soc integer, -- lien vers la societe
entity integer DEFAULT 1 NOT NULL, -- multi company id
ref_ext varchar(128), -- reference into an external system (not used by dolibarr)
civilite varchar(6),
civility varchar(6),
lastname varchar(50),
firstname varchar(50),
address varchar(255),

View File

@ -34,7 +34,7 @@ create table llx_user
pass varchar(32),
pass_crypted varchar(128),
pass_temp varchar(32), -- temporary password when asked for forget password
civilite varchar(6),
civility varchar(6),
lastname varchar(50),
firstname varchar(50),
address varchar(255), -- user personal address

View File

@ -133,7 +133,7 @@ Box=Box
Boxes=Boxes
MaxNbOfLinesForBoxes=Max number of lines for boxes
PositionByDefault=Default order
Position=Order
Position=Position
MenusDesc=Menus managers define content of the 2 menu bars (horizontal bar and vertical bar).
MenusEditorDesc=The menu editor allow you to define personalized entries in menus. Use it carefully to avoid making dolibarr unstable and menu entries permanently unreachable.<br>Some modules add entries in the menus (in menu <b>All</b> in most cases). If you removed some of these entries by mistake, you can restore them by disabling and reenabling the module.
MenuForUsers=Menu for users
@ -1082,6 +1082,7 @@ NotificationsDesc=EMails notifications feature allows you to silently send autom
ModelModules=Documents templates
DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT or .ODS files for OpenOffice, KOffice, TextEdit,...)
WatermarkOnDraft=Watermark on draft document
JSOnPaimentBill=Activate feature to autofill payment lines on payment form
CompanyIdProfChecker=Rules on Professional Ids
MustBeUnique=Must be unique ?
MustBeMandatory=Mandatory to create third parties ?

View File

@ -81,6 +81,8 @@ MustBeLowerThanPHPLimit=Remarque : Votre PHP limite la taille des envois à <b>
NoMaxSizeByPHPLimit=Aucune limite configurée dans votre serveur PHP
MaxSizeForUploadedFiles=Taille maximum des fichiers envoyés (0 pour interdire l'envoi)
UseCaptchaCode=Utilisation du code graphique (CAPTCHA) sur la page de connexion
HiddeNumVersion=Modifier titre du site
HiddeNumVersionExample=Remplace titre du site, si laisser vide cela affiche la valeur par defaut ( Dolibarr X.X.X )
UseAvToScanUploadedFiles=Utiliser un antivirus pour vérifier les fichiers envoyés
AntiVirusCommand= Chemin complet vers la commande antivirus
AntiVirusCommandExample= Exemple pour ClamWin : c:\\Progra~1\\ClamWin\\bin\\clamscan.exe<br>Exemple pour ClamAv : /usr/bin/clamscan

View File

@ -121,7 +121,7 @@ $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1); // R
if ($id)
{
$project->fetch($id);
$project->societe->fetch($project->societe->id);
$project->fetch_thirdparty();
}
$tasksarray=$taskstatic->getTasksArray(0,0,($project->id?$project->id:$projectsListId),$socid,0); // We want to see all task of project i am allowed to see, not only mine. Later only mine will be editable later.

View File

@ -53,7 +53,6 @@ class Project extends CommonObject
var $statuts;
var $oldcopy;
/**
* Constructor
*
@ -62,7 +61,6 @@ class Project extends CommonObject
function __construct($db)
{
$this->db = $db;
$this->societe = new Societe($db);
$this->statuts_short = array(0 => 'Draft', 1 => 'Opened', 2 => 'Closed');
$this->statuts = array(0 => 'Draft', 1 => 'Opened', 2 => 'Closed');
@ -982,6 +980,7 @@ class Project extends CommonObject
// Load source object
$clone_project->fetch($fromid);
$clone_project->fetch_thirdparty();
$orign_dt_start=$clone_project->date_start;
$orign_project_ref=$clone_project->ref;
@ -1009,7 +1008,7 @@ class Project extends CommonObject
require_once DOL_DOCUMENT_ROOT ."/core/modules/project/".$conf->global->PROJECT_ADDON.'.php';
$modProject = new $obj;
$defaultref = $modProject->getNextValue($clone_project->societe->id,$clone_project);
$defaultref = $modProject->getNextValue(is_object($clone_project->thirdparty)?$clone_project->thirdparty->id:0,$clone_project);
}
if (is_numeric($defaultref) && $defaultref <= 0) $defaultref='';

View File

@ -89,7 +89,7 @@ $userstatic=new User($db);
$project = new Project($db);
$project->fetch($projectid,$ref);
$project->societe->fetch($project->societe->id);
$project->fetch_thirdparty();
// To verify role of users
$userAccess = $project->restrictedProjectArea($user);
@ -115,7 +115,7 @@ print '</td></tr>';
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$project->title.'</td></tr>';
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
if (! empty($project->societe->id)) print $project->societe->getNomUrl(1);
if (! empty($project->thirdparty->id)) print $project->thirdparty->getNomUrl(1);
else print '&nbsp;';
print '</td></tr>';
@ -229,7 +229,7 @@ foreach ($listofreferent as $key => $value)
print_titre($langs->trans($title));
$selectList=$formproject->select_element($tablename,$project->societe->id);
$selectList=$formproject->select_element($tablename,$project->thirdparty->id);
if (!$selectList || ($selectList<0)) {
setEventMessage($formproject->error,'errors');
@ -244,7 +244,7 @@ foreach ($listofreferent as $key => $value)
print '</form>';
}
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td width="100">'.$langs->trans("Ref").'</td>';
print '<td width="100" align="center">'.$langs->trans("Date").'</td>';
@ -272,7 +272,7 @@ foreach ($listofreferent as $key => $value)
{
if ($element->close_code == 'replaced') $qualifiedfortotal=false; // Replacement invoice
}
$var=!$var;
print "<tr ".$bc[$var].">";
@ -294,7 +294,7 @@ foreach ($listofreferent as $key => $value)
print '</td>';
// Amount
if (empty($value['disableamount']))
if (empty($value['disableamount']))
{
print '<td align="right">';
if (! $qualifiedfortotal) print '<strike>';
@ -304,7 +304,7 @@ foreach ($listofreferent as $key => $value)
}
// Amount
if (empty($value['disableamount']))
if (empty($value['disableamount']))
{
print '<td align="right">';
if (! $qualifiedfortotal) print '<strike>';
@ -341,30 +341,30 @@ foreach ($listofreferent as $key => $value)
if ($project->statut > 0)
{
if ($project->societe->prospect || $project->societe->client)
if ($project->thirdparty->prospect || $project->thirdparty->client)
{
if ($key == 'propal' && ! empty($conf->propal->enabled) && $user->rights->propale->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$project->societe->id.'&amp;action=create&amp;origin='.$project->element.'&amp;originid='.$project->id.'">'.$langs->trans("AddProp").'</a>';
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$project->thirdparty->id.'&amp;action=create&amp;origin='.$project->element.'&amp;originid='.$project->id.'">'.$langs->trans("AddProp").'</a>';
}
if ($key == 'order' && ! empty($conf->commande->enabled) && $user->rights->commande->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/commande/fiche.php?socid='.$project->societe->id.'&amp;action=create&amp;origin='.$project->element.'&amp;originid='.$project->id.'">'.$langs->trans("AddCustomerOrder").'</a>';
print '<a class="butAction" href="'.DOL_URL_ROOT.'/commande/fiche.php?socid='.$project->thirdparty->id.'&amp;action=create&amp;origin='.$project->element.'&amp;originid='.$project->id.'">'.$langs->trans("AddCustomerOrder").'</a>';
}
if ($key == 'invoice' && ! empty($conf->facture->enabled) && $user->rights->facture->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?socid='.$project->societe->id.'&amp;action=create&amp;origin='.$project->element.'&amp;originid='.$project->id.'">'.$langs->trans("AddCustomerInvoice").'</a>';
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?socid='.$project->thirdparty->id.'&amp;action=create&amp;origin='.$project->element.'&amp;originid='.$project->id.'">'.$langs->trans("AddCustomerInvoice").'</a>';
}
}
if ($project->societe->fournisseur)
if ($project->thirdparty->fournisseur)
{
if ($key == 'order_supplier' && ! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?socid='.$project->societe->id.'&amp;action=create&amp;origin='.$project->element.'&amp;originid='.$project->id.'">'.$langs->trans("AddSupplierInvoice").'</a>';
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/fiche.php?socid='.$project->thirdparty->id.'&amp;action=create&amp;origin='.$project->element.'&amp;originid='.$project->id.'">'.$langs->trans("AddSupplierInvoice").'</a>';
}
if ($key == 'invoice_supplier' && ! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->creer)
{
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/fiche.php?socid='.$project->societe->id.'&amp;action=create&amp;origin='.$project->element.'&amp;originid='.$project->id.'">'.$langs->trans("AddSupplierOrder").'</a>';
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/commande/fiche.php?socid='.$project->thirdparty->id.'&amp;action=create&amp;origin='.$project->element.'&amp;originid='.$project->id.'">'.$langs->trans("AddSupplierOrder").'</a>';
}
}
}

BIN
htdocs/theme/amarok/img/1downarrow.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 117 B

BIN
htdocs/theme/amarok/img/1downarrow_selected.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 117 B

BIN
htdocs/theme/amarok/img/1leftarrow.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 123 B

BIN
htdocs/theme/amarok/img/1leftarrow_selected.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 126 B

BIN
htdocs/theme/amarok/img/1rightarrow.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 118 B

BIN
htdocs/theme/amarok/img/1rightarrow_selected.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 119 B

BIN
htdocs/theme/amarok/img/1uparrow.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 118 B

BIN
htdocs/theme/amarok/img/1uparrow_selected.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

After

Width:  |  Height:  |  Size: 114 B

BIN
htdocs/theme/amarok/img/1updownarrow.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 125 B

BIN
htdocs/theme/amarok/img/addfile.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
htdocs/theme/amarok/img/button_edit.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
htdocs/theme/amarok/img/calc.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 422 B

BIN
htdocs/theme/amarok/img/calendar.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 506 B

BIN
htdocs/theme/amarok/img/call.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 476 B

0
htdocs/theme/amarok/img/call_out.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 501 B

After

Width:  |  Height:  |  Size: 501 B

BIN
htdocs/theme/amarok/img/close.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

After

Width:  |  Height:  |  Size: 301 B

BIN
htdocs/theme/amarok/img/delete.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 424 B

BIN
htdocs/theme/amarok/img/detail.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 686 B

BIN
htdocs/theme/amarok/img/disable.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 490 B

BIN
htdocs/theme/amarok/img/edit.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 524 B

BIN
htdocs/theme/amarok/img/edit_add.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 B

After

Width:  |  Height:  |  Size: 461 B

Some files were not shown because too many files have changed in this diff Show More