pub struct CallForFunds {Show 16 fields
pub id: Uuid,
pub organization_id: Uuid,
pub building_id: Uuid,
pub title: String,
pub description: String,
pub total_amount: f64,
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>,
}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§organization_id: Uuid§building_id: Uuid§title: String§description: String§total_amount: f64§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>Implementations§
Source§impl CallForFunds
impl CallForFunds
pub fn new( organization_id: Uuid, building_id: Uuid, title: String, description: String, total_amount: f64, contribution_type: ContributionType, call_date: DateTime<Utc>, due_date: DateTime<Utc>, account_code: Option<String>, ) -> Result<Self, String>
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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CallForFunds> for CallForFundsResponse
impl From<CallForFunds> for CallForFundsResponse
Source§fn from(call: CallForFunds) -> Self
fn from(call: CallForFunds) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CallForFunds
impl PartialEq 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 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
Mutably borrows from an owned value. Read more
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.