pub struct CreateExpenseDto {Show 13 fields
pub organization_id: String,
pub building_id: String,
pub category: ExpenseCategory,
pub description: String,
pub amount: Decimal,
pub expense_date: String,
pub supplier: Option<String>,
pub invoice_number: Option<String>,
pub account_code: Option<String>,
pub amount_excl_vat: Option<Decimal>,
pub vat_rate: Option<Decimal>,
pub due_date: Option<String>,
pub line_items: Option<Vec<NouvelleLigneDeFactureDto>>,
}Fields§
§organization_id: String§building_id: String§category: ExpenseCategory§description: String§amount: DecimalMontant TTC (validé > 0 dans Expense::new). Decimal exact (cf. ADR-0007).
expense_date: String§supplier: Option<String>§invoice_number: Option<String>§account_code: Option<String>Optional Belgian PCMN account code (e.g., “604001” for electricity) Must reference an existing account in the organization’s chart of accounts
amount_excl_vat: Option<Decimal>Montant HT. Fourni avec vat_rate, la TVA est calculée et le TTC
déduit ; amount est alors ignoré au profit du calcul exact.
vat_rate: Option<Decimal>Taux de TVA en POURCENTAGE (21.0 pour 21 %), validé 0..=100.
due_date: Option<String>Échéance de règlement fournisseur (ISO 8601).
line_items: Option<Vec<NouvelleLigneDeFactureDto>>Le détail de la facture, quand elle est saisie ligne par ligne.
Absent en saisie simple : la dépense ne porte alors que ses totaux.
Trait Implementations§
Source§impl Clone for CreateExpenseDto
impl Clone for CreateExpenseDto
Source§fn clone(&self) -> CreateExpenseDto
fn clone(&self) -> CreateExpenseDto
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComposeSchema for CreateExpenseDto
impl ComposeSchema for CreateExpenseDto
Source§impl Debug for CreateExpenseDto
impl Debug for CreateExpenseDto
Source§impl<'de> Deserialize<'de> for CreateExpenseDto
impl<'de> Deserialize<'de> for CreateExpenseDto
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ToSchema for CreateExpenseDto
impl ToSchema for CreateExpenseDto
Auto Trait Implementations§
impl Freeze for CreateExpenseDto
impl RefUnwindSafe for CreateExpenseDto
impl Send for CreateExpenseDto
impl Sync for CreateExpenseDto
impl Unpin for CreateExpenseDto
impl UnsafeUnpin for CreateExpenseDto
impl UnwindSafe for CreateExpenseDto
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.