#[non_exhaustive]pub struct IsData {
pub cst_is: String,
pub c_class_trib_is: String,
pub v_bc_is: Option<String>,
pub p_is: Option<String>,
pub p_is_espec: Option<String>,
pub u_trib: Option<String>,
pub q_trib: Option<String>,
pub v_is: String,
}Expand description
IS (Imposto Seletivo / IBS+CBS) input data – PL_010 tax reform.
Goes inside <imposto> as an alternative/addition to ICMS.
String fields are pre-formatted (e.g. “100.00”, “5.0000”) because the IS schema uses mixed decimal precisions that don’t map to a single cents/rate convention.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cst_is: StringIS tax situation code
c_class_trib_is: StringIS tax classification code
v_bc_is: Option<String>Tax base (optional, e.g. “100.00”)
p_is: Option<String>IS rate (optional, e.g. “5.0000”)
p_is_espec: Option<String>Specific rate (optional, e.g. “1.5000”)
u_trib: Option<String>Taxable unit of measure (optional, e.g. “LT”)
q_trib: Option<String>Taxable quantity (optional, e.g. “10.0000”)
v_is: StringIS tax value (e.g. “5.00”)
Implementations§
Source§impl IsData
impl IsData
Sourcepub fn new(
cst_is: impl Into<String>,
c_class_trib_is: impl Into<String>,
v_is: impl Into<String>,
) -> Self
pub fn new( cst_is: impl Into<String>, c_class_trib_is: impl Into<String>, v_is: impl Into<String>, ) -> Self
Create a new IsData with required fields.
cst_is is the IS tax situation code, c_class_trib_is is the
IS classification code, and v_is is the pre-formatted IS value string
(e.g. "5.00").
Sourcepub fn v_bc_is(self, v: impl Into<String>) -> Self
pub fn v_bc_is(self, v: impl Into<String>) -> Self
Set the IS calculation base (vBCIS), e.g. "100.00".
Sourcepub fn p_is(self, v: impl Into<String>) -> Self
pub fn p_is(self, v: impl Into<String>) -> Self
Set the IS ad-valorem rate (pIS), e.g. "5.0000".
Sourcepub fn p_is_espec(self, v: impl Into<String>) -> Self
pub fn p_is_espec(self, v: impl Into<String>) -> Self
Set the IS specific rate (pISEspec), e.g. "1.5000".
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IsData
impl<'de> Deserialize<'de> for IsData
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>,
Source§impl TaxCalculation for IsData
impl TaxCalculation for IsData
Source§fn build_xml(&self) -> String
fn build_xml(&self) -> String
Build the IS (IBS/CBS) XML string, delegating to build_is_xml.