WIP estimate tex

This commit is contained in:
Paul Schneider 2016-11-03 17:34:19 +01:00
commit 4abf8db596
5 changed files with 155 additions and 31 deletions

View file

@ -1,5 +1,7 @@
@model Estimate
@{
Layout = null;
}
\documentclass[french,11pt]{article}
\usepackage{babel}
\usepackage[T1]{fontenc}
@ -53,14 +55,11 @@
\newcommand{\ListeProduits}{}
%%%%%%%%%%%%%%%%%%%%% A MODIFIER DANS LA FACTURE %%%%%%%%%%%%%%%%%%%%%
\def\FactureNum {@Model.Id.ToString()} % Numéro de facture
\def\FactureAcquittee {non} % Facture acquittée : oui/non
\def\FactureLieu {@Model.Command.Performer.PostalAddress} % Lieu de l'édition de la facture
\def\FactureLieu {@Model.Query.PerformerProfile.OrganizationAddress} % Lieu de l'édition de la facture
\def\FactureObjet {Facture : @Model.Title} % Objet du document
% Description de la facture
\def\FactureDescr {
@ -68,27 +67,33 @@
}
% Infos Client
\def\ClientNom{@Model.Command.Client.Name} % Nom du client
\def\ClientAdresse{% % Adresse du client
@if (!string.IsNullOrWhiteSpace(Model.Command.Client.PostalAddress.Address)) {
@string.Split("\n",Model.Command.Client.PostalAddress.Address).Join("\\\\\n")
}
if (!string.IsNullOrWhiteSpace(@Model.Command.Client.PhoneNumber)) {
Téléphone fixe: @Model.Command.Client.PhoneNumber \\
}
\def\ClientNom{@ViewBag.To.UserName} % Nom du client
if (!string.IsNullOrWhiteSpace(eto)) {
E-mail: @Model.Command.Client.Email }
\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
</text>}
@if (!string.IsNullOrWhiteSpace(ViewBag.To.Email)) {<text>
\\ E-mail: @ViewBag.To.Email </text>}
}
% Liste des produits facturés : Désignation, prix
@foreach (CommandLine line in Model.Command.Bill) {
\AjouterService { @line.Article.Name - @line.Comment (Ref:YPR@line.Article.Id) } {@line.Count} {@line.UnitaryCost}
}
@if (Model.Bill!=null) { 
foreach (CommandLine line in Model.Bill) {
<text>
\AjouterService {@line.Description} {@line.Count} {@line.UnitaryCost}
</text>
} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\geometry{verbose,tmargin=4em,bmargin=8em,lmargin=6em,rmargin=6em}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
@ -99,13 +104,11 @@ if (!string.IsNullOrWhiteSpace(eto)) {
\renewcommand{\headrulewidth}{0pt}
\cfoot{
@if (!string.IsNullOrWhiteSpace(from.Name)) { from.Name }
@if (!string.IsNullOrWhiteSpace(from.Address)) { @"-" @from.Address }
@if (!string.IsNullOrWhiteSpace(from.CityAndState)) { @"-" @from.CityAndState } \newline
@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(efrom)) { E-mail: efrom }
@if (!string.IsNullOrWhiteSpace(from.Mobile)) { @"-" Téléphone mobile: @from.Mobile }
@if (!string.IsNullOrWhiteSpace(from.Phone)) { @"-" Téléphone fixe: @from.Phone }
@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> }
}
}