diff --git a/manufacturing_utilities/hooks.py b/manufacturing_utilities/hooks.py index 0f894c9..d1618c9 100644 --- a/manufacturing_utilities/hooks.py +++ b/manufacturing_utilities/hooks.py @@ -182,12 +182,27 @@ doc_events = { "on_submit": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", "on_cancel": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", }, + "Work Order": { "on_update": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", "on_update_after_submit": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", "on_submit": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", "on_cancel": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", }, + + "Purchase Order": { + "on_update": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", + "on_update_after_submit": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", + "on_submit": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", + "on_cancel": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", + }, + + "Subcontracting Order": { + "on_update": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", + "on_update_after_submit": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", + "on_submit": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", + "on_cancel": "manufacturing_utilities.manufacturing_overview.cache.invalidate_overview_cache", + }, } # Scheduled Tasks diff --git a/manufacturing_utilities/locale/de.po b/manufacturing_utilities/locale/de.po new file mode 100644 index 0000000..95ed7dc --- /dev/null +++ b/manufacturing_utilities/locale/de.po @@ -0,0 +1,645 @@ +# German translations for Manufacturing Utilities. +# Copyright (C) 2026 CAnetzberger Design +# This file is distributed under the same license as the Manufacturing Utilities project. +# FIRST AUTHOR , 2026. +# +msgid "" +msgstr "" +"Project-Id-Version: Manufacturing Utilities VERSION\n" +"Report-Msgid-Bugs-To: info@canetzberger.design\n" +"POT-Creation-Date: 2026-11-02 19:20+0000\n" +"PO-Revision-Date: 2026-11-02 19:11+0000\n" +"Last-Translator: info@canetzberger.design\n" +"Language: de\n" +"Language-Team: info@canetzberger.design\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.18.0\n" + +#. Description of the 'Maximum Rows' (Int) field in DocType 'Manufacturing +#. Overview Settings' +#. Description of the 'Lookahead Days' (Int) field in DocType 'Manufacturing +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:51 +msgid "0 = unlimited" +msgstr "0 = unbegrenzt" + +#: manufacturing_utilities/public/js/label_composer.js:747 +msgid "Add Quantity" +msgstr "Menge hinzufügen" + +#: manufacturing_utilities/public/js/label_composer.js:1649 +msgid "Also Print Warehouse Labels" +msgstr "Lageretiketten ebenfalls drucken" + +#: manufacturing_utilities/label_composer/api.py:494 +#, python-brace-format +msgid "CUPS printer queue {0} was not found" +msgstr "CUPS-Druckerwarteschlange {0} wurde nicht gefunden" + +#: manufacturing_utilities/label_composer/api.py:501 +#, python-brace-format +msgid "CUPS printer {0} is not accepting jobs" +msgstr "CUPS-Drucker {0} nimmt keine Druckaufträge an" + +#: manufacturing_utilities/label_composer/api.py:466 +#, python-brace-format +msgid "CUPS queue name is missing for printer {0}" +msgstr "Für Drucker {0} fehlt der Name der CUPS-Warteschlange" + +#: manufacturing_utilities/label_composer/api.py:449 +#, python-brace-format +msgid "CUPS server address is missing for printer {0}" +msgstr "Für Drucker {0} fehlt die Adresse des CUPS-Servers" + +#: manufacturing_utilities/label_composer/api.py:479 +#, python-brace-format +msgid "Cannot connect to CUPS server for {0}: {1}" +msgstr "Verbindung zum CUPS-Server für {0} kann nicht hergestellt werden: {1}" + +#: manufacturing_utilities/label_composer/api.py:658 +msgid "Check the CUPS queue before trying again. Some labels may already have been submitted." +msgstr "Prüfen Sie die CUPS-Warteschlange, bevor Sie es erneut versuchen. Einige Etiketten wurden möglicherweise bereits übermittelt." + +#: manufacturing_utilities/public/js/label_composer.js:1196 +msgid "Complete the quantities to see a preview." +msgstr "Vervollständigen Sie die Mengenangaben, um eine Vorschau anzuzeigen." + +#: manufacturing_utilities/label_composer/api.py:118 +msgid "Configured Print Format not found" +msgstr "Das konfigurierte Druckformat wurde nicht gefunden" + +#: manufacturing_utilities/public/js/label_composer.js:1140 +msgid "Content extends beyond the label area. Check the Print Format before printing." +msgstr "Der Inhalt ragt über die Etikettenfläche hinaus. Prüfen Sie das Druckformat vor dem Drucken." + +#. Label of the customer (Data) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:74 +#: manufacturing_utilities/public/js/label_composer.js:1589 +msgid "Customer" +msgstr "Kunde" + +#. Option for the 'Label Type' (Select) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:37 +msgid "Customer Label" +msgstr "Kundenetikett" + +#. Label of the default_printer (Link) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:52 +msgid "Default Printer" +msgstr "Standarddrucker" + +#. Label of the delivery_date_column (Column Break) field in DocType 'Label +#. Composer Template' +#. Label of the delivery_date (Date) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:69 +#: manufacturing_utilities/public/js/label_composer.js:1625 +msgid "Delivery Date" +msgstr "Lieferdatum" + +#. Label of the enabled (Check) field in DocType 'Label Composer Template' +#. Label of the enabled (Check) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:43 +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:36 +msgid "Enabled" +msgstr "Aktiviert" + +#: manufacturing_utilities/public/js/label_composer.js:787 +msgid "Enter valid quantities and label counts." +msgstr "Geben Sie gültige Mengen und Etikettenanzahlen ein." + +#: manufacturing_utilities/public/js/label_composer.js:809 +msgid "Exceeds document quantity" +msgstr "Überschreitet die Belegmenge" + +#. Label of the filter_section (Section Break) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:66 +msgid "Filter" +msgstr "Filter" + +#. Label of the free_text (Text Editor) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:105 +msgid "Free Text" +msgstr "Freitext" + +#: manufacturing_utilities/label_composer/api.py:206 +msgid "Free text is too long" +msgstr "Der Freitext ist zu lang" + +#. Label of the general_section (Section Break) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:30 +msgid "General" +msgstr "Allgemein" + +#. Label of the generic_section (Section Break) field in DocType 'Label +#. Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:31 +msgid "Generic" +msgstr "Universell" + +#. Option for the 'Label Type' (Select) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:37 +msgid "Generic Label" +msgstr "Universaletikett" + +#: manufacturing_utilities/label_composer/api.py:576 +#, python-brace-format +msgid "Group {0} generated an empty PDF" +msgstr "Gruppe {0} hat eine leere PDF-Datei erzeugt" + +#: manufacturing_utilities/label_composer/api.py:535 +#: manufacturing_utilities/label_composer/api.py:566 +#, python-brace-format +msgid "Group {0}: {1}" +msgstr "Gruppe {0}: {1}" + +#: manufacturing_utilities/public/js/label_composer.js:1728 +msgid "HTML" +msgstr "HTML" + +#: manufacturing_utilities/public/js/label_composer.js:1248 +msgid "HTML preview failed. Check the server error log." +msgstr "Die HTML-Vorschau konnte nicht erstellt werden. Prüfen Sie das Fehlerprotokoll des Servers." + +#. Label of the include_child_warehouses (Check) field in DocType +#. 'Manufacturing Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:83 +msgid "Include Child Warehouses" +msgstr "Untergeordnete Lager einbeziehen" + +#: manufacturing_utilities/label_composer/api.py:457 +#: manufacturing_utilities/label_composer/api.py:460 +msgid "Invalid CUPS port" +msgstr "Ungültiger CUPS-Port" + +#: manufacturing_utilities/label_composer/api.py:421 +#, python-brace-format +msgid "Invalid copy count in group {0}" +msgstr "Ungültige Kopienanzahl in Gruppe {0}" + +#: manufacturing_utilities/public/js/label_composer.js:920 +msgid "Invalid label count" +msgstr "Ungültige Etikettenanzahl" + +#: manufacturing_utilities/label_composer/api.py:177 +msgid "Invalid label quantity" +msgstr "Ungültige Menge pro Etikett" + +#: manufacturing_utilities/label_composer/api.py:400 +#, python-brace-format +msgid "Invalid label type in group {0}" +msgstr "Ungültiger Etikettentyp in Gruppe {0}" + +#: manufacturing_utilities/label_composer/api.py:407 +#, python-brace-format +msgid "Invalid label values in group {0}" +msgstr "Ungültige Etikettenwerte in Gruppe {0}" + +#: manufacturing_utilities/public/js/label_composer.js:876 +msgid "Invalid packaging quantity or label count" +msgstr "Ungültige Verpackungsmenge oder Etikettenanzahl" + +#: manufacturing_utilities/label_composer/api.py:143 +msgid "Invalid paper dimensions in printer settings" +msgstr "Ungültige Papierabmessungen in den Druckereinstellungen" + +#: manufacturing_utilities/label_composer/api.py:393 +#, python-brace-format +msgid "Invalid print group {0}" +msgstr "Ungültige Druckgruppe {0}" + +#: manufacturing_utilities/label_composer/api.py:80 +#: manufacturing_utilities/label_composer/api.py:85 +msgid "Invalid print language" +msgstr "Ungültige Drucksprache" + +#: manufacturing_utilities/public/js/label_composer.js:1091 +msgid "Invalid printer paper size." +msgstr "Ungültiges Papierformat für den Drucker." + +#: manufacturing_utilities/label_composer/api.py:194 +#, python-brace-format +msgid "Invalid value for {0}" +msgstr "Ungültiger Wert für {0}" + +#: manufacturing_utilities/public/js/label_composer.js:906 +msgid "Invalid warehouse label count" +msgstr "Ungültige Anzahl an Lageretiketten" + +#. Label of the item_code (Data) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:84 +#: manufacturing_utilities/public/js/label_composer.js:1607 +msgid "Item Code" +msgstr "Artikelnummer" + +#. Label of the item_groups (Table MultiSelect) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:124 +msgid "Item Groups" +msgstr "Artikelgruppen" + +#. Label of the item_name (Data) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:89 +#: manufacturing_utilities/public/js/label_composer.js:1616 +msgid "Item Name" +msgstr "Artikelname" + +#: manufacturing_utilities/public/js/label_composer.js:1723 +msgid "LIVE PREVIEW" +msgstr "LIVE-VORSCHAU" + +#. Label of the custom_label_composer (Section Break) field in DocType 'Network +#. Printer Settings' +#: manufacturing_utilities/fixtures/custom_field.json:35 +#: manufacturing_utilities/public/js/label_composer.js:1691 +#: manufacturing_utilities/public/js/label_composer.js:1924 +msgid "Label Composer" +msgstr "Etikettengestaltung" + +#. Name of a DocType +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:122 +msgid "Label Composer Template" +msgstr "Vorlage für die Etikettengestaltung" + +#: manufacturing_utilities/public/js/label_composer.js:1739 +msgid "Label HTML Preview" +msgstr "HTML-Vorschau des Etiketts" + +#. Label of the label_type (Select) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:36 +#: manufacturing_utilities/public/js/label_composer.js:1542 +msgid "Label Type" +msgstr "Etikettentyp" + +#: manufacturing_utilities/public/js/label_composer.js:86 +msgid "Label printing failed" +msgstr "Etikettendruck fehlgeschlagen" + +#: manufacturing_utilities/public/js/label_composer.js:1403 +msgid "Label printing failed: label spans multiple pages" +msgstr "Etikettendruck fehlgeschlagen: Das Etikett erstreckt sich über mehrere Seiten" + +#: manufacturing_utilities/label_composer/api.py:171 +#: manufacturing_utilities/label_composer/api.py:181 +msgid "Label quantity must be greater than zero" +msgstr "Die Menge pro Etikett muss größer als null sein" + +#: manufacturing_utilities/label_composer/api.py:66 +msgid "Label values must be an object" +msgstr "Die Etikettenwerte müssen als Objekt vorliegen" + +#: manufacturing_utilities/public/js/label_composer.js:720 +#: manufacturing_utilities/public/js/label_composer.js:738 +#: manufacturing_utilities/public/js/label_composer.js:774 +msgid "Labels" +msgstr "Etiketten" + +#: manufacturing_utilities/label_composer/api.py:251 +msgid "Live HTML preview requires an HTML/Jinja Print Format" +msgstr "Die HTML-Live-Vorschau erfordert ein HTML/Jinja-Druckformat" + +#: manufacturing_utilities/label_composer/api.py:59 +msgid "Login required" +msgstr "Anmeldung erforderlich" + +#. Label of the lookahead_days (Int) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:61 +msgid "Lookahead Days" +msgstr "Vorschauzeitraum in Tagen" + +#. Title of a Sidebar +#: manufacturing_utilities/manufacturing_overview/sidebar/manufacturing_overview/manufacturing_overview.json:32 +msgid "Manufacturing Overview" +msgstr "Fertigungsübersicht" + +#. Name of a DocType +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_item_group/manufacturing_overview_item_group.json:29 +msgid "Manufacturing Overview Item Group" +msgstr "Artikelgruppe der Fertigungsübersicht" + +#. Name of a DocType +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:135 +msgid "Manufacturing Overview Settings" +msgstr "Einstellungen der Fertigungsübersicht" + +#. Label of a Sidebar Item +#: manufacturing_utilities/manufacturing_overview/sidebar/manufacturing_overview/manufacturing_overview.json:18 +msgid "Manufacturing Overview SettingsManufacturing Overview Settings" +msgstr "Einstellungen der FertigungsübersichtEinstellungen der Fertigungsübersicht" + +#. Name of a DocType +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_warehouse/manufacturing_overview_warehouse.json:29 +msgid "Manufacturing Overview Warehouse" +msgstr "Lager der Fertigungsübersicht" + +#. Name of a Workspace +#: manufacturing_utilities/manufacturing_overview/workspace/manufacturing_utilities/manufacturing_utilities.json:19 +msgid "Manufacturing Utilities" +msgstr "Fertigungshilfsmittel" + +#: manufacturing_utilities/public/js/label_composer.js:795 +msgid "Matches document quantity" +msgstr "Entspricht der Belegmenge" + +#. Label of the maximum_rows (Int) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:54 +msgid "Maximum Rows" +msgstr "Maximale Zeilenanzahl" + +#: manufacturing_utilities/label_composer/api.py:103 +msgid "No Label Composer Template configured" +msgstr "Keine Vorlage für die Etikettengestaltung konfiguriert" + +#: manufacturing_utilities/label_composer/api.py:112 +msgid "No Print Format configured" +msgstr "Kein Druckformat konfiguriert" + +#: manufacturing_utilities/label_composer/api.py:115 +msgid "No default printer configured" +msgstr "Kein Standarddrucker konfiguriert" + +#: manufacturing_utilities/public/js/label_composer.js:1714 +msgid "No document selected" +msgstr "Kein Beleg ausgewählt" + +#: manufacturing_utilities/public/js/label_composer.js:719 +#: manufacturing_utilities/public/js/label_composer.js:1640 +msgid "Number of Labels" +msgstr "Anzahl der Etiketten" + +#: manufacturing_utilities/public/js/label_composer.js:1996 +#: manufacturing_utilities/public/js/label_composer.js:1999 +msgid "Open Label Composer" +msgstr "Etikettengestaltung öffnen" + +#: manufacturing_utilities/label_composer/api.py:331 +msgid "PDF rendering returned no data" +msgstr "Die PDF-Erzeugung hat keine Daten zurückgegeben" + +#. Label of the custom_paper_height_mm (Float) field in DocType 'Network +#. Printer Settings' +#: manufacturing_utilities/fixtures/custom_field.json:159 +msgid "Paper Height (mm)" +msgstr "Papierhöhe (mm)" + +#. Label of the custom_paper_width_mm (Float) field in DocType 'Network Printer +#. Settings' +#: manufacturing_utilities/fixtures/custom_field.json:97 +msgid "Paper Width (mm)" +msgstr "Papierbreite (mm)" + +#: manufacturing_utilities/public/js/label_composer.js:799 +msgid "Partial quantity" +msgstr "Teilmenge" + +#: manufacturing_utilities/public/js/label_composer.js:769 +msgid "Parts" +msgstr "Teile" + +#: manufacturing_utilities/public/js/label_composer.js:1748 +msgid "Preparing preview..." +msgstr "Vorschau wird vorbereitet..." + +#. Label of the preview_data_section (Section Break) field in DocType 'Label +#. Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:64 +msgid "Preview Data" +msgstr "Vorschaudaten" + +#: manufacturing_utilities/public/js/label_composer.js:1122 +msgid "Preview ready" +msgstr "Vorschau bereit" + +#: manufacturing_utilities/public/js/label_composer.js:1694 +msgid "Print" +msgstr "Drucken" + +#. Label of the print_format (Link) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:58 +msgid "Print Format" +msgstr "Druckformat" + +#: manufacturing_utilities/public/js/label_composer.js:1754 +msgid "Print Job" +msgstr "Druckauftrag" + +#: manufacturing_utilities/public/js/label_composer.js:2006 +msgid "Print Labels" +msgstr "Etiketten drucken" + +#: manufacturing_utilities/public/js/label_composer.js:1556 +msgid "Print Language" +msgstr "Drucksprache" + +#: manufacturing_utilities/label_composer/api.py:92 +#, python-brace-format +msgid "Print language {0} is not enabled" +msgstr "Die Drucksprache {0} ist nicht aktiviert" + +#: manufacturing_utilities/public/js/label_composer.js:815 +msgid "Printing allowed" +msgstr "Drucken zulässig" + +#: manufacturing_utilities/public/js/label_composer.js:81 +msgid "Printing successful" +msgstr "Druck erfolgreich" + +#. Label of the quantity (Float) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:94 +#: manufacturing_utilities/public/js/label_composer.js:710 +msgid "Quantity" +msgstr "Menge" + +#: manufacturing_utilities/public/js/label_composer.js:709 +#: manufacturing_utilities/public/js/label_composer.js:737 +msgid "Quantity per Label" +msgstr "Menge pro Etikett" + +#. Label of the refresh_interval (Int) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:43 +msgid "Refresh Interval" +msgstr "Aktualisierungsintervall" + +#: manufacturing_utilities/public/js/label_composer.js:726 +msgid "Remove" +msgstr "Entfernen" + +#. Label of the show_customer (Check) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:94 +msgid "Show Customer" +msgstr "Kunden anzeigen" + +#. Label of the show_delivery_date (Check) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:118 +msgid "Show Delivery Date" +msgstr "Lieferdatum anzeigen" + +#. Label of the show_item_code (Check) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:100 +msgid "Show Item Code" +msgstr "Artikelnummer anzeigen" + +#. Label of the show_sales_order (Check) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:106 +msgid "Show Sales Order" +msgstr "Kundenauftrag anzeigen" + +#. Label of the show_work_order (Check) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:112 +msgid "Show Work Order" +msgstr "Fertigungsauftrag anzeigen" + +#: manufacturing_utilities/public/js/label_composer.js:1709 +msgid "Source" +msgstr "Quelle" + +#: manufacturing_utilities/public/js/label_composer.js:1576 +msgid "Source Item" +msgstr "Quellartikel" + +#. Label of the supplier (Data) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:79 +#: manufacturing_utilities/public/js/label_composer.js:1598 +msgid "Supplier" +msgstr "Lieferant" + +#. Option for the 'Label Type' (Select) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:37 +msgid "Supplier Label" +msgstr "Lieferantenetikett" + +#. Name of a role +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:134 +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:144 +msgid "System Manager" +msgstr "Systemverwalter" + +#. Label of the template_name (Data) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:111 +msgid "Template Name" +msgstr "Vorlagenname" + +#: manufacturing_utilities/public/js/label_composer.js:1670 +msgid "Text" +msgstr "Text" + +#: manufacturing_utilities/label_composer/api.py:213 +#, python-brace-format +msgid "Text value is too long for {0}" +msgstr "Der Text für {0} ist zu lang" + +#: manufacturing_utilities/label_composer/api.py:350 +msgid "The PDF contains no pages" +msgstr "Die PDF-Datei enthält keine Seiten" + +#: manufacturing_utilities/label_composer/api.py:127 +msgid "The Print Format belongs to a different DocType" +msgstr "Das Druckformat gehört zu einem anderen DocType" + +#: manufacturing_utilities/label_composer/api.py:378 +msgid "The print job is empty" +msgstr "Der Druckauftrag ist leer" + +#: manufacturing_utilities/label_composer/api.py:131 +msgid "The selected Print Format is disabled" +msgstr "Das ausgewählte Druckformat ist deaktiviert" + +#: manufacturing_utilities/public/js/label_composer.js:1231 +msgid "This label is not configured yet." +msgstr "Dieses Etikett ist noch nicht konfiguriert." + +#: manufacturing_utilities/label_composer/api.py:109 +msgid "This label template is disabled" +msgstr "Diese Etikettenvorlage ist deaktiviert" + +#: manufacturing_utilities/label_composer/api.py:69 +msgid "Too many label fields" +msgstr "Zu viele Etikettenfelder" + +#: manufacturing_utilities/label_composer/api.py:428 +#, python-brace-format +msgid "Too many labels (maximum {0})" +msgstr "Zu viele Etiketten (maximal {0})" + +#: manufacturing_utilities/label_composer/api.py:382 +#, python-brace-format +msgid "Too many print groups (maximum {0})" +msgstr "Zu viele Druckgruppen (maximal {0})" + +#: manufacturing_utilities/label_composer/api.py:100 +msgid "Unknown label type" +msgstr "Unbekannter Etikettentyp" + +#: manufacturing_utilities/public/js/label_composer.js:1204 +msgid "Updating preview..." +msgstr "Vorschau wird aktualisiert..." + +#. Label of the view_section (Section Break) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:88 +msgid "View" +msgstr "Ansicht" + +#. Label of the warehouse (Table MultiSelect) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:76 +msgid "Warehouse" +msgstr "Lager" + +#. Option for the 'Label Type' (Select) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:37 +msgid "Warehouse Label" +msgstr "Lageretikett" + +#: manufacturing_utilities/public/js/label_composer.js:1661 +msgid "Warehouse Label Count" +msgstr "Anzahl der Lageretiketten" + +#: manufacturing_utilities/public/js/label_composer.js:1286 +msgid "groups" +msgstr "Gruppen" + +#. Description of the 'Refresh Interval' (Int) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:40 +msgid "in seconds" +msgstr "in Sekunden" + +#. Label of the item_group (Link) field in DocType 'Manufacturing Overview Item +#. Group' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_item_group/manufacturing_overview_item_group.json:17 +msgid "item_group" +msgstr "Artikelgruppe" + +#: manufacturing_utilities/public/js/label_composer.js:1282 +msgid "labels" +msgstr "Etiketten" + +#: manufacturing_utilities/label_composer/api.py:523 +msgid "pycups is not installed on the Frappe server" +msgstr "pycups ist auf dem Frappe-Server nicht installiert" + +#. Label of the warehouse (Link) field in DocType 'Manufacturing Overview +#. Warehouse' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_warehouse/manufacturing_overview_warehouse.json:17 +msgid "warehouse" +msgstr "Lager" + diff --git a/manufacturing_utilities/locale/main.pot b/manufacturing_utilities/locale/main.pot new file mode 100644 index 0000000..78192bc --- /dev/null +++ b/manufacturing_utilities/locale/main.pot @@ -0,0 +1,644 @@ +# Translations template for Manufacturing Utilities. +# Copyright (C) 2026 CAnetzberger Design +# This file is distributed under the same license as the Manufacturing Utilities project. +# FIRST AUTHOR , 2026. +# +msgid "" +msgstr "" +"Project-Id-Version: Manufacturing Utilities VERSION\n" +"Report-Msgid-Bugs-To: info@canetzberger.design\n" +"POT-Creation-Date: 2026-11-02 19:20+0000\n" +"PO-Revision-Date: 2026-11-02 19:20+0000\n" +"Last-Translator: info@canetzberger.design\n" +"Language-Team: info@canetzberger.design\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.18.0\n" + +#. Description of the 'Maximum Rows' (Int) field in DocType 'Manufacturing +#. Overview Settings' +#. Description of the 'Lookahead Days' (Int) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:51 +msgid "0 = unlimited" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:747 +msgid "Add Quantity" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1649 +msgid "Also Print Warehouse Labels" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:494 +#, python-brace-format +msgid "CUPS printer queue {0} was not found" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:501 +#, python-brace-format +msgid "CUPS printer {0} is not accepting jobs" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:466 +#, python-brace-format +msgid "CUPS queue name is missing for printer {0}" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:449 +#, python-brace-format +msgid "CUPS server address is missing for printer {0}" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:479 +#, python-brace-format +msgid "Cannot connect to CUPS server for {0}: {1}" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:658 +msgid "Check the CUPS queue before trying again. Some labels may already have been submitted." +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1196 +msgid "Complete the quantities to see a preview." +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:118 +msgid "Configured Print Format not found" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1140 +msgid "Content extends beyond the label area. Check the Print Format before printing." +msgstr "" + +#. Label of the customer (Data) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:74 +#: manufacturing_utilities/public/js/label_composer.js:1589 +msgid "Customer" +msgstr "" + +#. Option for the 'Label Type' (Select) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:37 +msgid "Customer Label" +msgstr "" + +#. Label of the default_printer (Link) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:52 +msgid "Default Printer" +msgstr "" + +#. Label of the delivery_date_column (Column Break) field in DocType 'Label +#. Composer Template' +#. Label of the delivery_date (Date) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:69 +#: manufacturing_utilities/public/js/label_composer.js:1625 +msgid "Delivery Date" +msgstr "" + +#. Label of the enabled (Check) field in DocType 'Label Composer Template' +#. Label of the enabled (Check) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:43 +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:36 +msgid "Enabled" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:787 +msgid "Enter valid quantities and label counts." +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:809 +msgid "Exceeds document quantity" +msgstr "" + +#. Label of the filter_section (Section Break) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:66 +msgid "Filter" +msgstr "" + +#. Label of the free_text (Text Editor) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:105 +msgid "Free Text" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:206 +msgid "Free text is too long" +msgstr "" + +#. Label of the general_section (Section Break) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:30 +msgid "General" +msgstr "" + +#. Label of the generic_section (Section Break) field in DocType 'Label +#. Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:31 +msgid "Generic" +msgstr "" + +#. Option for the 'Label Type' (Select) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:37 +msgid "Generic Label" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:576 +#, python-brace-format +msgid "Group {0} generated an empty PDF" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:535 +#: manufacturing_utilities/label_composer/api.py:566 +#, python-brace-format +msgid "Group {0}: {1}" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1728 +msgid "HTML" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1248 +msgid "HTML preview failed. Check the server error log." +msgstr "" + +#. Label of the include_child_warehouses (Check) field in DocType +#. 'Manufacturing Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:83 +msgid "Include Child Warehouses" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:457 +#: manufacturing_utilities/label_composer/api.py:460 +msgid "Invalid CUPS port" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:421 +#, python-brace-format +msgid "Invalid copy count in group {0}" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:920 +msgid "Invalid label count" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:177 +msgid "Invalid label quantity" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:400 +#, python-brace-format +msgid "Invalid label type in group {0}" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:407 +#, python-brace-format +msgid "Invalid label values in group {0}" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:876 +msgid "Invalid packaging quantity or label count" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:143 +msgid "Invalid paper dimensions in printer settings" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:393 +#, python-brace-format +msgid "Invalid print group {0}" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:80 +#: manufacturing_utilities/label_composer/api.py:85 +msgid "Invalid print language" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1091 +msgid "Invalid printer paper size." +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:194 +#, python-brace-format +msgid "Invalid value for {0}" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:906 +msgid "Invalid warehouse label count" +msgstr "" + +#. Label of the item_code (Data) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:84 +#: manufacturing_utilities/public/js/label_composer.js:1607 +msgid "Item Code" +msgstr "" + +#. Label of the item_groups (Table MultiSelect) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:124 +msgid "Item Groups" +msgstr "" + +#. Label of the item_name (Data) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:89 +#: manufacturing_utilities/public/js/label_composer.js:1616 +msgid "Item Name" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1723 +msgid "LIVE PREVIEW" +msgstr "" + +#. Label of the custom_label_composer (Section Break) field in DocType 'Network +#. Printer Settings' +#: manufacturing_utilities/fixtures/custom_field.json:35 +#: manufacturing_utilities/public/js/label_composer.js:1691 +#: manufacturing_utilities/public/js/label_composer.js:1924 +msgid "Label Composer" +msgstr "" + +#. Name of a DocType +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:122 +msgid "Label Composer Template" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1739 +msgid "Label HTML Preview" +msgstr "" + +#. Label of the label_type (Select) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:36 +#: manufacturing_utilities/public/js/label_composer.js:1542 +msgid "Label Type" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:86 +msgid "Label printing failed" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1403 +msgid "Label printing failed: label spans multiple pages" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:171 +#: manufacturing_utilities/label_composer/api.py:181 +msgid "Label quantity must be greater than zero" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:66 +msgid "Label values must be an object" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:720 +#: manufacturing_utilities/public/js/label_composer.js:738 +#: manufacturing_utilities/public/js/label_composer.js:774 +msgid "Labels" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:251 +msgid "Live HTML preview requires an HTML/Jinja Print Format" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:59 +msgid "Login required" +msgstr "" + +#. Label of the lookahead_days (Int) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:61 +msgid "Lookahead Days" +msgstr "" + +#. Title of a Sidebar +#: manufacturing_utilities/manufacturing_overview/sidebar/manufacturing_overview/manufacturing_overview.json:32 +msgid "Manufacturing Overview" +msgstr "" + +#. Name of a DocType +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_item_group/manufacturing_overview_item_group.json:29 +msgid "Manufacturing Overview Item Group" +msgstr "" + +#. Name of a DocType +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:135 +msgid "Manufacturing Overview Settings" +msgstr "" + +#. Label of a Sidebar Item +#: manufacturing_utilities/manufacturing_overview/sidebar/manufacturing_overview/manufacturing_overview.json:18 +msgid "Manufacturing Overview SettingsManufacturing Overview Settings" +msgstr "" + +#. Name of a DocType +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_warehouse/manufacturing_overview_warehouse.json:29 +msgid "Manufacturing Overview Warehouse" +msgstr "" + +#. Name of a Workspace +#: manufacturing_utilities/manufacturing_overview/workspace/manufacturing_utilities/manufacturing_utilities.json:19 +msgid "Manufacturing Utilities" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:795 +msgid "Matches document quantity" +msgstr "" + +#. Label of the maximum_rows (Int) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:54 +msgid "Maximum Rows" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:103 +msgid "No Label Composer Template configured" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:112 +msgid "No Print Format configured" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:115 +msgid "No default printer configured" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1714 +msgid "No document selected" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:719 +#: manufacturing_utilities/public/js/label_composer.js:1640 +msgid "Number of Labels" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1996 +#: manufacturing_utilities/public/js/label_composer.js:1999 +msgid "Open Label Composer" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:331 +msgid "PDF rendering returned no data" +msgstr "" + +#. Label of the custom_paper_height_mm (Float) field in DocType 'Network +#. Printer Settings' +#: manufacturing_utilities/fixtures/custom_field.json:159 +msgid "Paper Height (mm)" +msgstr "" + +#. Label of the custom_paper_width_mm (Float) field in DocType 'Network Printer +#. Settings' +#: manufacturing_utilities/fixtures/custom_field.json:97 +msgid "Paper Width (mm)" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:799 +msgid "Partial quantity" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:769 +msgid "Parts" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1748 +msgid "Preparing preview..." +msgstr "" + +#. Label of the preview_data_section (Section Break) field in DocType 'Label +#. Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:64 +msgid "Preview Data" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1122 +msgid "Preview ready" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1694 +msgid "Print" +msgstr "" + +#. Label of the print_format (Link) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:58 +msgid "Print Format" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1754 +msgid "Print Job" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:2006 +msgid "Print Labels" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1556 +msgid "Print Language" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:92 +#, python-brace-format +msgid "Print language {0} is not enabled" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:815 +msgid "Printing allowed" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:81 +msgid "Printing successful" +msgstr "" + +#. Label of the quantity (Float) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:94 +#: manufacturing_utilities/public/js/label_composer.js:710 +msgid "Quantity" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:709 +#: manufacturing_utilities/public/js/label_composer.js:737 +msgid "Quantity per Label" +msgstr "" + +#. Label of the refresh_interval (Int) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:43 +msgid "Refresh Interval" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:726 +msgid "Remove" +msgstr "" + +#. Label of the show_customer (Check) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:94 +msgid "Show Customer" +msgstr "" + +#. Label of the show_delivery_date (Check) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:118 +msgid "Show Delivery Date" +msgstr "" + +#. Label of the show_item_code (Check) field in DocType 'Manufacturing Overview +#. Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:100 +msgid "Show Item Code" +msgstr "" + +#. Label of the show_sales_order (Check) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:106 +msgid "Show Sales Order" +msgstr "" + +#. Label of the show_work_order (Check) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:112 +msgid "Show Work Order" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1709 +msgid "Source" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1576 +msgid "Source Item" +msgstr "" + +#. Label of the supplier (Data) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:79 +#: manufacturing_utilities/public/js/label_composer.js:1598 +msgid "Supplier" +msgstr "" + +#. Option for the 'Label Type' (Select) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:37 +msgid "Supplier Label" +msgstr "" + +#. Name of a role +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:134 +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:144 +msgid "System Manager" +msgstr "" + +#. Label of the template_name (Data) field in DocType 'Label Composer Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:111 +msgid "Template Name" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1670 +msgid "Text" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:213 +#, python-brace-format +msgid "Text value is too long for {0}" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:350 +msgid "The PDF contains no pages" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:127 +msgid "The Print Format belongs to a different DocType" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:378 +msgid "The print job is empty" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:131 +msgid "The selected Print Format is disabled" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1231 +msgid "This label is not configured yet." +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:109 +msgid "This label template is disabled" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:69 +msgid "Too many label fields" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:428 +#, python-brace-format +msgid "Too many labels (maximum {0})" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:382 +#, python-brace-format +msgid "Too many print groups (maximum {0})" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:100 +msgid "Unknown label type" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1204 +msgid "Updating preview..." +msgstr "" + +#. Label of the view_section (Section Break) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:88 +msgid "View" +msgstr "" + +#. Label of the warehouse (Table MultiSelect) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:76 +msgid "Warehouse" +msgstr "" + +#. Option for the 'Label Type' (Select) field in DocType 'Label Composer +#. Template' +#: manufacturing_utilities/label_composer/doctype/label_composer_template/label_composer_template.json:37 +msgid "Warehouse Label" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1661 +msgid "Warehouse Label Count" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1286 +msgid "groups" +msgstr "" + +#. Description of the 'Refresh Interval' (Int) field in DocType 'Manufacturing +#. Overview Settings' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_settings/manufacturing_overview_settings.json:40 +msgid "in seconds" +msgstr "" + +#. Label of the item_group (Link) field in DocType 'Manufacturing Overview Item +#. Group' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_item_group/manufacturing_overview_item_group.json:17 +msgid "item_group" +msgstr "" + +#: manufacturing_utilities/public/js/label_composer.js:1282 +msgid "labels" +msgstr "" + +#: manufacturing_utilities/label_composer/api.py:523 +msgid "pycups is not installed on the Frappe server" +msgstr "" + +#. Label of the warehouse (Link) field in DocType 'Manufacturing Overview +#. Warehouse' +#: manufacturing_utilities/manufacturing_overview/doctype/manufacturing_overview_warehouse/manufacturing_overview_warehouse.json:17 +msgid "warehouse" +msgstr "" + diff --git a/manufacturing_utilities/manufacturing_overview/api.py b/manufacturing_utilities/manufacturing_overview/api.py index 88e34fc..7a106bc 100644 --- a/manufacturing_utilities/manufacturing_overview/api.py +++ b/manufacturing_utilities/manufacturing_overview/api.py @@ -1,51 +1,267 @@ import frappe -from frappe.utils import flt + +from frappe.utils import flt, getdate from manufacturing_utilities.manufacturing_overview.cache import ( get_cached_overview, set_cached_overview, ) -@frappe.whitelist(methods=["GET"]) -def get_manufacturing_overview(): - # ------------------------------------------------------------------------- - # Cache - # ------------------------------------------------------------------------- +@frappe.whitelist() +def get_manufacturing_overview(): cached = get_cached_overview() if cached is not None: return cached - # ------------------------------------------------------------------------- - # Settings - # ------------------------------------------------------------------------- + settings = frappe.get_cached_doc( + "Manufacturing Overview Settings" + ) - settings = frappe.get_cached_doc("Manufacturing Overview Settings") + item_groups = [ + row.item_group + for row in settings.item_groups + if row.item_group + ] - item_groups = [row.item_group for row in settings.item_groups] - warehouses = [row.warehouse for row in settings.warehouse] - maximum_rows = int(settings.maximum_rows or 0) + warehouses = [ + row.warehouse + for row in settings.warehouse + if row.warehouse + ] + + maximum_rows = int( + settings.maximum_rows or 0 + ) if not item_groups: result = {"items": []} set_cached_overview(result) return result - # ------------------------------------------------------------------------- - # Sales Order Items - # ------------------------------------------------------------------------- + rows = get_sales_order_items( + item_groups + ) - item_group_placeholders = ", ".join(["%s"] * len(item_groups)) + if not rows: + result = {"items": []} + set_cached_overview(result) + return result - query_values = list(item_groups) - limit_clause = "" + work_orders = get_work_orders( + rows + ) + + subcontracting = get_subcontracting_data( + rows + ) + + warehouse_qty = get_warehouse_quantities( + rows, + warehouses, + ) + + prepared_rows = [] + + for row in rows: + work_order = work_orders.get( + row.sales_order_item + ) + + subcontracting_rows = list( + subcontracting.get( + row.sales_order_item, + [], + ) + ) + + planned_end_date = ( + work_order.planned_end_date + if work_order + else None + ) + + # A Planned End Date means that this Work Order + # requires some form of subcontracting. + # + # If purchasing has not yet created a PO, still + # show the subcontracting planning card. + if ( + planned_end_date + and not subcontracting_rows + ): + subcontracting_rows.append( + get_planned_subcontracting_entry( + row=row, + work_order=work_order, + ) + ) + + effective_sort_date = get_effective_sort_date( + delivery_date=row.delivery_date, + planned_end_date=planned_end_date, + subcontracting_rows=subcontracting_rows, + ) + + prepared_rows.append( + { + "row": row, + "work_order": work_order, + "planned_end_date": planned_end_date, + "effective_sort_date": effective_sort_date, + "subcontracting": subcontracting_rows, + } + ) + + # Important: + # maximum_rows is applied AFTER effective-date sorting. + prepared_rows.sort( + key=overview_sort_key + ) + + remaining_stock = dict( + warehouse_qty + ) + + items = [] + + for prepared in prepared_rows: + row = prepared["row"] + work_order = prepared["work_order"] + + qty = flt( + row.qty + ) + + delivered_qty = flt( + row.delivered_qty + ) + + remaining_qty = flt( + row.remaining_qty + ) + + work_order_qty = flt( + row.work_order_qty + ) + + current_warehouse_qty = flt( + remaining_stock.get( + row.item_code, + 0, + ) + ) + + if delivered_qty > 0: + status = "partially_delivered" + + elif ( + current_warehouse_qty + >= remaining_qty + ): + status = "in_warehouse" + + elif work_order_qty > 0: + status = "to_produce" + + else: + status = "no_work_order" + + remaining_stock[ + row.item_code + ] = max( + current_warehouse_qty + - remaining_qty, + 0, + ) + + items.append( + { + "sales_order": + row.sales_order, + + "sales_order_item": + row.sales_order_item, + + "work_order": + ( + work_order.name + if work_order + else None + ), + + "work_order_planned_end_date": + prepared[ + "planned_end_date" + ], + + "effective_sort_date": + prepared[ + "effective_sort_date" + ], + + "item_code": + row.item_code, + + "item_name": + row.item_name, + + "customer": + row.customer, + + "qty": + qty, + + "delivered_qty": + delivered_qty, + + "remaining_qty": + remaining_qty, + + "delivery_date": + row.delivery_date, + + "warehouse_qty": + current_warehouse_qty, + + "work_order_qty": + work_order_qty, + + "status": + status, + + "subcontracting": + prepared[ + "subcontracting" + ], + } + ) if maximum_rows > 0: - limit_clause = "LIMIT %s" - query_values.append(maximum_rows) + items = items[ + :maximum_rows + ] - rows = frappe.db.sql( + result = { + "items": items, + } + + set_cached_overview( + result + ) + + return result + + +def get_sales_order_items( + item_groups, +): + placeholders = ", ".join( + ["%s"] * len(item_groups) + ) + + return frappe.db.sql( f""" SELECT soi.name AS sales_order_item, @@ -55,372 +271,683 @@ def get_manufacturing_overview(): so.customer, soi.qty, soi.delivered_qty, - (soi.qty - soi.delivered_qty) AS remaining_qty, + ( + soi.qty + - soi.delivered_qty + ) AS remaining_qty, soi.delivery_date, soi.work_order_qty - FROM `tabSales Order Item` soi - INNER JOIN `tabSales Order` so + + FROM + `tabSales Order Item` soi + + INNER JOIN + `tabSales Order` so ON so.name = soi.parent - INNER JOIN `tabItem` item + + INNER JOIN + `tabItem` item ON item.name = soi.item_code + WHERE so.docstatus = 1 - AND so.status NOT IN ('Closed', 'Completed') - AND soi.delivered_qty < soi.qty - AND item.item_group IN ({item_group_placeholders}) + + AND so.status NOT IN ( + 'Closed', + 'Completed' + ) + + AND soi.delivered_qty + < soi.qty + + AND item.item_group + IN ({placeholders}) + ORDER BY soi.delivery_date ASC, soi.item_code ASC, soi.name ASC - {limit_clause} """, - tuple(query_values), + tuple(item_groups), as_dict=True, ) - if not rows: - result = {"items": []} - set_cached_overview(result) - return result - # ------------------------------------------------------------------------- - # Warehouse stock - # ------------------------------------------------------------------------- - - warehouse_stock = {} - - if warehouses: - item_codes = list({row.item_code for row in rows}) - - item_placeholders = ", ".join(["%s"] * len(item_codes)) - warehouse_placeholders = ", ".join(["%s"] * len(warehouses)) - - stock_rows = frappe.db.sql( - f""" - SELECT - item_code, - SUM(actual_qty) AS actual_qty - FROM `tabBin` - WHERE - item_code IN ({item_placeholders}) - AND warehouse IN ({warehouse_placeholders}) - GROUP BY - item_code - """, - tuple(item_codes + warehouses), - as_dict=True, - ) - - warehouse_stock = { - row.item_code: flt(row.actual_qty) - for row in stock_rows +def get_work_orders( + rows, +): + sales_order_items = list( + { + row.sales_order_item + for row in rows + if row.sales_order_item } + ) - # Earlier delivery dates get first access to available stock. - remaining_stock = warehouse_stock.copy() - - # ------------------------------------------------------------------------- - # Work Orders - # ------------------------------------------------------------------------- - - sales_order_items = list({ - row.sales_order_item - for row in rows - }) + if not sales_order_items: + return {} work_order_rows = frappe.get_all( "Work Order", filters={ - "sales_order_item": ["in", sales_order_items], + "sales_order_item": [ + "in", + sales_order_items, + ], "docstatus": 1, }, fields=[ "name", "sales_order_item", + "planned_end_date", "creation", ], order_by="creation desc", ) - work_orders = {} + result = {} for work_order in work_order_rows: - # If multiple submitted Work Orders exist, use the newest one - # as the navigation target. - if work_order.sales_order_item not in work_orders: - work_orders[work_order.sales_order_item] = work_order.name - - # ------------------------------------------------------------------------- - # Build response - # ------------------------------------------------------------------------- - - items = [] - - for row in rows: - qty = flt(row.qty) - delivered_qty = flt(row.delivered_qty) - remaining_qty = flt(row.remaining_qty) - work_order_qty = flt(row.work_order_qty) - - current_warehouse_qty = flt( - remaining_stock.get(row.item_code, 0) + sales_order_item = ( + work_order.sales_order_item ) - if delivered_qty > 0: - status = "partially_delivered" - - elif current_warehouse_qty >= remaining_qty: - status = "in_warehouse" - - elif work_order_qty > 0: - status = "to_produce" - - else: - status = "no_work_order" - - subcontracting = get_subcontracting_data(rows) - - items.append( - { - "sales_order": row.sales_order, - "sales_order_item": row.sales_order_item, - "work_order": work_orders.get(row.sales_order_item), - "item_code": row.item_code, - "item_name": row.item_name, - "customer": row.customer, - "qty": qty, - "delivered_qty": delivered_qty, - "remaining_qty": remaining_qty, - "delivery_date": row.delivery_date, - "warehouse_qty": current_warehouse_qty, - "work_order_qty": work_order_qty, - "status": status, - "subcontracting": - subcontracting.get( - row.sales_order_item, - [] - ), - } - ) - - # Reserve stock for this position so later Sales Orders cannot - # use the same stock again. - remaining_stock[row.item_code] = max( - current_warehouse_qty - remaining_qty, - 0, - ) - - result = {"items": items} - - # Stock changes are intentionally allowed to remain stale for at most - # 60 seconds. Sales Orders, Work Orders and settings explicitly clear - # this cache. - set_cached_overview( - result, - expires_in_sec=60, - ) + # The query is newest first. + # Keep the newest submitted WO. + if sales_order_item not in result: + result[ + sales_order_item + ] = work_order return result +def get_planned_subcontracting_entry( + row, + work_order, +): + return { + "source": + "planning", -def get_subcontracting_data(rows): + "purchase_order": + None, + + "purchase_order_item": + None, + + "subcontracting_order": + None, + + "supplier": + None, + + "process": + "Subcontracting", + + "qty": + flt( + row.remaining_qty + ), + + "received_qty": + 0, + + "status": + "No Purchase Order", + + "material_transferred": + False, + } + + +def get_warehouse_quantities( + rows, + warehouses, +): + if ( + not rows + or not warehouses + ): + return {} + + item_codes = list( + { + row.item_code + for row in rows + if row.item_code + } + ) + + if not item_codes: + return {} + + item_placeholders = ", ".join( + ["%s"] * len(item_codes) + ) + + warehouse_placeholders = ", ".join( + ["%s"] * len(warehouses) + ) + + values = ( + tuple(item_codes) + + tuple(warehouses) + ) + + bin_rows = frappe.db.sql( + f""" + SELECT + item_code, + SUM(actual_qty) + AS actual_qty + + FROM + `tabBin` + + WHERE + item_code IN ( + {item_placeholders} + ) + + AND warehouse IN ( + {warehouse_placeholders} + ) + + GROUP BY + item_code + """, + values, + as_dict=True, + ) + + return { + row.item_code: + flt(row.actual_qty) + + for row in bin_rows + } + + +def get_subcontracting_data( + rows, +): if not rows: return {} - sales_order_items = list({ - row.sales_order_item - for row in rows - }) - - placeholders = ", ".join( - ["%s"] * len(sales_order_items) + sales_order_items = list( + { + row.sales_order_item + for row in rows + if row.sales_order_item + } ) - # ------------------------------------------------------------------------- - # Subcontracted Purchase Orders linked to our Sales Order Items - # ------------------------------------------------------------------------- + if not sales_order_items: + return {} + placeholders = ", ".join( + ["%s"] + * len(sales_order_items) + ) + + # Include both: + # + # docstatus 0 = Draft + # docstatus 1 = Submitted + # + # Cancelled documents are ignored. purchase_order_items = frappe.db.sql( f""" SELECT - poi.name AS purchase_order_item, + poi.name + AS purchase_order_item, + poi.sales_order_item, - poi.parent AS purchase_order, + poi.parent + AS purchase_order, poi.item_code, + poi.item_name, poi.fg_item, + poi.fg_item_qty, poi.qty, + poi.schedule_date, + poi.expected_delivery_date, po.supplier, + po.supplier_name, - po.status AS purchase_order_status - FROM `tabPurchase Order Item` poi + po.status + AS purchase_order_status, - INNER JOIN `tabPurchase Order` po + po.docstatus + AS purchase_order_docstatus, + + po.creation + + FROM + `tabPurchase Order Item` poi + + INNER JOIN + `tabPurchase Order` po ON po.name = poi.parent WHERE - poi.sales_order_item IN ({placeholders}) - AND po.docstatus = 1 + poi.sales_order_item + IN ({placeholders}) + + AND po.docstatus < 2 + AND po.is_subcontracted = 1 - AND po.status NOT IN ('Closed', 'Completed') + + ORDER BY + po.docstatus DESC, + po.creation DESC """, - tuple(sales_order_items), + tuple( + sales_order_items + ), as_dict=True, ) if not purchase_order_items: return {} - purchase_order_item_names = [ - row.purchase_order_item - for row in purchase_order_items + # Group PO items by Sales Order Item. + purchase_orders_by_so_item = {} + + for poi in purchase_order_items: + purchase_orders_by_so_item\ + .setdefault( + poi.sales_order_item, + [], + )\ + .append(poi) + + selected_purchase_order_items = [] + + for ( + sales_order_item, + linked_purchase_orders, + ) in purchase_orders_by_so_item.items(): + + submitted = [ + poi + for poi in linked_purchase_orders + if poi.purchase_order_docstatus == 1 + ] + + drafts = [ + poi + for poi in linked_purchase_orders + if poi.purchase_order_docstatus == 0 + ] + + # If a real submitted PO exists, + # don't also show its old planning draft. + if submitted: + selected_purchase_order_items.extend( + submitted + ) + + else: + selected_purchase_order_items.extend( + drafts + ) + + if not selected_purchase_order_items: + return {} + + submitted_purchase_order_items = [ + row + for row in selected_purchase_order_items + if row.purchase_order_docstatus == 1 ] - poi_placeholders = ", ".join( - ["%s"] * len(purchase_order_item_names) - ) - - # ------------------------------------------------------------------------- - # Subcontracting Orders created from those Purchase Order Items - # ------------------------------------------------------------------------- - - subcontracting_orders = frappe.db.sql( - f""" - SELECT - sco.name AS subcontracting_order, - sco.purchase_order, - sco.supplier, - sco.supplier_name, - sco.schedule_date, - sco.status, - - scoi.purchase_order_item, - scoi.qty, - scoi.received_qty - - FROM `tabSubcontracting Order Item` scoi - - INNER JOIN `tabSubcontracting Order` sco - ON sco.name = scoi.parent - - WHERE - scoi.purchase_order_item IN ({poi_placeholders}) - AND sco.docstatus < 2 - - ORDER BY - sco.creation ASC - """, - tuple(purchase_order_item_names), - as_dict=True, - ) - sco_by_purchase_order_item = {} - for row in subcontracting_orders: - sco_by_purchase_order_item.setdefault( - row.purchase_order_item, - [] - ).append(row) + if submitted_purchase_order_items: + submitted_poi_names = [ + row.purchase_order_item + for row in submitted_purchase_order_items + ] - # ------------------------------------------------------------------------- - # Build lookup keyed by Sales Order Item - # ------------------------------------------------------------------------- + poi_placeholders = ", ".join( + ["%s"] + * len(submitted_poi_names) + ) + + subcontracting_orders = frappe.db.sql( + f""" + SELECT + sco.name + AS subcontracting_order, + + sco.purchase_order, + + sco.supplier, + + sco.supplier_name, + + sco.schedule_date, + + sco.status, + + scoi.purchase_order_item, + + scoi.qty, + + scoi.received_qty, + + sco.creation + + FROM + `tabSubcontracting Order Item` + scoi + + INNER JOIN + `tabSubcontracting Order` + sco + + ON sco.name = + scoi.parent + + WHERE + scoi.purchase_order_item + IN ({poi_placeholders}) + + AND sco.docstatus = 1 + + ORDER BY + sco.creation DESC + """, + tuple( + submitted_poi_names + ), + as_dict=True, + ) + + for row in subcontracting_orders: + # Prefer the newest submitted SCO + # if more than one somehow exists. + if ( + row.purchase_order_item + not in sco_by_purchase_order_item + ): + sco_by_purchase_order_item[ + row.purchase_order_item + ] = row result = {} - for poi in purchase_order_items: - sales_order_item = poi.sales_order_item + for poi in selected_purchase_order_items: + sales_order_item = ( + poi.sales_order_item + ) result.setdefault( sales_order_item, - [] + [], ) - linked_orders = sco_by_purchase_order_item.get( - poi.purchase_order_item, - [] - ) + # ------------------------------------------------------------- + # Draft Purchase Order + # ------------------------------------------------------------- - # PO exists, but no Subcontracting Order yet. - if not linked_orders: - result[sales_order_item].append( + if ( + poi.purchase_order_docstatus + == 0 + ): + result[ + sales_order_item + ].append( { - "purchase_order": poi.purchase_order, - "purchase_order_item": poi.purchase_order_item, - "subcontracting_order": None, + "source": + "purchase_order_draft", - "supplier": ( - poi.supplier_name - or poi.supplier - ), + "purchase_order": + poi.purchase_order, - "process": ( - poi.item_name - or poi.item_code - ), + "purchase_order_item": + poi.purchase_order_item, - "qty": flt( - poi.fg_item_qty - or poi.qty - ), + "subcontracting_order": + None, - "delivery_date": ( - poi.expected_delivery_date - or poi.schedule_date - ), + "supplier": + ( + poi.supplier_name + or poi.supplier + ), - "status": "To Transfer", + "process": + ( + poi.item_name + or poi.item_code + ), + + "qty": + flt( + poi.fg_item_qty + or poi.qty + ), + + "received_qty": + 0, + + "status": + "Draft", + + "material_transferred": + False, } ) continue - for sco in linked_orders: - result[sales_order_item].append( + # ------------------------------------------------------------- + # Submitted PO + # ------------------------------------------------------------- + + sco = ( + sco_by_purchase_order_item.get( + poi.purchase_order_item + ) + ) + + # PO submitted, but SCO not yet created/submitted. + if not sco: + result[ + sales_order_item + ].append( { - "purchase_order": poi.purchase_order, - "purchase_order_item": poi.purchase_order_item, + "source": + "purchase_order", + + "purchase_order": + poi.purchase_order, + + "purchase_order_item": + poi.purchase_order_item, "subcontracting_order": - sco.subcontracting_order, + None, - "supplier": ( + "supplier": + ( + poi.supplier_name + or poi.supplier + ), + + "process": + ( + poi.item_name + or poi.item_code + ), + + "qty": + flt( + poi.fg_item_qty + or poi.qty + ), + + "received_qty": + 0, + + "status": + "To Transfer", + + "material_transferred": + False, + } + ) + + continue + + # ------------------------------------------------------------- + # Submitted Subcontracting Order + # ------------------------------------------------------------- + + material_transferred = ( + has_material_been_transferred( + sco.status + ) + ) + + result[ + sales_order_item + ].append( + { + "source": + "subcontracting_order", + + "purchase_order": + poi.purchase_order, + + "purchase_order_item": + poi.purchase_order_item, + + "subcontracting_order": + sco.subcontracting_order, + + "supplier": + ( sco.supplier_name or sco.supplier ), - "process": ( + "process": + ( poi.item_name or poi.item_code ), - "qty": flt( + "qty": + flt( sco.qty or poi.fg_item_qty or poi.qty ), - "received_qty": - flt(sco.received_qty), - - "delivery_date": ( - sco.schedule_date - or poi.expected_delivery_date - or poi.schedule_date + "received_qty": + flt( + sco.received_qty ), - "status": sco.status, - } + "status": + sco.status, + + "material_transferred": + material_transferred, + } + ) + + return result + + +def has_material_been_transferred( + status, +): + # Partial Material Transferred deliberately + # does NOT count as complete handoff. + return status in { + "Material Transferred", + "Partially Received", + "Completed", + } + + +def get_effective_sort_date( + delivery_date, + planned_end_date, + subcontracting_rows, +): + # If subcontracting is planned or active, + # Planned End Date is the production deadline. + if ( + planned_end_date + and subcontracting_rows + ): + all_material_transferred = all( + row.get( + "material_transferred", + False, + ) + for row in subcontracting_rows + ) + + if not all_material_transferred: + return getdate( + planned_end_date ) - return result \ No newline at end of file + # Once material has left us, customer + # delivery becomes relevant again. + if delivery_date: + return getdate( + delivery_date + ) + + return None + + +def overview_sort_key( + prepared, +): + maximum_date = getdate( + "9999-12-31" + ) + + effective_date = prepared[ + "effective_sort_date" + ] + + delivery_date = prepared[ + "row" + ].delivery_date + + return ( + ( + getdate(effective_date) + if effective_date + else maximum_date + ), + ( + getdate(delivery_date) + if delivery_date + else maximum_date + ), + prepared["row"].item_code + or "", + prepared["row"].sales_order_item + or "", + ) \ No newline at end of file