Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0
This commit is contained in:
commit
421f7ecff4
8 changed files with 21 additions and 28 deletions
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013-2022 Open-DSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2017-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
|
|
@ -805,12 +806,6 @@ if (!$error && $action == 'writebookkeeping') {
|
|||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
$lettering_static = new Lettering($db);
|
||||
$nb_lettering = $lettering_static->bookkeepingLetteringAll(array($bookkeeping->id));
|
||||
|
||||
if ($nb_lettering < 0) {
|
||||
$error++;
|
||||
$errorforline++;
|
||||
setEventMessages($lettering_static->error, $lettering_static->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
|
|
@ -380,13 +380,8 @@ if ($action == 'writebookkeeping') {
|
|||
if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
$lettering_static = new Lettering($db);
|
||||
$nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id));
|
||||
|
||||
if ($nb_lettering < 0) {
|
||||
$error++;
|
||||
$errorforline++;
|
||||
setEventMessages($lettering_static->error, $lettering_static->errors, 'errors');
|
||||
}
|
||||
$nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
|
|
@ -405,13 +405,6 @@ if ($action == 'writebookkeeping') {
|
|||
$lettering_static = new Lettering($db);
|
||||
|
||||
$nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id));
|
||||
|
||||
if ($nb_lettering < 0) {
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key] = 'other';
|
||||
setEventMessages($lettering_static->error, $lettering_static->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -762,14 +762,22 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
|||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("agenda", "other", "members"));
|
||||
|
||||
if (empty($object->actionmsg2)) {
|
||||
$object->actionmsg2 = $langs->transnoentities("MemberSubscriptionDeletedInDolibarr", $object->ref, $object->getFullName($langs));
|
||||
$member = $this->context['member'];
|
||||
if (!is_object($member)) { // This should not happen but it happen when deleting a subscription from adherents/subscription/card.php
|
||||
dol_syslog("Execute a trigger MEMBER_SUBSCRIPTION_CREATE with context key 'member' not an object");
|
||||
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
$member = new Adherent($this->db);
|
||||
$member->fetch($object->fk_adherent);
|
||||
}
|
||||
$object->actionmsg = $langs->transnoentities("MemberSubscriptionDeletedInDolibarr", $object->ref, $object->getFullName($langs));
|
||||
$object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
|
||||
$object->actionmsg = $langs->transnoentities("MemberSubscriptionDeletedInDolibarr", $object->ref, $member->getFullName($langs));
|
||||
$object->actionmsg .= "\n".$langs->transnoentities("Member").': '.$member->getFullName($langs);
|
||||
$object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->fk_type;
|
||||
$object->actionmsg .= "\n".$langs->transnoentities("Amount").': '.$object->amount;
|
||||
$object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day');
|
||||
if (empty($object->actionmsg2)) {
|
||||
$object->actionmsg2 = $langs->transnoentities("MemberSubscriptionDeletedInDolibarr", $object->ref, $member->getFullName($langs));
|
||||
}
|
||||
|
||||
$object->sendtoid = 0;
|
||||
if (isset($object->fk_soc) && $object->fk_soc > 0) {
|
||||
|
|
|
|||
|
|
@ -734,6 +734,7 @@ if (empty($reshook)) {
|
|||
// Actions on extra fields
|
||||
$result = $object->insertExtraFields('INTERVENTION_MODIFY');
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,6 +132,8 @@ if ($user->socid) {
|
|||
}
|
||||
$result = restrictedArea($user, 'produit|service', 0, 'product&product');
|
||||
|
||||
$hookmanager->initHooks(array('reassortlotlist'));
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
|
|
|||
|
|
@ -706,8 +706,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// List of actions on element
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
$formactions = new FormActions($db);
|
||||
$defaultthirdpartyid = $socid > 0 ? $socid : $object->project->socid;
|
||||
$formactions->showactions($object, 'task', $defaultthirdpartyid, 1, '', 10, 'withproject='.$withproject);
|
||||
$formactions->showactions($object, 'project_task', 0, 1, '', 10, 'withproject='.$withproject);
|
||||
|
||||
print '</div></div>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -630,7 +630,7 @@ if (empty($reshook)) {
|
|||
$error++;
|
||||
}
|
||||
|
||||
if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && GETPOST('price_ht') === '' && GETPOST('price_ttc') === '' && $price_ht_devise === '') { // Unit price can be 0 but not ''. Also price can be negative for proposal.
|
||||
if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && GETPOST('price_ht') === '' && GETPOST('price_ttc') === '' && GETPOST('multicurrency_price_ht') === '') { // Unit price can be 0 but not ''. Also price can be negative for proposal.
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPrice")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue