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 RequestForPayment,
11 DebitNoteRelatedToGoodsOrServices,
15 CreditNoteRelatedToGoodsOrServices,
19 MeteredServicesInvoice,
23 CreditNoteRelatedToFinancialAdjustments,
27 DebitNoteRelatedToFinancialAdjustments,
31 TaxNotification,
35 InvoicingDataSheet,
39 DirectPaymentValuation,
43 ProvisionalPaymentValuation,
47 PaymentValuation,
51 InterimApplicationForPayment,
55 FinalPaymentRequestBasedOnCompletionWork,
59 PaymentRequestForCompletedUnits,
63 SelfBilledCreditNote,
67 ConsolidatedCreditNoteGoodsAndServices,
71 PriceVariationInvoice,
75 CreditNoteForPriceVariation,
79 DelcredereCreditNote,
83 ProformaInvoice,
87 PartialInvoice,
91 CommercialInvoiceWhichIncludesAPackingList,
95 CommercialInvoice,
99 CreditNote,
103 CommissionNote,
107 DebitNote,
111 CorrectedInvoice,
115 ConsolidatedInvoice,
119 PrepaymentInvoice,
123 HireInvoice,
127 TaxInvoice,
131 SelfBilledInvoice,
135 DelcredereInvoice,
139 FactoredInvoice,
143 LeaseInvoice,
147 ConsignmentInvoice,
151 FactoredCreditNote,
155 OpticalCharacterReadingOcrPaymentCreditNote,
159 DebitAdvice,
163 ReversalDebit,
167 ReversalCredit,
171 SelfBilledCorrectiveInvoiceInvoiceTypeCorrected,
175 FactoredCorrectiveInvoiceInvoiceTypeCorrected,
179 SelfBilledFactoredCorrectiveInvoiceInvoiceTypeCorrected,
183 SelfPrepaymentInvoiceInvoiceTypeOriginal,
187 SelfBilledFactoredInvoiceInvoiceTypeOriginal,
191 SelfBilletFactoredCreditNoteCreditNoteTypeCorrected,
195 PrepaymentCreditNoteCreditNoteTypeCorrected,
199 SelfBilledDebitNote,
203 ForwardersCreditNote,
207 ForwardersInvoiceDiscrepancyReport,
211 InsurersInvoice,
215 ForwardersInvoice,
219 PortChargesDocuments,
223 InvoiceInformationForAccountingPurposes,
227 FreightInvoice,
231 ClaimNotification,
235 ConsularInvoice,
239 PartialConstructionInvoice,
243 PartialFinalConstructionInvoice,
247 FinalConstructionInvoice,
251 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}