pub enum PaymentTerms {
Show 14 variants
Immediate,
Net10,
Net15,
Net30,
Net45,
Net60,
Net90,
TwoTenNet30,
OneTenNet30,
TwoFifteenNet45,
EndOfMonth,
EndOfMonthPlus30,
CashOnDelivery,
Prepayment,
}Expand description
Payment terms for vendor/customer relationships.
Variants§
Immediate
Due immediately
Net10
Net 10 days
Net15
Net 15 days
Net30
Net 30 days (most common)
Net45
Net 45 days
Net60
Net 60 days
Net90
Net 90 days
TwoTenNet30
2% discount if paid within 10 days, otherwise net 30
OneTenNet30
1% discount if paid within 10 days, otherwise net 30
TwoFifteenNet45
2% discount if paid within 15 days, otherwise net 45
EndOfMonth
End of month
EndOfMonthPlus30
End of month plus 30 days
CashOnDelivery
Cash on delivery
Prepayment
Prepayment required
Implementations§
Source§impl PaymentTerms
impl PaymentTerms
Sourcepub fn early_payment_discount(&self) -> Option<(u16, Decimal)>
pub fn early_payment_discount(&self) -> Option<(u16, Decimal)>
Get discount percentage if paid early.
Sourcepub fn requires_prepayment(&self) -> bool
pub fn requires_prepayment(&self) -> bool
Check if this requires prepayment.
Sourcepub fn discount_days(&self) -> Option<u16>
pub fn discount_days(&self) -> Option<u16>
Get the discount days (days within which discount applies).
Sourcepub fn discount_percent(&self) -> Option<Decimal>
pub fn discount_percent(&self) -> Option<Decimal>
Get the discount percent.
Trait Implementations§
Source§impl Clone for PaymentTerms
impl Clone for PaymentTerms
Source§fn clone(&self) -> PaymentTerms
fn clone(&self) -> PaymentTerms
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 PaymentTerms
impl Debug for PaymentTerms
Source§impl Default for PaymentTerms
impl Default for PaymentTerms
Source§fn default() -> PaymentTerms
fn default() -> PaymentTerms
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PaymentTerms
impl<'de> Deserialize<'de> for PaymentTerms
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 Hash for PaymentTerms
impl Hash for PaymentTerms
Source§impl PartialEq for PaymentTerms
impl PartialEq for PaymentTerms
Source§impl Serialize for PaymentTerms
impl Serialize for PaymentTerms
impl Copy for PaymentTerms
impl Eq for PaymentTerms
impl StructuralPartialEq for PaymentTerms
Auto Trait Implementations§
impl Freeze for PaymentTerms
impl RefUnwindSafe for PaymentTerms
impl Send for PaymentTerms
impl Sync for PaymentTerms
impl Unpin for PaymentTerms
impl UnwindSafe for PaymentTerms
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.