export thanato statistic

This commit is contained in:
Tiavina 2024-12-26 08:38:06 +03:00
parent 82da31c2e5
commit c6d6d7300d
22 changed files with 33 additions and 36 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2545,11 +2545,11 @@ class PageController extends Controller {
public function exportThanatoStatistic($thanatoIdsToExport){ public function exportThanatoStatistic($thanatoIdsToExport){
if(empty($thanatoIdsToExport)){ if(empty($thanatoIdsToExport)){
return null; return "";
} }
$exportData = $this->myDb->getExportThanatoStatisticData($thanatoIdsToExport); $exportData = $this->myDb->getExportThanatoStatisticData($thanatoIdsToExport);
if(empty($exportData)){ if(empty($exportData)){
return null; return "";
} }
try{ try{
$current_config = json_decode($this->myDb->getConfiguration($this->idNextcloud)); $current_config = json_decode($this->myDb->getConfiguration($this->idNextcloud));

View File

@ -1765,9 +1765,6 @@ class Bdd {
$currentDistance = 0; $currentDistance = 0;
if($ligneTrajetList[$i]['lieu_id'] != NULL){ if($ligneTrajetList[$i]['lieu_id'] != NULL){
$last_point = $ligneTrajetList[$i]; $last_point = $ligneTrajetList[$i];
if($ligneTrajetList[$i]['lieu'] =="Antsahavola"){
var_dump($ligneTrajetList[$i]);
}
} }
if($last_point['lieu_id'] != NULL && $ligneTrajetList[$i+1]['lieu_id'] != NULL){ if($last_point['lieu_id'] != NULL && $ligneTrajetList[$i+1]['lieu_id'] != NULL){
$currentDistance = $this->calcul_distance( $currentDistance = $this->calcul_distance(

View File

@ -435,18 +435,18 @@ $('body').on('click', '#exportThanatoData', function () {
thanatoIdsToExport: thanatoIdsToExport thanatoIdsToExport: thanatoIdsToExport
} }
// $.ajax({ $.ajax({
// url: baseUrl + '/exportThanatoDataThisMonth', url: baseUrl + '/thanatopracteur/exportThanatoStatistic',
// type: 'POST', type: 'POST',
// contentType: 'application/json', contentType: 'application/json',
// data: JSON.stringify(exportThanatoPayload) data: JSON.stringify(exportThanatoPayload)
// }).done(function (response) { }).done(function (response) {
// let datatable = new DataTable('.tabledt'); let datatable = new DataTable('.tabledt');
// Devis.loadDevisDT(datatable); Thanatopracteur.loadThanatoDT(datatable);
// showSuccess(t('gestion', "Devis exported to facture")); showSuccess(t('gestion', "Statistic exported : " + response));
// }).fail(function (response, code) { }).fail(function (response, code) {
// showError(t('gestion', "Please select devis to facture")); showError(t('gestion', "Please select thanato to export"));
// }); });
}); });