1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-25 16:17:24 +02:00
This commit is contained in:
Yohann
2020-01-02 00:09:02 +01:00
parent 64ffcedbcc
commit 4b6d6f24ea
10 changed files with 182 additions and 64 deletions

View File

@ -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]);
}
}