Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
This commit is contained in:
commit
927a87851d
@ -2997,7 +2997,11 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// when bank account is empty (means not override by payment mode form a other object, like third-party), try to use default value
|
||||
$fk_account = GETPOSTISSET("fk_account") ? GETPOST("fk_account", 'int') : $fk_account;
|
||||
if ($socid > 0 && $fk_account) { // A company has already been set and it has a default fk_account
|
||||
$fk_account = GETPOSTISSET('fk_account') ? GETPOST("fk_account", 'int') : $fk_account; // The GETPOST is used only if form was posted to avoid to take default value, because in such case, the default must be the one of the company
|
||||
} else { // No company forced
|
||||
$fk_account = GETPOST("fk_account", 'int');
|
||||
}
|
||||
|
||||
if (!empty($soc->id)) {
|
||||
$absolute_discount = $soc->getAvailableDiscounts();
|
||||
|
||||
@ -49,7 +49,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$object->fetch($id, $ref);
|
||||
}
|
||||
|
||||
$permissionnote = $user->rights->produit->creer; // Used by the include of actions_setnotes.inc.php
|
||||
$permissionnote = ($user->rights->produit->creer || $user->rights->service->creer); // Used by the include of actions_setnotes.inc.php
|
||||
|
||||
if ($object->id > 0) {
|
||||
if ($object->type == $object::TYPE_PRODUCT) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user