estimate to LaTeX
This commit is contained in:
parent
56d0654fdc
commit
d1ae27074e
29 changed files with 1294 additions and 148 deletions
|
|
@ -1,9 +1,14 @@
|
|||
@model Estimate
|
||||
@using Yavsc.Helpers
|
||||
@{
|
||||
Layout = null;
|
||||
var pro = Model.Query.PerformerProfile;
|
||||
var from = Model.Query.PerformerProfile.Performer;
|
||||
var to = Model.Query.Client;
|
||||
var PostalAddress = (to.PostalAddress!=null) ? to.PostalAddress.Address.Replace("\n","\\\\\n") : null ;
|
||||
var proaddr = Model.Query?.PerformerProfile.OrganizationAddress.Address;
|
||||
var proaddrn = (proaddr!=null) ? proaddr.NewLinesWith("\\\\\n") : null ;
|
||||
var proaddrm = (proaddr!=null) ? proaddr.NewLinesWith(" - ") : null ;
|
||||
}
|
||||
\documentclass[french,11pt]{article}
|
||||
\usepackage{babel}
|
||||
|
|
@ -62,7 +67,7 @@
|
|||
|
||||
\def\FactureNum {@Model.Id.ToString()} % Numéro de facture
|
||||
\def\FactureAcquittee {non} % Facture acquittée : oui/non
|
||||
\def\FactureLieu {@Model.Query.PerformerProfile.OrganizationAddress} % Lieu de l'édition de la facture
|
||||
\def\FactureLieu {@proaddrn} % Lieu de l'édition de la facture
|
||||
\def\FactureObjet {Facture : @Model.Title} % Objet du document
|
||||
% Description de la facture
|
||||
\def\FactureDescr {
|
||||
|
|
@ -70,18 +75,16 @@
|
|||
}
|
||||
|
||||
% Infos Client
|
||||
\def\ClientNom{@ViewBag.To.UserName} % Nom du client
|
||||
\def\ClientNom{@to.UserName} % Nom du client
|
||||
|
||||
\def\ClientAdresse{
|
||||
% Adresse du client
|
||||
@if (ViewBag.To.PostalAddress!=null) {
|
||||
@ViewBag.To.PostalAddress.Address.Replace("\n","\\\\\n")
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.To.PhoneNumber)) {<text>
|
||||
\\ Téléphone fixe: @ViewBag.To.PhoneNumber
|
||||
@if (!string.IsNullOrWhiteSpace(PostalAddress)) {
|
||||
<text> @PostalAddress\\</text> }
|
||||
@if (!string.IsNullOrWhiteSpace(to.PhoneNumber)) {<text>
|
||||
@to.PhoneNumber <text>\\</text>
|
||||
</text>}
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.To.Email)) {<text>
|
||||
\\ E-mail: @ViewBag.To.Email </text>}
|
||||
E-mail: @to.Email
|
||||
}
|
||||
|
||||
% Liste des produits facturés : Désignation, prix
|
||||
|
|
@ -106,12 +109,10 @@
|
|||
\setlength{\parindent}{0pt}
|
||||
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
\cfoot{
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.From.UserName)) { @ViewBag.From.UserName }
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.From.PostalAddress)) { <text> - @ViewBag.From.PostalAddress.Address </text> } } \newline
|
||||
\small{
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Email)) { <text> E-mail: @ViewBag.From.Email </text> }
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.From.PhoneNumber)) { <text> - Téléphone fixe: @ViewBag.From.PhoneNumber </text> }
|
||||
\cfoot{ @if (!string.IsNullOrWhiteSpace(from.UserName)) { @from.UserName }
|
||||
@if (!string.IsNullOrWhiteSpace(proaddrm)) { <text> - @proaddrm </text> } \newline
|
||||
\small{ E-mail: @from.Email
|
||||
@if (!string.IsNullOrWhiteSpace(from.PhoneNumber)) { <text> - Téléphone fixe: @from.PhoneNumber </text> }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +126,7 @@
|
|||
}
|
||||
% Nom et adresse de la société
|
||||
@from.UserName \\
|
||||
@pro.OrganizationAddress.Address
|
||||
@proaddrn
|
||||
|
||||
Facture n°\FactureNum
|
||||
|
||||
|
|
|
|||
|
|
@ -1,91 +0,0 @@
|
|||
|
||||
|
||||
|
||||
|
||||
\geometry{verbose,tmargin=4em,bmargin=8em,lmargin=6em,rmargin=6em}
|
||||
\setlength{\parindent}{0pt}
|
||||
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
|
||||
|
||||
\thispagestyle{fancy}
|
||||
\pagestyle{fancy}
|
||||
\setlength{\parindent}{0pt}
|
||||
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
\cfoot{
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Name)) { @ViewBag.From.Name }
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Address)) { <text> - @ViewBag.From.Address </text> }
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.From.CityAndState)) { <text> - @ViewBag.From.CityAndState </text> } \newline
|
||||
\small{
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Email)) { <text> E-mail: @ViewBag.From.Email </text> }
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Mobile)) { <text> - Téléphone mobile: @ViewBag.From.Mobile </text> }
|
||||
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Phone)) { <text> - Téléphone fixe: @ViewBag.From.Phone </text> }
|
||||
}
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
|
||||
% Logo de la société
|
||||
%\includegraphics{logo.jpg}
|
||||
|
||||
% Nom et adresse de la société
|
||||
from.Name \\
|
||||
from.Address \\
|
||||
from.ZipCode from.CityAndState\\
|
||||
|
||||
Facture n°\FactureNum
|
||||
|
||||
|
||||
{\addtolength{\leftskip}{10.5cm} %in ERT
|
||||
\textbf{\ClientNom} \\
|
||||
\ClientAdresse \\
|
||||
|
||||
} %in ERT
|
||||
|
||||
|
||||
\hspace*{10.5cm}
|
||||
\FactureLieu, le \today
|
||||
|
||||
~\\~\\
|
||||
|
||||
\textbf{Objet : \FactureObjet \\}
|
||||
|
||||
\textnormal{\FactureDescr}
|
||||
|
||||
~\\
|
||||
|
||||
\begin{center}
|
||||
\begin{tabular}{lrrr}
|
||||
\textbf{Désignation ~~~~~~} & \textbf{Prix unitaire} & \textbf{Quantité} & \textbf{Montant (EUR)} \\
|
||||
\hline
|
||||
\AfficheResultat{}
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
||||
\begin{flushright}
|
||||
\textit{Auto entreprise en franchise de TVA}\\
|
||||
|
||||
\end{flushright}
|
||||
~\\
|
||||
|
||||
\ifthenelse{\equal{\FactureAcquittee}{oui}}{
|
||||
Facture acquittée.
|
||||
}{
|
||||
|
||||
À 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(from.IBAN) && !string.IsNullOrWhiteSpace(from.BIC)) {
|
||||
\hline \textbf{IBAN N°} & \multicolumn{3}{|l|}{ from.IBAN } \\
|
||||
\hline \textbf{Code BIC} & \multicolumn{3}{|l|}{ from.BIC }
|
||||
} \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
}
|
||||
\end{document}
|
||||
Loading…
Add table
Add a link
Reference in a new issue