pub struct Budget {Show 16 fields
pub id: Uuid,
pub acp_id: Uuid,
pub organization_id: Uuid,
pub building_id: Uuid,
pub fiscal_year: i32,
pub ordinary_budget: Decimal,
pub extraordinary_budget: Decimal,
pub total_budget: Decimal,
pub status: BudgetStatus,
pub submitted_date: Option<DateTime<Utc>>,
pub approved_date: Option<DateTime<Utc>>,
pub approved_by_meeting_id: Option<Uuid>,
pub monthly_provision_amount: Decimal,
pub notes: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Représente un budget annuel de copropriété (ordinaire + extraordinaire)
Obligation légale belge: Le budget doit être voté en AG avant le début de l’exercice fiscal. Il détermine les provisions mensuelles à appeler auprès des copropriétaires.
Fields§
§id: Uuid§acp_id: UuidL’ACP dont ce budget est le budget.
Deux faits distincts, et c’est leur confusion qui a fait appartenir le dossier de gestion au syndic (ADR-0045) : le budget prévisionnel est préparé par le syndic (Art. 3.89 § 5, 16°) mais appartient à l’ACP, qui le vote et le supporte. Le mandat change, le budget reste.
organization_id: UuidLe syndic qui a préparé ce budget, conservé comme trace d’auteur.
N’entre dans aucun prédicat d’autorisation : le périmètre d’un syndic
se dérive de son mandat, cf. perimetre_du_mandataire.
building_id: Uuid§fiscal_year: i32Année fiscale (ex: 2025)
ordinary_budget: DecimalBudget charges ordinaires (€) - Charges courantes récurrentes
extraordinary_budget: DecimalBudget charges extraordinaires (€) - Travaux et dépenses exceptionnelles
total_budget: DecimalBudget total (€) = ordinaire + extraordinaire
status: BudgetStatusStatut du budget
submitted_date: Option<DateTime<Utc>>Date de soumission pour vote AG
approved_date: Option<DateTime<Utc>>Date d’approbation par l’AG
approved_by_meeting_id: Option<Uuid>ID de l’AG qui a approuvé le budget
monthly_provision_amount: DecimalMontant mensuel des provisions à appeler (€) = total_budget / 12 mois
notes: Option<String>Notes / Commentaires
created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl Budget
impl Budget
pub fn new( acp_id: Uuid, organization_id: Uuid, building_id: Uuid, fiscal_year: i32, ordinary_budget: Decimal, extraordinary_budget: Decimal, ) -> Result<Self, String>
Sourcepub fn submit_for_approval(&mut self) -> Result<(), String>
pub fn submit_for_approval(&mut self) -> Result<(), String>
Soumet le budget pour vote en AG
Sourcepub fn approve(&mut self, meeting_id: Uuid) -> Result<(), String>
pub fn approve(&mut self, meeting_id: Uuid) -> Result<(), String>
Approuve le budget (vote AG positif)
Sourcepub fn update_amounts(
&mut self,
ordinary_budget: Decimal,
extraordinary_budget: Decimal,
) -> Result<(), String>
pub fn update_amounts( &mut self, ordinary_budget: Decimal, extraordinary_budget: Decimal, ) -> Result<(), String>
Met à jour les montants du budget (uniquement en Draft)
Sourcepub fn update_notes(&mut self, notes: String)
pub fn update_notes(&mut self, notes: String)
Ajoute/met à jour les notes
Sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Vérifie si le budget est actif (approuvé et pas encore archivé)
Sourcepub fn is_editable(&self) -> bool
pub fn is_editable(&self) -> bool
Vérifie si le budget peut être modifié
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Budget
impl<'de> Deserialize<'de> for Budget
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>,
Source§impl From<Budget> for BudgetResponse
impl From<Budget> for BudgetResponse
Source§impl PieceDeGestion for Budget
impl PieceDeGestion for Budget
impl StructuralPartialEq for Budget
Auto Trait Implementations§
impl Freeze for Budget
impl RefUnwindSafe for Budget
impl Send for Budget
impl Sync for Budget
impl Unpin for Budget
impl UnsafeUnpin for Budget
impl UnwindSafe for Budget
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
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>
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>
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 more