Merge branch 'ticket/r15782-stats' into develop

This commit is contained in:
Michael RICOIS 2018-02-06 14:48:36 +01:00
commit e02ddd8dee

View File

@ -236,7 +236,9 @@ class AdminStatsLogistic extends AdminTab
if ($result) { if ($result) {
$fname = 'export-remb-'.$this->date_export_begin.'-'.$this->date_export_end.'.csv'; $fname = 'export-remb-'.$this->date_export_begin.'-'.$this->date_export_end.'.csv';
$this->exportCSV($result, $fname); $this->exportCSV($result, $fname);
echo '<p class="conf">'.$this->l('Export complete.').' <a onclick="window.open(this.href); return false;" href="http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/stats_logistic/'.$fname.'">'.$this->l('Click here to download the file').'</a></p>'; echo '<p class="conf">'.$this->l('Export complete.').
' <a onclick="window.open(this.href); return false;" href="'.(Tools::usingSecureMode() ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].'/modules/stats_logistic/'.$fname.'">'.
$this->l('Click here to download the file').'</a></p>';
} else { } else {
echo '<p class="conf">'.$this->l('No result for these dates.').'</p>'; echo '<p class="conf">'.$this->l('No result for these dates.').'</p>';
} }
@ -597,7 +599,7 @@ class AdminStatsLogistic extends AdminTab
echo '<br><br><h2 style="margin-top:15px">Export Remboursements</h2> echo '<br><br><h2 style="margin-top:15px">Export Remboursements</h2>
<fieldset> <fieldset>
<p>Exporter le détail des ventes dont la date de début est comprise entre : </p> <p>Exporter le détail des ventes dont la date de début est comprise entre : </p>
<form method="POST" action="http://'.$_SERVER['SERVER_NAME'].'/modules/stats_logistic/ajax.php?action=export">' <form method="POST" action="'.(Tools::usingSecureMode() ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].'/modules/stats_logistic/ajax.php?action=export">'
.'<span class="form-group">' .'<span class="form-group">'
.'<label style="float: none;" class="control-label" for="date_export_begin">Date de début :</label>' .'<label style="float: none;" class="control-label" for="date_export_begin">Date de début :</label>'
.'<input type="date" name="date_export_begin" value="'.pSQl($this->date_export_begin).'" id="date_export_begin" class="form-control" />' .'<input type="date" name="date_export_begin" value="'.pSQl($this->date_export_begin).'" id="date_export_begin" class="form-control" />'