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

Conflicts:
	htdocs/expedition/card.php
	htdocs/holiday/list.php
This commit is contained in:
Laurent Destailleur 2019-11-01 21:06:06 +01:00
commit 2d9135b6ad
7 changed files with 37 additions and 47 deletions

View File

@ -48,7 +48,6 @@ FIX: Clean the + of categories on the product view only in POS module
FIX: access to public interface when origin email has an alias.
FIX: Alias name is not into the email recipient label.
FIX: allow standalone credit note even if no invoice
FIX: an admin can not access his own permissions after enabling advanced
FIX: an admin can not access his own permissions after enabling advanced permissions
FIX: Attachement of linked files on ticket when sending a message
FIX: avoid non numeric warning
@ -117,17 +116,17 @@ FIX: #11752
FIX: #11789 FIX: #11790
FIX: #11804 list of tickets from a customer card display ALL tickets
FIX: #11834
FIX: Add char $ and ; in sanitizing of filenames.
FIX: Add comment before protected functions
FIX: Add log and type of content in dolWebsiteOutput and
FIX: Add repair.php option 'restore' to restore user picture after v10
FIX: add char $ and ; in sanitizing of filenames
FIX: add comment before protected functions
FIX: add log and type of content in dolWebsiteOutput and
FIX: add repair.php option 'restore' to restore user picture after v10
FIX: amount opened on thirdparty card dont care of credit note not converted
FIX: Api of documents work with value 'thirdparty'
FIX: API of documents work with value 'thirdparty'
FIX: author in message / ticket API
FIX: avoid sql error if fk_project is empty during update
FIX: avoid SQL error if fk_project is empty during update
FIX: avoid Warning: A non-numeric value encountered
FIX: bad consistency in list of invoice for direct debit order.
FIX: Bad error management in zip compress and web site export
FIX: bad consistency in list of invoice for direct debit order
FIX: bad error management in zip compress and web site export
FIX: bad substitution for extrafields type checkbox
FIX: better help message with multicompany
FIX: calculation of $products_dispatched
@ -136,11 +135,11 @@ FIX: Can't delete a draft leave even if it should
FIX: Can't save setup of mailman module
FIX: column jabberid missing
FIX: Confirmation of deletion
FIX: Consistency in direct debit order lists.
FIX: Consistency in direct debit order lists
FIX: Content send before header warning
FIX: credit note can be split
FIX: credit note used on list
FIX: Css was saved on wrong website.
FIX: CSS was saved on wrong website
FIX: delivery extrafields
FIX: Disabling a website does not put it offline
FIX: display only stripe sources for customer
@ -157,13 +156,13 @@ FIX: Fatal situation if payment removed on expense report. Action
FIX: filepath of generated documents doesn't handle products with special characters
FIX: for MAIN_MAXTABS_IN_CARD = $i card
FIX: gzip and bzip2 must use option -f
FIX: It was possible to create cashfence without entering data.
FIX: it was possible to create cashfence without entering data
FIX: javascript error when using dol_use_jmobile=1
FIX: logout redirect to takepos.php
FIX: Look and feel v10
FIX: Make protected all pfd models functions
FIX: management of extrafields in modulebuilder
FIX: Missing div for buttons in tax, loan, various payment modules
FIX: missing div for buttons in tax, loan, various payment modules
FIX: missing include (dol_convert_file not found)
FIX: Missing some replacements in website module
FIX: missing test on permission on button to delete ledger record
@ -187,13 +186,13 @@ FIX: Return code of pdf_einstein.modules.php and proformat
FIX: round for application fee in stripe
FIX: Sens of the balance (Debit - Credit in accountancy not contrary)
FIX: Several pb in export of documents
FIX: SQL syntax error and CSRF check on vat reports
FIX: SQL syntax error and CSRF check on VAT reports
FIX: takepos layout clear or focus search
FIX: too many record in sql request. Whena criteria is a filter, we must
FIX: too many record in sql request. When a criteria is a filter, we must
FIX: Translation of month
FIX: USEDOLIBARREDITOR not always set
FIX: VAT number for Monaco (it uses FR)
FIX: vulenrability in uploading file found by 美创科技安全实验室
FIX: vulnerability in uploading file found by 美创科技安全实验室
FIX: wrong display (and hidden input) for already dispatched quantity
FIX: wrong parameters (same error in branch 9, 10, develop)
FIX: Wrong variable. Must be PROJECT_HIDE_UNSELECTABLES

View File

@ -1132,11 +1132,11 @@ else
while ($i < $num) {
$obj = $db->fetch_object($result);
$amount += $obj->amount;
$total_ht += $obj->amount;
$total_ttc += $obj->amount;
$subtotal_ht += $obj->amount;
$subtotal_ttc += $obj->amount;
$amount += -$obj->amount;
$total_ht += -$obj->amount;
$total_ttc += -$obj->amount;
$subtotal_ht += -$obj->amount;
$subtotal_ttc += -$obj->amount;
$i++;
}

View File

@ -480,10 +480,10 @@ if (! empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco
$obj = $db->fetch_object($result);
if (! isset($encaiss[$obj->dm])) $encaiss[$obj->dm]=0;
$encaiss[$obj->dm] += $obj->amount;
$encaiss[$obj->dm] += -$obj->amount;
if (! isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm]=0;
$encaiss_ttc[$obj->dm] += $obj->amount;
$encaiss_ttc[$obj->dm] += -$obj->amount;
$i++;
}

View File

@ -179,7 +179,7 @@ if (empty($reshook))
$object->socid = GETPOST("socid", 'int');
$object->lastname = GETPOST("lastname", 'alpha');
$object->firstname = GETPOST("firstname", 'alpha');
$object->civility_id = GETPOST("civility_id", 'alpha');
$object->civility_code = GETPOST("civility_code", 'alpha');
$object->poste = GETPOST("poste", 'alpha');
$object->address = GETPOST("address", 'alpha');
$object->zip = GETPOST("zipcode", 'alpha');
@ -367,7 +367,7 @@ if (empty($reshook))
$object->socid = GETPOST("socid", 'int');
$object->lastname = GETPOST("lastname", 'alpha');
$object->firstname = GETPOST("firstname", 'alpha');
$object->civility_id = GETPOST("civility_id", 'alpha');
$object->civility_code = GETPOST("civility_code", 'alpha');
$object->poste = GETPOST("poste", 'alpha');
$object->address = GETPOST("address", 'alpha');
@ -621,8 +621,8 @@ else
}
// Civility
print '<tr><td><label for="civility_id">'.$langs->trans("UserTitle").'</label></td><td colspan="3">';
print $formcompany->select_civility(GETPOST("civility", 'alpha')?GETPOST("civility", 'alpha'):$object->civility_code);
print '<tr><td><label for="civility_code">'.$langs->trans("UserTitle").'</label></td><td colspan="3">';
print $formcompany->select_civility(GETPOSTISSET("civility_code")?GETPOST("civility_code", 'alpha'):$object->civility_code, 'civility_code');
print '</td></tr>';
print '<tr><td><label for="title">'.$langs->trans("PostOrFunction").'</label></td>';
@ -931,8 +931,8 @@ else
}
// Civility
print '<tr><td><label for="civility_id">'.$langs->trans("UserTitle").'</label></td><td colspan="3">';
print $formcompany->select_civility(isset($_POST["civility"])?GETPOST("civility"):$object->civility_code);
print '<tr><td><label for="civility_code">'.$langs->trans("UserTitle").'</label></td><td colspan="3">';
print $formcompany->select_civility(GETPOSTISSET("civility_code")?GETPOST("civility", "aZ09"):$object->civility_code, 'civility_code');
print '</td></tr>';
print '<tr><td><label for="title">'.$langs->trans("PostOrFunction").'</label></td>';

View File

@ -328,13 +328,13 @@ class Contact extends CommonObject
$this->town=(empty($this->town)?'':$this->town);
$this->country_id=($this->country_id > 0?$this->country_id:$this->country_id);
if (empty($this->statut)) $this->statut = 0;
if (empty($this->civility_code) && ! is_numeric($this->civility_id)) $this->civility_code = $this->civility_id; // For backward compatibility
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET ";
if ($this->socid > 0) $sql .= " fk_soc='".$this->db->escape($this->socid)."',";
elseif ($this->socid == -1) $sql .= " fk_soc=null,";
$sql .= " civility='".$this->db->escape($this->civility_id)."'";
$sql .= " civility='".$this->db->escape($this->civility_code)."'";
$sql .= ", lastname='".$this->db->escape($this->lastname)."'";
$sql .= ", firstname='".$this->db->escape($this->firstname)."'";
$sql .= ", address='".$this->db->escape($this->address)."'";

View File

@ -92,6 +92,7 @@ $extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
$extrafields->fetch_name_optionals_label($object->table_element_line);
$extrafields->fetch_name_optionals_label(OrderLine::$table_element);
// Load object. Make an object->fetch
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
@ -301,12 +302,11 @@ if (empty($reshook))
}
// Extrafields
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
$array_options[$i] = $extrafields->getOptionalsFromPost($object->table_element_line, $i);
// Unset extrafield
if (is_array($extralabelsline)) {
if (is_array($extrafields->attributes[$object->table_element_line]['label'])) {
// Get extra fields
foreach ($extralabelsline as $key => $value) {
foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) {
unset($_POST["options_" . $key]);
}
}
@ -627,11 +627,10 @@ if (empty($reshook))
$line = new ExpeditionLigne($db);
// Extrafields Lines
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
$line->array_options = $extrafields->getOptionalsFromPost($object->table_element_line);
// Unset extrafield POST Data
if (is_array($extralabelsline)) {
foreach ($extralabelsline as $key => $value) {
if (is_array($extrafields->attributes[$object->table_element_line]['label'])) {
foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) {
unset($_POST["options_" . $key]);
}
}
@ -1031,7 +1030,6 @@ if ($action == 'create')
if (empty($reshook)) {
// copy from order
$extrafields->fetch_name_optionals_label($object->table_element);
if ($object->fetch_optionals() > 0) {
$expe->array_options = array_merge($expe->array_options, $object->array_options);
}
@ -1572,11 +1570,9 @@ if ($action == 'create')
{
//var_dump($line);
$colspan=5;
$extrafields->fetch_name_optionals_label($expe->table_element_line);
$expLine = new ExpeditionLigne($db);
$srcLine = new OrderLine($db);
$extrafields->fetch_name_optionals_label($srcLine->table_element);
$srcLine->fetch_optionals($line->id); // fetch extrafields also available in orderline
//$line->fetch_optionals($line->id);
$line->array_options = array_merge($line->array_options, $srcLine->array_options);
@ -2464,8 +2460,6 @@ elseif ($id || $ref)
$lines[$i]->fetch_optionals($lines[$i]->id);
$extrafields->fetch_name_optionals_label($lines[$i]->table_element);
print '<tr class="oddeven">';
if ($action == 'editline' && $lines[$i]->id == $line_id)
{

View File

@ -288,12 +288,9 @@ $sql.= ", ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua";
$sql.= " WHERE cp.entity IN (".getEntity('holiday').")";
$sql.= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pour la recherche sur le tableau
// Search all
//if (!empty($sall)) $sql.= natural_search(array_keys($fieldstosearchall), $sall);
if (!empty($sall)) $sql.= natural_search(array_keys($fieldstosearchall), $sall);
// Ref
if(!empty($search_ref))
{
$sql.= " AND cp.rowid = ".(int) $db->escape($search_ref);
}
if (!empty($search_ref)) $sql.= natural_search("cp.ref", $search_ref);
// Start date
$sql.= dolSqlDateFilter("cp.date_debut", $search_day_start, $search_month_start, $search_year_start);
// End date