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(
dec!(100),
"STK",
dec!(10.20),
TaxItem::new(dec!(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
cargo watch -x test