Skip to content

Commit

Permalink
Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 5, 2014
2 parents 5027222 + 76353bf commit 3a4a1a4
Show file tree
Hide file tree
Showing 247 changed files with 1,412 additions and 1,059 deletions.
6 changes: 6 additions & 0 deletions .tx/config
Expand Up @@ -164,6 +164,12 @@ source_file = htdocs/langs/en_US/ldap.lang
source_lang = en_US
type = MOZILLAPROPERTIES

[dolibarr.link]
file_filter = htdocs/langs/<lang>/link.lang
source_file = htdocs/langs/en_US/link.lang
source_lang = en_US
type = MOZILLAPROPERTIES

[dolibarr.mailmanspip]
file_filter = htdocs/langs/<lang>/mailmanspip.lang
source_file = htdocs/langs/en_US/mailmanspip.lang
Expand Down
2 changes: 2 additions & 0 deletions ChangeLog
Expand Up @@ -112,6 +112,8 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f

***** ChangeLog for 3.5.5 compared to 3.5.4 *****
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
Fix: Fusion PDF button on unpaid invoice is no more displayed
Fix: Unpaid invoice launch fusion PDF action even if it is only search (with enter keyboard input instead of lens click)

***** ChangeLog for 3.5.4 compared to 3.5.3 *****
Fix: Hide title of event when agenda module disabled.
Expand Down
26 changes: 13 additions & 13 deletions build/debian/dolibarr.postinst
Expand Up @@ -131,19 +131,19 @@ case "$1" in
setup_empty_conf
else
# File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
#echo Add new params to overwrite path to use shared libraries/fonts
#grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
#grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
#grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
##grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
##grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
#grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
#grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
#grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
#grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
#grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
fi

db_get dolibarr/reconfigure-webserver
Expand Down
1 change: 1 addition & 0 deletions build/makepack-dolibarr.pl
Expand Up @@ -416,6 +416,7 @@
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/spec`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/uml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/vagrant`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/xdebug`;
$ret=`rm -f $BUILDROOT/$PROJECT/dev/dolibarr_changes.txt`;
$ret=`rm -f $BUILDROOT/$PROJECT/dev/README`;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/admin/agenda_other.php
Expand Up @@ -110,11 +110,11 @@
}
else
{
if($conf->global->AGENDA_USE_EVENT_TYPE == 0)
if (empty($conf->global->AGENDA_USE_EVENT_TYPE))
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Disabled"),'off').'</a>';
}
else if($conf->global->BUSINESS_VISIBLE_TO_ALL_BY_DEFAULT == 1)
else
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_USE_EVENT_TYPE">'.img_picto($langs->trans("Enabled"),'on').'</a>';
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/dict.php
Expand Up @@ -780,7 +780,7 @@
if ($valuetoshow != '')
{
print '<td align="'.$align.'">';
if (! empty($tabhelp[$id][$value]) && preg_match('/http:/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.'</a>';
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
else print $valuetoshow;
print '</td>';
Expand Down
26 changes: 13 additions & 13 deletions htdocs/comm/action/fiche.php
Expand Up @@ -518,18 +518,18 @@ function setdatefields()
// Location
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.$object->location.'"></td></tr>';

// Assigned to
$var=false;
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
$form->select_users(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1);
print '</td></tr>';

print '</table>';

print '<br><br>';

print '<table class="border" width="100%">';

// Assigned to
$var=false;
print '<tr><td width="30%" class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
$form->select_users(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1);
print '</td></tr>';

// Busy
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td>';
print '<input id="transparency" type="checkbox" name="transparency"'.($actioncomm->transparency?' checked="checked"':'').'>';
Expand Down Expand Up @@ -772,15 +772,15 @@ function setdatefields()
// Location
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.$object->location.'"></td></tr>';

print '</table><br><br><table class="border" width="100%">';

// Assigned to
print '<tr><td width="30%" class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
print $form->select_dolusers($object->usertodo->id>0?$object->usertodo->id:-1,'affectedto',1);
print '</td></tr>';

print '</table><br><br><table class="border" width="100%">';

// Busy
print '<tr><td class="nowrap">'.$langs->trans("Busy").'</td><td>';
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td>';
print '<input id="transparency" type="checkbox" name="transparency"'.($object->transparency?' checked="checked"':'').'">';
print '</td></tr>';

Expand Down Expand Up @@ -947,15 +947,15 @@ function setdatefields()
// Location
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="2">'.$object->location.'</td></tr>';

print '</table><br><br><table class="border" width="100%">';

// Assigned to
print '<tr><td width="30%" class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
if ($object->usertodo->id > 0) print $object->usertodo->getNomUrl(1);
print '</td></tr>';

print '</table><br><br><table class="border" width="100%">';

// Busy
print '<tr><td class="nowrap">'.$langs->trans("Busy").'</td><td colspan="3">';
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td colspan="3">';
if ($object->usertodo->id > 0) print yn(($object->transparency > 0)?1:0); // We show nothing if event is assigned to nobody
print '</td></tr>';

Expand Down
6 changes: 4 additions & 2 deletions htdocs/compta/bank/bankid_fr.php
Expand Up @@ -35,6 +35,7 @@

$action=GETPOST('action');
$id=GETPOST('id');
$ref=GETPOST('ref');

// Security check
if (isset($_GET["id"]) || isset($_GET["ref"]))
Expand Down Expand Up @@ -88,8 +89,9 @@
if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->banque->configurer)
{
// Modification
$account = new Account($db, $_GET["id"]);
$account->delete($_GET["id"]);
$account = new Account($db);
$account->fetch($id);
$account->delete();

header("Location: ".DOL_URL_ROOT."/compta/bank/index.php");
exit;
Expand Down
3 changes: 2 additions & 1 deletion htdocs/compta/facture/impayees.php
Expand Up @@ -41,6 +41,7 @@
$action = GETPOST('action','alpha');
$option = GETPOST('option');
$mode=GETPOST('mode');
$builddoc_generatebutton=GETPOST('builddoc_generatebutton');

// Security check
if ($user->societe_id) $socid=$user->societe_id;
Expand Down Expand Up @@ -230,7 +231,7 @@
}


if ($action == "builddoc" && $user->rights->facture->lire && ! GETPOST('button_search'))
if ($action == "builddoc" && $user->rights->facture->lire && ! GETPOST('button_search') && !empty($builddoc_generatebutton))
{
if (is_array($_POST['toGenerate']))
{
Expand Down
32 changes: 24 additions & 8 deletions htdocs/contrat/fiche.php
Expand Up @@ -3,9 +3,10 @@
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Ferran Marcet <fmarcet@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
Expand Down Expand Up @@ -419,6 +420,10 @@

$tva_tx = get_default_tva($mysoc,$object->thirdparty,$prod->id);
$tva_npr = get_default_npr($mysoc,$object->thirdparty,$prod->id);
$pu_ht = $prod->price;
$pu_ttc = $prod->price_ttc;
$price_min = $prod->price_min;
$price_base_type = $prod->price_base_type;

// On defini prix unitaire
if ($conf->global->PRODUIT_MULTIPRICES && $object->thirdparty->price_level)
Expand All @@ -428,13 +433,24 @@
$price_min = $prod->multiprices_min[$object->thirdparty->price_level];
$price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level];
}
else
{
$pu_ht = $prod->price;
$pu_ttc = $prod->price_ttc;
$price_min = $prod->price_min;
$price_base_type = $prod->price_base_type;
}
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
{
require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php';

$prodcustprice = new Productcustomerprice($db);

$filter = array('t.fk_product' => $prod->id,'t.fk_soc' => $object->client->id);

$result = $prodcustprice->fetch_all('', '', 0, 0, $filter);
if ($result) {
if (count($prodcustprice->lines) > 0) {
$pu_ht = price($prodcustprice->lines [0]->price);
$pu_ttc = price($prodcustprice->lines [0]->price_ttc);
$price_base_type = $prodcustprice->lines [0]->price_base_type;
$prod->tva_tx = $prodcustprice->lines [0]->tva_tx;
}
}
}

// On reevalue prix selon taux tva car taux tva transaction peut etre different
// de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur).
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/extrafields.class.php
Expand Up @@ -943,7 +943,7 @@ function showOutputField($key,$value,$moreparam='')
$selectkey="rowid";
$keyList='rowid';

if (count($InfoFieldList)==3)
if (count($InfoFieldList)>=3)
{
$selectkey = $InfoFieldList[2];
$keyList=$InfoFieldList[2].' as rowid';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/class/html.formfile.class.php
Expand Up @@ -500,7 +500,7 @@ function showdocuments($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed
// Button
$addcolumforpicto=($delallowed || $printer || $morepicto);
$out.= '<th align="center" colspan="'.($addcolumforpicto?'2':'1').'" class="formdocbutton liste_titre">';
$genbutton = '<input class="button" id="'.$forname.'_generatebutton"';
$genbutton = '<input class="button" id="'.$forname.'_generatebutton" name="'.$forname.'_generatebutton"';
$genbutton.= ' type="submit" value="'.$buttonlabel.'"';
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist)) $genbutton.= ' disabled="disabled"';
$genbutton.= '>';
Expand All @@ -510,7 +510,7 @@ function showdocuments($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed
$genbutton.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated"));
}
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton='';
if (empty($modellist) && ! $showempty) $genbutton='';
if (empty($modellist) && ! $showempty && $modulepart != 'unpaid') $genbutton='';
$out.= $genbutton;
$out.= '</th>';

Expand Down
13 changes: 9 additions & 4 deletions htdocs/core/lib/agenda.lib.php
Expand Up @@ -428,10 +428,15 @@ function actions_prepare_head($object)
$h++;
}

$head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
$head[$h][2] = 'documents';
$h++;
// Attached files
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$upload_dir = $conf->agenda->dir_output . "/" . $object->id;
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents");
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
$head[$h][2] = 'documents';
$h++;

$head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$object->id;
$head[$h][1] = $langs->trans('Info');
Expand Down
Expand Up @@ -723,8 +723,8 @@ function run_trigger($action,$object,$user,$langs,$conf)
$actioncomm->contact = $contactforaction;
$actioncomm->societe = $societeforaction;
$actioncomm->author = $user; // User saving action
//$actioncomm->usertodo = $user; // User affected to action
$actioncomm->userdone = $user; // User doing action
$actioncomm->usertodo = $user; // User action is assigned to (owner of action)
$actioncomm->userdone = $user; // User doing action (deprecated, not used anymore)

$actioncomm->fk_element = $object->id;
$actioncomm->elementtype = $object->element;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/expedition/index.php
Expand Up @@ -67,7 +67,7 @@
$sql.= ", s.nom, s.rowid as socid";
$sql.= ", c.ref as commande_ref, c.rowid as commande_id";
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping'";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
if (!$user->rights->societe->client->voir && !$socid)
Expand Down
5 changes: 4 additions & 1 deletion htdocs/install/mysql/migration/3.5.0-3.6.0.sql
Expand Up @@ -1677,4 +1677,7 @@ INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype,
-- Fix: Missing instruction not correctly done into 3.5
-- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_mode_reglement DROP NOT NULL;
-- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_cond_reglement DROP NOT NULL;


UPDATE llx_actioncomm set fk_user_action = fk_user_done where fk_user_done > 0 and (fk_user_action is null or fk_user_action = 0);
UPDATE llx_actioncomm set fk_user_action = fk_user_author where fk_user_author > 0 and (fk_user_action is null or fk_user_action = 0);

5 changes: 5 additions & 0 deletions htdocs/install/mysql/migration/repair.sql
Expand Up @@ -150,3 +150,8 @@ drop table tmp_societe_double;


UPDATE llx_projet_task SET fk_task_parent = 0 WHERE fk_task_parent = rowid


UPDATE llx_actioncomm set fk_user_action = fk_user_done where fk_user_done > 0 and (fk_user_action is null or fk_user_action = 0);
UPDATE llx_actioncomm set fk_user_action = fk_user_author where fk_user_author > 0 and (fk_user_action is null or fk_user_action = 0);

4 changes: 2 additions & 2 deletions htdocs/install/mysql/tables/llx_actioncomm.sql
Expand Up @@ -45,9 +45,9 @@ create table llx_actioncomm
fk_parent integer NOT NULL default 0,

fk_user_action integer, -- user id of owner of action (currently also user id of actor that must do action. In future, actors assigned to action will be an array into table llx_actioncomm_resources)
transparency integer, -- transparency (ical standard). used to say if user assigned to event are busy or not by event (in future version, this field is deprecated and will be stored into table llx_actioncomm_resources)

transparency integer, -- transparency (ical standard). used to say if people assigned to event are busy or not by event (in future version, this field is deprecated and will be stored into table llx_actioncomm_resources)
fk_user_done integer, -- user id of people that has made action (deprecated)
fk_user_done integer, -- user id of user that has made action (deprecated)

priority smallint,
fulldayevent smallint NOT NULL default 0,
Expand Down

0 comments on commit 3a4a1a4

Please sign in to comment.