en16931_peppol 0.1.2 copy "en16931_peppol: ^0.1.2" to clipboard
en16931_peppol: ^0.1.2 copied to clipboard

The Peppol BIS Billing 3.0 profile of the European electronic invoice: the identifiers it is claimed under, and the rules Peppol adds to EN 16931.

example/example.dart

// ignore_for_file: avoid_print

import 'package:en16931/en16931.dart';
import 'package:en16931_peppol/en16931_peppol.dart';

/// Builds an invoice claimed under Peppol and checks it against the standard
/// and the profile at once.
void main() {
  final invoice = Invoice.fromLines(
    number: '2026-0042',
    issueDate: DateTime(2026, 9, 13),
    dueDate: DateTime(2026, 10, 13),
    specificationIdentifier: peppolSpecification,
    businessProcess: peppolBillingProcess,
    buyerReference: 'PO-77812',
    seller: const Seller(
      name: 'COMAPPS SRL',
      vatIdentifier: 'BE0123456789',
      electronicAddress: Identifier(
        '0123456749',
        scheme: Scheme.belgianEnterprise,
      ),
      address: Address(city: 'Bruxelles', postalCode: '1000', country: 'BE'),
    ),
    buyer: const Buyer(
      name: 'Client SA',
      electronicAddress: Identifier(
        '0987654394',
        scheme: Scheme.belgianEnterprise,
      ),
      address: Address(city: 'Namur', postalCode: '5000', country: 'BE'),
    ),
    lines: [
      InvoiceLine.of(
        id: '1',
        item: const Item(name: 'Consulting'),
        quantity: 8,
        unitPrice: 150.00,
        vatRate: 21,
        unit: UnitCode.hour,
      ),
    ],
  );

  final violations = validatePeppol(invoice);
  print(violations.isEmpty ? 'ready for the network' : 'not yet:');
  for (final violation in violations) {
    print('  $violation');
  }
}
0
likes
160
points
134
downloads

Documentation

API reference

Publisher

verified publishercomapps.be

Weekly Downloads

The Peppol BIS Billing 3.0 profile of the European electronic invoice: the identifiers it is claimed under, and the rules Peppol adds to EN 16931.

Homepage
Repository (GitHub)
View/report issues

Topics

#einvoicing #en16931 #peppol #invoice #vat

License

MIT (license)

Dependencies

decimal, en16931

More

Packages that depend on en16931_peppol