diff --git a/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email-anb.html.php b/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email-anb.html.php new file mode 100644 index 000000000..38d7661db --- /dev/null +++ b/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email-anb.html.php @@ -0,0 +1,121 @@ +setReturnValue([ + 'subject' => "Ihre Rechnung ".$invoice->invoice_number, + 'from_email' => "no-reply@rmlinfrastruktur.at", + 'from_email_name' => "Rechnung | RML Infrastruktur GmbH" +]); + +$period = "monthly"; + +$netowner_config = TT_PREORDER_BILLING[$invoice->netowner_id]; +$netoperator_config = $netowner_config["netoperators"][$invoice->owner_id]; + +if($netoperator_config["billing-period"] == "quarterly") { + $period = "quarterly"; +} + +if($period == "quarterly") { + $period_date = new DateTime($invoice->invoice_date); + $period_date->modify("-1 month"); + $bill_quarter = ceil($period_date->format("n") / 3); + $period_text = "Q$bill_quarter ".$period_date->format("Y"); +} else { + $fmt = new IntlDateFormatter( + MFLOCALE_TIME, + IntlDateFormatter::NONE, + IntlDateFormatter::NONE, + "Europe/Vienna", + IntlDateFormatter::GREGORIAN, + 'MMMM' + ); + + $period_date = new DateTime($invoice->invoice_date); + $period_date->modify("-1 month"); + $period_text = $fmt->format($period_date). " ".$period_date->format("Y"); +} + +?> + + + + + + + + +
+

 

+

Sg. Damen und Herren,

+

 

+

im Anhang übersenden wir Ihnen unsere Abrechnung für .

+

 

+
+ +
+

 

+

Beste Grüße, 

+

Ihre

+

 

+

RML Infrastruktur GmbH Logo RGB Farbe

+

 

+

Wir bekommen ein Upgrade. +Glasfaser fr die Region Liezen. +

+

Dieses Projekt wird aus Mitteln der FFG gefrdert. +www.ffg.at

+

 

+

RML Infrastruktur GmbH

+

Wirtschaftspark A | 8940 Liezen

+

www.DeineGlasfaser.at +

+

 

+

www.facebook.com/rmlinfrastruktur

+

https://www.instagram.com/rmlinfrastruktur/

+

 

+

 

+
+ + \ No newline at end of file diff --git a/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email-anb.php b/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email-anb.php index 62d3bc972..a1c05bf72 100644 --- a/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email-anb.php +++ b/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email-anb.php @@ -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" ]); diff --git a/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email.html.php b/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email.html.php new file mode 100644 index 000000000..8b5c9ba14 --- /dev/null +++ b/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email.html.php @@ -0,0 +1,91 @@ +setReturnValue([ + 'subject' => "Ihre Rechnung ".$invoice->invoice_number, + 'from_email' => "no-reply@rmlinfrastruktur.at", + 'from_email_name' => "Rechnung | RML Infrastruktur GmbH" +]); +?> + + + + + + + + +
+

 

+

Sehr geehrte Damen und Herren,

+

 

+

Im Anhang erhalten Sie die Rechnung für die Herstellung Ihres Glasfaseranschlusses.

+

 

+
+ +
+

 

+

Beste Grüße, 

+

Ihre

+

 

+

RML Infrastruktur GmbH Logo RGB Farbe

+

 

+

Wir bekommen ein Upgrade. +Glasfaser fr die Region Liezen. +

+

Dieses Projekt wird aus Mitteln der FFG gefrdert. +www.ffg.at

+

 

+

RML Infrastruktur GmbH

+

Wirtschaftspark A | 8940 Liezen

+

www.DeineGlasfaser.at +

+

 

+

www.facebook.com/rmlinfrastruktur

+

https://www.instagram.com/rmlinfrastruktur/

+

 

+

 

+
+ + \ No newline at end of file diff --git a/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email.php b/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email.php index 951f247a4..4a38a2335 100644 --- a/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email.php +++ b/Layout/default/Emailtemplates/preorder-invoice/rml/invoice-email.php @@ -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" ]); diff --git a/Layout/default/PreorderBillingInvoice/PDF_MAIN-4807.php b/Layout/default/PreorderBillingInvoice/PDF_MAIN-4807.php index 3f7f324ba..c4685811c 100644 --- a/Layout/default/PreorderBillingInvoice/PDF_MAIN-4807.php +++ b/Layout/default/PreorderBillingInvoice/PDF_MAIN-4807.php @@ -138,7 +138,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]); endforeach; ?> - Gesamt Netto: + Nettobetrag @@ -146,7 +146,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]); 0): ?> - + USt. %: + + % USt. von @@ -155,7 +155,7 @@ $this->setReturnValue(['filename' => $invoice->invoice_number . ".pdf"]); - Gesamt Brutto: + Rechungsbetrag diff --git a/application/PreorderBillingInvoice/PreorderBillingInvoice.php b/application/PreorderBillingInvoice/PreorderBillingInvoice.php index e40ed7795..bf2160242 100644 --- a/application/PreorderBillingInvoice/PreorderBillingInvoice.php +++ b/application/PreorderBillingInvoice/PreorderBillingInvoice.php @@ -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); diff --git a/application/PreorderBillingInvoice/PreorderBillingInvoiceController.php b/application/PreorderBillingInvoice/PreorderBillingInvoiceController.php index cebbf2286..67ffd8d7d 100644 --- a/application/PreorderBillingInvoice/PreorderBillingInvoiceController.php +++ b/application/PreorderBillingInvoice/PreorderBillingInvoiceController.php @@ -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");