pub struct AssetTransfer {Show 17 fields
pub transfer_id: String,
pub asset_number: String,
pub sub_number: String,
pub transfer_date: NaiveDate,
pub transfer_type: TransferType,
pub from_company: String,
pub to_company: String,
pub from_cost_center: Option<String>,
pub to_cost_center: Option<String>,
pub from_location: Option<String>,
pub to_location: Option<String>,
pub transfer_value: Decimal,
pub accumulated_depreciation: Decimal,
pub status: TransferStatus,
pub created_by: String,
pub created_at: DateTime<Utc>,
pub notes: Option<String>,
}Expand description
Asset transfer (between locations or entities).
Fields§
§transfer_id: StringTransfer ID.
asset_number: StringAsset number.
sub_number: StringSub-number.
transfer_date: NaiveDateTransfer date.
transfer_type: TransferTypeTransfer type.
from_company: StringFrom company code.
to_company: StringTo company code.
from_cost_center: Option<String>From cost center.
to_cost_center: Option<String>To cost center.
from_location: Option<String>From location.
to_location: Option<String>To location.
transfer_value: DecimalTransfer value.
accumulated_depreciation: DecimalAccumulated depreciation transferred.
status: TransferStatusStatus.
created_by: StringCreated by.
created_at: DateTime<Utc>Created at.
notes: Option<String>Notes.
Implementations§
Source§impl AssetTransfer
impl AssetTransfer
Sourcepub fn new(
transfer_id: String,
asset: &FixedAssetRecord,
transfer_date: NaiveDate,
transfer_type: TransferType,
to_company: String,
created_by: String,
) -> Self
pub fn new( transfer_id: String, asset: &FixedAssetRecord, transfer_date: NaiveDate, transfer_type: TransferType, to_company: String, created_by: String, ) -> Self
Creates a new asset transfer.
Sourcepub fn to_cost_center(self, cost_center: String) -> Self
pub fn to_cost_center(self, cost_center: String) -> Self
Sets destination cost center.
Sourcepub fn to_location(self, location: String) -> Self
pub fn to_location(self, location: String) -> Self
Sets destination location.
Sourcepub fn is_intercompany(&self) -> bool
pub fn is_intercompany(&self) -> bool
Is intercompany transfer.
Trait Implementations§
Source§impl Clone for AssetTransfer
impl Clone for AssetTransfer
Source§fn clone(&self) -> AssetTransfer
fn clone(&self) -> AssetTransfer
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 AssetTransfer
impl Debug for AssetTransfer
Source§impl<'de> Deserialize<'de> for AssetTransfer
impl<'de> Deserialize<'de> for AssetTransfer
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 AssetTransfer
impl RefUnwindSafe for AssetTransfer
impl Send for AssetTransfer
impl Sync for AssetTransfer
impl Unpin for AssetTransfer
impl UnwindSafe for AssetTransfer
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