fix: SABB print for packed items (#44413)
(cherry picked from commit 5266f236b7)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -478,7 +478,7 @@ def get_serial_or_batch_nos(bundle):
|
||||
html = "<table class= 'table table-borderless' style='margin-top: 0px;margin-bottom: 0px;'>"
|
||||
for d in data:
|
||||
if d.serial_no:
|
||||
html += f"<tr><td>{d.batch_no}</th><th>{d.serial_no}</th ><th>{abs(d.qty)}</th></tr>"
|
||||
html += f"<tr><td>{d.batch_no}</td><td>{d.serial_no}</td><td>{abs(d.qty)}</td></tr>"
|
||||
else:
|
||||
html += f"<tr><td>{d.batch_no}</td><td>{abs(d.qty)}</td></tr>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user