From 2575f9f9c0763d2901c63a878f86df310a1f30e3 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 29 Nov 2024 15:49:00 +0530 Subject: [PATCH] fix: SABB print for packed items (#44413) (cherry picked from commit 5266f236b70290bfcf32e51d86fb0a9a673f9576) --- erpnext/controllers/print_settings.py | 8 +++++++- erpnext/stock/serial_batch_bundle.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/print_settings.py b/erpnext/controllers/print_settings.py index f99711631ffa..f05ef67c3087 100644 --- a/erpnext/controllers/print_settings.py +++ b/erpnext/controllers/print_settings.py @@ -11,7 +11,13 @@ def set_print_templates_for_item_table(doc, settings): "items": { "qty": "templates/print_formats/includes/item_table_qty.html", "serial_and_batch_bundle": "templates/print_formats/includes/serial_and_batch_bundle.html", - } + }, + "packed_items": { + "serial_and_batch_bundle": "templates/print_formats/includes/serial_and_batch_bundle.html", + }, + "supplied_items": { + "serial_and_batch_bundle": "templates/print_formats/includes/serial_and_batch_bundle.html", + }, } doc.flags.compact_item_fields = ["description", "qty", "rate", "amount"] diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 3fed0195d693..dd459bb30bc4 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -478,7 +478,7 @@ def get_serial_or_batch_nos(bundle): html = "" for d in data: if d.serial_no: - html += f"" + html += f"" else: html += f""
{d.batch_no}{d.serial_no}{abs(d.qty)}
{d.batch_no}{d.serial_no}{abs(d.qty)}
{d.batch_no}{abs(d.qty)}