pub struct CallForFunds {Show 19 fields
pub id: Uuid,
pub acp_id: Uuid,
pub organization_id: Uuid,
pub building_id: Uuid,
pub title: String,
pub description: String,
pub total_amount: Decimal,
pub reserve_fund_share: Decimal,
pub contribution_type: ContributionType,
pub call_date: DateTime<Utc>,
pub due_date: DateTime<Utc>,
pub sent_date: Option<DateTime<Utc>>,
pub status: CallForFundsStatus,
pub account_code: Option<String>,
pub notes: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub created_by: Option<Uuid>,
pub fund_id: Option<Uuid>,
}Expand description
Call for Funds (Appel de Fonds Collectif)
Represents a payment request sent by the Syndic to all owners of a building Automatically generates individual OwnerContribution records based on ownership percentages
Fields§
§id: Uuid§acp_id: UuidL’ACP au nom de laquelle les fonds sont appelés.
Art. 3.86 § 3 : le patrimoine de l’ACP « est constitué par des apports périodiques des copropriétaires décidés par l’assemblée générale ». Le syndic lance l’appel, l’ACP en est créancière. Le mandat s’éteint, la créance reste. Cf. ADR-0045.
organization_id: UuidLe syndic qui a lancé l’appel, conservé comme trace d’auteur.
N’entre dans aucun prédicat d’autorisation.
building_id: Uuid§title: String§description: String§total_amount: DecimalPart du montant appelé qui alimentera le fonds de réserve.
Art. 3.86 § 3, alinéa 7 : « Le syndic communique à toutes les parties concernées lors de l’appel de fonds quelle part sera affectée au fonds de réserve. »
L’obligation n’est pas d’affichage : le fonds de réserve est la part qu’un copropriétaire ne récupère pas en vendant son lot (elle suit le lot, pas le vendeur). Il doit donc savoir ce qu’il y verse au moment où on le lui réclame, et non le découvrir à la mutation.
Zéro est licite et explicite : toutes les charges n’alimentent pas le fonds. Ce qui ne l’est pas, c’est de ne rien dire.
contribution_type: ContributionType§call_date: DateTime<Utc>§due_date: DateTime<Utc>§sent_date: Option<DateTime<Utc>>§status: CallForFundsStatus§account_code: Option<String>§notes: Option<String>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>§created_by: Option<Uuid>§fund_id: Option<Uuid>Le fonds alimenté par cet appel (roulement/réserve/affecté).
Issue #635 — posé après construction (à l’image de created_by),
jamais comme argument de constructeur : aucune des dizaines de sites
d’appel existants de CallForFunds::new n’a besoin de connaître le
fonds au moment de la création de l’appel.
Implementations§
Source§impl CallForFunds
impl CallForFunds
pub fn new( acp_id: Uuid, organization_id: Uuid, building_id: Uuid, title: String, description: String, total_amount: Decimal, contribution_type: ContributionType, call_date: DateTime<Utc>, due_date: DateTime<Utc>, account_code: Option<String>, reserve_fund_share: Decimal, ) -> Result<Self, CallForFundsError>
Sourcepub fn attach_to_fund(&mut self, fund_id: Uuid)
pub fn attach_to_fund(&mut self, fund_id: Uuid)
Rattache cet appel au fonds qu’il alimente (issue #635).
Sourcepub fn mark_as_sent(&mut self)
pub fn mark_as_sent(&mut self)
Mark as sent to owners
Sourcepub fn mark_as_completed(&mut self)
pub fn mark_as_completed(&mut self)
Mark as completed (all owners paid)
Sourcepub fn is_overdue(&self) -> bool
pub fn is_overdue(&self) -> bool
Check if overdue (past due date and not completed)
Trait Implementations§
Source§impl Clone for CallForFunds
impl Clone for CallForFunds
Source§fn clone(&self) -> CallForFunds
fn clone(&self) -> CallForFunds
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CallForFunds
impl Debug for CallForFunds
Source§impl<'de> Deserialize<'de> for CallForFunds
impl<'de> Deserialize<'de> for CallForFunds
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<CallForFunds> for CallForFundsResponse
impl From<CallForFunds> for CallForFundsResponse
Source§fn from(call: CallForFunds) -> Self
fn from(call: CallForFunds) -> Self
Source§impl PartialEq for CallForFunds
impl PartialEq for CallForFunds
Source§fn eq(&self, other: &CallForFunds) -> bool
fn eq(&self, other: &CallForFunds) -> bool
self and other values to be equal, and is used by ==.Source§impl PieceDeGestion for CallForFunds
impl PieceDeGestion for CallForFunds
Source§impl Serialize for CallForFunds
impl Serialize for CallForFunds
impl StructuralPartialEq for CallForFunds
Auto Trait Implementations§
impl Freeze for CallForFunds
impl RefUnwindSafe for CallForFunds
impl Send for CallForFunds
impl Sync for CallForFunds
impl Unpin for CallForFunds
impl UnsafeUnpin for CallForFunds
impl UnwindSafe for CallForFunds
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