zugferd_code_lists/zugferd_2_3_2/
enum1001.rs

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