mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-25 16:17:24 +02:00
Paiement
This commit is contained in:
@ -54,6 +54,16 @@ class Payment
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $amount
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
{
|
||||
global $DB;
|
||||
$this->amount = $amount;
|
||||
$DB->prepare("UPDATE `payments` SET `amount` = ? WHERE `id` = ?;")->execute([$amount, $this->id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
@ -137,6 +147,6 @@ class Payment
|
||||
{
|
||||
global $DB;
|
||||
$this->validation_status = $validation_status;
|
||||
$DB->prepare("UPDATE `payments` SET `$validation_status` = ? WHERE `id` = ?;")->execute([ValidationStatus::fromName($validation_status), $this->id]);
|
||||
$DB->prepare("UPDATE `payments` SET `validation_status` = ? WHERE `id` = ?;")->execute([ValidationStatus::getName($validation_status), $this->id]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user