nano sante wallet fixer en dure la valeur du prix de l'hyperviseur

This commit is contained in:
root 2024-12-06 14:25:26 +01:00
parent 1678e4e37b
commit 0d6a007e3a
3 changed files with 27 additions and 11 deletions

View File

@ -520,16 +520,21 @@ class Hyperviseur_dash extends CI_Controller
} }
//Create wallet if it not exist //Create wallet if it not exist
$res = $this->wallet_model->getWallet($agent_id); // $res = $this->wallet_model->getWallet($agent_id);
if ($res == false) { // log_message('error', 'agent_id : ' . print_r($agent_id, true));
$this->user_model->addWallet($agent_id); // if ($res == false) {
$res = $this->wallet_model->getWallet($agent_id); // $this->user_model->addWallet($agent_id);
} // $res = $this->wallet_model->getWallet($agent_id);
// }
$row = $res->first_row(); // $row = $res->first_row();
$data["commission"] = Money::of(round($row->balance_com, 2), $this->session->userdata('currency_code'), $context)->formatTo('fr_FR'); $res = (object) [];
$data["principal"] = Money::of(round($row->balance_princ, 2), $this->session->userdata('currency_code'), $context)->formatTo('fr_FR'); $res->balance_com = "235362378.00";
$data['wallet_id'] = $row->wallet_id; $res->balance_princ = "0.00";
$res->wallet_id = "23697";
$data["commission"] = Money::of(round($res->balance_com, 2), $this->session->userdata('currency_code'), $context);
$data["principal"] = Money::of(round($res->balance_princ, 2), $this->session->userdata('currency_code'), $context);
$data['wallet_id'] = $res->wallet_id;
$data['currency_code'] = $this->session->userdata('currency_code'); $data['currency_code'] = $this->session->userdata('currency_code');
$this->load->view('header_hyp', $data); $this->load->view('header_hyp', $data);

View File

@ -11,7 +11,7 @@
"source": "https://github.com/bcit-ci/CodeIgniter" "source": "https://github.com/bcit-ci/CodeIgniter"
}, },
"require": { "require": {
"php": ">=7.0", "php": "^8.0",
"spatie/async": "^1.4", "spatie/async": "^1.4",
"nesbot/carbon": "^2.33", "nesbot/carbon": "^2.33",
"brick/money": "^0.4.5", "brick/money": "^0.4.5",
@ -21,6 +21,11 @@
"ext-openssl": "*", "ext-openssl": "*",
"ext-pdo": "*" "ext-pdo": "*"
}, },
"config": {
"platform": {
"php": "8.0"
}
},
"suggest": { "suggest": {
"paragonie/random_compat": "Provides better randomness in PHP 5.x" "paragonie/random_compat": "Provides better randomness in PHP 5.x"
}, },

View File

@ -129,6 +129,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
* @param string $name Session cookie name * @param string $name Session cookie name
* @return bool * @return bool
*/ */
#[\ReturnTypeWillChange]
public function open($save_path, $name) public function open($save_path, $name)
{ {
if ( ! is_dir($save_path)) if ( ! is_dir($save_path))
@ -161,6 +162,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
* @param string $session_id Session ID * @param string $session_id Session ID
* @return string Serialized session data * @return string Serialized session data
*/ */
#[\ReturnTypeWillChange]
public function read($session_id) public function read($session_id)
{ {
// This might seem weird, but PHP 5.6 introduces session_reset(), // This might seem weird, but PHP 5.6 introduces session_reset(),
@ -230,6 +232,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
* @param string $session_data Serialized session data * @param string $session_data Serialized session data
* @return bool * @return bool
*/ */
#[\ReturnTypeWillChange]
public function write($session_id, $session_data) public function write($session_id, $session_data)
{ {
// If the two IDs don't match, we have a session_regenerate_id() call // If the two IDs don't match, we have a session_regenerate_id() call
@ -287,6 +290,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
* *
* @return bool * @return bool
*/ */
#[\ReturnTypeWillChange]
public function close() public function close()
{ {
if (is_resource($this->_file_handle)) if (is_resource($this->_file_handle))
@ -310,6 +314,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
* @param string $session_id Session ID * @param string $session_id Session ID
* @return bool * @return bool
*/ */
#[\ReturnTypeWillChange]
public function destroy($session_id) public function destroy($session_id)
{ {
if ($this->close() === $this->_success) if ($this->close() === $this->_success)
@ -351,6 +356,7 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
* @param int $maxlifetime Maximum lifetime of sessions * @param int $maxlifetime Maximum lifetime of sessions
* @return bool * @return bool
*/ */
#[\ReturnTypeWillChange]
public function gc($maxlifetime) public function gc($maxlifetime)
{ {
if ( ! is_dir($this->_config['save_path']) OR ($directory = opendir($this->_config['save_path'])) === FALSE) if ( ! is_dir($this->_config['save_path']) OR ($directory = opendir($this->_config['save_path'])) === FALSE)