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