Petites corrections
This commit is contained in:
parent
b36a92a513
commit
b26f2d84da
@ -371,34 +371,38 @@ class ReportController extends Zend_Controller_Action
|
|||||||
$row = $commandM->fetchRow($where);
|
$row = $commandM->fetchRow($where);
|
||||||
if ( $row!==null ) {
|
if ( $row!==null ) {
|
||||||
|
|
||||||
$infos = new stdClass();
|
if ($row->eta == 0) {
|
||||||
$infos->NumCommande = $row->cmdId;
|
|
||||||
$date = new Zend_Date($row->dateInsert);
|
|
||||||
$infos->DateCommande = $date->toString('dd/MM/yyyy HH:mm:ss');
|
|
||||||
$infos->RaisonSociale = $row->rs;
|
|
||||||
$infos->NomPrenom = $row->nom . ' ' . $row->prenom;
|
|
||||||
$infos->Adresse = $row->adresse;
|
|
||||||
$infos->CpVille = $row->cp . ' ' . $row->ville;
|
|
||||||
$infos->Tel = $row->tel;
|
|
||||||
$infos->Mob = $row->mobile;
|
|
||||||
|
|
||||||
$this->view->Infos = $infos;
|
$infos = new stdClass();
|
||||||
|
$infos->NumCommande = $row->cmdId;
|
||||||
|
$date = new Zend_Date($row->dateInsert);
|
||||||
|
$infos->DateCommande = $date->toString('dd/MM/yyyy HH:mm:ss');
|
||||||
|
$infos->RaisonSociale = $row->rs;
|
||||||
|
$infos->NomPrenom = $row->nom . ' ' . $row->prenom;
|
||||||
|
$infos->Adresse = $row->adresse;
|
||||||
|
$infos->CpVille = $row->cp . ' ' . $row->ville;
|
||||||
|
$infos->Tel = $row->tel;
|
||||||
|
$infos->Mob = $row->mobile;
|
||||||
|
|
||||||
$links = array();
|
$this->view->Infos = $infos;
|
||||||
|
|
||||||
|
$links = array();
|
||||||
|
|
||||||
|
if ( file_exists($pathCmd . DIRECTORY_SEPARATOR . $row->cmdId . '.html') ) {
|
||||||
|
//Define links to get the HTML and/or PDF
|
||||||
|
$links[] = array(
|
||||||
|
'title' => 'Fichier PDF',
|
||||||
|
'desc' => 'Télécharger le bilan financier',
|
||||||
|
'url' => $this->view->url(array(
|
||||||
|
'controller'=>'report',
|
||||||
|
'action'=>'pdf',
|
||||||
|
'id' => $row->cmdId))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->view->links = $links;
|
||||||
|
|
||||||
if ( file_exists($pathCmd . DIRECTORY_SEPARATOR . $row->cmdId . '.html') ) {
|
|
||||||
//Define links to get the HTML and/or PDF
|
|
||||||
$links[] = array(
|
|
||||||
'title' => 'Fichier PDF',
|
|
||||||
'desc' => 'Télécharger le bilan financier',
|
|
||||||
'url' => $this->view->url(array(
|
|
||||||
'controller'=>'report',
|
|
||||||
'action'=>'pdf',
|
|
||||||
'id' => $row->cmdId))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->view->links = $links;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,10 +439,13 @@ class ReportController extends Zend_Controller_Action
|
|||||||
$c = Zend_Registry::get('config');
|
$c = Zend_Registry::get('config');
|
||||||
$source = $c->profil->path->data . DIRECTORY_SEPARATOR . $row->cmdId . '.html';
|
$source = $c->profil->path->data . DIRECTORY_SEPARATOR . $row->cmdId . '.html';
|
||||||
$dest = $c->profil->path->pages . DIRECTORY_SEPARATOR . $row->cmdId . '.html';
|
$dest = $c->profil->path->pages . DIRECTORY_SEPARATOR . $row->cmdId . '.html';
|
||||||
if ( copy($source, $dest) ) {
|
|
||||||
$wkthml = new Scores_Wkhtml_Pdf();
|
$content = file_get_contents($source);
|
||||||
$file = $wkhtml->exec($dest);
|
$content = preg_replace('@<link href="/@si','<link href="./',$content);
|
||||||
}
|
$content = preg_replace('@src="/@si','src="./',$content);
|
||||||
|
file_put_contents($dest, $content);
|
||||||
|
$pdf = new Scores_Wkhtml_Pdf();
|
||||||
|
$file = $pdf->exec($dest);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,6 +68,10 @@ if(isset($opts->install))
|
|||||||
APPLICATION_PATH.'/../library/Scores/Partner/Templates/pages '.
|
APPLICATION_PATH.'/../library/Scores/Partner/Templates/pages '.
|
||||||
APPLICATION_PATH.'/../data/');
|
APPLICATION_PATH.'/../data/');
|
||||||
|
|
||||||
|
if (!file_exists($c->profil->path->pages.'/fichier/imgcache'))
|
||||||
|
passthru('ln -vs '.APPLICATION_PATH.'/../data/pages/imgcache'.' '.
|
||||||
|
$c->profil->path->pages.'/fichier/imgcache');
|
||||||
|
|
||||||
//Modification des permissions
|
//Modification des permissions
|
||||||
passthru('chown -R www-data: '.APPLICATION_PATH.'/../');
|
passthru('chown -R www-data: '.APPLICATION_PATH.'/../');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user