ticket labels e ticket receipt

This commit is contained in:
2026-05-10 14:09:57 +02:00
parent 385c3da0a5
commit 5c86483563
20 changed files with 1024 additions and 157 deletions

View File

@@ -0,0 +1,29 @@
enum DocumentType { ticket, ddt, invoice }
class DocumentSequence {
final String docType;
final int nextValue;
final String prefix;
DocumentSequence({
required this.docType,
required this.nextValue,
required this.prefix,
});
DocumentSequence copyWith({int? nextValue, String? prefix}) {
return DocumentSequence(
docType: docType,
nextValue: nextValue ?? this.nextValue,
prefix: prefix ?? this.prefix,
);
}
factory DocumentSequence.fromMap(Map<String, dynamic> map) {
return DocumentSequence(
docType: map['doc_type'],
nextValue: map['next_value'],
prefix: map['prefix'] ?? '',
);
}
}