+ Fix bug when export wallet uba transactions
This commit is contained in:
parent
a973c5f13b
commit
d9bbb98f06
|
@ -23,7 +23,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
| a PHP script and you can easily do that on your own.
|
| a PHP script and you can easily do that on your own.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['base_url'] = 'https://'.$_SERVER['SERVER_NAME'].'/backofficeiLinkTest';
|
$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/backofficeiLinkTest';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -76,8 +76,8 @@ $query_builder = TRUE;
|
||||||
$db['default'] = array(
|
$db['default'] = array(
|
||||||
'dsn' => '',
|
'dsn' => '',
|
||||||
'hostname' => 'localhost',
|
'hostname' => 'localhost',
|
||||||
'username' => 'root',
|
'username' => 'djery-tom',
|
||||||
'password' => 'vps@2017GA',
|
'password' => 'root',
|
||||||
'database' => 'iLink_preprod',
|
'database' => 'iLink_preprod',
|
||||||
'dbdriver' => 'mysqli',
|
'dbdriver' => 'mysqli',
|
||||||
'dbprefix' => '',
|
'dbprefix' => '',
|
||||||
|
|
|
@ -55,7 +55,7 @@ class WalletTransaction extends CI_Controller
|
||||||
$disabled1 = $row->deleted ? "disabled" : "";
|
$disabled1 = $row->deleted ? "disabled" : "";
|
||||||
|
|
||||||
$data[] = array($row->id,strtoupper($type), join(" ", str_split($row->numCarte, 4)), $fmt->format($net), ($row->type_transac == 'credit' ? $fmt->format($banque) : ""),
|
$data[] = array($row->id,strtoupper($type), join(" ", str_split($row->numCarte, 4)), $fmt->format($net), ($row->type_transac == 'credit' ? $fmt->format($banque) : ""),
|
||||||
$fmt->format( $row->commission_banque), $fmt->format( $row->commission_hyp), $fmt->format( $row->commission_sup), $fmt->format( $row->commission_ag), $row->agent , $row->date_created,
|
$fmt->format( $row->commission_banque), $fmt->format( $row->commission_hyp), $fmt->format( $row->commission_sup), $fmt->format( $row->commission_ag), $row->agent ,$row->parrain, $row->date_created,
|
||||||
'<button data-id-transaction="'.$row->id.'" id="cancel" class="btn btn-danger btn-block" '.$disabled.' >
|
'<button data-id-transaction="'.$row->id.'" id="cancel" class="btn btn-danger btn-block" '.$disabled.' >
|
||||||
'.$this->lang->line('cancel').'
|
'.$this->lang->line('cancel').'
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -88,6 +88,7 @@
|
||||||
<th><?php echo $this->lang->line('Commission du superviseur') ?></th>
|
<th><?php echo $this->lang->line('Commission du superviseur') ?></th>
|
||||||
<th><?php echo $this->lang->line('Commission de l\'agent') ?></th>
|
<th><?php echo $this->lang->line('Commission de l\'agent') ?></th>
|
||||||
<th><?php echo $this->lang->line('agent_name') ?></th>
|
<th><?php echo $this->lang->line('agent_name') ?></th>
|
||||||
|
<th><?php echo $this->lang->line('Superviseur') ?></th>
|
||||||
<th align='center'>Date</th>
|
<th align='center'>Date</th>
|
||||||
<?php if ($this->session->userdata('category') != 'super') { ?>
|
<?php if ($this->session->userdata('category') != 'super') { ?>
|
||||||
<th align='center'>Action</th>
|
<th align='center'>Action</th>
|
||||||
|
@ -178,21 +179,51 @@
|
||||||
},
|
},
|
||||||
"aaSorting": [[ 0, "desc" ]],
|
"aaSorting": [[ 0, "desc" ]],
|
||||||
"columnDefs": [ {
|
"columnDefs": [ {
|
||||||
targets: 10,
|
targets: 11,
|
||||||
render: $.fn.dataTable.render.moment( 'YYYY-MM-DD HH:mm:ss' , 'D MMMM YYYY HH:mm:ss', format)
|
render: $.fn.dataTable.render.moment( 'YYYY-MM-DD HH:mm:ss' , 'D MMMM YYYY HH:mm:ss', format)
|
||||||
}],
|
},{
|
||||||
|
targets: 10,
|
||||||
|
visible : false
|
||||||
|
}
|
||||||
|
],
|
||||||
dom: 'Bfrtip',
|
dom: 'Bfrtip',
|
||||||
"buttons": [
|
"buttons": [
|
||||||
'pageLength',
|
'pageLength',
|
||||||
{
|
{
|
||||||
"extend": 'excelHtml5',
|
"extend": 'excelHtml5',
|
||||||
title: "<?= $this->lang->line('Historique des transactions') ?>",
|
title: "<?= $this->lang->line('Historique des transactions') ?>",
|
||||||
|
customizeData: function (data) {
|
||||||
|
for (var i = 0; i < data.body.length; i++) {
|
||||||
|
for (var j = 0; j < data.body[i].length; j++) {
|
||||||
|
// data.body[i][j] = '\u200C' + data.body[i][j];
|
||||||
|
if ([3, 4, 5, 6 , 7 , 8].includes(j)) {
|
||||||
|
// Get the value and strip the non numeric characters
|
||||||
|
// var value = $(this).text();
|
||||||
|
value = data.body[i][j].replace(',', ".")
|
||||||
|
data.body[i][j] = Number(value.replace(/[^0-9\.-]+/g, ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
trim: false,
|
trim: false,
|
||||||
"action": newexportaction
|
"action": newexportaction
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
extend: 'csvHtml5',
|
extend: 'csvHtml5',
|
||||||
title: "<?= $this->lang->line('Historique des transactions') ?>",
|
title: "<?= $this->lang->line('Historique des transactions') ?>",
|
||||||
|
customizeData: function (data) {
|
||||||
|
for (var i = 0; i < data.body.length; i++) {
|
||||||
|
for (var j = 0; j < data.body[i].length; j++) {
|
||||||
|
// data.body[i][j] = '\u200C' + data.body[i][j];
|
||||||
|
if ([3, 4, 5, 6 , 7 , 8].includes(j)) {
|
||||||
|
// Get the value and strip the non numeric characters
|
||||||
|
// var value = $(this).text();
|
||||||
|
value = data.body[i][j].replace(',', ".")
|
||||||
|
data.body[i][j] = Number(value.replace(/[^0-9\.-]+/g, ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
trim: false,
|
trim: false,
|
||||||
"action": newexportaction
|
"action": newexportaction
|
||||||
},
|
},
|
||||||
|
|
|
@ -243,6 +243,19 @@ use Brick\Money\ExchangeRateProvider\PDOProviderConfiguration;
|
||||||
exportOptions: {
|
exportOptions: {
|
||||||
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
|
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
|
||||||
},
|
},
|
||||||
|
customizeData: function (data) {
|
||||||
|
for (var i = 0; i < data.body.length; i++) {
|
||||||
|
for (var j = 0; j < data.body[i].length; j++) {
|
||||||
|
// data.body[i][j] = '\u200C' + data.body[i][j];
|
||||||
|
if ([3, 4, 5, 10, 11, 12, 13, 14,15].includes(j)) {
|
||||||
|
// Get the value and strip the non numeric characters
|
||||||
|
// var value = $(this).text();
|
||||||
|
value = data.body[i][j].replace(',', ".")
|
||||||
|
data.body[i][j] = Number(value.replace(/[^0-9\.-]+/g, ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
trim: false,
|
trim: false,
|
||||||
"action": newexportaction
|
"action": newexportaction
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue