2
0
forked from Wavyzz/dolibarr

clean code (#35183)

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code
This commit is contained in:
Frédéric FRANCE
2025-09-02 22:46:55 +02:00
committed by GitHub
parent 5b4295912e
commit 24bd6d918a
5 changed files with 36 additions and 95 deletions

View File

@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
/* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
*
* 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
@@ -49,7 +50,7 @@ trait CommonSignedObject
'STATUS_SIGNED_SENDER' => 1,
'STATUS_SIGNED_RECEIVER' => 2,
'STATUS_SIGNED_RECEIVER_ONLINE' => 3,
'STATUS_SIGNED_ALL' => 9 // To handle future kind of signature (ex: tripartite contract)
'STATUS_SIGNED_ALL' => 9, // To handle future kind of signature (ex: tripartite contract)
];
/**
@@ -140,11 +141,9 @@ trait CommonSignedObject
$sql .= " WHERE rowid = ".((int) $this->id);
if ($this->db->query($sql)) {
if (!$error) {
$this->oldcopy = clone $this;
}
$this->oldcopy = clone $this;
if (!$error && !$notrigger) {
if (!$notrigger) {
// Call trigger
$result = $this->call_trigger($triggercode, $user);
if ($result < 0) {