WIP Estimate

This commit is contained in:
Paul Schneider 2016-11-04 13:55:48 +01:00
commit 9293ee4ec9
27 changed files with 1308 additions and 76 deletions

View file

@ -1,6 +1,9 @@
@model Estimate
@{
Layout = null;
var pro = Model.Query.PerformerProfile;
var from = Model.Query.PerformerProfile.Performer;
var to = Model.Query.Client;
}
\documentclass[french,11pt]{article}
\usepackage{babel}
@ -115,12 +118,14 @@
\begin{document}
% Logo de la société
%\includegraphics{logo.jpg}
@if (from.Avatar != null) {<text>
\includegraphics{@from.Avatar}</text>
} else { <text>
%\includegraphics{logo.png}</text>
}
% Nom et adresse de la société
from.Name \\
from.Address \\
from.ZipCode from.CityAndState\\
@from.UserName \\
@pro.OrganizationAddress.Address
Facture n°\FactureNum
@ -160,22 +165,30 @@ Facture n°\FactureNum
\ifthenelse{\equal{\FactureAcquittee}{oui}}{
Facture acquittée.
}{
À régler par chèque ou par virement bancaire :
@{
var bi = from.BankInfo;
if (bi!=null) {
<text>À régler par chèque ou par virement bancaire :
\begin{center}
\begin{tabular}{|c c c c|}
if (!string.IsNullOrWhiteSpace(from.BankCode) && !string.IsNullOrWhiteSpace(from.WicketCode)
&& !string.IsNullOrWhiteSpace(from.AccountNumber) ) {
\hline \textbf{Code banque} & \textbf{Code guichet} & \textbf{N° de Compte} & \textbf{Clé RIB} \\
from.BankCode & from.WicketCode & from.AccountNumber & from.BankedKey \\
@if (!string.IsNullOrWhiteSpace(bi.BankCode) && !string.IsNullOrWhiteSpace(bi.WicketCode)
&& !string.IsNullOrWhiteSpace(bi.AccountNumber) ) {
<text>\hline \textbf{Code banque} & \textbf{Code guichet} & \textbf{N° de Compte} & \textbf{Clé RIB} \\
@bi.BankCode & @bi.WicketCode & @bi.AccountNumber & @bi.BankedKey \\
</text>
}
if (!string.IsNullOrWhiteSpace(from.IBAN) && !string.IsNullOrWhiteSpace(from.BIC)) {
\hline \textbf{IBAN N°} & \multicolumn{3}{|l|}{ from.IBAN } \\
\hline \textbf{Code BIC} & \multicolumn{3}{|l|}{ from.BIC }
@if (!string.IsNullOrWhiteSpace(@bi.IBAN) && !string.IsNullOrWhiteSpace(@bi.BIC)) {
<text>
\hline \textbf{IBAN N°} & \multicolumn{3}{|l|}{ @bi.IBAN } \\
\hline \textbf{Code BIC} & \multicolumn{3}{|l|}{ @bi.BIC }
</text>
} \\
\hline
\end{tabular}
\end{center}
\end{center}</text>
}
}
}
\end{document}