Debug v23
This commit is contained in:
parent
6d48243b68
commit
caa5d7b347
3 changed files with 11 additions and 6 deletions
|
|
@ -165,12 +165,16 @@ function isALNEQualifiedVersion($ignoredev = 0, $ignoremodule = 0)
|
|||
*/
|
||||
function isALNERunningVersion($blockedlogtestalreadydone = 0)
|
||||
{
|
||||
// For Debug help: Constant set by developer to force all LNE restrictions even if country is not France so we can test them on any dev instance.
|
||||
// Note that you can force, with this option, the enabling of the LNE restrictions, but there is no way to force the disabling of the LNE restriction.
|
||||
if (defined('CERTIF_LNE') && (int) constant('CERTIF_LNE') === 2) {
|
||||
// For Debug help: Constant set by developer to force all LNE restrictions
|
||||
// even if country is not France so we can test them on any dev instance.
|
||||
// Note that you can force, with this option, the enabling of the LNE restrictions,
|
||||
// but there is no way to force the disabling of the LNE restriction.
|
||||
if (defined('CERTIF_LNE') && (int) constant('CERTIF_LNE') === 2
|
||||
&& isModEnabled('blockedlog') && ($blockedlogtestalreadydone || isBlockedLogUsed())) {
|
||||
return true;
|
||||
}
|
||||
if (isModEnabled('blockedlog') && ($blockedlogtestalreadydone || isBlockedLogUsed())) {
|
||||
if (defined('CERTIF_LNE') && (int) constant('CERTIF_LNE') === 1
|
||||
&& isModEnabled('blockedlog') && ($blockedlogtestalreadydone || isBlockedLogUsed())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5042,11 +5042,11 @@ if ($action == 'create') {
|
|||
break;
|
||||
case -7:
|
||||
// Already validated
|
||||
setEventMessages($langs->trans("DisabledBecauseVersionProtected"), null, 'errors');
|
||||
setEventMessages($langs->trans("DisabledBecauseVersionProtected").(empty($object->error) ? '' : ': '.$object->error), null, 'errors');
|
||||
break;
|
||||
default:
|
||||
// Other error
|
||||
setEventMessages($langs->trans("DisabledBecauseNotErasable"), null, 'errors');
|
||||
setEventMessages($langs->trans("DisabledBecauseNotErasable").(empty($object->error) ? '' : ': '.$object->error), null, 'errors');
|
||||
break;
|
||||
}
|
||||
$oktomodif = 0;
|
||||
|
|
|
|||
|
|
@ -763,6 +763,7 @@ abstract class CommonInvoice extends CommonObject
|
|||
|
||||
include_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php';
|
||||
if (isALNERunningVersion()) {
|
||||
$this->error = 'Action not allowed on the certified version';
|
||||
return -7;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue