Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop
Debug v23
This commit is contained in:
parent
8dd0aeb1c8
commit
15054810ba
2 changed files with 12 additions and 1 deletions
|
|
@ -2707,6 +2707,8 @@ class Facture extends CommonInvoice
|
|||
{
|
||||
$error = 0;
|
||||
|
||||
$this->oldcopy = dol_clone($this, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
|
||||
|
||||
// Clean parameters
|
||||
if (empty($this->type)) {
|
||||
$this->type = self::TYPE_STANDARD;
|
||||
|
|
|
|||
|
|
@ -2713,16 +2713,25 @@ abstract class CommonObject
|
|||
dol_syslog(get_class($this).'::setPaymentMethods('.$id.')');
|
||||
|
||||
if ($this->status >= 0 || $this->element == 'societe') {
|
||||
$this->oldcopy = dol_clone($this, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
|
||||
|
||||
// TODO uniformize field name
|
||||
$fieldname = 'fk_mode_reglement';
|
||||
$triggerName = (empty($this->TRIGGER_PREFIX) ? strtoupper(get_class($this)) : $this->TRIGGER_PREFIX);
|
||||
if ($this->element == 'societe') {
|
||||
$fieldname = 'mode_reglement';
|
||||
$triggerName = 'COMPANY';
|
||||
}
|
||||
if (get_class($this) == 'Facture') {
|
||||
$triggerName = 'BILL';
|
||||
}
|
||||
if (get_class($this) == 'Fournisseur') {
|
||||
$fieldname = 'mode_reglement_supplier';
|
||||
$triggerName = 'BILL_SUPPLIER';
|
||||
}
|
||||
if (get_class($this) == 'Tva') {
|
||||
$fieldname = 'fk_typepayment';
|
||||
$triggerName = 'VAT';
|
||||
}
|
||||
if (get_class($this) == 'Salary') {
|
||||
$fieldname = 'fk_typepayment';
|
||||
|
|
@ -2738,10 +2747,10 @@ abstract class CommonObject
|
|||
if (get_class($this) == 'Fournisseur') {
|
||||
$this->mode_reglement_supplier_id = $id;
|
||||
}
|
||||
|
||||
// Triggers
|
||||
if (!$error && !$notrigger) {
|
||||
// Call triggers
|
||||
$triggerName = (empty($this->TRIGGER_PREFIX) ? strtoupper(get_class($this)) : $this->TRIGGER_PREFIX);
|
||||
$result = $this->call_trigger($triggerName.'_MODIFY', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue