Add Agent login
This commit is contained in:
parent
7f40059f0e
commit
2bc06cf940
|
@ -0,0 +1,190 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Brick\Money\Context\AutoContext;
|
||||||
|
use Brick\Money\Money;
|
||||||
|
|
||||||
|
defined('BASEPATH') or exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Agent extends CI_Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->load->model('wallet_model');
|
||||||
|
$this->load->model('nano_credit_model');
|
||||||
|
$this->load->model('Users_simple');
|
||||||
|
$this->load->model('User_model');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
if ($this->isLogged()) {
|
||||||
|
|
||||||
|
$data['active'] = "health_care_sheets";
|
||||||
|
|
||||||
|
$data['member_code'] = $this->session->userdata('member_code');
|
||||||
|
$data['category'] = $this->session->userdata('category');
|
||||||
|
$data['network'] = $this->session->userdata('network');
|
||||||
|
$data['code_parrain'] = $this->session->userdata('parrain');
|
||||||
|
$data['network_agent_id'] = $this->session->userdata('network_agent_id');
|
||||||
|
|
||||||
|
$startDate = $this->input->get('d');
|
||||||
|
$endDate = $this->input->get('f');
|
||||||
|
|
||||||
|
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d';
|
||||||
|
$data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null;
|
||||||
|
$data['endDate'] = $endDate ? date($format, strtotime($endDate)) : null;
|
||||||
|
$endDate = Date('Y-m-d', strtotime($endDate . "+1 day"));
|
||||||
|
|
||||||
|
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||||
|
$this->load->view('header_agent', $data);
|
||||||
|
$this->load->view('nano_health/hyper/insurances_health_care_sheets');
|
||||||
|
$this->load->view('footer');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Wallet
|
||||||
|
public function wallet()
|
||||||
|
{
|
||||||
|
if (!$this->session->userdata('email')) {
|
||||||
|
$this->session->set_flashdata('error', 'log in first');
|
||||||
|
|
||||||
|
$data['alert'] = "ok";
|
||||||
|
$data['message'] = "Login first!";
|
||||||
|
$this->load->view('login', $data);
|
||||||
|
} else {
|
||||||
|
$id_network = $this->session->userdata('network_id');
|
||||||
|
$data["commission"] = "";
|
||||||
|
$data["principal"] = "";
|
||||||
|
$data["transactions"] = "";
|
||||||
|
$agent_id = $this->session->userdata('agent_id');
|
||||||
|
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||||
|
|
||||||
|
if ($this->input->get('history')) {
|
||||||
|
$this->historique($id_network, $this->input->get('d'), $this->input->get('f'), $this->session->userdata('member_code'),
|
||||||
|
$this->input->get('history'));
|
||||||
|
} else {
|
||||||
|
$context = new AutoContext();
|
||||||
|
//Create wallet if it not exist
|
||||||
|
$res = $this->wallet_model->getWallet($agent_id);
|
||||||
|
if ($res == false) {
|
||||||
|
if ($data['hasWallet']) {
|
||||||
|
$this->user_model->addWallet($agent_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$res = $this->wallet_model->getWallet($agent_id);
|
||||||
|
if ($res != null) {
|
||||||
|
$row = $res->first_row();
|
||||||
|
$data["commission"] = Money::of(round($row->balance_com, 2), $this->session->userdata('currency_code'), $context)->formatTo('fr_FR');
|
||||||
|
$data["principal"] = Money::of(round($row->balance_princ, 2), $this->session->userdata('currency_code'), $context)->formatTo('fr_FR');
|
||||||
|
$agents_g = $this->user_model->getUsersGeolocatedForSup($this->session->userdata('member_code'));
|
||||||
|
$data['agents_g'] = $agents_g;
|
||||||
|
|
||||||
|
//Fetch all transactions of any geolocated agent of the network
|
||||||
|
$data["transactions"] = array();
|
||||||
|
if ($agents_g) {
|
||||||
|
foreach ($agents_g->result() as $row) {
|
||||||
|
$wallet = $this->wallet_model->getWallet($row->agent_id);
|
||||||
|
if ($wallet) {
|
||||||
|
if ($data['hasWallet']->first_row()->type == 'visa') {
|
||||||
|
$transactions = $this->user_model->getAgentTransactions($wallet->first_row()->wallet_id);
|
||||||
|
} else if ($data['hasWallet']->first_row()->type == 'ilink') {
|
||||||
|
$transactions = $this->user_model->getAgentiLinkTransactions($wallet->first_row()->wallet_id);
|
||||||
|
}
|
||||||
|
if ($transactions) {
|
||||||
|
foreach ($transactions->result() as $trans) {
|
||||||
|
$trans->agent_id = $row->agent_id; // Add agent id to transaction
|
||||||
|
array_push($data['transactions'], $trans);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$data["commission"] = "N/A";
|
||||||
|
$data["principal"] = "N/A";
|
||||||
|
$data["totalCommissionBanque"] = "N/A";
|
||||||
|
$data["transactions"] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$data['currency_code'] = $this->session->userdata('currency_code');
|
||||||
|
$data['alert'] = "";
|
||||||
|
$data['active'] = "wallet";
|
||||||
|
$data['code_parrain'] = $this->session->userdata('code_parrain');
|
||||||
|
$data['category'] = $this->session->userdata('category');
|
||||||
|
$data['network'] = $this->session->userdata('network');
|
||||||
|
$data['network_id'] = $id_network;
|
||||||
|
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||||
|
$data['pays'] = $this->user_model->getAllGameCountries();
|
||||||
|
$data['networks'] = $this->user_model->getActiveNetwork();
|
||||||
|
$data['agentWalletInfos'] = $this->user_model->getInfosWalletAgentForHyper($id_network);
|
||||||
|
// $data['geolocated_user'] = $this->user_model->getSuperNameAndCodeForSup($this->session->userdata('member_code'));
|
||||||
|
$this->load->view('header_sup', $data);
|
||||||
|
if ($data['hasWallet']->first_row()->type == 'visa')
|
||||||
|
$this->load->view('gestion_wallet_sup');
|
||||||
|
elseif ($data['hasWallet']->first_row()->type == 'ilink')
|
||||||
|
$this->load->view('gestion_wallet_sup_ilink');
|
||||||
|
$this->load->view('footer');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function historique($network_id, $startDate, $endDate, $codeMembre, $type)
|
||||||
|
{
|
||||||
|
$data['configWallet'] = $this->wallet_model->getConfigWallet($network_id);
|
||||||
|
$format = $this->session->userdata('site_lang') === 'french' ? 'd-m-Y' : 'Y-m-d';
|
||||||
|
$data['startDate'] = $startDate ? date($format, strtotime($startDate)) : null;
|
||||||
|
$data['endDate'] = $endDate ? date($format, strtotime($endDate)) : null;
|
||||||
|
$endDate = Date('Y-m-d', strtotime($endDate . "+1 day"));
|
||||||
|
if ($type == 'transaction')
|
||||||
|
$data['transactions'] = $this->user_model->getTransactionsSup($startDate, $endDate, $codeMembre);
|
||||||
|
else if ($type == 'transaction_ilink')
|
||||||
|
$data['transactions'] = $this->wallet_model->getIlinkTransactionsSup($startDate, $endDate, $codeMembre);
|
||||||
|
else if ($type == 'commission_transfer')
|
||||||
|
$data['transactions'] = $this->wallet_model->getCommissionTransfers($startDate, $endDate, $this->session->userdata('member_code'));
|
||||||
|
else if ($type == 'balance_statement')
|
||||||
|
$data['wallets'] = $this->user_model->getInfosWalletAgentForSuper($codeMembre);
|
||||||
|
|
||||||
|
$data['active'] = "wallet";
|
||||||
|
$data['alert'] = "";
|
||||||
|
$data['network'] = $this->session->userdata('network');
|
||||||
|
$data['villes'] = $this->user_model->getVilleByUserGeo($data['network'], $this->session->userdata('current_pays'));
|
||||||
|
$data['networks'] = $this->user_model->getActiveNetwork();
|
||||||
|
// $data['superviseurs'] = $this->user_model->getSuperNameAndCodeForHyp($this->session->userdata('member_code'));
|
||||||
|
$data['hasWallet'] = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'));
|
||||||
|
$data['country'] = $this->session->userdata('current_pays');
|
||||||
|
$data['category'] = $this->session->userdata('category');
|
||||||
|
$data['geolocated_user'] = $this->user_model->getSuperNameAndCodeForSup($this->session->userdata('member_code'));
|
||||||
|
$data['id_network'] = $this->session->userdata('network_id');
|
||||||
|
|
||||||
|
|
||||||
|
$this->load->view('header_sup', $data);
|
||||||
|
if ($type == 'transaction')
|
||||||
|
$this->load->view('historique_transactions');
|
||||||
|
else if ($type == 'transaction_ilink')
|
||||||
|
$this->load->view('historique_transactions_ilink');
|
||||||
|
else if ($type == 'commission_transfer')
|
||||||
|
$this->load->view('historique_transferts_commission');
|
||||||
|
else if ($type == 'balance_statement')
|
||||||
|
$this->load->view('config_wallet_ilink_hyp/etat_soldes');
|
||||||
|
$this->load->view('footer');
|
||||||
|
}
|
||||||
|
|
||||||
|
private function isLogged()
|
||||||
|
{
|
||||||
|
if (!$this->session->userdata('email')) {
|
||||||
|
$this->session->set_flashdata('error', 'log in first');
|
||||||
|
|
||||||
|
$data['alert'] = "ok";
|
||||||
|
$data['message'] = "Login first!";
|
||||||
|
$this->load->view('login', $data);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -149,6 +149,10 @@
|
||||||
} else if ($data->category == $super) {
|
} else if ($data->category == $super) {
|
||||||
$this->session->set_userdata('code_parrain', $data->code_parrain);
|
$this->session->set_userdata('code_parrain', $data->code_parrain);
|
||||||
redirect('Superviseur_dash');
|
redirect('Superviseur_dash');
|
||||||
|
}else if($data->category == 'geolocated') {
|
||||||
|
$this->session->set_userdata('code_parrain', $data->code_parrain);
|
||||||
|
$this->session->set_userdata('network_agent_id', $data->network_agent_id);
|
||||||
|
redirect('Agent');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -820,4 +820,5 @@ $lang['resubmit'] = "Resubmit";
|
||||||
$lang['subscription_resubmitted'] = "The subscription has been resubmitted";
|
$lang['subscription_resubmitted'] = "The subscription has been resubmitted";
|
||||||
$lang['insurance_part'] = "Insurance share";
|
$lang['insurance_part'] = "Insurance share";
|
||||||
$lang['insurance_part'] = "Insurance share";
|
$lang['insurance_part'] = "Insurance share";
|
||||||
|
$lang['consultation_id'] = "Consulation ID";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -831,4 +831,5 @@ $lang['resubmit'] = "Resoumettre";
|
||||||
$lang['subscription_resubmitted'] = "La souscription a été re-soumise";
|
$lang['subscription_resubmitted'] = "La souscription a été re-soumise";
|
||||||
$lang['insurance_part'] = "Part de l'assurance";
|
$lang['insurance_part'] = "Part de l'assurance";
|
||||||
$lang['insurance_part'] = "Part de l'assurance";
|
$lang['insurance_part'] = "Part de l'assurance";
|
||||||
|
$lang['consultation_id'] = "ID de la consultation";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -30,11 +30,14 @@ class User_model extends CI_Model
|
||||||
$this->db->where("email",$id);
|
$this->db->where("email",$id);
|
||||||
$query=$this->db->get();
|
$query=$this->db->get();
|
||||||
break;
|
break;
|
||||||
case 2: //hyperviseur ou superviseur
|
case 2: //hyperviseur ou superviseur ou agent
|
||||||
$query = $this->db->query("SELECT * FROM hyper_infos WHERE code_membre='".$id."'");
|
$query = $this->db->query("SELECT * FROM hyper_infos WHERE code_membre='".$id."'");
|
||||||
if($query->num_rows()==0){
|
if($query->num_rows()==0){
|
||||||
$query = $this->db->query("SELECT * FROM super_infos WHERE category='super' AND code_membre='".$id."'");
|
$query = $this->db->query("SELECT * FROM super_infos WHERE category='super' AND code_membre='".$id."'");
|
||||||
}
|
}
|
||||||
|
if($query->num_rows()==0){
|
||||||
|
$query = $this->db->query("SELECT * FROM agent_plus WHERE category='geolocated' AND code_membre='".$id."'");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,13 @@ class HealthCareSheets_model extends CI_Model
|
||||||
public function countAll($postData)
|
public function countAll($postData)
|
||||||
{
|
{
|
||||||
$this->db->from($this->table);
|
$this->db->from($this->table);
|
||||||
$this->db->where('network_id', $postData['id_network']);
|
if(!empty($postData['id_network'])){
|
||||||
|
$this->db->where('network_id', $postData['id_network']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($postData['network_agent_id'])){
|
||||||
|
$this->db->where('network_agent_id', $postData['network_agent_id']);
|
||||||
|
}
|
||||||
return $this->db->count_all_results();
|
return $this->db->count_all_results();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +66,13 @@ class HealthCareSheets_model extends CI_Model
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->db->from($this->table);
|
$this->db->from($this->table);
|
||||||
$this->db->where('network_id', $postData['id_network']);
|
if(!empty($postData['id_network'])){
|
||||||
|
$this->db->where('network_id', $postData['id_network']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($postData['network_agent_id'])){
|
||||||
|
$this->db->where('network_agent_id', $postData['network_agent_id']);
|
||||||
|
}
|
||||||
if (strlen($postData['startDate']) > 0 && strlen($postData['endDate']) > 0) {
|
if (strlen($postData['startDate']) > 0 && strlen($postData['endDate']) > 0) {
|
||||||
$this->db->where('created_at >=', date('Y-m-d', strtotime($postData['startDate'])));
|
$this->db->where('created_at >=', date('Y-m-d', strtotime($postData['startDate'])));
|
||||||
$this->db->where('created_at <', date('Y-m-d', strtotime($postData['endDate']. "+1 day")));
|
$this->db->where('created_at <', date('Y-m-d', strtotime($postData['endDate']. "+1 day")));
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
<input name="email" id="email" type="text" class="form-control" placeholder="Email" required>
|
<input name="email" id="email" type="text" class="form-control" placeholder="Email" required>
|
||||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" align="center">
|
<div class="form-group" style="text-align: center">
|
||||||
<button type="submit" name="Submit" class="btn btn-primary btn-block btn-flat">Confirmer</button>
|
<button type="submit" name="Submit" class="btn btn-primary btn-block btn-flat">Confirmer</button>
|
||||||
<button type="button" id="back" class="btn btn-danger btn-block btn-flat">Retour</button>
|
<button type="button" id="back" class="btn btn-danger btn-block btn-flat">Retour</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
<input type="password" name="password_confirm" id="password_confirm" class="form-control" placeholder="Entrez à nouveau le mot de passe" required>
|
<input type="password" name="password_confirm" id="password_confirm" class="form-control" placeholder="Entrez à nouveau le mot de passe" required>
|
||||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" align="center">
|
<div class="form-group" style="text-align: center">
|
||||||
<button type="submit" name="Submit" class="btn btn-primary btn-block btn-flat">Terminer</button>
|
<button type="submit" name="Submit" class="btn btn-primary btn-block btn-flat">Terminer</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<input type="text" name="transaction" id="transaction" class="form-control" placeholder="N° transaction" required>
|
<input type="text" name="transaction" id="transaction" class="form-control" placeholder="N° transaction" required>
|
||||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" align="center">
|
<div class="form-group" style="text-align: center">
|
||||||
<button type="submit" name="Submit" class="btn btn-primary btn-block btn-flat">Créer</button>
|
<button type="submit" name="Submit" class="btn btn-primary btn-block btn-flat">Créer</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -141,7 +141,7 @@
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<h3 class="" align="center"><?php echo $this->lang->line('Créer un compte administrateur'); ?></h3>
|
<h3 class="" style="text-align: center"><?php echo $this->lang->line('Créer un compte administrateur'); ?></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<form method='POST' id="create-admin-form" class="bottom-75 center-block">
|
<form method='POST' id="create-admin-form" class="bottom-75 center-block">
|
||||||
|
@ -183,7 +183,7 @@
|
||||||
<input type="text" class="form-control input-lg" name="adresse" required
|
<input type="text" class="form-control input-lg" name="adresse" required
|
||||||
id="adresse">
|
id="adresse">
|
||||||
</div>
|
</div>
|
||||||
<div align="center" class="form-group">
|
<div style="text-align: center" class="form-group">
|
||||||
<input id="btn-add" type="submit" value="<?php echo $this->lang->line('Créer le compte'); ?>" class="btn btn-primary">
|
<input id="btn-add" type="submit" value="<?php echo $this->lang->line('Créer le compte'); ?>" class="btn btn-primary">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
<th align='center'><?php echo $this->lang->line('Statut'); ?></th>
|
<th align='center'><?php echo $this->lang->line('Statut'); ?></th>
|
||||||
<th align='center'><?php echo $this->lang->line('Activer/Désactiver'); ?></th>
|
<th align='center'><?php echo $this->lang->line('Activer/Désactiver'); ?></th>
|
||||||
<th align='center'><?php echo $this->lang->line('Modifier'); ?></th>
|
<th align='center'><?php echo $this->lang->line('Modifier'); ?></th>
|
||||||
<th align="center"><?php echo $this->lang->line('Supprimer'); ?></th>
|
<th style="text-align: center"><?php echo $this->lang->line('Supprimer'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
@ -184,7 +184,7 @@
|
||||||
<th align='center'><?php echo $this->lang->line('Statut'); ?></th>
|
<th align='center'><?php echo $this->lang->line('Statut'); ?></th>
|
||||||
<th align='center'> <?php echo $this->lang->line('share_rate') ?></th>
|
<th align='center'> <?php echo $this->lang->line('share_rate') ?></th>
|
||||||
<th align='center'> URL</th>
|
<th align='center'> URL</th>
|
||||||
<th align="center"> Action</th>
|
<th style="text-align: center"> Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>iLink | Superviseur</title>
|
||||||
|
<!-- Tell the browser to be responsive to screen width -->
|
||||||
|
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('bower_components/bootstrap/dist/css/bootstrap.min.css') ?>">
|
||||||
|
<!-- Font Awesome -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('bower_components/font-awesome/css/font-awesome.min.css') ?>">
|
||||||
|
<!-- Ionicons -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('bower_components/Ionicons/css/ionicons.min.css') ?>">
|
||||||
|
<!-- Theme style -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('dist/css/AdminLTE.css') ?>">
|
||||||
|
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||||
|
folder instead of downloading all of them to reduce the load. -->
|
||||||
|
<link rel="stylesheet" href="<?= base_url('dist/css/skins/_all-skins.min.css') ?>">
|
||||||
|
<link rel="shortcut icon" href="<?= base_url('favicon.ico') ?>" type="image/x-icon">
|
||||||
|
<link rel="icon" href="<?= base_url('favicon.ico') ?>" type="image/x-icon">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
<style media="screen">
|
||||||
|
.img-dash {
|
||||||
|
height: 50px !important;
|
||||||
|
float: left !important;
|
||||||
|
padding: 1% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table_modified {
|
||||||
|
font-size: 11px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="hold-transition skin-blue sidebar-mini">
|
||||||
|
<div class="wrapper">
|
||||||
|
<header class="main-header">
|
||||||
|
<!-- Logo -->
|
||||||
|
<a href="#" class="logo">
|
||||||
|
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||||
|
<span class="logo-mini"><b>iLink</b></span>
|
||||||
|
<!-- logo for regular state and mobile devices -->
|
||||||
|
<span class="logo-lg">
|
||||||
|
<img class="img img-responsive img-dash" src="<?= base_url('images/logo.png') ?>">
|
||||||
|
<b>iLink</b> World
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<!-- Header Navbar: style can be found in header.less -->
|
||||||
|
<nav class="navbar navbar-static-top">
|
||||||
|
<!-- Sidebar toggle button-->
|
||||||
|
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
|
||||||
|
<span class="sr-only">Toggle navigation</span>
|
||||||
|
</a>
|
||||||
|
<div class="navbar-custom-menu">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<!-- User Account: style can be found in dropdown.less -->
|
||||||
|
<li class="dropdown user user-menu">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
|
<?= $this->lang->line('Bienvenue'); ?> <span class="hidden-xs"><b><?= $this->session->userdata('firstname').' '.$this->session->userdata('lastname');?></b></span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<!-- User image -->
|
||||||
|
<li class="user-header">
|
||||||
|
<p>
|
||||||
|
<?= $this->session->userdata('network').' - '.$this->session->userdata('member_code');?>
|
||||||
|
<small><?= $this->session->userdata('email');?></small>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<li class="user-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6 text-center">
|
||||||
|
<?= $this->session->userdata('current_pays');?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6 text-center">
|
||||||
|
<?= $this->session->userdata('phone');?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
</li>
|
||||||
|
<li class="user-footer">
|
||||||
|
<div class="pull-right">
|
||||||
|
<a href="<?= base_url('Users/logout') ?>" class="btn btn-default btn-flat"><?= $this->lang->line('Déconnexion'); ?></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<!-- Left side column. contains the logo and sidebar -->
|
||||||
|
<aside class="main-sidebar">
|
||||||
|
<!-- sidebar: style can be found in sidebar.less -->
|
||||||
|
<section class="sidebar">
|
||||||
|
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||||
|
<ul class="sidebar-menu" data-widget="tree">
|
||||||
|
<?php if ($hasWallet) {
|
||||||
|
?>
|
||||||
|
<?php if ($hasWallet->first_row()->type == 'ilink_sante') { ?>
|
||||||
|
<li class="<?php if ($active == "health_care_sheets") {
|
||||||
|
echo "active";
|
||||||
|
} ?>">
|
||||||
|
<a href="<?= base_url('Agent') ?>">
|
||||||
|
<i class="fa fa-money"></i> <span>Feuille de soins</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php }?>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
<!-- /.sidebar -->
|
||||||
|
</aside>
|
|
@ -0,0 +1,206 @@
|
||||||
|
<!-- DataTables -->
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="<?= base_url('bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css') ?>">
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.6.2/css/buttons.dataTables.min.css">
|
||||||
|
<link rel="stylesheet" href="<?= base_url('bower_components/toastr/toastr.css') ?>">
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<?php
|
||||||
|
?>
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<section class="content-header">
|
||||||
|
<h1>
|
||||||
|
<?= $this->lang->line('manage_health_care_sheets') ?>
|
||||||
|
<!-- <input type="button" class="btn btn-primary pull-right" id="Bactiver"-->
|
||||||
|
<!-- value="Activer/Désactiver le(s) réseau(x)" />-->
|
||||||
|
</h1>
|
||||||
|
</section>
|
||||||
|
<section class="content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-sm-6 col-xs-12">
|
||||||
|
<div class="info-box">
|
||||||
|
<span class="info-box-icon bg-aqua"><i class="ion ion-android-time"></i></span>
|
||||||
|
<div class="info-box-content">
|
||||||
|
<span class="info-box-text"><?= $this->lang->line('Période') ?> </span>
|
||||||
|
<span class="info-box-number">
|
||||||
|
<input id="picker"
|
||||||
|
style="background: #fff; cursor: pointer; padding: 1px 1px; border: 1px solid #ccc; width: 100%"
|
||||||
|
data-category="<?= isset($category) ? $category : null ?>"
|
||||||
|
type="text" name="daterange"
|
||||||
|
data-lang="<?= $this->session->userdata('site_lang') ?>"
|
||||||
|
value="<?= ($startDate != null & $endDate != null) ? $startDate . ' - ' . $endDate : '' ?>"/>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
<span> Format : <?= $this->session->userdata('site_lang') === 'french' ? 'Jour - Mois - Année ' : 'Year - Month - Day' ?> </span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="box">
|
||||||
|
<div class="box-header">
|
||||||
|
<h3 class="box-title"><?= $this->lang->line('export_health_care_sheets_list') ?></h3>
|
||||||
|
<div class="box-tools">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-body" style="overflow-x:auto;">
|
||||||
|
|
||||||
|
<table id="subscriptions" class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th align='center'><?= $this->lang->line('health_care_sheet_id') ?></th>
|
||||||
|
<th>Type</th>
|
||||||
|
<th><?= $this->lang->line('insured_id') ?></th>
|
||||||
|
<th><?= $this->lang->line('patient_lastname') ?></th>
|
||||||
|
<th><?= $this->lang->line('patient_situation') ?></th>
|
||||||
|
<th><?= $this->lang->line('institution_name') ?></th>
|
||||||
|
<th><?= $this->lang->line('practitioner_lastname') ?></th>
|
||||||
|
<th><?= $this->lang->line('care_condition') ?></th>
|
||||||
|
<th><?= $this->lang->line('state') ?></th>
|
||||||
|
<th align='center'>Date</th>
|
||||||
|
<th align='center'>Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- jQuery 3 -->
|
||||||
|
<script src="<?= base_url('bower_components/jquery/dist/jquery.min.js') ?>"></script>
|
||||||
|
<!-- Bootstrap 3.3.7 -->
|
||||||
|
<script src="<?= base_url('bower_components/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- DataTables -->
|
||||||
|
<script src="<?= base_url('bower_components/datatables.net/js/jquery.dataTables.min.js') ?>"></script>
|
||||||
|
<script src="<?= base_url('bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') ?>"></script>
|
||||||
|
<!-- SlimScroll -->
|
||||||
|
<script src="<?= base_url('bower_components/jquery-slimscroll/jquery.slimscroll.min.js') ?>"></script>
|
||||||
|
<!-- FastClick -->
|
||||||
|
<script src="<?= base_url('bower_components/fastclick/lib/fastclick.js') ?>"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="<?= base_url('dist/js/adminlte.min.js') ?>"></script>
|
||||||
|
<!-- AdminLTE for demo purposes -->
|
||||||
|
<script src="<?= base_url('dist/js/demo.js') ?>"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment-with-locales.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/plug-ins/1.10.19/sorting/datetime-moment.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/plug-ins/1.10.20/dataRender/datetime.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/dataTables.buttons.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.html5.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.print.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.colVis.min.js"></script>
|
||||||
|
<script src="<?= base_url('dist/js/sweetalert2.js') ?>"></script>
|
||||||
|
<script src="<?= base_url('bower_components/toastr/toastr.js') ?>"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
const lang = $('#picker').data('lang');
|
||||||
|
const format = lang === 'french' ? 'fr' : 'en';
|
||||||
|
moment.updateLocale(moment.locale(format), {invalidDate: ""}); // Blank text when is invalid date
|
||||||
|
|
||||||
|
var table = $('#subscriptions').DataTable({
|
||||||
|
// Processing indicator
|
||||||
|
"processing": true,
|
||||||
|
"language": {
|
||||||
|
"processing": "<?= $this->lang->line('loading') ?>",
|
||||||
|
"emptyTable" : "<?= $this->lang->line('no_insured') ?>"
|
||||||
|
},
|
||||||
|
// DataTables server-side processing mode
|
||||||
|
"serverSide": true,
|
||||||
|
// Initial no order.
|
||||||
|
"order": [],
|
||||||
|
// Load data from an Ajax source
|
||||||
|
"ajax": {
|
||||||
|
"url": "<?= base_url('pagination/HealthCareSheets/getLists'); ?>",
|
||||||
|
"data":{
|
||||||
|
"startDate" : "<?= $startDate?>",
|
||||||
|
"endDate" : "<?= $endDate?>",
|
||||||
|
"id_network" : "<?= $id_network ?? '' ?>",
|
||||||
|
"currentURL" : "<?= current_url()?>"
|
||||||
|
},
|
||||||
|
"type": "POST"
|
||||||
|
},
|
||||||
|
"aaSorting": [[9, "desc"]],
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": [9],
|
||||||
|
// "orderable": false,
|
||||||
|
render: $.fn.dataTable.render.moment('YYYY-MM-DD HH:mm:ss', 'D MMMM YYYY HH:mm:ss', format)
|
||||||
|
}],
|
||||||
|
dom: 'Bfrtip',
|
||||||
|
"buttons": [
|
||||||
|
'pageLength',
|
||||||
|
{
|
||||||
|
"extend": 'excelHtml5',
|
||||||
|
title: "<?= $this->lang->line('subscriptions_history') ?>",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
extend: 'csvHtml5',
|
||||||
|
title: "<?= $this->lang->line('subscriptions_history') ?>",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
extend: 'pdfHtml5',
|
||||||
|
orientation: 'landscape',
|
||||||
|
pageSize: 'LEGAL',
|
||||||
|
title: "<?= $this->lang->line('subscriptions_history') ?>",
|
||||||
|
trim: false,
|
||||||
|
"action": newexportaction
|
||||||
|
},
|
||||||
|
// 'colvis'
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
table.buttons().container()
|
||||||
|
.appendTo('#example_wrapper .col-sm-6:eq(0)');
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var startDate;
|
||||||
|
var endDate;
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
const lang = $('#picker').data('lang');
|
||||||
|
const category = $('#picker').data('category');
|
||||||
|
const id_network = "<?= $id_network ?? ''?>";
|
||||||
|
$('input[name="daterange"]').daterangepicker({
|
||||||
|
opens: 'left',
|
||||||
|
autoUpdateInput: false,
|
||||||
|
locale: {
|
||||||
|
format: lang === 'french' ? 'DD-MM-YYYY' : 'YYYY-MM-DD',
|
||||||
|
cancelLabel: 'Clear'
|
||||||
|
}
|
||||||
|
}, function (start, end, label) {
|
||||||
|
const debut = start.format('YYYY-MM-DD');
|
||||||
|
const fin = end.format('YYYY-MM-DD');
|
||||||
|
if(category)
|
||||||
|
window.location = "<?= current_url()?>" + "?history=insurance-health_care_sheets" + "&d=" + debut + "&f=" + fin;
|
||||||
|
else
|
||||||
|
window.location = "<?= current_url()?>" + "?id="+id_network+"&history=insurance-health_care_sheets" + "&d=" + debut + "&f=" + fin;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$('input[name="daterange"]').on('cancel.daterangepicker', function(ev, picker) {
|
||||||
|
//do something, like clearing an input
|
||||||
|
$('#daterange').val('');
|
||||||
|
if(category)
|
||||||
|
window.location = "<?= current_url()?>" + "?history=insurance-health_care_sheets";
|
||||||
|
else
|
||||||
|
window.location = "<?= current_url()?>" + "?id="+id_network+"&history=insurance-health_care_sheets";
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
|
@ -74,28 +74,34 @@
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="center"><strong>Patient</strong></th>
|
<th style="text-align: center"><strong>Patient</strong></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('insured_id'); ?></td>
|
<td><?= $this->lang->line('insured_id'); ?></td>
|
||||||
<td align="center"><strong><?= $health_care_sheet->insured_id ?></strong></td>
|
<td style="text-align: center"><strong><?= $health_care_sheet->insured_id ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('patient_lastname'); ?></td>
|
<td><?= $this->lang->line('patient_lastname'); ?></td>
|
||||||
<td align="center"><strong><?= $health_care_sheet->patient_lastname ; ?></strong></td>
|
<td style="text-align: center"><strong><?= $health_care_sheet->patient_lastname ; ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('patient_firstname')?></td>
|
<td><?= $this->lang->line('patient_firstname')?></td>
|
||||||
<td align="center"><strong><?= $health_care_sheet->patient_firstname ?></strong></td>
|
<td style="text-align: center"><strong><?= $health_care_sheet->patient_firstname ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('patient_situation')?></td>
|
<td><?= $this->lang->line('patient_situation')?></td>
|
||||||
<td align="center"><strong><?= $this->lang->line($health_care_sheet->patient_situation) ?></strong></td>
|
<td style="text-align: center"><strong><?= $this->lang->line($health_care_sheet->patient_situation) ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php if($health_care_sheet->type == 'EXECUTION') { ?>
|
||||||
|
<tr>
|
||||||
|
<td><?= $this->lang->line('consultation_id')?></td>
|
||||||
|
<td style="text-align: center"><strong><?= $health_care_sheet->prescription_health_care_sheet_id ?></strong></td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -114,28 +120,28 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('institution_name'); ?></td>
|
<td><?= $this->lang->line('institution_name'); ?></td>
|
||||||
<td align="center"><strong><?= $health_care_sheet->institution_name ?></strong></td>
|
<td style="text-align: center"><strong><?= $health_care_sheet->institution_name ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('institution_code'); ?></td>
|
<td><?= $this->lang->line('institution_code'); ?></td>
|
||||||
<td align="center"><strong><?= $health_care_sheet->institution_code ?></strong></td>
|
<td style="text-align: center"><strong><?= $health_care_sheet->institution_code ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('practitioner_lastname'); ?></td>
|
<td><?= $this->lang->line('practitioner_lastname'); ?></td>
|
||||||
<td align="center"><strong><?= $health_care_sheet->practitioner_lastname ; ?></strong></td>
|
<td style="text-align: center"><strong><?= $health_care_sheet->practitioner_lastname ; ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('practitioner_firstname')?></td>
|
<td><?= $this->lang->line('practitioner_firstname')?></td>
|
||||||
<td align="center"><strong><?= $health_care_sheet->practitioner_firstname ?></strong></td>
|
<td style="text-align: center"><strong><?= $health_care_sheet->practitioner_firstname ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Classification</td>
|
<td>Classification</td>
|
||||||
<td align="center"><strong><?= $health_care_sheet->practitioner_provider_class ?></strong></td>
|
<td style="text-align: center"><strong><?= $health_care_sheet->practitioner_provider_class ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('care_condition')?></td>
|
<td><?= $this->lang->line('care_condition')?></td>
|
||||||
<td align="center"><strong><?= $this->lang->line($health_care_sheet->care_condition) ?></strong></td>
|
<td style="text-align: center"><strong><?= $this->lang->line($health_care_sheet->care_condition) ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if(isset($health_care_sheet->accident_date)){ ?>
|
<?php if(isset($health_care_sheet->accident_date)){ ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -187,33 +193,34 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="box box-primary">
|
<?php if($health_care_sheet->type != 'EXECUTION') { ?>
|
||||||
<div class="box-header with-border">
|
<div class="box box-primary">
|
||||||
<h3 class="box-title"><?= $this->lang->line('performances') ?></h3>
|
<div class="box-header with-border">
|
||||||
</div>
|
<h3 class="box-title"><?= $this->lang->line('performances') ?></h3>
|
||||||
<div class="box-body" style="overflow-x:auto;">
|
</div>
|
||||||
<table id="performances" class="table table-bordered table-hover">
|
<div class="box-body" style="overflow-x:auto;">
|
||||||
<thead>
|
<table id="performances" class="table table-bordered table-hover">
|
||||||
<tr>
|
<thead>
|
||||||
<th>#</th>
|
<tr>
|
||||||
<th><?= $this->lang->line('act_code'); ?></th>
|
<th>#</th>
|
||||||
<th><?= $this->lang->line('Montant'); ?></th>
|
<th><?= $this->lang->line('act_code'); ?></th>
|
||||||
<th><?= $this->lang->line('moderator_ticket'); ?></th>
|
<th><?= $this->lang->line('Montant'); ?></th>
|
||||||
<th><?= $this->lang->line('insurance_amount'); ?></th>
|
<th><?= $this->lang->line('moderator_ticket'); ?></th>
|
||||||
<th><?= $this->lang->line('home_visit_fees'); ?></th>
|
<th><?= $this->lang->line('insurance_amount'); ?></th>
|
||||||
<th>Date</th>
|
<th><?= $this->lang->line('home_visit_fees'); ?></th>
|
||||||
</tr>
|
<th>Date</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>
|
</thead>
|
||||||
<?php
|
<tbody>
|
||||||
if (isset($performances)) {
|
<?php
|
||||||
foreach ($performances->result() as $i => $row) {
|
if (isset($performances)) {
|
||||||
$amount = Money::of(round($row->amount, 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR');
|
foreach ($performances->result() as $i => $row) {
|
||||||
$moderator_ticket = Money::of(round($row->moderator_ticket, 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR');
|
$amount = Money::of(round($row->amount, 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR');
|
||||||
$insurance_amount = Money::of(round($row->insurance_amount, 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR');
|
$moderator_ticket = Money::of(round($row->moderator_ticket, 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR');
|
||||||
$home_visit_fees = isset($row->home_visit_fees) ? Money::of(round($row->home_visit_fees, 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR') : '';
|
$insurance_amount = Money::of(round($row->insurance_amount, 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR');
|
||||||
|
$home_visit_fees = isset($row->home_visit_fees) ? Money::of(round($row->home_visit_fees, 2), $health_care_sheet->currency_code, $this->context)->formatTo('fr_FR') : '';
|
||||||
|
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
<td>" . ($i+1) . "</td>
|
<td>" . ($i+1) . "</td>
|
||||||
<td>" . $row->act_code . "</td>
|
<td>" . $row->act_code . "</td>
|
||||||
<td>" . $amount . "</td>
|
<td>" . $amount . "</td>
|
||||||
|
@ -221,16 +228,18 @@
|
||||||
<td>" . $insurance_amount . "</td>
|
<td>" . $insurance_amount . "</td>
|
||||||
<td>".$home_visit_fees."</td>
|
<td>".$home_visit_fees."</td>
|
||||||
<td>" . $row->created_at. "</td>";
|
<td>" . $row->created_at. "</td>";
|
||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
?>
|
||||||
?>
|
</tbody>
|
||||||
</tbody>
|
</table>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
<?php if (isset($exams) && $exams->num_rows() > 0 ) { ?>
|
<?php if (isset($exams) && $exams->num_rows() > 0 ) { ?>
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
|
|
|
@ -73,21 +73,21 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('insured_id'); ?></td>
|
<td><?= $this->lang->line('insured_id'); ?></td>
|
||||||
<td align="center"><strong><?= $insured_id ?></strong></td>
|
<td style="text-align: center"><strong><?= $insured_id ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('Nom'); ?></td>
|
<td><?= $this->lang->line('Nom'); ?></td>
|
||||||
<td align="center"><strong><?= $user->lastname ?? '' . $user->firstname ?? ''; ?></strong></td>
|
<td style="text-align: center"><strong><?= $user->lastname ?? '' . $user->firstname ?? ''; ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('Adresse')?></td>
|
<td><?= $this->lang->line('Adresse')?></td>
|
||||||
<td align="center"><strong><?= $user->adresse ?></strong></td>
|
<td style="text-align: center"><strong><?= $user->adresse ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('Contact')?></td>
|
<td><?= $this->lang->line('Contact')?></td>
|
||||||
<td align="center"><strong><?= $user->phone." | ".$user->email ?></strong></td>
|
<td style="text-align: center"><strong><?= $user->phone." | ".$user->email ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -91,16 +91,16 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('Nom'); ?></td>
|
<td><?= $this->lang->line('Nom'); ?></td>
|
||||||
<td align="center"><strong><?= $user->lastname ?? '' . $user->firstname ?? ''; ?></strong></td>
|
<td style="text-align: center"><strong><?= $user->lastname ?? '' . $user->firstname ?? ''; ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('Adresse')?></td>
|
<td><?= $this->lang->line('Adresse')?></td>
|
||||||
<td align="center"><strong><?= $user->adresse ?></strong></td>
|
<td style="text-align: center"><strong><?= $user->adresse ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->lang->line('Contact')?></td>
|
<td><?= $this->lang->line('Contact')?></td>
|
||||||
<td align="center"><strong><?= $user->phone." | ".$user->email ?></strong></td>
|
<td style="text-align: center"><strong><?= $user->phone." | ".$user->email ?></strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -128,7 +128,8 @@
|
||||||
"data":{
|
"data":{
|
||||||
"startDate" : "<?= $startDate?>",
|
"startDate" : "<?= $startDate?>",
|
||||||
"endDate" : "<?= $endDate?>",
|
"endDate" : "<?= $endDate?>",
|
||||||
"id_network" : "<?= $id_network ?>",
|
"id_network" : "<?= $id_network ?? null ?>",
|
||||||
|
"network_agent_id" : "<?= $network_agent_id ?? null ?>",
|
||||||
"currentURL" : "<?= current_url()?>"
|
"currentURL" : "<?= current_url()?>"
|
||||||
},
|
},
|
||||||
"type": "POST"
|
"type": "POST"
|
||||||
|
@ -175,7 +176,8 @@
|
||||||
$(function () {
|
$(function () {
|
||||||
const lang = $('#picker').data('lang');
|
const lang = $('#picker').data('lang');
|
||||||
const category = $('#picker').data('category');
|
const category = $('#picker').data('category');
|
||||||
const id_network = "<?= $id_network?>";
|
const id_network = "<?= $id_network ?? null ?>";
|
||||||
|
const ne = "<?=$network_agent_id ?? null ?>"
|
||||||
$('input[name="daterange"]').daterangepicker({
|
$('input[name="daterange"]').daterangepicker({
|
||||||
opens: 'left',
|
opens: 'left',
|
||||||
autoUpdateInput: false,
|
autoUpdateInput: false,
|
||||||
|
|
Loading…
Reference in New Issue