zugferd_code_lists/zugferd_2_3_2/
enum1001.rs

1#![allow(non_camel_case_types)]
2
3#[cfg_attr(feature = "specta", derive(specta::Type))]
4#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
6pub enum Enum1001 {
7    /// Request for payment
8    ///
9    /// Invoice
10    RequestForPayment,
11    /// Debit note related to goods or services
12    ///
13    /// Invoice
14    DebitNoteRelatedToGoodsOrServices,
15    /// Credit note related to goods or services
16    ///
17    /// Credit Note
18    CreditNoteRelatedToGoodsOrServices,
19    /// Metered services invoice
20    ///
21    /// Invoice
22    MeteredServicesInvoice,
23    /// Credit note related to financial adjustments
24    ///
25    /// Credit Note
26    CreditNoteRelatedToFinancialAdjustments,
27    /// Debit note related to financial adjustments
28    ///
29    /// Invoice
30    DebitNoteRelatedToFinancialAdjustments,
31    /// Tax notification
32    ///
33    /// Invoice
34    TaxNotification,
35    /// Invoicing data sheet
36    ///
37    /// Invoice
38    InvoicingDataSheet,
39    /// Direct payment valuation
40    ///
41    /// Invoice
42    DirectPaymentValuation,
43    /// Provisional payment valuation
44    ///
45    /// Invoice
46    ProvisionalPaymentValuation,
47    /// Payment valuation
48    ///
49    /// Invoice
50    PaymentValuation,
51    /// Interim application for payment
52    ///
53    /// Invoice
54    InterimApplicationForPayment,
55    /// Final payment request based on completion of work
56    ///
57    /// Invoice
58    FinalPaymentRequestBasedOnCompletionWork,
59    /// Payment request for completed units
60    ///
61    /// Invoice
62    PaymentRequestForCompletedUnits,
63    /// Self billed credit note
64    ///
65    /// Credit Note
66    SelfBilledCreditNote,
67    /// Consolidated credit note - goods and services
68    ///
69    /// Credit Note
70    ConsolidatedCreditNoteGoodsAndServices,
71    /// Price variation invoice
72    ///
73    /// Invoice
74    PriceVariationInvoice,
75    /// Credit note for price variation
76    ///
77    /// Credit Note
78    CreditNoteForPriceVariation,
79    /// Delcredere credit note
80    ///
81    /// Credit Note
82    DelcredereCreditNote,
83    /// Proforma invoice
84    ///
85    /// Invoice
86    ProformaInvoice,
87    /// Partial invoice
88    ///
89    /// Invoice
90    PartialInvoice,
91    /// Commercial invoice which includes a packing list
92    ///
93    /// Invoice
94    CommercialInvoiceWhichIncludesAPackingList,
95    /// Commercial invoice
96    ///
97    /// Invoice
98    CommercialInvoice,
99    /// Credit note
100    ///
101    /// Credit Note
102    CreditNote,
103    /// Commission note
104    ///
105    /// Invoice
106    CommissionNote,
107    /// Debit note
108    ///
109    /// Invoice
110    DebitNote,
111    /// Corrected invoice
112    ///
113    /// Invoice
114    CorrectedInvoice,
115    /// Consolidated invoice
116    ///
117    /// Invoice
118    ConsolidatedInvoice,
119    /// Prepayment invoice
120    ///
121    /// Invoice
122    PrepaymentInvoice,
123    /// Hire invoice
124    ///
125    /// Invoice
126    HireInvoice,
127    /// Tax invoice
128    ///
129    /// Invoice
130    TaxInvoice,
131    /// Self-billed invoice
132    ///
133    /// Invoice
134    SelfBilledInvoice,
135    /// Delcredere invoice
136    ///
137    /// Invoice
138    DelcredereInvoice,
139    /// Factored invoice
140    ///
141    /// Invoice
142    FactoredInvoice,
143    /// Lease invoice
144    ///
145    /// Invoice
146    LeaseInvoice,
147    /// Consignment invoice
148    ///
149    /// Invoice
150    ConsignmentInvoice,
151    /// Factored credit note
152    ///
153    /// Credit Note
154    FactoredCreditNote,
155    /// Optical Character Reading (OCR) payment credit note
156    ///
157    /// Credit Note
158    OpticalCharacterReadingOcrPaymentCreditNote,
159    /// Debit advice
160    ///
161    /// Invoice
162    DebitAdvice,
163    /// Reversal of debit
164    ///
165    /// Invoice
166    ReversalDebit,
167    /// Reversal of credit
168    ///
169    /// Credit Note
170    ReversalCredit,
171    /// Self billed debit note
172    ///
173    /// Invoice
174    SelfBilledDebitNote,
175    /// Forwarder's credit note
176    ///
177    /// Credit Note
178    ForwardersCreditNote,
179    /// Forwarder's invoice discrepancy report
180    ///
181    /// Invoice
182    ForwardersInvoiceDiscrepancyReport,
183    /// Insurer's invoice
184    ///
185    /// Invoice
186    InsurersInvoice,
187    /// Forwarder's invoice
188    ///
189    /// Invoice
190    ForwardersInvoice,
191    /// Port charges documents
192    ///
193    /// Invoice
194    PortChargesDocuments,
195    /// Invoice information for accounting purposes
196    ///
197    /// Invoice
198    InvoiceInformationForAccountingPurposes,
199    /// Freight invoice
200    ///
201    /// Invoice
202    FreightInvoice,
203    /// Claim notification
204    ///
205    /// Invoice
206    ClaimNotification,
207    /// Consular invoice
208    ///
209    /// Invoice
210    ConsularInvoice,
211    /// Partial construction invoice
212    ///
213    /// Invoice
214    PartialConstructionInvoice,
215    /// Partial final construction invoice
216    ///
217    /// Invoice
218    PartialFinalConstructionInvoice,
219    /// Final construction invoice
220    ///
221    /// Invoice
222    FinalConstructionInvoice,
223    /// Customs invoice
224    ///
225    /// Invoice
226    CustomsInvoice,
227}
228
229impl crate::Code for Enum1001 {
230    fn code(self) -> &'static str {
231        match self {
232            Enum1001::RequestForPayment => "71",
233            Enum1001::DebitNoteRelatedToGoodsOrServices => "80",
234            Enum1001::CreditNoteRelatedToGoodsOrServices => "81",
235            Enum1001::MeteredServicesInvoice => "82",
236            Enum1001::CreditNoteRelatedToFinancialAdjustments => "83",
237            Enum1001::DebitNoteRelatedToFinancialAdjustments => "84",
238            Enum1001::TaxNotification => "102",
239            Enum1001::InvoicingDataSheet => "130",
240            Enum1001::DirectPaymentValuation => "202",
241            Enum1001::ProvisionalPaymentValuation => "203",
242            Enum1001::PaymentValuation => "204",
243            Enum1001::InterimApplicationForPayment => "211",
244            Enum1001::FinalPaymentRequestBasedOnCompletionWork => "218",
245            Enum1001::PaymentRequestForCompletedUnits => "219",
246            Enum1001::SelfBilledCreditNote => "261",
247            Enum1001::ConsolidatedCreditNoteGoodsAndServices => "262",
248            Enum1001::PriceVariationInvoice => "295",
249            Enum1001::CreditNoteForPriceVariation => "296",
250            Enum1001::DelcredereCreditNote => "308",
251            Enum1001::ProformaInvoice => "325",
252            Enum1001::PartialInvoice => "326",
253            Enum1001::CommercialInvoiceWhichIncludesAPackingList => "331",
254            Enum1001::CommercialInvoice => "380",
255            Enum1001::CreditNote => "381",
256            Enum1001::CommissionNote => "382",
257            Enum1001::DebitNote => "383",
258            Enum1001::CorrectedInvoice => "384",
259            Enum1001::ConsolidatedInvoice => "385",
260            Enum1001::PrepaymentInvoice => "386",
261            Enum1001::HireInvoice => "387",
262            Enum1001::TaxInvoice => "388",
263            Enum1001::SelfBilledInvoice => "389",
264            Enum1001::DelcredereInvoice => "390",
265            Enum1001::FactoredInvoice => "393",
266            Enum1001::LeaseInvoice => "394",
267            Enum1001::ConsignmentInvoice => "395",
268            Enum1001::FactoredCreditNote => "396",
269            Enum1001::OpticalCharacterReadingOcrPaymentCreditNote => "420",
270            Enum1001::DebitAdvice => "456",
271            Enum1001::ReversalDebit => "457",
272            Enum1001::ReversalCredit => "458",
273            Enum1001::SelfBilledDebitNote => "527",
274            Enum1001::ForwardersCreditNote => "532",
275            Enum1001::ForwardersInvoiceDiscrepancyReport => "553",
276            Enum1001::InsurersInvoice => "575",
277            Enum1001::ForwardersInvoice => "623",
278            Enum1001::PortChargesDocuments => "633",
279            Enum1001::InvoiceInformationForAccountingPurposes => "751",
280            Enum1001::FreightInvoice => "780",
281            Enum1001::ClaimNotification => "817",
282            Enum1001::ConsularInvoice => "870",
283            Enum1001::PartialConstructionInvoice => "875",
284            Enum1001::PartialFinalConstructionInvoice => "876",
285            Enum1001::FinalConstructionInvoice => "877",
286            Enum1001::CustomsInvoice => "935",
287        }
288    }
289}
290
291impl crate::Description for Enum1001 {
292    fn description(self) -> &'static str {
293        match self {
294            Enum1001::RequestForPayment => "Request for payment",
295            Enum1001::DebitNoteRelatedToGoodsOrServices => {
296                "Debit note related to goods or services"
297            }
298            Enum1001::CreditNoteRelatedToGoodsOrServices => {
299                "Credit note related to goods or services"
300            }
301            Enum1001::MeteredServicesInvoice => "Metered services invoice",
302            Enum1001::CreditNoteRelatedToFinancialAdjustments => {
303                "Credit note related to financial adjustments"
304            }
305            Enum1001::DebitNoteRelatedToFinancialAdjustments => {
306                "Debit note related to financial adjustments"
307            }
308            Enum1001::TaxNotification => "Tax notification",
309            Enum1001::InvoicingDataSheet => "Invoicing data sheet",
310            Enum1001::DirectPaymentValuation => "Direct payment valuation",
311            Enum1001::ProvisionalPaymentValuation => "Provisional payment valuation",
312            Enum1001::PaymentValuation => "Payment valuation",
313            Enum1001::InterimApplicationForPayment => "Interim application for payment",
314            Enum1001::FinalPaymentRequestBasedOnCompletionWork => {
315                "Final payment request based on completion of work"
316            }
317            Enum1001::PaymentRequestForCompletedUnits => "Payment request for completed units",
318            Enum1001::SelfBilledCreditNote => "Self billed credit note",
319            Enum1001::ConsolidatedCreditNoteGoodsAndServices => {
320                "Consolidated credit note - goods and services"
321            }
322            Enum1001::PriceVariationInvoice => "Price variation invoice",
323            Enum1001::CreditNoteForPriceVariation => "Credit note for price variation",
324            Enum1001::DelcredereCreditNote => "Delcredere credit note",
325            Enum1001::ProformaInvoice => "Proforma invoice",
326            Enum1001::PartialInvoice => "Partial invoice",
327            Enum1001::CommercialInvoiceWhichIncludesAPackingList => {
328                "Commercial invoice which includes a packing list"
329            }
330            Enum1001::CommercialInvoice => "Commercial invoice",
331            Enum1001::CreditNote => "Credit note",
332            Enum1001::CommissionNote => "Commission note",
333            Enum1001::DebitNote => "Debit note",
334            Enum1001::CorrectedInvoice => "Corrected invoice",
335            Enum1001::ConsolidatedInvoice => "Consolidated invoice",
336            Enum1001::PrepaymentInvoice => "Prepayment invoice",
337            Enum1001::HireInvoice => "Hire invoice",
338            Enum1001::TaxInvoice => "Tax invoice",
339            Enum1001::SelfBilledInvoice => "Self-billed invoice",
340            Enum1001::DelcredereInvoice => "Delcredere invoice",
341            Enum1001::FactoredInvoice => "Factored invoice",
342            Enum1001::LeaseInvoice => "Lease invoice",
343            Enum1001::ConsignmentInvoice => "Consignment invoice",
344            Enum1001::FactoredCreditNote => "Factored credit note",
345            Enum1001::OpticalCharacterReadingOcrPaymentCreditNote => {
346                "Optical Character Reading (OCR) payment credit note"
347            }
348            Enum1001::DebitAdvice => "Debit advice",
349            Enum1001::ReversalDebit => "Reversal of debit",
350            Enum1001::ReversalCredit => "Reversal of credit",
351            Enum1001::SelfBilledDebitNote => "Self billed debit note",
352            Enum1001::ForwardersCreditNote => "Forwarder's credit note",
353            Enum1001::ForwardersInvoiceDiscrepancyReport => {
354                "Forwarder's invoice discrepancy report"
355            }
356            Enum1001::InsurersInvoice => "Insurer's invoice",
357            Enum1001::ForwardersInvoice => "Forwarder's invoice",
358            Enum1001::PortChargesDocuments => "Port charges documents",
359            Enum1001::InvoiceInformationForAccountingPurposes => {
360                "Invoice information for accounting purposes"
361            }
362            Enum1001::FreightInvoice => "Freight invoice",
363            Enum1001::ClaimNotification => "Claim notification",
364            Enum1001::ConsularInvoice => "Consular invoice",
365            Enum1001::PartialConstructionInvoice => "Partial construction invoice",
366            Enum1001::PartialFinalConstructionInvoice => "Partial final construction invoice",
367            Enum1001::FinalConstructionInvoice => "Final construction invoice",
368            Enum1001::CustomsInvoice => "Customs invoice",
369        }
370    }
371}
372
373impl crate::FromCode for Enum1001 {
374    fn from_code(code: &str) -> Option<Self>
375    where
376        Self: Sized,
377    {
378        match code {
379            "71" => Some(Enum1001::RequestForPayment),
380            "80" => Some(Enum1001::DebitNoteRelatedToGoodsOrServices),
381            "81" => Some(Enum1001::CreditNoteRelatedToGoodsOrServices),
382            "82" => Some(Enum1001::MeteredServicesInvoice),
383            "83" => Some(Enum1001::CreditNoteRelatedToFinancialAdjustments),
384            "84" => Some(Enum1001::DebitNoteRelatedToFinancialAdjustments),
385            "102" => Some(Enum1001::TaxNotification),
386            "130" => Some(Enum1001::InvoicingDataSheet),
387            "202" => Some(Enum1001::DirectPaymentValuation),
388            "203" => Some(Enum1001::ProvisionalPaymentValuation),
389            "204" => Some(Enum1001::PaymentValuation),
390            "211" => Some(Enum1001::InterimApplicationForPayment),
391            "218" => Some(Enum1001::FinalPaymentRequestBasedOnCompletionWork),
392            "219" => Some(Enum1001::PaymentRequestForCompletedUnits),
393            "261" => Some(Enum1001::SelfBilledCreditNote),
394            "262" => Some(Enum1001::ConsolidatedCreditNoteGoodsAndServices),
395            "295" => Some(Enum1001::PriceVariationInvoice),
396            "296" => Some(Enum1001::CreditNoteForPriceVariation),
397            "308" => Some(Enum1001::DelcredereCreditNote),
398            "325" => Some(Enum1001::ProformaInvoice),
399            "326" => Some(Enum1001::PartialInvoice),
400            "331" => Some(Enum1001::CommercialInvoiceWhichIncludesAPackingList),
401            "380" => Some(Enum1001::CommercialInvoice),
402            "381" => Some(Enum1001::CreditNote),
403            "382" => Some(Enum1001::CommissionNote),
404            "383" => Some(Enum1001::DebitNote),
405            "384" => Some(Enum1001::CorrectedInvoice),
406            "385" => Some(Enum1001::ConsolidatedInvoice),
407            "386" => Some(Enum1001::PrepaymentInvoice),
408            "387" => Some(Enum1001::HireInvoice),
409            "388" => Some(Enum1001::TaxInvoice),
410            "389" => Some(Enum1001::SelfBilledInvoice),
411            "390" => Some(Enum1001::DelcredereInvoice),
412            "393" => Some(Enum1001::FactoredInvoice),
413            "394" => Some(Enum1001::LeaseInvoice),
414            "395" => Some(Enum1001::ConsignmentInvoice),
415            "396" => Some(Enum1001::FactoredCreditNote),
416            "420" => Some(Enum1001::OpticalCharacterReadingOcrPaymentCreditNote),
417            "456" => Some(Enum1001::DebitAdvice),
418            "457" => Some(Enum1001::ReversalDebit),
419            "458" => Some(Enum1001::ReversalCredit),
420            "527" => Some(Enum1001::SelfBilledDebitNote),
421            "532" => Some(Enum1001::ForwardersCreditNote),
422            "553" => Some(Enum1001::ForwardersInvoiceDiscrepancyReport),
423            "575" => Some(Enum1001::InsurersInvoice),
424            "623" => Some(Enum1001::ForwardersInvoice),
425            "633" => Some(Enum1001::PortChargesDocuments),
426            "751" => Some(Enum1001::InvoiceInformationForAccountingPurposes),
427            "780" => Some(Enum1001::FreightInvoice),
428            "817" => Some(Enum1001::ClaimNotification),
429            "870" => Some(Enum1001::ConsularInvoice),
430            "875" => Some(Enum1001::PartialConstructionInvoice),
431            "876" => Some(Enum1001::PartialFinalConstructionInvoice),
432            "877" => Some(Enum1001::FinalConstructionInvoice),
433            "935" => Some(Enum1001::CustomsInvoice),
434            _ => None,
435        }
436    }
437}