Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/expedition/class/expedition.class.php
	htdocs/takepos/takepos.php
This commit is contained in:
Laurent Destailleur
2019-09-27 14:11:14 +02:00
70 changed files with 1138 additions and 66 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 991 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -50,7 +50,7 @@ fi
# ----------------------------- if no params on command line # ----------------------------- if no params on command line
if [ "x$passwd" = "x" ] if [ "x$passwd" = "x" ]
then then
export dumpfile=`ls $mydir/mysqldump_dolibarr_*.sql | sort | tail -n 1` export dumpfile=`ls -v $mydir/mysqldump_dolibarr_*.sql | tail -n 1`
export dumpfile=`basename $dumpfile` export dumpfile=`basename $dumpfile`
# ----------------------------- input file # ----------------------------- input file

File diff suppressed because one or more lines are too long

View File

@@ -38,7 +38,7 @@ passwd=$5;
# ----------------------------- if no params on command line # ----------------------------- if no params on command line
if [ "x$passwd" = "x" ] if [ "x$passwd" = "x" ]
then then
export dumpfile=`ls $mydir/mysqldump_dolibarr_*.sql | sort | tail -n 1` export dumpfile=`ls -v $mydir/mysqldump_dolibarr_*.sql | tail -n 1`
export dumpfile=`basename $dumpfile` export dumpfile=`basename $dumpfile`
# ----------------------------- input file # ----------------------------- input file

View File

@@ -71,7 +71,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm=='yes
$error++; $error++;
$action = 'create'; $action = 'create';
} }
if (! empty($conf->banque->enabled) && ! $_POST["accountid"] > 0) if (! empty($conf->banque->enabled) && ! ($_POST["accountid"] > 0))
{ {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToCredit")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("AccountToCredit")), null, 'errors');
$error++; $error++;

View File

@@ -530,7 +530,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
} }
// Blank line // Blank line
print '<tr><td colspan="'.($span+1).'">&nbsp;</td></tr>'; print '<tr><td colspan="'.($span+2).'">&nbsp;</td></tr>';
// Print table headers for this quadri - expenses now // Print table headers for this quadri - expenses now
print '<tr class="liste_titre liste_titre_topborder">'; print '<tr class="liste_titre liste_titre_topborder">';

View File

@@ -6814,16 +6814,9 @@ abstract class CommonObject
$dir = $sdir . '/'; $dir = $sdir . '/';
$pdir = '/'; $pdir = '/';
if ($modulepart == 'ticket')
{ $dir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/';
$dir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->track_id.'/'; $pdir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/';
$pdir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->track_id.'/';
}
else
{
$dir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/';
$pdir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/';
}
// For backward compatibility // For backward compatibility
if ($modulepart == 'product' && ! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) if ($modulepart == 'product' && ! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO))

View File

@@ -7015,8 +7015,8 @@ class Form
// Left part of banner // Left part of banner
if ($morehtmlleft) if ($morehtmlleft)
{ {
if ($conf->browser->layout == 'phone') $ret.='<div class="floatleft">'.$morehtmlleft.'</div>'; // class="center" to have photo in middle if ($conf->browser->layout == 'phone') $ret.='<!-- morehmltleft --><div class="floatleft">'.$morehtmlleft.'</div>'; // class="center" to have photo in middle
else $ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>'; else $ret.='<!-- morehmltleft --><div class="inline-block floatleft">'.$morehtmlleft.'</div>';
} }
//if ($conf->browser->layout == 'phone') $ret.='<div class="clearboth"></div>'; //if ($conf->browser->layout == 'phone') $ret.='<div class="clearboth"></div>';

View File

@@ -1120,7 +1120,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
{ {
global $conf, $langs, $hookmanager; global $conf, $langs, $hookmanager;
$out="\n".'<div class="tabs" data-role="controlgroup" data-type="horizontal">'."\n"; $out="\n".'<!-- dol_get_fiche_head --><div class="tabs" data-role="controlgroup" data-type="horizontal">'."\n";
if ($morehtmlright) $out.='<div class="inline-block floatright tabsElem">'.$morehtmlright.'</div>'; // Output right area first so when space is missing, text is in front of tabs and not under. if ($morehtmlright) $out.='<div class="inline-block floatright tabsElem">'.$morehtmlright.'</div>'; // Output right area first so when space is missing, text is in front of tabs and not under.
@@ -1367,7 +1367,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
elseif ($object->element == 'ticket') elseif ($object->element == 'ticket')
{ {
$width=80; $cssclass='photoref'; $width=80; $cssclass='photoref';
$showimage=$object->is_photo_available($conf->ticket->multidir_output[$entity].'/'.$object->track_id); $showimage=$object->is_photo_available($conf->ticket->multidir_output[$entity].'/'.$object->ref);
$maxvisiblephotos=(isset($conf->global->TICKETSUP_MAX_VISIBLE_PHOTO)?$conf->global->TICKETSUP_MAX_VISIBLE_PHOTO:2); $maxvisiblephotos=(isset($conf->global->TICKETSUP_MAX_VISIBLE_PHOTO)?$conf->global->TICKETSUP_MAX_VISIBLE_PHOTO:2);
if ($conf->browser->layout == 'phone') $maxvisiblephotos=1; if ($conf->browser->layout == 'phone') $maxvisiblephotos=1;
if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$object->show_photos('ticket', $conf->ticket->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0).'</div>'; if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$object->show_photos('ticket', $conf->ticket->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0).'</div>';

View File

@@ -551,6 +551,7 @@ if (empty($reshook))
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
exit(); exit();
} }
setEventMessages($object->error, $object->errors, 'errors');
} }
elseif ($action == 'classifyclosed') elseif ($action == 'classifyclosed')
@@ -561,6 +562,7 @@ if (empty($reshook))
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
exit(); exit();
} }
setEventMessages($object->error, $object->errors, 'errors');
} }
/* /*

View File

@@ -603,7 +603,7 @@ class Expedition extends CommonObject
//Incoterms //Incoterms
$this->fk_incoterms = $obj->fk_incoterms; $this->fk_incoterms = $obj->fk_incoterms;
$this->location_incoterms = $obj->location_incoterms; $this->location_incoterms = $obj->location_incoterms;
$this->label_incoterms = $obj->label_incoterms; $this->label_incoterms = $obj->label_incoterms;
$this->db->free($result); $this->db->free($result);
@@ -1384,6 +1384,7 @@ class Expedition extends CommonObject
// phpcs:enable // phpcs:enable
global $conf, $mysoc; global $conf, $mysoc;
// TODO: recuperer les champs du document associe a part // TODO: recuperer les champs du document associe a part
$this->lines=array();
$sql = "SELECT cd.rowid, cd.fk_product, cd.label as custom_label, cd.description, cd.qty as qty_asked, cd.product_type"; $sql = "SELECT cd.rowid, cd.fk_product, cd.label as custom_label, cd.description, cd.qty as qty_asked, cd.product_type";
$sql.= ", cd.total_ht, cd.total_localtax1, cd.total_localtax2, cd.total_ttc, cd.total_tva"; $sql.= ", cd.total_ht, cd.total_localtax1, cd.total_localtax2, cd.total_ttc, cd.total_tva";

View File

@@ -1646,9 +1646,11 @@ class Project extends CommonObject
* *
* @param string $tableName Table of the element to update * @param string $tableName Table of the element to update
* @param int $elementSelectId Key-rowid of the line of the element to update * @param int $elementSelectId Key-rowid of the line of the element to update
* @param string $projectfield The column name that stores the link with the project
*
* @return int 1 if OK or < 0 if KO * @return int 1 if OK or < 0 if KO
*/ */
public function remove_element($tableName, $elementSelectId) public function remove_element($tableName, $elementSelectId, $projectfield = 'fk_projet')
{ {
// phpcs:enable // phpcs:enable
$sql="UPDATE ".MAIN_DB_PREFIX.$tableName; $sql="UPDATE ".MAIN_DB_PREFIX.$tableName;
@@ -1657,10 +1659,9 @@ class Project extends CommonObject
{ {
$sql.= " SET fk_project=NULL"; $sql.= " SET fk_project=NULL";
$sql.= " WHERE id=".$elementSelectId; $sql.= " WHERE id=".$elementSelectId;
} }else
else
{ {
$sql.= " SET fk_projet=NULL"; $sql.= " SET ".$projectfield."=NULL";
$sql.= " WHERE rowid=".$elementSelectId; $sql.= " WHERE rowid=".$elementSelectId;
} }

View File

@@ -540,10 +540,11 @@ if ($action=="addelement")
elseif ($action == "unlink") elseif ($action == "unlink")
{ {
$tablename = GETPOST("tablename"); $tablename = GETPOST("tablename", "aZ09");
$elementselectid = GETPOST("elementselect"); $projectField = GETPOST("projectfield", "aZ09");
$elementselectid = GETPOST("elementselect", "int");
$result = $object->remove_element($tablename, $elementselectid); $result = $object->remove_element($tablename, $elementselectid, $projectField);
if ($result < 0) if ($result < 0)
{ {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
@@ -917,7 +918,7 @@ foreach ($listofreferent as $key => $value)
{ {
if (empty($conf->global->PROJECT_DISABLE_UNLINK_FROM_OVERVIEW) || $user->admin) // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true if (empty($conf->global->PROJECT_DISABLE_UNLINK_FROM_OVERVIEW) || $user->admin) // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true
{ {
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $projectid . '&action=unlink&tablename=' . $tablename . '&elementselect=' . $element->id . '" class="reposition">'; print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $projectid . '&action=unlink&tablename=' . $tablename . '&elementselect=' . $element->id . ($project_field ? '&projectfield=' . $project_field : '') . '" class="reposition">';
print img_picto($langs->trans('Unlink'), 'unlink'); print img_picto($langs->trans('Unlink'), 'unlink');
print '</a>'; print '</a>';
} }

View File

@@ -426,6 +426,7 @@ function Search2() {
continue; continue;
} }
$("#prodesc"+i).text(data[parseInt(i)]['label']); $("#prodesc"+i).text(data[parseInt(i)]['label']);
$("#prodivdesc"+i).show();
$("#proimg"+i).attr("src","genimg/?query=pro&id="+data[i]['rowid']); $("#proimg"+i).attr("src","genimg/?query=pro&id="+data[i]['rowid']);
$("#prodiv"+i).data("rowid",data[i]['rowid']); $("#prodiv"+i).data("rowid",data[i]['rowid']);
$("#prodiv"+i).data("iscat",0); $("#prodiv"+i).data("iscat",0);

View File

@@ -199,7 +199,7 @@ $minwidthtmenu=66; /* minimum width for one top menu entry */
$heightmenu=48; /* height of top menu, part with image */ $heightmenu=48; /* height of top menu, part with image */
$heightmenu2=49; /* height of top menu, part with login */ $heightmenu2=49; /* height of top menu, part with login */
$disableimages = 0; $disableimages = 0;
$maxwidthloginblock = 130; $maxwidthloginblock = 180;
if (! empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE)) { $disableimages = 1; $maxwidthloginblock = 180; $minwidthtmenu=0; } if (! empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE)) { $disableimages = 1; $maxwidthloginblock = 180; $minwidthtmenu=0; }