un positionnement de paramètre workflow des pros
This commit is contained in:
parent
fbd352e788
commit
96746fcc0b
322 changed files with 25893 additions and 3844 deletions
44
Yavsc/Views/Shared/Components/Directory/Default.cshtml
Normal file
44
Yavsc/Views/Shared/Components/Directory/Default.cshtml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
@using Yavsc.ViewModels.UserFiles
|
||||
@model UserDirectoryInfo
|
||||
<div class="dirinfo">
|
||||
<strong>@Model.UserName / @Model.SubPath</strong>
|
||||
<div class="subdirs">
|
||||
@foreach (string subdir in Model.SubDirectories) {
|
||||
<a href="@subdir" class="subdir">@subdir</a>
|
||||
}
|
||||
</div>
|
||||
<style>
|
||||
tr.fileheaders th {
|
||||
border-bottom: 1px solid #ddd;
|
||||
font-style: italic;
|
||||
}
|
||||
tr.fileinfo td {
|
||||
padding: 1em;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
tr.fileinfo:nth-child(even) {background-color: #f2f2f2}
|
||||
tr.fileinfo:hover {background-color: #f5f5f5}
|
||||
|
||||
</style>
|
||||
<table >
|
||||
<tr class="fileheaders">
|
||||
<th>Nom
|
||||
</th>
|
||||
<th>Taille
|
||||
</th>
|
||||
<th>Modification
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var fileinfo in Model.Files) {
|
||||
<tr class="fileinfo">
|
||||
<td class="filename">
|
||||
<a href="@fileinfo.FileLink(Model.UserName,Model.SubPath)">
|
||||
@fileinfo.Name
|
||||
</a></td>
|
||||
<td class="filesize">@fileinfo.Size</td>
|
||||
<td class="filemdate">@fileinfo.LastModified</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
@model Estimate
|
||||
<div class="estimate">
|
||||
|
||||
<a href="~/api/pdfestimate/estimate-@(Model.Id).tex" >Export au format LaTeX</a>
|
||||
|
||||
|
|
@ -9,3 +10,4 @@
|
|||
</form>
|
||||
|
||||
<a href="~/api/pdfestimate/get/@(Model.Id)" >Télécharger le document généré</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
@using Yavsc.Helpers
|
||||
@using System.IO
|
||||
@using System.Globalization
|
||||
@model Estimate
|
||||
@{
|
||||
|
|
@ -6,11 +7,14 @@
|
|||
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}
|
||||
var PostalAddress = to.PostalAddress?.Address.SplitAddressToTeX();
|
||||
var proaddr = Model.Query.PerformerProfile.OrganizationAddress.Address.SplitAddressToTeX();
|
||||
var proaddrm = new HtmlString(Model.Query.PerformerProfile.OrganizationAddress.Address);
|
||||
var isestimate = !ViewBag.AsBill;
|
||||
var prosign = new FileInfo($"{ViewBag.BillsDir}/estimate-prosign-{Model.Id}.png");
|
||||
|
||||
}
|
||||
\documentclass[french,11pt]{article}
|
||||
\usepackage{eurosym}
|
||||
\usepackage{babel}
|
||||
\usepackage[T1]{fontenc}
|
||||
|
|
@ -32,14 +36,11 @@
|
|||
\FPeval{\montant}{#2 * #3}
|
||||
\FPround{\montant}{\montant}{2}
|
||||
\FPadd{\TotalHT}{\TotalHT}{\montant}
|
||||
|
||||
\eaddto\ListeProduits{#1 & \prix & #2 & \montant \cr}
|
||||
}
|
||||
|
||||
|
||||
\newcommand{\AfficheResultat}{%
|
||||
\ListeProduits
|
||||
|
||||
\FPeval{\TotalTVA}{\TotalHT * \TVA / 100}
|
||||
\FPadd{\TotalTTC}{\TotalHT}{\TotalTVA}
|
||||
\FPround{\TotalHT}{\TotalHT}{2}
|
||||
|
|
@ -48,8 +49,6 @@
|
|||
\global\let\TotalHT\TotalHT
|
||||
\global\let\TotalTVA\TotalTVA
|
||||
\global\let\TotalTTC\TotalTTC
|
||||
|
||||
|
||||
\cr
|
||||
\hline
|
||||
\textbf{Total} & & & \TotalHT
|
||||
|
|
@ -67,9 +66,9 @@
|
|||
%%%%%%%%%%%%%%%%%%%%% A MODIFIER DANS LA FACTURE %%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\def\FactureNum {@Model.Id.ToString()} % Numéro de facture
|
||||
\def\FactureAcquittee {non} % Facture acquittée : oui/non
|
||||
\def\FactureLieu {@proaddrn} % Lieu de l'édition de la facture
|
||||
\def\FactureObjet {Facture : @TeXHelpers.ToTeX(Model.Title)} % Objet du document
|
||||
\def\FactureAcquittee {@ViewBag.Acquitted?"oui":"non"} % Facture acquittée : oui/non
|
||||
\def\FactureLieu {@proaddrm} % Lieu de l'édition de la facture
|
||||
\def\FactureObjet {@(new HtmlString(isestimate?"Devis":"Facture")) : @TeXHelpers.ToTeX(Model.Title)} % Objet du document
|
||||
% Description de la facture
|
||||
\def\FactureDescr {
|
||||
@TeXHelpers.ToTeX(Model.Description)
|
||||
|
|
@ -80,10 +79,9 @@
|
|||
|
||||
\def\ClientAdresse{
|
||||
% Adresse du client
|
||||
@if (!string.IsNullOrWhiteSpace(PostalAddress)) {
|
||||
<text> @TeXHelpers.ToTeX(PostalAddress)\\</text> }
|
||||
@if (!string.IsNullOrWhiteSpace(to.PhoneNumber)) {<text>
|
||||
@TeXHelpers.ToTeX(to.PhoneNumber)<text>\\</text>
|
||||
@PostalAddress
|
||||
@if (PostalAddress!=null) {<text>@PostalAddress</text>}
|
||||
@if (!string.IsNullOrWhiteSpace(to.PhoneNumber)) {<text>@TeXHelpers.ToTeX(to.PhoneNumber)<text>\\</text>
|
||||
</text>}
|
||||
E-mail: @TeXHelpers.ToTeX(to.Email)
|
||||
}
|
||||
|
|
@ -106,7 +104,7 @@
|
|||
\setlength{\parindent}{0pt}
|
||||
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
\cfoot{ @TeXHelpers.ToTeX(from.UserName) @if (!string.IsNullOrWhiteSpace(proaddrm)) { <text> - @TeXHelpers.ToTeX(proaddrm) </text> } \newline
|
||||
\cfoot{ @TeXHelpers.ToTeX(from.UserName) @if (proaddrm!=null) { <text> - @proaddrm </text> } \newline
|
||||
\small{ E-mail: @TeXHelpers.ToTeX(from.Email) @if (!string.IsNullOrWhiteSpace(from.PhoneNumber)) { <text> - Téléphone fixe: @TeXHelpers.ToTeX(from.PhoneNumber) </text> }
|
||||
}
|
||||
}
|
||||
|
|
@ -115,7 +113,7 @@
|
|||
|
||||
% Logo de la société
|
||||
@if (from.Avatar != null) {
|
||||
<text>\includegraphics{@from.Avatar}
|
||||
<text>\includegraphics[height=60pt]{@(ViewBag.AvatarsDir)/@(from.UserName).png}
|
||||
</text>
|
||||
} else {
|
||||
<text>%\includegraphics{logo.png}
|
||||
|
|
@ -123,9 +121,9 @@
|
|||
}
|
||||
% Nom et adresse de la société
|
||||
@TeXHelpers.ToTeX(from.UserName) \\
|
||||
@TeXHelpers.ToTeX(proaddrn)
|
||||
@proaddr
|
||||
|
||||
Facture n°\FactureNum
|
||||
@(isestimate?"Devis":"Facture") n°\FactureNum
|
||||
|
||||
|
||||
{\addtolength{\leftskip}{10.5cm} %in ERT
|
||||
|
|
@ -159,11 +157,12 @@ Facture n°\FactureNum
|
|||
|
||||
\end{flushright}
|
||||
~\\
|
||||
|
||||
@if (!isestimate) {
|
||||
<text>
|
||||
\ifthenelse{\equal{\FactureAcquittee}{oui}}{
|
||||
Facture acquittée.
|
||||
}{
|
||||
@{
|
||||
}{ </text>
|
||||
|
||||
var bi = from.BankInfo;
|
||||
if (bi!=null) {
|
||||
<text>À régler par chèque ou par virement bancaire :
|
||||
|
|
@ -188,5 +187,21 @@ Facture n°\FactureNum
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@if (!(Model.ProviderValidationDate==null)) {
|
||||
<text>
|
||||
\begin{flushright}
|
||||
@(new HtmlString(isestimate?"Devis validé":"Facture validée")) le @TeXHelpers.ToTeX(Model.ProviderValidationDate.ToString("dddd dd MMMM yyyy",
|
||||
CultureInfo.CreateSpecificCulture("fr-FR")))
|
||||
\end{flushright}
|
||||
@if (prosign.Exists) {
|
||||
<text>
|
||||
\begin{center}
|
||||
\hspace{263pt}
|
||||
\includegraphics[height=60pt]{@(ViewBag.BillsDir)/estimate-prosign-@(Model.Id).png}
|
||||
\end{center}
|
||||
</text>
|
||||
}
|
||||
</text>
|
||||
}
|
||||
\end{document}
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
@model UserDirectoryInfo
|
||||
@{
|
||||
var files = User.GetUserFiles();
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue