Skip to main content

IcmsPartData

Struct IcmsPartData 

Source
#[non_exhaustive]
pub struct IcmsPartData {
Show 21 fields pub orig: String, pub cst: String, pub mod_bc: String, pub v_bc: Cents, pub p_red_bc: Option<Rate>, pub p_icms: Rate, pub v_icms: Cents, pub mod_bc_st: String, pub p_mva_st: Option<Rate>, pub p_red_bc_st: Option<Rate>, pub v_bc_st: Cents, pub p_icms_st: Rate, pub v_icms_st: Cents, pub v_bc_fcp_st: Option<Cents>, pub p_fcp_st: Option<Rate>, pub v_fcp_st: Option<Cents>, pub p_bc_op: Rate, pub uf_st: String, pub v_icms_deson: Option<Cents>, pub mot_des_icms: Option<String>, pub ind_deduz_deson: Option<String>,
}
Expand description

Data for building the ICMSPart XML group (ICMS partition between states).

Used for interstate operations where the ICMS is split between origin and destination states.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§orig: String

Product origin code (orig).

§cst: String

ICMS CST code.

§mod_bc: String

Base calculation modality (modBC).

§v_bc: Cents

ICMS calculation base value (vBC).

§p_red_bc: Option<Rate>

Base reduction rate (pRedBC). Optional.

§p_icms: Rate

ICMS rate (pICMS).

§v_icms: Cents

ICMS value (vICMS).

§mod_bc_st: String

ST base calculation modality (modBCST).

§p_mva_st: Option<Rate>

ST added value margin (pMVAST). Optional.

§p_red_bc_st: Option<Rate>

ST base reduction rate (pRedBCST). Optional.

§v_bc_st: Cents

ST calculation base value (vBCST).

§p_icms_st: Rate

ST rate (pICMSST).

§v_icms_st: Cents

ST value (vICMSST).

§v_bc_fcp_st: Option<Cents>

FCP-ST calculation base (vBCFCPST). Optional.

§p_fcp_st: Option<Rate>

FCP-ST rate (pFCPST). Optional.

§v_fcp_st: Option<Cents>

FCP-ST value (vFCPST). Optional.

§p_bc_op: Rate

Partition percentage applied at origin state (pBCOp).

§uf_st: String

Destination state abbreviation for ST (UFST).

§v_icms_deson: Option<Cents>

Desonerated ICMS value (vICMSDeson). Optional.

§mot_des_icms: Option<String>

Reason code for ICMS desoneration (motDesICMS). Optional.

§ind_deduz_deson: Option<String>

Indicator whether desoneration is deducted (indDeduzDeson). Optional.

Implementations§

Source§

impl IcmsPartData

Source

pub fn new( orig: impl Into<String>, cst: impl Into<String>, mod_bc: impl Into<String>, v_bc: Cents, p_icms: Rate, v_icms: Cents, mod_bc_st: impl Into<String>, v_bc_st: Cents, p_icms_st: Rate, v_icms_st: Cents, p_bc_op: Rate, uf_st: impl Into<String>, ) -> Self

Create a new IcmsPartData with all required fields.

Source

pub fn p_red_bc(self, v: Rate) -> Self

Set the ICMS base reduction rate (pRedBC).

Source

pub fn p_mva_st(self, v: Rate) -> Self

Set the ST added value margin (pMVAST).

Source

pub fn p_red_bc_st(self, v: Rate) -> Self

Set the ST base reduction rate (pRedBCST).

Source

pub fn v_bc_fcp_st(self, v: Cents) -> Self

Set the FCP-ST calculation base (vBCFCPST).

Source

pub fn p_fcp_st(self, v: Rate) -> Self

Set the FCP-ST rate (pFCPST).

Source

pub fn v_fcp_st(self, v: Cents) -> Self

Set the FCP-ST value (vFCPST).

Source

pub fn v_icms_deson(self, v: Cents) -> Self

Set the desonerated ICMS value (vICMSDeson).

Source

pub fn mot_des_icms(self, v: impl Into<String>) -> Self

Set the ICMS desoneration reason code (motDesICMS).

Source

pub fn ind_deduz_deson(self, v: impl Into<String>) -> Self

Set the desoneration deduction indicator (indDeduzDeson).

Trait Implementations§

Source§

impl Clone for IcmsPartData

Source§

fn clone(&self) -> IcmsPartData

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IcmsPartData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.