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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue