54 lines
1.8 KiB
C#
54 lines
1.8 KiB
C#
namespace SIFinance.Modules.Finance.Dtos;
|
|
|
|
public record FactureEcheanceDto(int Id, DateOnly Date, decimal Montant, string Statut);
|
|
public record FactureJustificatifDto(string Nom, string Url);
|
|
|
|
public record FactureDto(
|
|
int Id,
|
|
string Numero,
|
|
int FournisseurId,
|
|
string Fournisseur,
|
|
decimal MontantHt,
|
|
decimal TauxTva,
|
|
decimal MontantTva,
|
|
decimal MontantTtc,
|
|
DateOnly DateFacture,
|
|
DateOnly DateEcheance,
|
|
string Statut,
|
|
int? DemandeAchatId,
|
|
int? AvoirLieId,
|
|
string? AvoirLieNumero,
|
|
decimal? AvoirLieMontant,
|
|
string? Commentaire,
|
|
bool EstDoublonSignale,
|
|
int? ContratId,
|
|
string? ContratObjet,
|
|
List<FactureEcheanceDto> Echeances,
|
|
List<FactureJustificatifDto>? Justificatifs = null);
|
|
|
|
// Le formulaire ne saisit qu'un montant TTC global (pas de ventilation HT/TVA à la création) —
|
|
// on applique un taux de TVA par défaut de 20% et on recalcule HT/TVA à partir du TTC saisi.
|
|
public record CreateFactureDto(string Numero, int FournisseurId, decimal Montant, DateOnly DateFacture, DateOnly DateEcheance, int? DemandeAchatId, string? Commentaire, int? ContratId);
|
|
|
|
public record UpdateFactureCommentaireDto(string? Commentaire);
|
|
|
|
public record UpdateFactureStatutDto(string Statut);
|
|
|
|
public record CreateEcheanceDto(DateOnly Date, decimal Montant);
|
|
|
|
public record UpdateEcheanceDto(DateOnly Date, decimal Montant);
|
|
|
|
// Résultat de l'analyse d'un PDF Factur-X/ZUGFeRD uploadé (réception de facture
|
|
// électronique) — Conforme=false si le PDF n'a pas de XML EN16931 embarqué, auquel cas
|
|
// les autres champs sont null et la saisie reste manuelle.
|
|
public record FacturXAnalyseDto(
|
|
bool Conforme,
|
|
string? Numero,
|
|
string? FournisseurNom,
|
|
decimal? MontantHt,
|
|
decimal? MontantTva,
|
|
decimal? MontantTtc,
|
|
DateOnly? DateFacture,
|
|
DateOnly? DateEcheance,
|
|
string? Erreur);
|