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

Conflicts:
	htdocs/modulebuilder/index.php
This commit is contained in:
Laurent Destailleur 2022-04-14 16:10:23 +02:00
commit 4e34649fc2
8 changed files with 25 additions and 11 deletions

View File

@ -482,7 +482,7 @@ if (GETPOSTISSET("search_status")) {
$titre = $langs->trans("MembersListToValid");
}
if ($search_status == Adherent::STATUS_VALIDATED && $filter == '') {
$titre = $langs->trans("MembersValidated");
$titre = $langs->trans("MenuMembersValidated");
}
if ($search_status == Adherent::STATUS_VALIDATED && $filter == 'withoutsubscription') {
$titre = $langs->trans("MembersWithSubscriptionToReceive");

View File

@ -125,6 +125,7 @@ class Tva extends CommonObject
// Insert request
$sql = "INSERT INTO ".MAIN_DB_PREFIX."tva(";
$sql .= "entity,";
$sql .= "datec,";
$sql .= "datep,";
$sql .= "datev,";
@ -136,6 +137,7 @@ class Tva extends CommonObject
$sql .= "fk_user_creat,";
$sql .= "fk_user_modif";
$sql .= ") VALUES (";
$sql .= " ".((int) $conf->entity).", ";
$sql .= " '".$this->db->idate($now)."',";
$sql .= " '".$this->db->idate($this->datep)."',";
$sql .= " '".$this->db->idate($this->datev)."',";
@ -144,8 +146,8 @@ class Tva extends CommonObject
$sql .= " '".$this->db->escape($this->note)."',";
$sql .= " '".$this->db->escape($this->fk_account)."',";
$sql .= " '".$this->db->escape($this->type_payment)."',";
$sql .= " '".($this->fk_user_creat > 0 ? (int) $this->fk_user_creat : (int) $user->id)."',";
$sql .= " '".$this->db->escape($this->fk_user_modif)."'";
$sql .= " ".($this->fk_user_creat > 0 ? (int) $this->fk_user_creat : (int) $user->id).",";
$sql .= " ".($this->fk_user_modif > 0 ? (int) $this->fk_user_modif : (int) $user->id);
$sql .= ")";
dol_syslog(get_class($this)."::create", LOG_DEBUG);

View File

@ -48,6 +48,10 @@ if (!defined('NOIPCHECK')) {
if (!defined('NOBROWSERNOTIF')) {
define('NOBROWSERNOTIF', '1');
}
$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
if (is_numeric($entity)) {
define("DOLENTITY", $entity);
}
include '../../main.inc.php';
$action = GETPOST('action', 'aZ09');

View File

@ -539,5 +539,5 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (154,
-- Add column to help to fix a very critical bug when transferring into accounting bank record of a bank account into another currency.
-- Idea is to update this column manually in v15 with value in currency of company for bank that are not into the main currency and the transfer
-- into accounting will use it in priority if value is not null.
-- into accounting will use it in priority if value is not null. The script repair.sql contains the sequence to fix datas in llx_bank.
ALTER TABLE llx_bank ADD COLUMN amount_main_currency double(24,8) NULL;

View File

@ -1701,7 +1701,11 @@ class Product extends CommonObject
$testExit = array('multiprices','multiprices_ttc','multiprices_base_type','multiprices_min','multiprices_min_ttc','multiprices_tva_tx','multiprices_recuperableonly');
foreach ($testExit as $field) {
if (!isset($this->$field[$level])) {
if (!isset($this->$field)) {
return array();
}
$tmparray = $this->$field;
if (!isset($tmparray[$level])) {
return array();
}
}

View File

@ -193,7 +193,7 @@ $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1);
if ($action == 'refusepropal') {
print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY).($conf->multicompany->enabled?'&entity='.$entity:''), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
}
// Check link validity for param 'source' to avoid use of the examples as value
@ -431,11 +431,12 @@ if ($action == "dosign" && empty($cancel)) {
"ref" : \''.dol_escape_js($REF).'\',
"securekey" : \''.dol_escape_js($SECUREKEY).'\',
"mode" : \''.dol_escape_htmltag($source).'\',
"entity" : \''.dol_escape_htmltag($entity).'\',
},
success: function(response) {
if(response == "success"){
console.log("Success on saving signature");
window.location.replace("'.$_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&message=signed&securekey='.urlencode($SECUREKEY).'");
window.location.replace("'.$_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&message=signed&securekey='.urlencode($SECUREKEY).($conf->multicompany->enabled?'&entity='.$entity:'').'");
}else{
console.error(response);
}

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) - 2013-2015 Jean-François FERRY <jfefe@aternatik.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2022 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
@ -224,9 +225,11 @@ class FormResource
$value = ($maxlength ?dol_trunc($arraytypes['label'], $maxlength) : $arraytypes['label']);
} elseif ($format == 3) {
$value = $arraytypes['code'];
} elseif (empty($value)) {
print '&nbsp;';
}
if (empty($value)) {
$value = '&nbsp;';
}
print $value;
print '</option>';
}
}

View File

@ -870,10 +870,10 @@ if ($user->rights->societe->creer) {
$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
}
if ($user->rights->societe->creer) {
$arrayofmassactions['preenable'] = img_picto('', '', 'class="pictofixedwidth"').$langs->trans("SetToEnabled");
$arrayofmassactions['preenable'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SetToEnabled");
}
if ($user->rights->societe->creer) {
$arrayofmassactions['predisable'] = img_picto('', '', 'class="pictofixedwidth"').$langs->trans("SetToDisabled");
$arrayofmassactions['predisable'] = img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("SetToDisabled");
}
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete', 'preaffecttag', 'preenable', 'preclose'))) {
$arrayofmassactions = array();