ebInterface generator
eb_interface_rs
rounds after all calculations are doneeb_interface_rs
uses theMidpointAwayFromZero
rounding strategy
- minimal invoice
Invoice::new(
"test",
"EUR",
"993433000298",
"2020-01-01",
Biller::new("ATU51507409"),
InvoiceRecipient::new("ATU18708634"),
)
.with_item(
DetailsItem::new(
Decimal::from(100),
"STK",
Decimal::new(1020, 2),
TaxItem::new(Decimal::from(20), TaxCategory::S),
)
.with_description("Schraubenzieher"),
)
.with_document_title("An invoice")
.with_language("de")
.with_payment_method(
PaymentMethod::payment_card(
PaymentMethodPaymentCard::new("123456*4321")
.unwrap()
.with_card_holder_name("Name"),
)
.with_comment("Comment"),
)
.to_xml(); // returns "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Invoice>...</Invoice>"
Reference: https://www.wko.at/service/netzwerke/ebinterface-aktuelle-version-xml-rechnungsstandard.html
Validate: https://labs.ebinterface.at/labs