zugferd_code_lists/zugferd_2_3_2/
enum1001.rs

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