Merge branch 'hotfixes/hotfix-defunt-certificate-without-thanato' into staging
This commit is contained in:
commit
c3f7ba1f22
@ -85,6 +85,40 @@ class CertificateService {
|
|||||||
return base64_encode($file->getContent());
|
return base64_encode($file->getContent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function setDevisOfDefuntDefaultValue($devisOfDefunt){
|
||||||
|
$devisOfDefunt["devis_date"] = new DateTimeImmutable($devisOfDefunt["devis_date"]);
|
||||||
|
$locationOfDevis = "";
|
||||||
|
if($devisOfDefunt['lieu_nom'] != null){
|
||||||
|
$locationOfDevis .= $devisOfDefunt['lieu_nom'];
|
||||||
|
}
|
||||||
|
if($devisOfDefunt['lieu_adresse'] != null){
|
||||||
|
$locationOfDevis .= " ". $devisOfDefunt['lieu_adresse'];
|
||||||
|
}
|
||||||
|
$devisOfDefunt['location_of_devis'] = $locationOfDevis;
|
||||||
|
if($devisOfDefunt['thanato_nom'] == null){
|
||||||
|
$devisOfDefunt['thanato_nom'] = "";
|
||||||
|
}
|
||||||
|
if($devisOfDefunt['thanato_prenom'] == null){
|
||||||
|
$devisOfDefunt['thanato_prenom'] = "";
|
||||||
|
}
|
||||||
|
if($devisOfDefunt['thanato_reference'] == null){
|
||||||
|
$devisOfDefunt['thanato_reference'] = "";
|
||||||
|
}
|
||||||
|
if($devisOfDefunt['client_nom'] == null){
|
||||||
|
$devisOfDefunt['client_nom'] = "";
|
||||||
|
}
|
||||||
|
if($devisOfDefunt['client_prenom'] == null){
|
||||||
|
$devisOfDefunt['client_prenom'] = "";
|
||||||
|
}
|
||||||
|
if($devisOfDefunt['client_entreprise'] == null){
|
||||||
|
$devisOfDefunt['client_entreprise'] = "";
|
||||||
|
}
|
||||||
|
if($devisOfDefunt['client_adresse'] == null){
|
||||||
|
$devisOfDefunt['client_adresse'] = "";
|
||||||
|
}
|
||||||
|
return $devisOfDefunt;
|
||||||
|
}
|
||||||
|
|
||||||
public function generateCareCertificate($defuntId,$idNextCloud){
|
public function generateCareCertificate($defuntId,$idNextCloud){
|
||||||
$storage = $this->rootFolder->getUserFolder($idNextCloud);
|
$storage = $this->rootFolder->getUserFolder($idNextCloud);
|
||||||
$configs = json_decode($this->gestionBdd->getConfiguration(self::DEFAULT_NEXTCLOUD_ADMIN));
|
$configs = json_decode($this->gestionBdd->getConfiguration(self::DEFAULT_NEXTCLOUD_ADMIN));
|
||||||
@ -95,17 +129,7 @@ class CertificateService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$devisOfDefunt["configuration"] = $currentConfig;
|
$devisOfDefunt["configuration"] = $currentConfig;
|
||||||
$devisOfDefunt["thanato_date_habilitation"] = new DateTimeImmutable($devisOfDefunt["thanato_date_habilitation"]);
|
$devisOfDefunt = $this->setDevisOfDefuntDefaultValue($devisOfDefunt);
|
||||||
$devisOfDefunt["devis_date"] = new DateTimeImmutable($devisOfDefunt["devis_date"]);
|
|
||||||
$locationOfDevis = "";
|
|
||||||
if($devisOfDefunt['lieu_nom'] != null){
|
|
||||||
$locationOfDevis .= $devisOfDefunt['lieu_nom'];
|
|
||||||
}
|
|
||||||
if($devisOfDefunt['lieu_adresse'] != null){
|
|
||||||
$locationOfDevis .= " ". $devisOfDefunt['lieu_adresse'];
|
|
||||||
}
|
|
||||||
$devisOfDefunt['location_of_devis'] = $locationOfDevis;
|
|
||||||
|
|
||||||
$clean_folder = html_entity_decode(string: $currentConfig->path).'/';
|
$clean_folder = html_entity_decode(string: $currentConfig->path).'/';
|
||||||
$careCertificateFolder = $this->getCareCertificateFolder($devisOfDefunt);
|
$careCertificateFolder = $this->getCareCertificateFolder($devisOfDefunt);
|
||||||
$folderDestination = $clean_folder.$careCertificateFolder;
|
$folderDestination = $clean_folder.$careCertificateFolder;
|
||||||
@ -169,17 +193,7 @@ class CertificateService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$devisOfDefunt["configuration"] = $currentConfig;
|
$devisOfDefunt["configuration"] = $currentConfig;
|
||||||
$devisOfDefunt["thanato_date_habilitation"] = new DateTimeImmutable($devisOfDefunt["thanato_date_habilitation"]);
|
$devisOfDefunt = $this->setDevisOfDefuntDefaultValue($devisOfDefunt);
|
||||||
$devisOfDefunt["devis_date"] = new DateTimeImmutable($devisOfDefunt["devis_date"]);
|
|
||||||
$locationOfDevis = "";
|
|
||||||
if($devisOfDefunt['lieu_nom'] != null){
|
|
||||||
$locationOfDevis .= $devisOfDefunt['lieu_nom'];
|
|
||||||
}
|
|
||||||
if($devisOfDefunt['lieu_adresse'] != null){
|
|
||||||
$locationOfDevis .= " ". $devisOfDefunt['lieu_adresse'];
|
|
||||||
}
|
|
||||||
$devisOfDefunt['location_of_devis'] = $locationOfDevis;
|
|
||||||
|
|
||||||
$clean_folder = html_entity_decode(string: $currentConfig->path).'/';
|
$clean_folder = html_entity_decode(string: $currentConfig->path).'/';
|
||||||
$pacemakerCertificateFolder = $this->getPacemakerCertificateFolder($devisOfDefunt);
|
$pacemakerCertificateFolder = $this->getPacemakerCertificateFolder($devisOfDefunt);
|
||||||
$folderDestination = $clean_folder.$pacemakerCertificateFolder;
|
$folderDestination = $clean_folder.$pacemakerCertificateFolder;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user