Fix bugs on export
This commit is contained in:
parent
7f94745870
commit
e4dc4be372
|
@ -591,14 +591,23 @@ class Hyperviseur_dash extends CI_Controller
|
|||
if (isset($_POST)) {
|
||||
|
||||
$parrain_id = $this->input->post('parrain_id');
|
||||
$start = date('Y-m-d', strtotime($this->input->post('start')));
|
||||
$end = date('Y-m-d', strtotime($this->input->post('end'). "+1 day"));
|
||||
$start = $this->input->post('start');
|
||||
$end = $this->input->post('end');
|
||||
|
||||
$config = $this->wallet_model->getConfigWallet($this->session->userdata('network_id'))->first_row();
|
||||
|
||||
$sql = "SELECT id, type_transac, numCarte, montant, 0 as bank_deposit , commission_banque, commission_hyp, commission_sup, commission_ag,
|
||||
if(isset($start) && isset($end)){
|
||||
$start = date('Y-m-d', strtotime($start));
|
||||
$end = date('Y-m-d', strtotime($end. "+1 day"));
|
||||
|
||||
$sql = "SELECT id, type_transac, numCarte, montant, 0 as bank_deposit , commission_banque, commission_hyp, commission_sup, commission_ag,
|
||||
agent,parrain,date_created FROM infos_transaction WHERE deleted = 0 AND parrain_id = ? AND date_created >= ? AND date_created < ? ORDER BY agent ASC";
|
||||
$query = $this->db->query($sql, array($parrain_id,$start,$end));
|
||||
$query = $this->db->query($sql, array($parrain_id,$start,$end));
|
||||
}else{
|
||||
$sql = "SELECT id, type_transac, numCarte, montant, 0 as bank_deposit , commission_banque, commission_hyp, commission_sup, commission_ag,
|
||||
agent,parrain,date_created FROM infos_transaction WHERE deleted = 0 AND parrain_id = ? ORDER BY agent ASC";
|
||||
$query = $this->db->query($sql, array($parrain_id));
|
||||
}
|
||||
|
||||
$data = [['ID', 'Type' , $this->lang->line('cart_number'),$this->lang->line('customer_net_amount'),$this->lang->line('bank_deposit_amount'),
|
||||
$this->lang->line('Commission de la banque'),$this->lang->line('Commission de l\'hyperviseur'),$this->lang->line('Commission du superviseur'),
|
||||
|
|
|
@ -403,12 +403,10 @@
|
|||
data: {"parrain_id": parrain_id , start : start , end : end },
|
||||
async:true,
|
||||
success : function(data){
|
||||
|
||||
console.log('data',data)
|
||||
|
||||
// Empty workbook object
|
||||
var wb = XLSX.utils.book_new();
|
||||
var title = "<?= $this->lang->line('Historique des transactions').(isset($parrain) ? ' _ POS de '.$parrain->lastname : '')?>"+" _ "+start+" - "+end
|
||||
var title = "<?= $this->lang->line('Historique des transactions').(isset($parrain) ? ' _ POS de '.$parrain->lastname : '')?>"
|
||||
+ (start ? (" _ "+start+" - "+end) : '')
|
||||
wb.Props = {
|
||||
Title: title,
|
||||
Subject: title,
|
||||
|
|
Loading…
Reference in New Issue