+our @customer_settings = (
+ [ 0, t8('Do not create Factur-X/ZUGFeRD invoices') ],
+ [ PROFILE_FACTURX_EXTENDED() * 2 + 1, t8('Create with profile \'Factur-X 1.0.05/ZUGFeRD 2.1.1 extended\'') ],
+ [ PROFILE_FACTURX_EXTENDED() * 2 + 2, t8('Create with profile \'Factur-X 1.0.05/ZUGFeRD 2.1.1 extended\' (test mode)') ],
+ [ PROFILE_XRECHNUNG() * 2 + 1, t8('Create with profile \'XRechnung 2.0.0\'') ],
+ [ PROFILE_XRECHNUNG() * 2 + 2, t8('Create with profile \'XRechnung 2.0.0\' (test mode)') ],
+);
+
+sub convert_customer_setting {
+ my ($class, $customer_setting) = @_;
+
+ return () if ($customer_setting <= 0) || ($customer_setting >= scalar(@customer_settings));
+
+ return (
+ profile => int(($customer_setting - 1) / 2),
+ test_mode => ($customer_setting - 1) % 2,
+ );
+}
+