Neu Lieferadresse in Rechnungsemail

  • Ersteller des Themas Gelöschter Benutzer 65955
  • Erstellungsdatum

Gelöschter Benutzer 65955

Guest
Hallo Ihr lieben,

ich komme irgendwie nicht weiter.
Es wäre super, wenn jemand die Rechnung zugeschickt bekommt, in der Email die Rechnungs- UND Lieferadresse steht.
Habe die Vorlage bearbeitet und als Vorschau wird es mir auch immer korrekt angezeigt, mit Rechnungs- und Lieferadresse.
Sobald die E-Mails aber an den Kunden gehen, steht in der Mail nur noch die Rechnungsadresse.

Vielleicht hat ja jemand einen Tipp für mich, was ich in der Vorlage falsch gemacht habe.

_______________________________________________________________________________________________________________________________________________________

HTML clipboard {% comment -%}
JTL-Software Template für E-Mail "Rechnung (Text-Format)", Stand: 20181009
--------------------------------------------------------------------------------------------------------------
Sie können das Template über folgende Variablen steuern:
--------------------------------------------------------------------------------------------------------------
{% endcomment -%}
{% assign IncludeArtikelnummern = false %}{% comment %}Gibt an, ob die Artikelnummern ausgegeben werden{% endcomment -%}
{% assign IncludeEinzelpreise = false %}{% comment %}Gibt an, ob die Einzelpreise ausgegeben werden{% endcomment -%}
{% comment -%}
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
Unterhalb dieses Bereiches sollten nur erfahrene Anwender Änderungen vornehmen. Bei Fragen
steht Ihnen unser Supportforum unter http://forum.jtl-software.de/formulardesigner-editor-open-beta-phase/
zur Verfügung. Gerne helfen Ihnen auch unsere Servicepartner weiter. Einen qualifizierten Service-Partner
finden Sie unter http://www.jtl-software.de/Servicepartner.
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
{% endcomment -%}
{% assign NettoPreiseBenutzen = false -%}
{% if Specification.UseNetPrices == true -%}
{% assign NettoPreiseBenutzen = true -%}
{% endif -%}
{{ Report.Company.CompanyName }} Rechnung #{{ Report.InvoiceNumber }}
_____________________________________________________________________________________

{% if Report.InvoiceBillToAddress.Salutation != empty -%}
{% case Report.InvoiceBillToAddress.Salutation -%}
{% when 'Herr' -%}
Sehr geehrter Herr\
{% when 'Frau' -%}
Sehr geehrte Frau\
{% else -%}
Sehr geehrte(r) {{ Report.InvoiceBillToAddress.Salutation }}\
{% endcase -%}
{% if Report.InvoiceBillToAddress.Title != empty %} {{ Report.InvoiceBillToAddress.Title }}{% endif %}{{ Report.InvoiceBillToAddress.LastName }},
{% else -%}
Sehr geehrte Damen und Herren,
{% endif -%}

vielen Dank für Ihren Auftrag vom {{ Report.CreationDate | Datum: 'D' }}. Ihr Auftrag wurde bearbeitet und wird nun versendet.
Sollten Sie noch Fragen haben, stehen wir Ihnen gerne zur Verfügung.

Einzelheiten zum Auftrag
------------------------

Rechnungsadresse:
{% if Report.InvoiceBillToAddress.Company != null and Report.InvoiceBillToAddress.Company != empty -%}
{{ Report.InvoiceBillToAddress.Company }}
{% endif -%}
{% if Report.InvoiceBillToAddress.CompanySupplement != null and Report.InvoiceBillToAddress.CompanySupplement != empty -%}
{{ Report.InvoiceBillToAddress.CompanySupplement }}
{% endif -%}
{% if Report.InvoiceBillToAddress.Salutation != null and Report.InvoiceBillToAddress.Salutation != empty -%}
{{ Report.InvoiceBillToAddress.Salutation }} \
{% endif -%}
{% if Report.InvoiceBillToAddress.Title != null and Report.InvoiceBillToAddress.Title != empty -%}
{{ Report.InvoiceBillToAddress.Title }} \
{% else -%}
{{ Report.InvoiceBillToAddress.FirstName }} \
{% endif -%}
{% if Report.InvoiceBillToAddress.LastName != null and Report.InvoiceBillToAddress.LastName != empty -%}
{{ Report.InvoiceBillToAddress.LastName }} \
{% endif %}
{% if Report.InvoiceBillToAddress.AddressSupplement != null and Report.InvoiceBillToAddress.AddressSupplement != empty -%}
{{ Report.InvoiceBillToAddress.AddressSupplement }}
{% endif -%}
{{ Report.InvoiceBillToAddress.Address }}
{{ Report.InvoiceBillToAddress.PostalCode }} {{ Report.InvoiceBillToAddress.City }}
{% if Report.InvoiceBillToAddress.Country != null and Report.InvoiceBillToAddress.Country != empty -%}
{{ Report.InvoiceBillToAddress.Country }}
{% endif -%}
{% if Report.InvoiceBillToAddress.ValueAddedTaxId > 0 -%}

USt-IdNr.: {{ Report.InvoiceBillToAddress.ValueAddedTaxId }}
{% endif -%}
{% if Report.ServiceDate != null and Report.ServiceDate != empty -%}

Lieferadresse:
{% if Report.InvoiceShipToAddress.Company != empty and Report.InvoiceShipToAddress.Company != null -%}
{{ Report.InvoiceShipToAddress.Company }}
{% endif -%}
{% if Report.InvoiceShipToAddress.CompanySupplement != empty and Report.InvoiceShipToAddress.CompanySupplement != null -%}
{{ Report.InvoiceShipToAddress.CompanySupplement }}
{% endif -%}
{% if Report.InvoiceShipToAddress.Salutation != empty and if Report.InvoiceShipToAddress.Salutation != null -%}
{{ Report.InvoiceShipToAddress.Salutation }} \
{% endif -%}
{% if Report.InvoiceShipToAddress.Title != empty and Report.InvoiceShipToAddress.Title != null -%}
{{ Report.InvoiceShipToAddress.Title }} \
{% else -%}
{{ Report.InvoiceShipToAddress.FirstName }} \
{% endif -%}
{% if Report.InvoiceShipToAddress.LastName != empty and Report.InvoiceShipToAddress.LastName != null -%}
{{ Report.InvoiceShipToAddress.LastName }}\
{% endif %}
{% if Report.InvoiceShipToAddress.AddressSupplement != empty and Report.InvoiceShipToAddress.AddressSupplement != null -%}
{{ Report.InvoiceShipToAddress.AddressSupplement }}
{% endif -%}
{{ Report.InvoiceShipToAddress.Address }}
{{ Report.InvoiceShipToAddress.PostalCode }} {{ Report.InvoiceShipToAddress.City }}
{% if Report.InvoiceShipToAddress.Country != empty and Report.InvoiceShipToAddress.Country != null -%}
{{ Report.InvoiceShipToAddress.Country }}
{% endif -%}
Voraussichtliche Lieferung: {{Report.ServiceDate | Datum: 'd' }}
{% endif -%}
{% if Report.ShippingMethod.PrintingText != null and Report.ShippingMethod.PrintingText != empty -%}
{{ Report.ShippingMethod.PrintingText }}
{% endif -%}

Positionen:
{% assign versandposition = 0 -%}
{% for position in Report.InvoicePosition -%}
{% if position.PositionType == 'ShippingPosition' -%}
{% assign versandart = position.Name -%}
{% if NettoPreiseBenutzen -%}
{% assign versandkosten = position.TotalNetPrice -%}
{% else -%}
{% assign versandkosten = position.TotalGrossPrice -%}
{% endif -%}
{% else -%}
{% capture menge -%}{{ position.Quantity | Nummer : 'N2' }}{% if position.Unit != empty %} {{ Position.Unit }}{% else %}x{% endif %} {{ position.Name }}{% endcapture -%}
{% capture preis -%}{% if NettoPreiseBenutzen %}{{ position.TotalNetPrice | Nummer : 'C' }}{% else %}{{ position.TotalGrossPrice | Nummer : 'C' }}{% endif %}{% endcapture -%}
{{ menge | Truncate: 61 | Align: -61 }}{{Tabulator}}{{ preis | Truncate: 15 | Align: 15 }}
{% if IncludeArtikelnummern == true -%}
{% capture artnr %}Artikelnummer: {{ position.SKU }}{% endcapture -%}
{{ artnr | Truncate: 61 }}
{% endif -%}
{% if IncludeEinzelpreise == true -%}
{% capture ez %}Einzelpreis: {% if NettoPreiseBenutzen %}{{ position.NetPricePerUnit | Nummer : 'C' }}{% else %}{{ position.GrossPricePerUnit | Nummer : 'C' }}{% endif -%}{% endcapture -%}
{{ ez | Truncate: 59 }}
{% endif -%}
{% endif -%}
{% endfor -%}
{% capture desc %}Verpackung und Versand{% if versandart != null %} ({{ versandart }}){% endif %}:{% endcapture -%}
{% capture price %}{% if versandkosten != empty %}{{ versandkosten | Nummer : 'C' }}{% else %}{{ 0 | Nummer: 'C' }}{% endif %}{%endcapture -%}
{{ desc | Truncate: 61 | Align: 61 }}{{Tabulator}}{{ price | Truncate: 15 | Align: 15 }}
{% if Specification.RevealValueAddedTax -%}
{{ ' ' | Align: 61 }}{{Tabulator}}---------------
{% for invoiceTotals in Report.TotalsInvoice -%}
{% if invoiceTotals.GrossPriceTotal > 0 -%}
{% capture desc %}Summe Netto ({{invoiceTotals.VATRate | Nummer : 'N' }}%):{% endcapture -%}
{% capture price %}{{ invoiceTotals.NetPriceTotal | Nummer : 'C' }}{% endcapture -%}
{{ desc | Truncate: 61 | Align: 61 }}{{Tabulator}}{{ price | Truncate: 15 | Align: 15 }}
{% endif -%}
{% endfor -%}
{% for invoiceTotals in Report.TotalsInvoice -%}
{% if invoiceTotals.GrossPriceTotal > 0 -%}
{% capture desc %}zzgl. USt. ({{invoiceTotals.VATRate | Nummer : 'N' }}%):{% endcapture -%}
{% capture price %}{{ invoiceTotals.VATSum | Nummer:'C' }}{% endcapture -%}
{{ desc | Truncate: 61 | Align: 61 }}{{Tabulator}}{{ price | Truncate: 15 | Align: 15 }}
{% endif -%}
{% endfor -%}
{% endif -%}
{{ ' ' | Align: 61 }}{{Tabulator}}===============
{{ 'Gesamtsumme:' | Truncate: 61 | Align: 61}}{{ Tabulator }}{{ Report.TotalGrossPrice | Nummer : 'C' | Truncate: 15 | Align: 15 }}
{{ ' ' | Align: 61 }}{{Tabulator}}===============

Zahlung:
{% assign payments = false -%}
{% for payment in Report.InvoicePayments -%}
{% assign payments = true -%}
{% capture desc %}Zahlung ({{ payment.Name }}) vom {{ payment.PaymentDate | Datum: 'd' }}:{% endcapture -%}
{% capture price %}{{ payment.Value | Nummer: 'C' }}{% endcapture -%}
{{ desc | Truncate: 61 | Align: 61 }}{{Tabulator}}{{ price | Truncate: 15 | Align: 15 }}
{% endfor -%}
{% if payments == true -%}
{% capture desc %}offener Betrag:{% endcapture -%}
{% capture price %}{{ Report.OpenGrossPrice | Nummer: 'C' }}{% endcapture -%}
{{ ' ' | Align: 61 }}{{Tabulator}}===============
{{ desc | Truncate: 61 | Align: 61 }}{{Tabulator}}{{ price | Truncate: 15 | Align: 15 }}
{% endif -%}

{% if Report.ExemptFromVAT == 'ExemptFromVATnotEU' -%}
{{ Specification.TextsExemptFromValueAddedTax }}
{% endif -%}
{% if Report.ExemptFromVAT == 'IGL' -%}
{{ Specification.TextsIGL }}
{% endif -%}
{% if Report.ExemptFromVAT == 'ReverseCharge' -%}
{{ Specification.TextsReverseCharge }}
{% endif -%}
{% if Report.InvoicePrintingText != empty -%}
{{ Report.InvoicePrintingText }}
{% endif -%}

Mit freundlichen Grüßen

{{ Report.User.Name }}
{{ Report.Company.CompanyName }}

---
{% if Report.Company.WebsiteURL != empty %}
Besuchen Sie auf unserer Homepage unter {{ Report.Company.WebsiteURL }}.

{% endif -%}
{{ Report.Company.CompanyName }}
{% if Report.Company.ManagingDirector != empty -%}
{{ Report.Company.ManagingDirector }}
{% endif -%}
{{ Report.Company.Address }}
{{ Report.Company.PostalCode }} {{ Report.Company.City }}
{% if Report.Company.Country != empty -%}
{{ Report.Company.Country }}
{% endif -%}
Tel: {{ Report.Company.Phone }}
{% if Report.Company.Fax != empty -%}
Fax: {{ Report.Company.Fax }}
{% endif -%}
{% if Report.Company.ValueAddedTaxId != empty -%}
USt-IdNr.: {{ Report.Company.ValueAddedTaxId }}
{% endif -%}
{% if Report.Company.FederalTaxId != empty -%}
St.Nr.: {{ Report.Company.FederalTaxId }}
{% endif -%}
{% if Report.Company.CreditorId != empty -%}
Gläubiger-IdNr.: {{ Report.Company.CreditorId }}
{% endif %}

Bankverbindung:{{ Report.Company.AccountHolder }}
Bank: {{ Report.Company.BankName }}
BIC: {{ Report.Company.BIC }}
IBAN: {{ Report.Company.IBAN }}

_______________________________________________________________________________________________________________________________________________________

Vielen Dank schonmal für die Mühe

Liebe Grüße
 

Anhänge

  • Ist-Zustand.png
    Ist-Zustand.png
    13,9 KB · Aufrufe: 13
  • Wunsch.png
    Wunsch.png
    18,9 KB · Aufrufe: 11
Zuletzt von einem Moderator bearbeitet:

tom10

Sehr aktives Mitglied
2. Oktober 2012
714
107
06774 Muldestausee

Gelöschter Benutzer 65955

Guest
Vielen Dank für die Antwort.
Sobald ich das so ersetze wie von dir beschrieben, kommt folgendes in der Vorschau.
 

Anhänge

  • Unknow-End.PNG
    Unknow-End.PNG
    6,8 KB · Aufrufe: 9

tom10

Sehr aktives Mitglied
2. Oktober 2012
714
107
06774 Muldestausee
Vielleicht ist das endif auch "verrutscht" und fehlt nicht. Das hab ich nicht überprüft, mach ich aber gleich mal ...

Edit:

Ich habs glaube gefunden. Du hast das vorraussichtliche Lieferdatum nach unten verschoben. Dabei aber das drumrum vergessen.

Ersetze mal in der oben geposteten Vorlage:
Code:
Voraussichtliche Lieferung: {{Report.ServiceDate | Datum: 'd' }}
{% endif -%}
mit:
Code:
{% if Report.ServiceDate != null and Report.ServiceDate != empty -%}
  Voraussichtliche Lieferung: {{Report.ServiceDate | Datum: 'd' }}
{% endif -%}
und lösche weiter oben:
Code:
{% if Report.ServiceDate != null and Report.ServiceDate != empty -%}
 
Zuletzt bearbeitet:

Gelöschter Benutzer 65955

Guest
So, habe es jetzt laut deinem Vorschlag angepasst, und die Fehlermeldung ist weg. Supi :)
Allerdings wird immer noch nicht das richtige gemailt.

Habe dir nochmal 2 Screenshots gemacht, wie es in der Mailvorlage aktuell aussieht und was beim Kunden ankommt.

Ich bearbeite:
Beleg Verkauf
---Rechnung
---Rechnung
und dann auf "Mailen bearbeiten"

Das ist doch die richtige Vorlage um das anzupassen was ich gerne hätte, oder?
 

Anhänge

  • E-Mail Darstellung.PNG
    E-Mail Darstellung.PNG
    51,9 KB · Aufrufe: 15
  • Laut Vorlage.PNG
    Laut Vorlage.PNG
    15,8 KB · Aufrufe: 16

Gelöschter Benutzer 65955

Guest
Hat sich erledigt, hab gerade jetzt erst gemerkt das es für die HTML Vorlage nochmal eine extra Rohdaten Ansicht gibt, hab's dort jetzt angepasst und läuft :)

Vielen Dank!