pub struct ProjectRevenue {Show 16 fields
pub id: String,
pub project_id: String,
pub entity_id: String,
pub period_start: NaiveDate,
pub period_end: NaiveDate,
pub contract_value: Decimal,
pub estimated_total_cost: Decimal,
pub costs_to_date: Decimal,
pub completion_pct: Decimal,
pub method: RevenueMethod,
pub measure: CompletionMeasure,
pub cumulative_revenue: Decimal,
pub period_revenue: Decimal,
pub billed_to_date: Decimal,
pub unbilled_revenue: Decimal,
pub gross_margin_pct: Decimal,
}Expand description
Revenue recognition for a project period.
Fields§
§id: StringUnique revenue record ID
project_id: StringProject ID
entity_id: StringEntity ID (billing entity)
period_start: NaiveDatePeriod start
period_end: NaiveDatePeriod end
contract_value: DecimalTotal contract value
estimated_total_cost: DecimalTotal estimated cost at completion
costs_to_date: DecimalCosts incurred to date
completion_pct: DecimalCompletion percentage (0.00 to 1.00)
method: RevenueMethodRevenue method
measure: CompletionMeasureCompletion measure
cumulative_revenue: DecimalCumulative revenue recognized to date
period_revenue: DecimalRevenue recognized in this period
billed_to_date: DecimalCumulative amount billed to customer
unbilled_revenue: DecimalUnbilled revenue (cumulative_revenue - billed_to_date)
gross_margin_pct: DecimalEstimated gross margin percentage
Implementations§
Source§impl ProjectRevenue
impl ProjectRevenue
Sourcepub fn computed_completion_pct(&self) -> Decimal
pub fn computed_completion_pct(&self) -> Decimal
Computes the PoC completion percentage (cost-to-cost method).
Sourcepub fn computed_cumulative_revenue(&self) -> Decimal
pub fn computed_cumulative_revenue(&self) -> Decimal
Computes the cumulative revenue based on PoC.
Sourcepub fn computed_unbilled_revenue(&self) -> Decimal
pub fn computed_unbilled_revenue(&self) -> Decimal
Computes the unbilled revenue.
Sourcepub fn computed_gross_margin_pct(&self) -> Decimal
pub fn computed_gross_margin_pct(&self) -> Decimal
Computes estimated gross margin percentage.
Trait Implementations§
Source§impl Clone for ProjectRevenue
impl Clone for ProjectRevenue
Source§fn clone(&self) -> ProjectRevenue
fn clone(&self) -> ProjectRevenue
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 ProjectRevenue
impl Debug for ProjectRevenue
Source§impl<'de> Deserialize<'de> for ProjectRevenue
impl<'de> Deserialize<'de> for ProjectRevenue
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
Auto Trait Implementations§
impl Freeze for ProjectRevenue
impl RefUnwindSafe for ProjectRevenue
impl Send for ProjectRevenue
impl Sync for ProjectRevenue
impl Unpin for ProjectRevenue
impl UnsafeUnpin for ProjectRevenue
impl UnwindSafe for ProjectRevenue
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