RML Billing:

- Emailtemplate jetzt HTML mit RML Signatur
- BMD-Export Filenamen angepasst (buchungen.csv; personenkonten.csv)
- Rechungsformular Gesamt/Ust Zeilen: Text angepasst
This commit is contained in:
Frank Schubert
2025-04-25 11:50:33 +02:00
parent 16ae5149c4
commit 982cbabbf6
7 changed files with 224 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@
* @var Invoice $invoice
*/
$this->setReturnValue([
'subject' => "Ihre ".(($invoice->total < 0) ? "Gutschrift" : "Rechnung" )." ".$invoice->invoice_number,
'subject' => "Ihre Rechnung ".$invoice->invoice_number,
'from_email' => "no-reply@rmlinfrastruktur.at",
'from_email_name' => "Rechnung | RML Infrastruktur GmbH"
]);

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@
* @var Invoice $invoice
*/
$this->setReturnValue([
'subject' => "Ihre ".(($invoice->total < 0) ? "Gutschrift" : "Rechnung" )." ".$invoice->invoice_number,
'subject' => "Ihre Rechung ".$invoice->invoice_number,
'from_email' => "no-reply@rmlinfrastruktur.at",
'from_email_name' => "Rechnung | RML Infrastruktur GmbH"
]);

View File

@@ -138,7 +138,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]);
endforeach;
?>
<tr style="font-weight: bold; background-color: #ebebeb; border-bottom: 1px solid black;border-top: 1px solid black">
<td colspan="6">Gesamt Netto:</td>
<td colspan="6">Nettobetrag</td>
<td colspan="2" style="text-align: right; padding-right: 4pt;"><?=number_format($net_total, 2, ",","."). " €"?></td>
</tr>
@@ -146,7 +146,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]);
<?php if($rate > 0): ?>
<tr style="font-size: 11px;border-bottom: 1px solid black;">
<td colspan="6">+ USt. <?=number_format($rate, 0, ",", ".")?>%:</td>
<td colspan="6">+ <?=number_format($rate, 2, ",",".")?>% USt. von <?=number_format($net_total, 2, ",",".")?></td>
<td colspan="2" style="text-align: right; padding-right: 4pt;"><?=number_format($vat_total, 2, ",","."). " €"?></td>
</tr>
<?php endif; ?>
@@ -155,7 +155,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]);
<!-- double underline border on bottom -->
<tr style="font-weight: bold; border-bottom: 3px double black; background-color: #ebebeb;">
<td colspan="6">Gesamt Brutto:</td>
<td colspan="6">Rechungsbetrag</td>
<td colspan="2" style="text-align: right; padding-right: 4pt;"><?=number_format($gross_total, 2, ",","."). " €"?></td>
</tr>
</table>

View File

@@ -171,9 +171,9 @@ RML Infrastruktur GmbH";
}
$tpl = new Layout();
$tpl->setTemplate("Emailtemplates/preorder-invoice/rml/invoice-email");
$tpl->setTemplate("Emailtemplates/preorder-invoice/rml/invoice-email.html");
if($this->owner_id) {
$tpl->setTemplate("Emailtemplates/preorder-invoice/rml/invoice-email-anb");
$tpl->setTemplate("Emailtemplates/preorder-invoice/rml/invoice-email-anb.html");
}
$pdf_vars = [
@@ -208,7 +208,7 @@ RML Infrastruktur GmbH";
} else {
$email = new Emailnotification();
$email->setSubject($subject);
$email->setBody($body);
$email->setHtmlBody($body);
$email->setFrom($from, $from_name);
$email->setTo($to);
$email->setHeader("X-".MFAPPNAME."-Iid", $this->id);

View File

@@ -797,6 +797,7 @@ class PreorderBillingInvoiceController extends mfBaseController {
mkdir($csv_path, 0777, true);
}
$filename = "thetool-bmd-person-export-".$today->format("Y-m-d_H-i-s").".csv";
$export_filename = "personenkonten.csv";
$filepath = "$csv_path/$filename";
if(file_put_contents($filepath, $csv) === false) {
$this->layout()->setFlash("Fehler beim Erstellen des BMD-Exports", "error");
@@ -814,7 +815,7 @@ class PreorderBillingInvoiceController extends mfBaseController {
// copy csv file to bmd export transfer directory
$transfer_path = $netowner_config["bmd-export-transfer-path"];
$transfer_file = "$transfer_path/$filename";
$transfer_file = "$transfer_path/$export_filename";
$this->log->debug(__METHOD__.": Copying $filepath to $transfer_file");
if(!copy($filepath, $transfer_file)) {
$this->layout()->setFlash("Fehler beim Kopieren des BMD-Exports", "error");
@@ -913,6 +914,7 @@ class PreorderBillingInvoiceController extends mfBaseController {
mkdir($csv_path, 0777, true);
}
$filename = "thetool-bmd-invoice-export-".$today->format("Y-m-d_H-i-s").".csv";
$export_filename = "buchungen.csv";
$filepath = "$csv_path/$filename";
if(file_put_contents($filepath, $csv) === false) {
$this->layout()->setFlash("Fehler beim Erstellen des BMD-Exports", "error");
@@ -963,7 +965,7 @@ class PreorderBillingInvoiceController extends mfBaseController {
// copy csv file to bmd export transfer directory
$transfer_path = $netowner_config["bmd-export-transfer-path"];
$transfer_file = "$transfer_path/$filename";
$transfer_file = "$transfer_path/$export_filename";
$this->log->debug(__METHOD__.": Copying $filepath to $transfer_file");
if(!copy($filepath, $transfer_file)) {
$this->layout()->setFlash("Fehler beim Kopieren des BMD-Exports", "error");