DV : add footer email to Vannessa and rectifie invoice simple template
This commit is contained in:
parent
4dd8b224e3
commit
4569c4e8c5
@ -109,7 +109,7 @@ class InvoiceController extends Controller
|
||||
$message->attach($content);
|
||||
$message->setSubject("Facture");
|
||||
|
||||
$signature = $this->mailerService->getFooterContent();
|
||||
$signature = $this->mailerService->getFooterContent( $this->getUserNameForEmailSignature());
|
||||
|
||||
$message->setHtmlBody(
|
||||
"<p>Bonjour.</p>".
|
||||
@ -128,4 +128,9 @@ class InvoiceController extends Controller
|
||||
}
|
||||
return new DataResponse("E-mail envoyé avec succès à ".$email.".", 200, ['Content-Type' => 'application/json']);
|
||||
}
|
||||
public function getUserNameForEmailSignature (){
|
||||
$configs = json_decode($this->gestionRepository->getConfiguration(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD));
|
||||
$currentConfig = $configs[0];
|
||||
return $currentConfig->nom . " " . $currentConfig->prenom;
|
||||
}
|
||||
}
|
||||
@ -1635,7 +1635,7 @@ class PageController extends Controller {
|
||||
}
|
||||
}
|
||||
public function getUserNameForEmailSignature (){
|
||||
$configs = json_decode($this->myDb->getConfiguration(self::DEFAULT_NEXTCLOUD_ADMIN));
|
||||
$configs = json_decode($this->myDb->getConfiguration(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD));
|
||||
$currentConfig = $configs[0];
|
||||
return $currentConfig->nom . " " . $currentConfig->prenom;
|
||||
}
|
||||
|
||||
@ -328,28 +328,31 @@ class InvoicePdfHandler extends FPDF
|
||||
$totalTtc += $valueTtc;
|
||||
$productDescription = $product["produit_description"];
|
||||
$dateValue = "";
|
||||
if ($product === end($products)) {
|
||||
if ($product === reset($products)) {
|
||||
$dateValue = $devisDate;
|
||||
$productDescription .= " de " . FileExportHelpers::GetSexeLabel($this->factureData['defunt_sexe']) . ' ' . $this->factureData["defunt_nom"];
|
||||
// $productDescription .= " de " . FileExportHelpers::GetSexeLabel($this->factureData['defunt_sexe']) . ' ' . $this->factureData["defunt_nom"];
|
||||
$this->SetXY(70, $yValue);
|
||||
$this->Cell(5, 6, $this->factureData["defunt_nom"], 0, 0);
|
||||
}
|
||||
$yValue += 3;
|
||||
$tvaAmount = $valueTtc - $valueHt;
|
||||
$this->SetXY(5, $yValue);
|
||||
$this->SetXY(5, $yValue + 5);
|
||||
$this->Cell(5, 6, $dateValue, 0, 0);
|
||||
|
||||
$this->SetXY(30, $yValue);
|
||||
|
||||
$this->SetXY(30, $yValue +5);
|
||||
$this->MultiAlignCell($maxDescriptionWidth, 6, utf8_decode(html_entity_decode($productDescription)), 0, '0', );
|
||||
|
||||
|
||||
|
||||
$this->SetXY(144, $yValue);
|
||||
$this->SetXY(144, $yValue +5);
|
||||
$this->Cell(20, 6, number_format($valueHt, 2, '.', '') . chr(128), 0, 0, 'C');
|
||||
|
||||
$this->SetXY(165, $yValue);
|
||||
$this->SetXY(165, $yValue + 5);
|
||||
$this->Cell(20, 6, number_format($tvaAmount, 2, '.', '') . chr(128), 0, 0, 'C');
|
||||
|
||||
$this->SetXY(182, $yValue);
|
||||
$this->SetXY(182, $yValue + 5);
|
||||
$this->Cell(25, 6, number_format($valueTtc, 2, '.', '') . chr(128), 0, 1, 'C');
|
||||
$yValue += 12;
|
||||
$yValue += 6;
|
||||
$totalTva += $tvaAmount;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user