|
|
|
|
@ -34,7 +34,7 @@ namespace Gremlin.Operations
|
|
|
|
|
_ = texFile.AppendLine($"\\rohead{{{quoteVM.QuotationNumber}}}");
|
|
|
|
|
_ = texFile.AppendLine("\\cfoot{Seite \\thepage/\\pageref{LastPage}}\n" + "\\sisetup{round-integer-to-decimal,round-precision=2,round-mode=places}" + "\n\\newcommand{\\produkttitel}[1]{\\textsc{#1}}" + "\n\\renewcommand{\\arraystretch}{1.2}\r\n\\definecolor{AgilentBlau}{HTML}{0085d5}" + "\n\\setlist{noitemsep}\r\n\\begin{document}" + "\n\\begin{tabular}{p{0.4\\hsize}p{0.5\\hsize}}" + "\n\\multirow{4}{*}{\\includegraphics[width=0.9\\hsize]{agilentLogo.png}}" + "\n&\\normalsize{Agilent Technologies Sales \\& Services GmbH \\& Co.KG}\\\\" + "\n&\\normalsize{Life Sciences \\& Chemical Analysis}\\\\" + $"\n&\\normalsize{{Hewlett-Packard-Str. 8}}\\\\" + "\n&\\normalsize{D-76337 Waldbronn}" + "\n\\end{tabular}" + "\n\\par\r\n\\begin{flushright}" + "\n\\colorbox{AgilentBlau}{\\textcolor{white}{\\textsc{\\Huge{Angebot}}}}\r\n\\end{flushright}\r\n\\begin{tabular}{p{0.4\\hsize}p{0.6\\hsize}}" + "\n&\n\\multirow{4}{*}{" + "\n\\begin{tabular}{|ll|}" + "\n\\hline");
|
|
|
|
|
_ = texFile.AppendLine($"\\textbf{{Angebotsnummer:}}&{quoteVM.QuotationNumber}\\\\");
|
|
|
|
|
_ = texFile.Append("Angebotdatum:&\\today\\\\\r\nAngebotsgültigkeit:&60 Tage\\\\");
|
|
|
|
|
_ = texFile.Append($"Angebotdatum:&\\today\\\\\r\nAngebotsgültigkeit:&{quoteVM.Validity} Tage\\\\");
|
|
|
|
|
_ = texFile.AppendLine($"\\textbf{{Ansprechpartner:}}&{RUSettingModel.GetSettingValue(Properties.Settings.Default.userSettingID, "userName")}\\\\");
|
|
|
|
|
_ = texFile.AppendLine($"Telefon: &{RUSettingModel.GetSettingValue(Properties.Settings.Default.userSettingID, "userPhone")}\\\\");
|
|
|
|
|
_ = texFile.AppendLine($"Mobil:&{RUSettingModel.GetSettingValue(Properties.Settings.Default.userSettingID, "userMobile")}\\\\");
|
|
|
|
|
@ -52,19 +52,45 @@ namespace Gremlin.Operations
|
|
|
|
|
_ = texFile.Append(CreateHeading(quoteVM));
|
|
|
|
|
|
|
|
|
|
//Tabelle
|
|
|
|
|
_ = texFile.Append("\\begin{center}");
|
|
|
|
|
_ = texFile.Append("\\begin{longtable}");
|
|
|
|
|
_ = texFile.Append("{| cp{0.72\\textwidth} cr |} \\hline");
|
|
|
|
|
_ = texFile.Append(@"\textbf{\#} & \textbf{Produktbeschreibung} (Produktnummer) & \textbf{Menge} & \textbf{Preis}\\ \hline \endhead");
|
|
|
|
|
_ = texFile.AppendLine("\\begin{center}");
|
|
|
|
|
_ = texFile.AppendLine("\\begin{longtable}");
|
|
|
|
|
|
|
|
|
|
if (quoteVM.SinglePrices == true)
|
|
|
|
|
{
|
|
|
|
|
//mit Einzelpreisen
|
|
|
|
|
_ = texFile.AppendLine("{| cp{0.72\\textwidth} cr |} \\hline");
|
|
|
|
|
_ = texFile.AppendLine(@"\textbf{\#} & \textbf{Produktbeschreibung} (Produktnummer) & \textbf{Menge} & \textbf{Preis}\\ \hline \endhead");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//ohne Einzelpreise
|
|
|
|
|
_ = texFile.AppendLine("{| cp{0.83\\textwidth} c |} \\hline");
|
|
|
|
|
_ = texFile.AppendLine(@"\textbf{\#} & \textbf{Produktbeschreibung} (Produktnummer) & \textbf{Menge}\\ \hline \endhead");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach (LineItemVM lineItemVM in quoteVM.LineItemsVM)
|
|
|
|
|
{
|
|
|
|
|
string lineItemTex = lineItemVM.OptionNumber != ""
|
|
|
|
|
? $"{lineItemVM.Position} &\\textbf{{{lineItemVM.CustomDescription.Heading}}} ({lineItemVM.ProductNumber}\\#{lineItemVM.OptionNumber})\\newline {lineItemVM.CustomDescription.DescriptionText}&{lineItemVM.Amount}&\\SI{{{lineItemVM.TotalNet}}}{{\\sieuro}}\\\\"
|
|
|
|
|
: $"{lineItemVM.Position} &\\textbf{{{lineItemVM.CustomDescription.Heading}}} ({lineItemVM.ProductNumber})\\newline {lineItemVM.CustomDescription.DescriptionText}&{lineItemVM.Amount}&\\SI{{{lineItemVM.TotalNet}}}{{\\sieuro}}\\\\";
|
|
|
|
|
string lineItemTex = "";
|
|
|
|
|
|
|
|
|
|
if (quoteVM.SinglePrices == true)
|
|
|
|
|
{
|
|
|
|
|
//mit Einzelpreisen
|
|
|
|
|
lineItemTex = lineItemVM.OptionNumber != ""
|
|
|
|
|
? $"{lineItemVM.Position} &\\textbf{{{lineItemVM.CustomDescription.Heading}}} ({lineItemVM.ProductNumber}\\#{lineItemVM.OptionNumber})\\newline {lineItemVM.CustomDescription.DescriptionText}&{lineItemVM.Amount}&\\SI{{{lineItemVM.TotalNet}}}{{\\sieuro}}\\\\"
|
|
|
|
|
: $"{lineItemVM.Position} &\\textbf{{{lineItemVM.CustomDescription.Heading}}} ({lineItemVM.ProductNumber})\\newline {lineItemVM.CustomDescription.DescriptionText}&{lineItemVM.Amount}&\\SI{{{lineItemVM.TotalNet}}}{{\\sieuro}}\\\\";
|
|
|
|
|
}
|
|
|
|
|
else if (quoteVM.SinglePrices == false)
|
|
|
|
|
{
|
|
|
|
|
//ohne Einzelpreise
|
|
|
|
|
lineItemTex = lineItemVM.OptionNumber != ""
|
|
|
|
|
? $"{lineItemVM.Position} &\\textbf{{{lineItemVM.CustomDescription.Heading}}} ({lineItemVM.ProductNumber}\\#{lineItemVM.OptionNumber})\\newline {lineItemVM.CustomDescription.DescriptionText}&{lineItemVM.Amount}\\\\"
|
|
|
|
|
: $"{lineItemVM.Position} &\\textbf{{{lineItemVM.CustomDescription.Heading}}} ({lineItemVM.ProductNumber})\\newline {lineItemVM.CustomDescription.DescriptionText}&{lineItemVM.Amount}\\\\";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_ = texFile.Append(lineItemTex + "\n");
|
|
|
|
|
}
|
|
|
|
|
_ = texFile.Append("\\hline\r\n\\end{longtable}\r\n\\end{center}\r\n\\vspace{-2cm}\r\n\\begin{flushright}\r\n\\begin{large}\r\n\\begin{tabular}{|rr|}\r\n\\hline");
|
|
|
|
|
|
|
|
|
|
_ = texFile.AppendLine("\\hline\r\n\\end{longtable}\r\n\\end{center}\r\n\\vspace{-2cm}\r\n\\begin{flushright}\r\n\\begin{large}\r\n\\begin{tabular}{|rr|}\r\n\\hline");
|
|
|
|
|
|
|
|
|
|
//Gesamtsumme
|
|
|
|
|
_ = texFile.AppendLine($"\\textbf{{Gesamtsumme netto}} & \\SI{{{quoteVM.TotalNet}}}{{\\sieuro}}\\\\");
|
|
|
|
|
@ -73,7 +99,6 @@ namespace Gremlin.Operations
|
|
|
|
|
if (brutto == true)
|
|
|
|
|
{
|
|
|
|
|
_ = texFile.AppendLine($"\\textbf{{Mehrwertsteuer {quoteVM.VAT}\\%}} & \\SI{{{(float)quoteVM.TotalNet * quoteVM.VAT / 100}}}{{\\sieuro}}\\\\");
|
|
|
|
|
|
|
|
|
|
_ = texFile.AppendLine($"\\textbf{{Gesamtsumme brutto}} & \\SI{{{(float)quoteVM.TotalNet * (1 + (quoteVM.VAT / 100))}}}{{\\sieuro}}\\\\");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|