|
|
@@ -458,22 +458,29 @@ $controller = new class($document_type, $document_number) {
|
|
|
}
|
|
|
|
|
|
$title = $document->getTitle();
|
|
|
+ $text = "Hereby attached is your information.";
|
|
|
|
|
|
if($document->isSalesOrder()) {
|
|
|
if($variant === "commercial") {
|
|
|
$title = __("Commercial Invoice %d", $document->number);
|
|
|
+ $text = __("Hereby attached is your Commercial Invoice as requested.");
|
|
|
}
|
|
|
else {
|
|
|
$title = __("Proforma Invoice %d", $document->number);
|
|
|
+ $text = __("Hereby attached is your Pro-forma Offer.");
|
|
|
}
|
|
|
}
|
|
|
+ if($document->isDeliveryNote()) {
|
|
|
+ $text = __("Hereby attached is your Delivery Note information.");
|
|
|
+ }
|
|
|
|
|
|
$body = file_get_contents("templates/email/document.html");
|
|
|
$search_replace = [
|
|
|
"%contact-name%" => $document->contact_name,
|
|
|
"%document-title%" => $title,
|
|
|
"%company-name%" => $company->name,
|
|
|
- "%user-name%" => $user->getDisplayName()
|
|
|
+ "%user-name%" => $user->getDisplayName(),
|
|
|
+ "%document-text%" => $text
|
|
|
];
|
|
|
$body = str_replace(array_keys($search_replace), array_values($search_replace), $body);
|
|
|
|