Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4578cdff

Von Tamino Steinert vor mehr als 2 Jahren hinzugefügt

  • ID 4578cdff0acd43700d1da186e8708d68cfbdacd1
  • Vorgänger 166e72f1
  • Nachfolger a000b4a2

Reclamation: added example print tempaltes

Unterschiede anzeigen:

templates/print/marei/purchase_reclamation.tex
1
% config: use-template-toolkit=1
2
% config: tag-style=$( )$
3
$( USE KiviLatex )$
4
$( USE L )$
5
$( USE LxERP )$
6

  
7
\documentclass[paper=a4,fontsize=10pt]{scrartcl}
8
\usepackage{kiviletter}
9

  
10

  
11
% Variablen, die in settings verwendet werden
12
\newcommand{\lxlangcode} {$( template_meta.language.template_code )$}
13
\newcommand{\lxmedia} {$( media )$}
14
\newcommand{\lxcurrency} {$( currency )$}
15
\newcommand{\kivicompany} {$( employee_company )$}
16

  
17
% settings: Einstellungen, Logo, Briefpapier, Kopfzeile, Fusszeile
18
\input{insettings.tex}
19

  
20
% laufende Kopfzeile:
21
\ourhead{\kundennummer}{$( KiviLatex.filter(reclamation.customervendor.number) )$}{\auftragsbestaetigung}{$( KiviLatex.filter(reclamation.record_number) )$}{$( reclamation.transdate_as_date )$}
22

  
23
\setkomavar*{date}{\datum}
24
\setkomavar{date}{$( reclamation.transdate_as_date )$}
25
\setkomavar{customer}{$( KiviLatex.filter(reclamation.customer.number) )$}
26
\setkomavar{fromname}{$( KiviLatex.filter(reclamation.employee.name) )$}
27
%\setkomavar{fromphone}{$( KiviLatex.filter(reclamation.employee.deleted_tel) )$}
28
%\setkomavar{fromemail}{$( KiviLatex.filter(reclamation.employee.deleted_email) )$}
29
\setkomavar{title}{
30
  \auftragsbestaetigung~
31
  \nr~$( KiviLatex.filter(reclamation.record_number) )$%
32
}
33

  
34
$( IF (reclamation.cv_record_number) )$%
35
  %\setkomavar*{yourref}{\ihreReclamationsnummer}
36
  \setkomavar{yourref}{$( KiviLatex.filter(reclamation.cv_record_number) )$}
37
$( END )$%
38
\setkomavar{transaction}{$( KiviLatex.filter(reclamation.transaction_description) )$}
39

  
40
%TODO(Tamino): look at shipto
41
$( IF (reclamation.shipto_id) )$%
42
\makeatletter
43
\begin{lrbox}\shippingAddressBox
44
  \parbox{\useplength{toaddrwidth}}{
45
    \backaddr@format{\scriptsize\usekomafont{backaddress}%
46
      \strut abweichende Lieferadresse
47
    }
48
    \par\smallskip
49
    \setlength{\parskip}{\z@}
50
    \par
51
    \normalsize
52
    $( KiviLatex.filter(reclamation.shipto.shiptoname) )$\par
53
    $( IF (reclamation.shipto.shiptocontact) )$ $( KiviLatex.filter(reclamation.shipto.shiptocontact) )$$( END )$\par
54
    $( KiviLatex.filter(reclamation.shipto.shiptodepartment_1) )$\par
55
    $( KiviLatex.filter(reclamation.shipto.shiptodepartment_2) )$\par
56
    $( KiviLatex.filter(reclamation.shipto.shiptostreet) )$\par
57
    $( KiviLatex.filter(reclamation.shipto.shiptozipcode) )$ $( KiviLatex.filter(reclamation.shipto.shiptocity) )$%
58
  }
59
\end{lrbox}
60
\makeatother
61
$( END )$%
62

  
63
\begin{document}
64

  
65
\begin{letter}{
66
    %TODO(Tamino): what name, street, ... ?
67
    $( name )$\strut\\
68
    $( IF (department_1) )$$( department_1 )$\\$( END )$%
69
    $( IF (department_2) )$$( department_2 )$\\$( END )$%
70
    $( reclamation.contact.cp_givenname )$ $( reclamation.contact.cp_name )$\strut\\
71
    $( street )$\strut\\
72
    $( zipcode )$ $( city )$\strut\\
73
    $( country )$ \strut
74
  }
75

  
76
% Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
77
% Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
78
\opening{
79
  \Ifstr{$( KiviLatex.filter(reclamation.contact.cp_name) )$}{}{
80
    $( IF (reclamation.customervendor.natural_person) )$
81
      $( KiviLatex.filter(reclamation.customervendor.greeting) )$ $( KiviLatex.filter(reclamation.customervendor.name) )$,
82
    $( ELSE )$
83
      \anrede
84
    $( END )$
85
  }{
86
    \Ifstr{$( KiviLatex.filter(reclamation.contact.cp_gender) )$}{f}
87
      {\anredefrau}
88
      {\anredeherr}
89
      $( KiviLatex.filter(reclamation.contact.cp_title) )$ $( KiviLatex.filter(reclamation.contact.cp_name) )$,
90
  }
91
}
92
\thispagestyle{kivitendo.letter.first}
93

  
94
\auftragsformel
95

  
96
\begin{PricingTabular*}
97
  % eigentliche Tabelle
98
  \FakeTable{
99
  $( FOREACH item = reclamation.items_sorted )$%
100
    $( item.position )$ &%
101
    $( item.part.partnumber )$ &%
102
    \textbf{ $( KiviLatex.filter(item.description) )$ }%
103
    $( IF (item.longdescription) )$\ExtraDescription{$( KiviLatex.filter(item.longdescription) )$}$( END )$%
104
    $( IF (item.reqdate) )$\ExtraDescription{\lieferdatum: $( item.reqdate_as_date )$}$( END )$%
105
    $( IF (item.serialnumber) )$\ExtraDescription{\seriennummer: $( KiviLatex.filter(item.serialnumber) )$}$( END )$%
106
    $( IF (item.projectnumber) )$\ExtraDescription{\projektnummer: $( KiviLatex.filter(item.projectnumber) )$}$( END )$%
107
    &%
108
    $( item.qty_as_number )$ $( item.unit )$ &%
109
    $( item.sellprice_as_number )$&%
110
    % TODO(Tamino): discount in '%'
111
    \Ifstr{$( p_discount )$}{0}{}{\sffamily\scriptsize{(-$( p_discount )$\,\%)}}%
112
    % TODO(Tamino): linetotal
113
    $( LxERP.format_amount(item.linetotal, 2, 0) )$\tabularnewline
114
  $( END )$%
115
  }%
116
  \begin{PricingTotal}%
117
    % Tabellenende letzte Seite
118
    \nettobetrag & $( reclamation.netamount_as_number )$\\%
119
    $( FOREACH tax = reclamation.taxes )$%
120
      $( KiviLatex.filter(tax.tax.taxdescription) )$ & $( LxERP.format_amount(tax.amount) )$\\%
121
    $( END )$%
122
    \bfseries\schlussbetrag &  \bfseries $( reclamation.amount_as_number )$\\%
123
  \end{PricingTotal}
124
\end{PricingTabular*}
125

  
126
$( IF (reclamation.notes) )$%
127
  $( KiviLatex.filter_html(reclamation.notes) )$%
128
  \medskip
129
$( END )$%
130

  
131
$( IF (reclamation.delivery_term) )$%
132
  \lieferung ~$( KiviLatex.filter(reclamation.delivery_term.description_long) )$\\
133
$( END )$%
134

  
135
$( IF (reclamation.reqdate) )$%
136
  \lieferungErfolgtAm ~$( reclamation.reqdate_as_date )$.
137
$( END )$%
138

  
139
\textit{\auftragpruefen}
140

  
141
%\closing{\gruesse}
142

  
143
\end{letter}
144

  
145
\end{document}
templates/print/marei/sales_reclamation.tex
1
% config: use-template-toolkit=1
2
% config: tag-style=$( )$
3
$( USE KiviLatex )$
4
$( USE L )$
5
$( USE LxERP )$
6

  
7
\documentclass[paper=a4,fontsize=10pt]{scrartcl}
8
\usepackage{kiviletter}
9

  
10

  
11
% Variablen, die in settings verwendet werden
12
\newcommand{\lxlangcode} {$( template_meta.language.template_code )$}
13
\newcommand{\lxmedia} {$( media )$}
14
\newcommand{\lxcurrency} {$( currency )$}
15
\newcommand{\kivicompany} {$( employee_company )$}
16

  
17
% settings: Einstellungen, Logo, Briefpapier, Kopfzeile, Fusszeile
18
\input{insettings.tex}
19

  
20
% laufende Kopfzeile:
21
\ourhead{\kundennummer}{$( KiviLatex.filter(reclamation.customervendor.number) )$}{\auftragsbestaetigung}{$( KiviLatex.filter(reclamation.record_number) )$}{$( reclamation.transdate_as_date )$}
22

  
23
\setkomavar*{date}{\datum}
24
\setkomavar{date}{$( reclamation.transdate_as_date )$}
25
\setkomavar{customer}{$( KiviLatex.filter(reclamation.customer.number) )$}
26
\setkomavar{fromname}{$( KiviLatex.filter(reclamation.employee.name) )$}
27
%\setkomavar{fromphone}{$( KiviLatex.filter(reclamation.employee.deleted_tel) )$}
28
%\setkomavar{fromemail}{$( KiviLatex.filter(reclamation.employee.deleted_email) )$}
29
\setkomavar{title}{
30
  \auftragsbestaetigung~
31
  \nr~$( KiviLatex.filter(reclamation.record_number) )$%
32
}
33

  
34
$( IF (reclamation.cv_record_number) )$%
35
  %\setkomavar*{yourref}{\ihreReclamationsnummer}
36
  \setkomavar{yourref}{$( KiviLatex.filter(reclamation.cv_record_number) )$}
37
$( END )$%
38
\setkomavar{transaction}{$( KiviLatex.filter(reclamation.transaction_description) )$}
39

  
40
%TODO(Tamino): look at shipto
41
$( IF (reclamation.shipto_id) )$%
42
\makeatletter
43
\begin{lrbox}\shippingAddressBox
44
  \parbox{\useplength{toaddrwidth}}{
45
    \backaddr@format{\scriptsize\usekomafont{backaddress}%
46
      \strut abweichende Lieferadresse
47
    }
48
    \par\smallskip
49
    \setlength{\parskip}{\z@}
50
    \par
51
    \normalsize
52
    $( KiviLatex.filter(reclamation.shipto.shiptoname) )$\par
53
    $( IF (reclamation.shipto.shiptocontact) )$ $( KiviLatex.filter(reclamation.shipto.shiptocontact) )$$( END )$\par
54
    $( KiviLatex.filter(reclamation.shipto.shiptodepartment_1) )$\par
55
    $( KiviLatex.filter(reclamation.shipto.shiptodepartment_2) )$\par
56
    $( KiviLatex.filter(reclamation.shipto.shiptostreet) )$\par
57
    $( KiviLatex.filter(reclamation.shipto.shiptozipcode) )$ $( KiviLatex.filter(reclamation.shipto.shiptocity) )$%
58
  }
59
\end{lrbox}
60
\makeatother
61
$( END )$%
62

  
63
\begin{document}
64

  
65
\begin{letter}{
66
    %TODO(Tamino): what name, street, ... ?
67
    $( name )$\strut\\
68
    $( IF (department_1) )$$( department_1 )$\\$( END )$%
69
    $( IF (department_2) )$$( department_2 )$\\$( END )$%
70
    $( reclamation.contact.cp_givenname )$ $( reclamation.contact.cp_name )$\strut\\
71
    $( street )$\strut\\
72
    $( zipcode )$ $( city )$\strut\\
73
    $( country )$ \strut
74
  }
75

  
76
% Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
77
% Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
78
\opening{
79
  \Ifstr{$( KiviLatex.filter(reclamation.contact.cp_name) )$}{}{
80
    $( IF (reclamation.customervendor.natural_person) )$
81
      $( KiviLatex.filter(reclamation.customervendor.greeting) )$ $( KiviLatex.filter(reclamation.customervendor.name) )$,
82
    $( ELSE )$
83
      \anrede
84
    $( END )$
85
  }{
86
    \Ifstr{$( KiviLatex.filter(reclamation.contact.cp_gender) )$}{f}
87
      {\anredefrau}
88
      {\anredeherr}
89
      $( KiviLatex.filter(reclamation.contact.cp_title) )$ $( KiviLatex.filter(reclamation.contact.cp_name) )$,
90
  }
91
}
92
\thispagestyle{kivitendo.letter.first}
93

  
94
\auftragsformel
95

  
96
\begin{PricingTabular*}
97
  % eigentliche Tabelle
98
  \FakeTable{
99
  $( FOREACH item = reclamation.items_sorted )$%
100
    $( item.position )$ &%
101
    $( item.part.partnumber )$ &%
102
    \textbf{ $( KiviLatex.filter(item.description) )$ }%
103
    $( IF (item.longdescription) )$\ExtraDescription{$( KiviLatex.filter(item.longdescription) )$}$( END )$%
104
    $( IF (item.reqdate) )$\ExtraDescription{\lieferdatum: $( item.reqdate_as_date )$}$( END )$%
105
    $( IF (item.serialnumber) )$\ExtraDescription{\seriennummer: $( KiviLatex.filter(item.serialnumber) )$}$( END )$%
106
    $( IF (item.projectnumber) )$\ExtraDescription{\projektnummer: $( KiviLatex.filter(item.projectnumber) )$}$( END )$%
107
    &%
108
    $( item.qty_as_number )$ $( item.unit )$ &%
109
    $( item.sellprice_as_number )$&%
110
    % TODO(Tamino): discount in '%'
111
    \Ifstr{$( p_discount )$}{0}{}{\sffamily\scriptsize{(-$( p_discount )$\,\%)}}%
112
    % TODO(Tamino): linetotal
113
    $( LxERP.format_amount(item.linetotal, 2, 0) )$\tabularnewline
114
  $( END )$%
115
  }%
116
  \begin{PricingTotal}%
117
    % Tabellenende letzte Seite
118
    \nettobetrag & $( reclamation.netamount_as_number )$\\%
119
    $( FOREACH tax = reclamation.taxes )$%
120
      $( KiviLatex.filter(tax.tax.taxdescription) )$ & $( LxERP.format_amount(tax.amount) )$\\%
121
    $( END )$%
122
    \bfseries\schlussbetrag &  \bfseries $( reclamation.amount_as_number )$\\%
123
  \end{PricingTotal}
124
\end{PricingTabular*}
125

  
126
$( IF (reclamation.notes) )$%
127
  $( KiviLatex.filter_html(reclamation.notes) )$%
128
  \medskip
129
$( END )$%
130

  
131
$( IF (reclamation.delivery_term) )$%
132
  \lieferung ~$( KiviLatex.filter(reclamation.delivery_term.description_long) )$\\
133
$( END )$%
134

  
135
$( IF (reclamation.reqdate) )$%
136
  \lieferungErfolgtAm ~$( reclamation.reqdate_as_date )$.
137
$( END )$%
138

  
139
\textit{\auftragpruefen}
140

  
141
%\closing{\gruesse}
142

  
143
\end{letter}
144

  
145
\end{document}

Auch abrufbar als: Unified diff