mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
@@ -9378,60 +9378,6 @@ parameters:
|
|||||||
count: 1
|
count: 1
|
||||||
path: ../../../htdocs/document.php
|
path: ../../../htdocs/document.php
|
||||||
|
|
||||||
-
|
|
||||||
message: '#^Negated boolean expression is always true\.$#'
|
|
||||||
identifier: booleanNot.alwaysTrue
|
|
||||||
count: 5
|
|
||||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: '#^Property PaymentDonation\:\:\$amount \(float\) in isset\(\) is not nullable\.$#'
|
|
||||||
identifier: isset.property
|
|
||||||
count: 3
|
|
||||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: '#^Property PaymentDonation\:\:\$fk_bank \(int\) in isset\(\) is not nullable\.$#'
|
|
||||||
identifier: isset.property
|
|
||||||
count: 3
|
|
||||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: '#^Property PaymentDonation\:\:\$fk_donation \(int\) in isset\(\) is not nullable\.$#'
|
|
||||||
identifier: isset.property
|
|
||||||
count: 4
|
|
||||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: '#^Property PaymentDonation\:\:\$fk_typepayment \(int\) in isset\(\) is not nullable\.$#'
|
|
||||||
identifier: isset.property
|
|
||||||
count: 3
|
|
||||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: '#^Property PaymentDonation\:\:\$fk_user_creat \(int\) in isset\(\) is not nullable\.$#'
|
|
||||||
identifier: isset.property
|
|
||||||
count: 3
|
|
||||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: '#^Property PaymentDonation\:\:\$fk_user_modif \(int\) in isset\(\) is not nullable\.$#'
|
|
||||||
identifier: isset.property
|
|
||||||
count: 3
|
|
||||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: '#^Property PaymentDonation\:\:\$num_payment \(string\) in isset\(\) is not nullable\.$#'
|
|
||||||
identifier: isset.property
|
|
||||||
count: 3
|
|
||||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: '#^Result of && is always true\.$#'
|
|
||||||
identifier: booleanAnd.alwaysTrue
|
|
||||||
count: 2
|
|
||||||
path: ../../../htdocs/don/class/paymentdonation.class.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: '#^Variable \$maxlength might not be defined\.$#'
|
message: '#^Variable \$maxlength might not be defined\.$#'
|
||||||
identifier: variable.undefined
|
identifier: variable.undefined
|
||||||
|
|||||||
@@ -758,13 +758,13 @@ abstract class CommonObject
|
|||||||
public $user_modification_id;
|
public $user_modification_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var int|null ID
|
||||||
* @deprecated Use $user_creation_id
|
* @deprecated Use $user_creation_id
|
||||||
*/
|
*/
|
||||||
public $fk_user_creat;
|
public $fk_user_creat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ?int ID
|
* @var int|null ID
|
||||||
* @deprecated Use $user_modification_id
|
* @deprecated Use $user_modification_id
|
||||||
*/
|
*/
|
||||||
public $fk_user_modif;
|
public $fk_user_modif;
|
||||||
@@ -11342,7 +11342,7 @@ abstract class CommonObject
|
|||||||
$comment = new Comment($this->db);
|
$comment = new Comment($this->db);
|
||||||
$result = $comment->fetchAllFor($this->element, $this->id);
|
$result = $comment->fetchAllFor($this->element, $this->id);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$this->errors = array_merge($this->errors, $comment->errors);
|
$this->setErrorsFromObject($comment);
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
$this->comments = $comment->comments;
|
$this->comments = $comment->comments;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -52,7 +52,7 @@ class PaymentDonation extends CommonObject
|
|||||||
public $rowid;
|
public $rowid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var ?int ID
|
||||||
*/
|
*/
|
||||||
public $fk_donation;
|
public $fk_donation;
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ class PaymentDonation extends CommonObject
|
|||||||
public $datep = '';
|
public $datep = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var float amount
|
* @var ?float amount
|
||||||
*/
|
*/
|
||||||
public $amount; // Total amount of payment
|
public $amount; // Total amount of payment
|
||||||
|
|
||||||
@@ -77,42 +77,42 @@ class PaymentDonation extends CommonObject
|
|||||||
public $amounts = array(); // Array of amounts
|
public $amounts = array(); // Array of amounts
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Payment mode ID
|
* @var ?int Payment mode ID
|
||||||
* @deprecated Use $paymenttype
|
* @deprecated Use $paymenttype
|
||||||
* @see $paymenttype
|
* @see $paymenttype
|
||||||
*/
|
*/
|
||||||
public $fk_typepayment;
|
public $fk_typepayment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Payment mode ID or Code. TODO Use only the code in this field.
|
* @var ?int Payment mode ID or Code. TODO Use only the code in this field.
|
||||||
*/
|
*/
|
||||||
public $paymenttype;
|
public $paymenttype;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Payment reference
|
* @var ?string Payment reference
|
||||||
* (Cheque or bank transfer reference. Can be "ABC123")
|
* (Cheque or bank transfer reference. Can be "ABC123")
|
||||||
*/
|
*/
|
||||||
public $num_payment;
|
public $num_payment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var ?int ID
|
||||||
*/
|
*/
|
||||||
public $fk_bank;
|
public $fk_bank;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var ?int ID
|
||||||
*/
|
*/
|
||||||
public $fk_user_creat;
|
public $fk_user_creat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var ?int ID
|
||||||
*/
|
*/
|
||||||
public $fk_user_modif;
|
public $fk_user_modif;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use $amount, $amounts
|
* @deprecated Use $amount, $amounts
|
||||||
* @see $amount, $amounts
|
* @see $amount, $amounts
|
||||||
* @var float
|
* @var ?float
|
||||||
*/
|
*/
|
||||||
public $total;
|
public $total;
|
||||||
|
|
||||||
@@ -405,8 +405,6 @@ class PaymentDonation extends CommonObject
|
|||||||
$this->errors[] = "Error ".$this->db->lasterror();
|
$this->errors[] = "Error ".$this->db->lasterror();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
|
||||||
if (!$notrigger) {
|
|
||||||
if (!$error && !$notrigger) {
|
if (!$error && !$notrigger) {
|
||||||
// Call triggers
|
// Call triggers
|
||||||
$result = $this->call_trigger('DONATION_PAYMENT_MODIFY', $user);
|
$result = $this->call_trigger('DONATION_PAYMENT_MODIFY', $user);
|
||||||
@@ -415,8 +413,6 @@ class PaymentDonation extends CommonObject
|
|||||||
}
|
}
|
||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
@@ -443,11 +439,11 @@ class PaymentDonation extends CommonObject
|
|||||||
public function delete($user, $notrigger = 0)
|
public function delete($user, $notrigger = 0)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if (!$error) {
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url";
|
||||||
$sql .= " WHERE type='payment_donation' AND url_id=".(int) $this->id;
|
$sql .= " WHERE type='payment_donation' AND url_id=".(int) $this->id;
|
||||||
|
|
||||||
@@ -457,7 +453,6 @@ class PaymentDonation extends CommonObject
|
|||||||
$error++;
|
$error++;
|
||||||
$this->errors[] = "Error ".$this->db->lasterror();
|
$this->errors[] = "Error ".$this->db->lasterror();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_donation";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_donation";
|
||||||
@@ -471,8 +466,6 @@ class PaymentDonation extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
|
||||||
if (!$notrigger) {
|
|
||||||
if (!$error && !$notrigger) {
|
if (!$error && !$notrigger) {
|
||||||
// Call triggers
|
// Call triggers
|
||||||
$result = $this->call_trigger('DONATION_PAYMENT_DELETE', $user);
|
$result = $this->call_trigger('DONATION_PAYMENT_DELETE', $user);
|
||||||
@@ -481,8 +474,6 @@ class PaymentDonation extends CommonObject
|
|||||||
}
|
}
|
||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
@@ -639,7 +630,7 @@ class PaymentDonation extends CommonObject
|
|||||||
$this->datep,
|
$this->datep,
|
||||||
(string) $this->paymenttype, // Payment mode id or code ("CHQ or VIR for example")
|
(string) $this->paymenttype, // Payment mode id or code ("CHQ or VIR for example")
|
||||||
$label,
|
$label,
|
||||||
$amount,
|
(float) $amount,
|
||||||
$this->num_payment,
|
$this->num_payment,
|
||||||
0,
|
0,
|
||||||
$user,
|
$user,
|
||||||
|
|||||||
Reference in New Issue
Block a user