zugferd_code_lists/zugferd_2_3_3/
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 corrective invoice, invoice type, Corrected
172    ///
173    /// Invoice
174    SelfBilledCorrectiveInvoiceInvoiceTypeCorrected,
175    ///  Factored Corrective Invoice, invoice type, Corrected
176    ///
177    /// Invoice
178    FactoredCorrectiveInvoiceInvoiceTypeCorrected,
179    ///  Self billed Factored corrective invoice, invoice type, Corrected
180    ///
181    /// Invoice
182    SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected,
183    ///  Self Prepayment invoice, invoice type, Original
184    ///
185    /// Invoice
186    SelfPrepaymentInvoiceInvoiceTypeOriginal,
187    ///  Self billed factored invoice, invoice type, Original
188    ///
189    /// Invoice
190    SelfBilledFactoredInvoiceInvoiceTypeOriginal,
191    ///  Self billet factored Credit Note, Credit note type, Corrected
192    ///
193    /// Credit Note
194    SelfBilletFactoredCreditNoteCreditNoteTypeCorrected,
195    ///  Prepayment credit note, credit note type, Corrected
196    ///
197    /// Credit Note
198    PrepaymentCreditNoteCreditNoteTypeCorrected,
199    /// Self billed debit note
200    ///
201    /// Invoice
202    SelfBilledDebitNote,
203    /// Forwarder's credit note
204    ///
205    /// Credit Note
206    ForwardersCreditNote,
207    /// Forwarder's invoice discrepancy report
208    ///
209    /// Invoice
210    ForwardersInvoiceDiscrepancyReport,
211    /// Insurer's invoice
212    ///
213    /// Invoice
214    InsurersInvoice,
215    /// Forwarder's invoice
216    ///
217    /// Invoice
218    ForwardersInvoice,
219    /// Port charges documents
220    ///
221    /// Invoice
222    PortChargesDocuments,
223    /// Invoice information for accounting purposes
224    ///
225    /// Invoice
226    InvoiceInformationForAccountingPurposes,
227    /// Freight invoice
228    ///
229    /// Invoice
230    FreightInvoice,
231    /// Claim notification
232    ///
233    /// Invoice
234    ClaimNotification,
235    /// Consular invoice
236    ///
237    /// Invoice
238    ConsularInvoice,
239    /// Partial construction invoice
240    ///
241    /// Invoice
242    PartialConstructionInvoice,
243    /// Partial final construction invoice
244    ///
245    /// Invoice
246    PartialFinalConstructionInvoice,
247    /// Final construction invoice
248    ///
249    /// Invoice
250    FinalConstructionInvoice,
251    /// Customs invoice
252    ///
253    /// Invoice
254    CustomsInvoice,
255}
256
257impl std::fmt::Display for Enum1001 {
258    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
259        write!(f, "{}", <Self as crate::Code>::code(*self))
260    }
261}
262
263impl std::str::FromStr for Enum1001 {
264    type Err = ();
265    fn from_str(s: &str) -> Result<Self, Self::Err> {
266        <Self as crate::FromCode>::from_code(s).ok_or(())
267    }
268}
269
270impl crate::Code for Enum1001 {
271    fn code(self) -> &'static str {
272        match self {
273            Enum1001::RequestForPayment => "71",
274            Enum1001::DebitNoteRelatedToGoodsOrServices => "80",
275            Enum1001::CreditNoteRelatedToGoodsOrServices => "81",
276            Enum1001::MeteredServicesInvoice => "82",
277            Enum1001::CreditNoteRelatedToFinancialAdjustments => "83",
278            Enum1001::DebitNoteRelatedToFinancialAdjustments => "84",
279            Enum1001::TaxNotification => "102",
280            Enum1001::InvoicingDataSheet => "130",
281            Enum1001::DirectPaymentValuation => "202",
282            Enum1001::ProvisionalPaymentValuation => "203",
283            Enum1001::PaymentValuation => "204",
284            Enum1001::InterimApplicationForPayment => "211",
285            Enum1001::FinalPaymentRequestBasedOnCompletionWork => "218",
286            Enum1001::PaymentRequestForCompletedUnits => "219",
287            Enum1001::SelfBilledCreditNote => "261",
288            Enum1001::ConsolidatedCreditNoteGoodsAndServices => "262",
289            Enum1001::PriceVariationInvoice => "295",
290            Enum1001::CreditNoteForPriceVariation => "296",
291            Enum1001::DelcredereCreditNote => "308",
292            Enum1001::ProformaInvoice => "325",
293            Enum1001::PartialInvoice => "326",
294            Enum1001::CommercialInvoiceWhichIncludesAPackingList => "331",
295            Enum1001::CommercialInvoice => "380",
296            Enum1001::CreditNote => "381",
297            Enum1001::CommissionNote => "382",
298            Enum1001::DebitNote => "383",
299            Enum1001::CorrectedInvoice => "384",
300            Enum1001::ConsolidatedInvoice => "385",
301            Enum1001::PrepaymentInvoice => "386",
302            Enum1001::HireInvoice => "387",
303            Enum1001::TaxInvoice => "388",
304            Enum1001::SelfBilledInvoice => "389",
305            Enum1001::DelcredereInvoice => "390",
306            Enum1001::FactoredInvoice => "393",
307            Enum1001::LeaseInvoice => "394",
308            Enum1001::ConsignmentInvoice => "395",
309            Enum1001::FactoredCreditNote => "396",
310            Enum1001::OpticalCharacterReadingOcrPaymentCreditNote => "420",
311            Enum1001::DebitAdvice => "456",
312            Enum1001::ReversalDebit => "457",
313            Enum1001::ReversalCredit => "458",
314            Enum1001::SelfBilledCorrectiveInvoiceInvoiceTypeCorrected => "471",
315            Enum1001::FactoredCorrectiveInvoiceInvoiceTypeCorrected => "472",
316            Enum1001::SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected => "473",
317            Enum1001::SelfPrepaymentInvoiceInvoiceTypeOriginal => "500",
318            Enum1001::SelfBilledFactoredInvoiceInvoiceTypeOriginal => "501",
319            Enum1001::SelfBilletFactoredCreditNoteCreditNoteTypeCorrected => "502",
320            Enum1001::PrepaymentCreditNoteCreditNoteTypeCorrected => "503",
321            Enum1001::SelfBilledDebitNote => "527",
322            Enum1001::ForwardersCreditNote => "532",
323            Enum1001::ForwardersInvoiceDiscrepancyReport => "553",
324            Enum1001::InsurersInvoice => "575",
325            Enum1001::ForwardersInvoice => "623",
326            Enum1001::PortChargesDocuments => "633",
327            Enum1001::InvoiceInformationForAccountingPurposes => "751",
328            Enum1001::FreightInvoice => "780",
329            Enum1001::ClaimNotification => "817",
330            Enum1001::ConsularInvoice => "870",
331            Enum1001::PartialConstructionInvoice => "875",
332            Enum1001::PartialFinalConstructionInvoice => "876",
333            Enum1001::FinalConstructionInvoice => "877",
334            Enum1001::CustomsInvoice => "935",
335        }
336    }
337}
338
339impl crate::Description for Enum1001 {
340    fn description(self) -> &'static str {
341        match self {
342            Enum1001::RequestForPayment => "Request for payment",
343            Enum1001::DebitNoteRelatedToGoodsOrServices => {
344                "Debit note related to goods or services"
345            }
346            Enum1001::CreditNoteRelatedToGoodsOrServices => {
347                "Credit note related to goods or services"
348            }
349            Enum1001::MeteredServicesInvoice => "Metered services invoice",
350            Enum1001::CreditNoteRelatedToFinancialAdjustments => {
351                "Credit note related to financial adjustments"
352            }
353            Enum1001::DebitNoteRelatedToFinancialAdjustments => {
354                "Debit note related to financial adjustments"
355            }
356            Enum1001::TaxNotification => "Tax notification",
357            Enum1001::InvoicingDataSheet => "Invoicing data sheet",
358            Enum1001::DirectPaymentValuation => "Direct payment valuation",
359            Enum1001::ProvisionalPaymentValuation => "Provisional payment valuation",
360            Enum1001::PaymentValuation => "Payment valuation",
361            Enum1001::InterimApplicationForPayment => "Interim application for payment",
362            Enum1001::FinalPaymentRequestBasedOnCompletionWork => {
363                "Final payment request based on completion of work"
364            }
365            Enum1001::PaymentRequestForCompletedUnits => "Payment request for completed units",
366            Enum1001::SelfBilledCreditNote => "Self billed credit note",
367            Enum1001::ConsolidatedCreditNoteGoodsAndServices => {
368                "Consolidated credit note - goods and services"
369            }
370            Enum1001::PriceVariationInvoice => "Price variation invoice",
371            Enum1001::CreditNoteForPriceVariation => "Credit note for price variation",
372            Enum1001::DelcredereCreditNote => "Delcredere credit note",
373            Enum1001::ProformaInvoice => "Proforma invoice",
374            Enum1001::PartialInvoice => "Partial invoice",
375            Enum1001::CommercialInvoiceWhichIncludesAPackingList => {
376                "Commercial invoice which includes a packing list"
377            }
378            Enum1001::CommercialInvoice => "Commercial invoice",
379            Enum1001::CreditNote => "Credit note",
380            Enum1001::CommissionNote => "Commission note",
381            Enum1001::DebitNote => "Debit note",
382            Enum1001::CorrectedInvoice => "Corrected invoice",
383            Enum1001::ConsolidatedInvoice => "Consolidated invoice",
384            Enum1001::PrepaymentInvoice => "Prepayment invoice",
385            Enum1001::HireInvoice => "Hire invoice",
386            Enum1001::TaxInvoice => "Tax invoice",
387            Enum1001::SelfBilledInvoice => "Self-billed invoice",
388            Enum1001::DelcredereInvoice => "Delcredere invoice",
389            Enum1001::FactoredInvoice => "Factored invoice",
390            Enum1001::LeaseInvoice => "Lease invoice",
391            Enum1001::ConsignmentInvoice => "Consignment invoice",
392            Enum1001::FactoredCreditNote => "Factored credit note",
393            Enum1001::OpticalCharacterReadingOcrPaymentCreditNote => {
394                "Optical Character Reading (OCR) payment credit note"
395            }
396            Enum1001::DebitAdvice => "Debit advice",
397            Enum1001::ReversalDebit => "Reversal of debit",
398            Enum1001::ReversalCredit => "Reversal of credit",
399            Enum1001::SelfBilledCorrectiveInvoiceInvoiceTypeCorrected => {
400                " Self-billed corrective invoice, invoice type, Corrected"
401            }
402            Enum1001::FactoredCorrectiveInvoiceInvoiceTypeCorrected => {
403                " Factored Corrective Invoice, invoice type, Corrected"
404            }
405            Enum1001::SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected => {
406                " Self billed Factored corrective invoice, invoice type, Corrected"
407            }
408            Enum1001::SelfPrepaymentInvoiceInvoiceTypeOriginal => {
409                " Self Prepayment invoice, invoice type, Original"
410            }
411            Enum1001::SelfBilledFactoredInvoiceInvoiceTypeOriginal => {
412                " Self billed factored invoice, invoice type, Original"
413            }
414            Enum1001::SelfBilletFactoredCreditNoteCreditNoteTypeCorrected => {
415                " Self billet factored Credit Note, Credit note type, Corrected"
416            }
417            Enum1001::PrepaymentCreditNoteCreditNoteTypeCorrected => {
418                " Prepayment credit note, credit note type, Corrected"
419            }
420            Enum1001::SelfBilledDebitNote => "Self billed debit note",
421            Enum1001::ForwardersCreditNote => "Forwarder's credit note",
422            Enum1001::ForwardersInvoiceDiscrepancyReport => {
423                "Forwarder's invoice discrepancy report"
424            }
425            Enum1001::InsurersInvoice => "Insurer's invoice",
426            Enum1001::ForwardersInvoice => "Forwarder's invoice",
427            Enum1001::PortChargesDocuments => "Port charges documents",
428            Enum1001::InvoiceInformationForAccountingPurposes => {
429                "Invoice information for accounting purposes"
430            }
431            Enum1001::FreightInvoice => "Freight invoice",
432            Enum1001::ClaimNotification => "Claim notification",
433            Enum1001::ConsularInvoice => "Consular invoice",
434            Enum1001::PartialConstructionInvoice => "Partial construction invoice",
435            Enum1001::PartialFinalConstructionInvoice => "Partial final construction invoice",
436            Enum1001::FinalConstructionInvoice => "Final construction invoice",
437            Enum1001::CustomsInvoice => "Customs invoice",
438        }
439    }
440}
441
442impl crate::FromCode for Enum1001 {
443    fn from_code(code: &str) -> Option<Self>
444    where
445        Self: Sized,
446    {
447        match code {
448            "71" => Some(Enum1001::RequestForPayment),
449            "80" => Some(Enum1001::DebitNoteRelatedToGoodsOrServices),
450            "81" => Some(Enum1001::CreditNoteRelatedToGoodsOrServices),
451            "82" => Some(Enum1001::MeteredServicesInvoice),
452            "83" => Some(Enum1001::CreditNoteRelatedToFinancialAdjustments),
453            "84" => Some(Enum1001::DebitNoteRelatedToFinancialAdjustments),
454            "102" => Some(Enum1001::TaxNotification),
455            "130" => Some(Enum1001::InvoicingDataSheet),
456            "202" => Some(Enum1001::DirectPaymentValuation),
457            "203" => Some(Enum1001::ProvisionalPaymentValuation),
458            "204" => Some(Enum1001::PaymentValuation),
459            "211" => Some(Enum1001::InterimApplicationForPayment),
460            "218" => Some(Enum1001::FinalPaymentRequestBasedOnCompletionWork),
461            "219" => Some(Enum1001::PaymentRequestForCompletedUnits),
462            "261" => Some(Enum1001::SelfBilledCreditNote),
463            "262" => Some(Enum1001::ConsolidatedCreditNoteGoodsAndServices),
464            "295" => Some(Enum1001::PriceVariationInvoice),
465            "296" => Some(Enum1001::CreditNoteForPriceVariation),
466            "308" => Some(Enum1001::DelcredereCreditNote),
467            "325" => Some(Enum1001::ProformaInvoice),
468            "326" => Some(Enum1001::PartialInvoice),
469            "331" => Some(Enum1001::CommercialInvoiceWhichIncludesAPackingList),
470            "380" => Some(Enum1001::CommercialInvoice),
471            "381" => Some(Enum1001::CreditNote),
472            "382" => Some(Enum1001::CommissionNote),
473            "383" => Some(Enum1001::DebitNote),
474            "384" => Some(Enum1001::CorrectedInvoice),
475            "385" => Some(Enum1001::ConsolidatedInvoice),
476            "386" => Some(Enum1001::PrepaymentInvoice),
477            "387" => Some(Enum1001::HireInvoice),
478            "388" => Some(Enum1001::TaxInvoice),
479            "389" => Some(Enum1001::SelfBilledInvoice),
480            "390" => Some(Enum1001::DelcredereInvoice),
481            "393" => Some(Enum1001::FactoredInvoice),
482            "394" => Some(Enum1001::LeaseInvoice),
483            "395" => Some(Enum1001::ConsignmentInvoice),
484            "396" => Some(Enum1001::FactoredCreditNote),
485            "420" => Some(Enum1001::OpticalCharacterReadingOcrPaymentCreditNote),
486            "456" => Some(Enum1001::DebitAdvice),
487            "457" => Some(Enum1001::ReversalDebit),
488            "458" => Some(Enum1001::ReversalCredit),
489            "471" => Some(Enum1001::SelfBilledCorrectiveInvoiceInvoiceTypeCorrected),
490            "472" => Some(Enum1001::FactoredCorrectiveInvoiceInvoiceTypeCorrected),
491            "473" => Some(Enum1001::SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected),
492            "500" => Some(Enum1001::SelfPrepaymentInvoiceInvoiceTypeOriginal),
493            "501" => Some(Enum1001::SelfBilledFactoredInvoiceInvoiceTypeOriginal),
494            "502" => Some(Enum1001::SelfBilletFactoredCreditNoteCreditNoteTypeCorrected),
495            "503" => Some(Enum1001::PrepaymentCreditNoteCreditNoteTypeCorrected),
496            "527" => Some(Enum1001::SelfBilledDebitNote),
497            "532" => Some(Enum1001::ForwardersCreditNote),
498            "553" => Some(Enum1001::ForwardersInvoiceDiscrepancyReport),
499            "575" => Some(Enum1001::InsurersInvoice),
500            "623" => Some(Enum1001::ForwardersInvoice),
501            "633" => Some(Enum1001::PortChargesDocuments),
502            "751" => Some(Enum1001::InvoiceInformationForAccountingPurposes),
503            "780" => Some(Enum1001::FreightInvoice),
504            "817" => Some(Enum1001::ClaimNotification),
505            "870" => Some(Enum1001::ConsularInvoice),
506            "875" => Some(Enum1001::PartialConstructionInvoice),
507            "876" => Some(Enum1001::PartialFinalConstructionInvoice),
508            "877" => Some(Enum1001::FinalConstructionInvoice),
509            "935" => Some(Enum1001::CustomsInvoice),
510            _ => None,
511        }
512    }
513}