bill
parent
3fc9e9be84
commit
5189be288b
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Attributes
|
||||
{
|
||||
public class ActivityBillingAttribute : Attribute
|
||||
{
|
||||
public string BillingCode { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Identifie une entité de facturation
|
||||
/// </summary>
|
||||
/// <param name="billingCode">Code de facturation,
|
||||
/// Il doit avoir une valeur unique par usage.
|
||||
/// </param>
|
||||
public ActivityBillingAttribute(string billingCode) {
|
||||
BillingCode = billingCode;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
public partial class satisfaction
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long _id { get; set; }
|
||||
public string comnt { get; set; }
|
||||
public int? rate { get; set; }
|
||||
|
||||
[ForeignKey("Skill.Id")]
|
||||
public long? userskillid { get; set; }
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
public partial class writtings
|
||||
{
|
||||
public long _id { get; set; }
|
||||
public int? count { get; set; }
|
||||
public string description { get; set; }
|
||||
public long estimid { get; set; }
|
||||
public string productid { get; set; }
|
||||
public decimal? ucost { get; set; }
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
public partial class wrtags
|
||||
{
|
||||
public long wrid { get; set; }
|
||||
public long tagid { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Billing;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Services
|
||||
{
|
||||
public class BillingService : IBillingService
|
||||
{
|
||||
public ApplicationDbContext DbContext { get; private set; }
|
||||
private ILogger logger;
|
||||
|
||||
public BillingService(ILoggerFactory loggerFactory, ApplicationDbContext dbContext)
|
||||
{
|
||||
logger = loggerFactory.CreateLogger<BillingService>();
|
||||
DbContext = dbContext;
|
||||
}
|
||||
public async Task<IQueryable<ISpecializationSettings>> GetPerformersSettings(string activityCode)
|
||||
{
|
||||
logger.LogDebug("searching for "+activityCode);
|
||||
var activity = await DbContext.Activities.SingleAsync(a=>a.Code == activityCode);
|
||||
logger.LogDebug(JsonConvert.SerializeObject(activity));
|
||||
|
||||
|
||||
if (activity.SettingsClassName==null) return null;
|
||||
var dbSetPropInfo = Startup.UserSettings.SingleOrDefault(s => s.PropertyType.GenericTypeArguments[0].FullName == activity.SettingsClassName);
|
||||
|
||||
|
||||
if (dbSetPropInfo == null) return null;
|
||||
// var settingType = dbSetPropInfo.PropertyType;
|
||||
// var dbSetType = typeof(DbSet<>).MakeGenericType(new Type[] { settingType } );
|
||||
// avec une info method Remove et Update, ça le ferait ...
|
||||
|
||||
return (IQueryable<ISpecializationSettings>) dbSetPropInfo.GetValue(DbContext);
|
||||
}
|
||||
|
||||
public async Task<IBillable> GetBillAsync(string billingCode, long queryId)
|
||||
{
|
||||
var dbFunc = Startup.Billing[billingCode];
|
||||
IBillable query = null;
|
||||
await Task.Run(()=> dbFunc(DbContext, queryId));
|
||||
return query;
|
||||
}
|
||||
|
||||
public async Task<ISpecializationSettings> GetPerformerSettingsAsync(string activityCode, string userId)
|
||||
{
|
||||
return await (await GetPerformersSettings(activityCode)).SingleOrDefaultAsync(s=> s.UserId == userId);
|
||||
}
|
||||
|
||||
public Task<IQueryable<ISpecializationSettings>> GetPerformersSettingsAsync(string activityCode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
namespace Yavsc.Services
|
||||
{
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Billing;
|
||||
public interface IBillingService
|
||||
{
|
||||
/// <summary>
|
||||
/// Renvoye la facture associée à une clé de facturation:
|
||||
/// le couple suivant :
|
||||
///
|
||||
/// * un code de facturation
|
||||
/// (identifiant associé à un type de facturation d'un flux de travail)
|
||||
/// * un entier long identifiant la demande du client
|
||||
/// (à une demande, on associe au maximum une seule facture)
|
||||
/// </summary>
|
||||
/// <param name="billingCode">Identifiant du type de facturation</param>
|
||||
/// <param name="queryId">Identifiant de la demande du client</param>
|
||||
/// <returns>La facture</returns>
|
||||
Task<IBillable> GetBillAsync(string billingCode, long queryId);
|
||||
Task<IQueryable<ISpecializationSettings>> GetPerformersSettingsAsync(string activityCode);
|
||||
|
||||
Task<ISpecializationSettings> GetPerformerSettingsAsync(string activityCode, string userId);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Yavsc.Billing;
|
||||
using Yavsc.Helpers;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Services;
|
||||
using Yavsc.ViewModels.Gen;
|
||||
|
||||
namespace Yavsc.ViewComponents
|
||||
{
|
||||
public enum OutputFormat {
|
||||
Html,
|
||||
LaTeX,
|
||||
Pdf
|
||||
}
|
||||
public class BillViewComponent : ViewComponent
|
||||
{
|
||||
ApplicationDbContext dbContext;
|
||||
IBillingService billingService;
|
||||
IStringLocalizer<Yavsc.Resources.YavscLocalisation> localizer;
|
||||
|
||||
public BillViewComponent(ApplicationDbContext dbContext,
|
||||
IStringLocalizer<Yavsc.Resources.YavscLocalisation> localizer)
|
||||
{
|
||||
this.dbContext = dbContext;
|
||||
this.localizer = localizer;
|
||||
}
|
||||
/*
|
||||
public async Task<IViewComponentResult> InvokeAsync(string code, long id)
|
||||
{
|
||||
return await InvokeAsync(code, id, OutputFormat.Html);
|
||||
}
|
||||
public async Task<IViewComponentResult> InvokeAsync(string code, long id, OutputFormat outputFormat)
|
||||
{
|
||||
return await InvokeAsync(code,id,outputFormat,false,false);
|
||||
}
|
||||
public async Task<IViewComponentResult> InvokeAsync(string code, long id, OutputFormat outputFormat, bool asBill, bool acquitted)
|
||||
{
|
||||
var billable = await Task.Run( () => billingService.GetBillAsync(code,id));
|
||||
|
||||
if (billable == null)
|
||||
throw new Exception("No data");
|
||||
return await InvokeAsync(code, billable, outputFormat,asBill,acquitted);
|
||||
|
||||
} */
|
||||
|
||||
public async Task<IViewComponentResult> InvokeAsync(string code, IBillable billable, OutputFormat format, bool asBill, bool acquitted)
|
||||
{
|
||||
var di = new DirectoryInfo(Startup.SiteSetup.UserFiles.Bills);
|
||||
var dia = new DirectoryInfo(Startup.SiteSetup.UserFiles.Avatars);
|
||||
ViewBag.BillsDir = di.FullName;
|
||||
ViewBag.AvatarsDir = dia.FullName;
|
||||
ViewBag.AsBill = asBill; // vrai pour une facture, sinon, c'est un devis
|
||||
ViewBag.Acquitted = acquitted;
|
||||
ViewBag.BillingCode = code;
|
||||
switch (format) {
|
||||
case OutputFormat.LaTeX :
|
||||
var client = await dbContext.Users
|
||||
.Include(u=>u.PostalAddress)
|
||||
.SingleAsync(u=>u.Id == billable.ClientId);
|
||||
ViewBag.Client = client;
|
||||
var performer = await dbContext.Users
|
||||
.Include(u=>u.BankInfo)
|
||||
.Include(u=>u.PostalAddress)
|
||||
.SingleAsync(u=>u.Id == billable.PerformerId);
|
||||
ViewBag.Performer = performer;
|
||||
|
||||
ViewBag.ClientAddress = client.PostalAddress?.Address.SplitAddressToTeX();
|
||||
|
||||
var profile = await dbContext.Performers
|
||||
.Include(p=>p.OrganizationAddress)
|
||||
.SingleAsync(p=>p.PerformerId == billable.PerformerId);
|
||||
ViewBag.PerformerProfile = profile;
|
||||
ViewBag.ActivityLabel = localizer[billable.ActivityCode];
|
||||
ViewBag.PerformerOrganizationAddress = profile.OrganizationAddress.Address.SplitAddressToTeX() ;
|
||||
ViewBag.PerformerAddress = performer.PostalAddress?.Address.SplitAddressToTeX() ;
|
||||
return this.View("Bill_tex", billable);
|
||||
case OutputFormat.Pdf :
|
||||
string tex = null;
|
||||
var oldWriter = ViewComponentContext.ViewContext.Writer;
|
||||
using (var writer = new StringWriter())
|
||||
{
|
||||
this.ViewComponentContext.ViewContext.Writer = writer;
|
||||
|
||||
var resultTex = View("Bill_tex", billable);
|
||||
await resultTex.ExecuteAsync(this.ViewComponentContext);
|
||||
tex = writer.ToString();
|
||||
|
||||
}
|
||||
ViewComponentContext.ViewContext.Writer = oldWriter;
|
||||
|
||||
return this.View("Bill_pdf",
|
||||
new PdfGenerationViewModel{
|
||||
Temp = Startup.Temp,
|
||||
TeXSource = tex,
|
||||
DestDir = Startup.UserBillsDirName,
|
||||
BaseFileName = $"bill-{code}-{billable.Id}"
|
||||
} );
|
||||
}
|
||||
return View("Default",billable);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Billing;
|
||||
using Yavsc.ViewModels.Gen;
|
||||
|
||||
namespace Yavsc.ViewComponents
|
||||
{
|
||||
public class EstimateViewComponent : ViewComponent
|
||||
{
|
||||
ApplicationDbContext dbContext;
|
||||
public EstimateViewComponent(ApplicationDbContext dbContext)
|
||||
{
|
||||
this.dbContext = dbContext;
|
||||
}
|
||||
public async Task<IViewComponentResult> InvokeAsync(long id)
|
||||
{
|
||||
return await InvokeAsync(id,"Html");
|
||||
}
|
||||
public async Task<IViewComponentResult> InvokeAsync(long id, string outputFormat ="Html")
|
||||
{
|
||||
return await InvokeAsync(id,outputFormat,false,false);
|
||||
}
|
||||
public async Task<IViewComponentResult> InvokeAsync(long id, string outputFormat ="Html", bool asBill = false, bool acquitted = false)
|
||||
{
|
||||
return await Task.Run( ()=> {
|
||||
Estimate estimate =
|
||||
dbContext.Estimates.Include(x => x.Query)
|
||||
.Include(x => x.Query.Client)
|
||||
.Include(x => x.Query.PerformerProfile)
|
||||
.Include(x => x.Query.PerformerProfile.OrganizationAddress)
|
||||
.Include(x => x.Query.PerformerProfile.Performer)
|
||||
.Include(e => e.Bill).FirstOrDefault(x => x.Id == id);
|
||||
if (estimate == null)
|
||||
throw new Exception("No data");
|
||||
var di = new DirectoryInfo(Startup.SiteSetup.UserFiles.Bills);
|
||||
var dia = new DirectoryInfo(Startup.SiteSetup.UserFiles.Avatars);
|
||||
ViewBag.BillsDir = di.FullName;
|
||||
ViewBag.AvatarsDir = dia.FullName;
|
||||
ViewBag.AsBill = asBill;
|
||||
ViewBag.Acquitted = acquitted;
|
||||
if (outputFormat == "LaTeX") {
|
||||
return this.View("Estimate_tex", estimate);
|
||||
}
|
||||
else if (outputFormat == "Pdf")
|
||||
{
|
||||
// Sorry for this code
|
||||
string tex = null;
|
||||
var oldWriter = ViewComponentContext.ViewContext.Writer;
|
||||
using (var writer = new StringWriter())
|
||||
{
|
||||
this.ViewComponentContext.ViewContext.Writer = writer;
|
||||
|
||||
var resultTex = View("Estimate_tex", estimate);
|
||||
resultTex.Execute(this.ViewComponentContext);
|
||||
tex = writer.ToString();
|
||||
|
||||
}
|
||||
ViewComponentContext.ViewContext.Writer = oldWriter;
|
||||
|
||||
return this.View("Estimate_pdf",
|
||||
new PdfGenerationViewModel{
|
||||
Temp = Startup.Temp,
|
||||
TeXSource = tex,
|
||||
DestDir = Startup.UserBillsDirName,
|
||||
BaseFileName = $"estimate-{id}"
|
||||
} );
|
||||
}
|
||||
return View("Default",estimate);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
@using System.Reflection
|
||||
@using System.IO
|
||||
@using Microsoft.Extensions.WebEncoders
|
||||
@using System.Diagnostics
|
||||
@using System.Text
|
||||
@using Yavsc.Formatters
|
||||
@using Yavsc.Helpers
|
||||
@model Yavsc.ViewModels.Gen.PdfGenerationViewModel
|
||||
|
||||
@{
|
||||
Model.GenerateEstimatePdf();
|
||||
}
|
||||
@if (Model.Generated) {
|
||||
<div>
|
||||
@(Model.BaseFileName).pdf was generated
|
||||
</div>
|
||||
} else {
|
||||
<div class="error">
|
||||
@Model.GenerationErrorMessage
|
||||
<p>Something went wrong ...</p>
|
||||
</div>
|
||||
}
|
@ -0,0 +1,216 @@
|
||||
@using Yavsc.Helpers
|
||||
@using System.IO
|
||||
@using System.Globalization
|
||||
@model IBillable
|
||||
@{
|
||||
Layout = null;
|
||||
var pro = ViewBag.PerformerProfile;
|
||||
var from = ViewBag.Performer;
|
||||
var to = ViewBag.Client;
|
||||
var PostalAddress = ViewBag.ClientAddress;
|
||||
var proaddr = ViewBag.PerformerOrganizationAddress;
|
||||
var proaddrm = proaddr;
|
||||
var isestimate = !ViewBag.AsBill;
|
||||
var prosign = new FileInfo($"{ViewBag.BillsDir}/sign-{ViewBag.BillingCode}-{Model.Id}.png");
|
||||
var clisign = new FileInfo($"{ViewBag.BillsDir}/sign-{ViewBag.BillingCode}-{Model.Id}.png");
|
||||
var activity = ViewBag.ActivityLabel;
|
||||
var bill = Model.GetBillItems();
|
||||
string validationDate = null ;
|
||||
if (Model.ValidationDate.HasValue) {
|
||||
validationDate = Model.ValidationDate.Value.ToString("dddd dd MMMM yyyy", CultureInfo.CreateSpecificCulture("fr-FR"));
|
||||
}
|
||||
}
|
||||
\documentclass[french,11pt]{article}
|
||||
\usepackage{eurosym}
|
||||
\usepackage{babel}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[a4paper]{geometry}
|
||||
\usepackage{units}
|
||||
\usepackage{bera}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{fp}
|
||||
|
||||
\def\TVA{20} % Taux de la TVA
|
||||
|
||||
\def\TotalHT{0}
|
||||
\def\TotalTVA{0}
|
||||
|
||||
\newcommand{\AjouterService}[3]{% Arguments : Désignation, quantité, prix
|
||||
\FPround{\prix}{#3}{2}
|
||||
\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}
|
||||
\FPround{\TotalTVA}{\TotalTVA}{2}
|
||||
\FPround{\TotalTTC}{\TotalTTC}{2}
|
||||
\global\let\TotalHT\TotalHT
|
||||
\global\let\TotalTVA\TotalTVA
|
||||
\global\let\TotalTTC\TotalTTC
|
||||
\cr
|
||||
\hline
|
||||
\textbf{Total} & & & \TotalHT
|
||||
}
|
||||
|
||||
\newcommand*\eaddto[2]{% version développée de \addto
|
||||
\edef\tmp{#2}%
|
||||
\expandafter\addto
|
||||
\expandafter#1%
|
||||
\expandafter{\tmp}%
|
||||
}
|
||||
|
||||
\newcommand{\ListeProduits}{}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%% A MODIFIER DANS LA FACTURE %%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\def\FactureNum {@Model.Id.ToString()} % Numéro de facture
|
||||
\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")) en @TeXHelpers.ToTeX(activity)} % Objet du document
|
||||
% Description de la facture
|
||||
\def\FactureDescr {
|
||||
@TeXHelpers.ToTeX(Model.GetDescription())
|
||||
}
|
||||
|
||||
% Infos Client
|
||||
\def\ClientNom{@TeXHelpers.ToTeX(to.UserName)} % Nom du client
|
||||
|
||||
\def\ClientAdresse{
|
||||
% Adresse du client
|
||||
@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)
|
||||
}
|
||||
|
||||
% Liste des produits facturés : Désignation, prix
|
||||
@foreach (var line in bill) {
|
||||
<text>\AjouterService{@TeXHelpers.ToTeX(line.Description)}{@line.Count}{@line.UnitaryCost.ToString("F2",CultureInfo.InvariantCulture)}
|
||||
</text>}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
|
||||
\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{ @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> }
|
||||
}
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
|
||||
% Logo de la société
|
||||
@if (from.Avatar != null) {
|
||||
<text>\includegraphics[height=60pt]{@(ViewBag.AvatarsDir)/@(from.UserName).png}
|
||||
</text>
|
||||
} else {
|
||||
<text>%\includegraphics{logo.png}
|
||||
</text>
|
||||
}
|
||||
% Nom et adresse de la société
|
||||
@TeXHelpers.ToTeX(from.UserName) \\
|
||||
@proaddr
|
||||
|
||||
@(isestimate?"Devis":"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 (\euro)} \\
|
||||
\hline
|
||||
\AfficheResultat{}
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
||||
\begin{flushright}
|
||||
\textit{Auto entreprise en franchise de TVA}\\
|
||||
|
||||
\end{flushright}
|
||||
~\\
|
||||
@if (ViewBag.AsBill) {
|
||||
|
||||
} else if (ViewBag.Acquitted) {
|
||||
<text>
|
||||
\ifthenelse{\equal{\FactureAcquittee}{oui}}{
|
||||
Facture acquittée.
|
||||
}
|
||||
</text>
|
||||
} else {
|
||||
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(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(@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}</text>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@if (validationDate!=null) {
|
||||
<text>
|
||||
\begin{flushright}
|
||||
@(new TeXString(isestimate?"Devis demandé le ":"Facture suite à la demande du ")+
|
||||
TeXHelpers.ToTeX(validationDate))
|
||||
\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}
|
@ -0,0 +1,13 @@
|
||||
|
||||
@model IBillable
|
||||
<div class="bill">
|
||||
|
||||
<a href="~/api/pdfbill/bill-@(Model.ActivityCode)-@(Model.Id).tex" >Export au format LaTeX</a>
|
||||
|
||||
|
||||
<form action="~/api/pdfbill/gen/@(Model.ActivityCode)-@Model.Id" method="POST">
|
||||
<input type="submit" value="Générer le Pdf"/>
|
||||
</form>
|
||||
|
||||
<a href="~/api/pdfbill/get/@(Model.Id)" >Télécharger le document généré</a>
|
||||
</div>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue