diff --git a/src/manage_packing_list_items.php b/src/manage_packing_list_items.php index 02ab572..b902aff 100644 --- a/src/manage_packing_list_items.php +++ b/src/manage_packing_list_items.php @@ -159,17 +159,17 @@ $conn->close(); border: 1px solid #eee; border-radius: 8px; padding: 6px; text-align: center; background: #fff; display: flex; flex-direction: column; transition: transform 0.1s, box-shadow 0.1s; - height: 165px; + height: 200px; } .lager-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.05); } .lager-img-wrapper { - width: 100%; height: 75px; margin-bottom: 4px; display: flex; + width: 100%; height: 90px; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; } .lager-img-wrapper img.lager-card-img { width: 100% !important; height: 100% !important; - max-width: 100% !important; max-height: 75px !important; + max-width: 100% !important; max-height: 90px !important; object-fit: contain !important; border-radius: 4px; } .lager-title { diff --git a/src/print_packing_list.php b/src/print_packing_list.php index b929c97..cbea632 100644 --- a/src/print_packing_list.php +++ b/src/print_packing_list.php @@ -49,6 +49,7 @@ if ($packing_list) { COALESCE(a.name, pli.name, bp.name, bpc.name, 'Unbekannt') AS name, a.weight_grams, c.name AS category_name, a.consumable, a.image_url, a.product_designation, m.name AS manufacturer_name, + bp.manufacturer AS bp_manufacturer, bp.model AS bp_model, u.username AS carrier_name FROM packing_list_items pli LEFT JOIN articles a ON pli.article_id = a.id @@ -133,9 +134,14 @@ function render_rows_recursive($items, $level = 0) { if ($level > 0 && !$is_container) echo ''; $meta = []; - if (!empty($item['manufacturer_name'])) $meta[] = $item['manufacturer_name']; - if (!empty($item['product_designation'])) $meta[] = $item['product_designation']; - $meta_str = !empty($meta) && !$is_container ? ' (' . htmlspecialchars(implode(' - ', $meta)) . ')' : ''; + if (!empty($item['backpack_id'])) { + if (!empty($item['bp_manufacturer'])) $meta[] = $item['bp_manufacturer']; + if (!empty($item['bp_model'])) $meta[] = $item['bp_model']; + } else { + if (!empty($item['manufacturer_name'])) $meta[] = $item['manufacturer_name']; + if (!empty($item['product_designation'])) $meta[] = $item['product_designation']; + } + $meta_str = !empty($meta) && (!empty($item['backpack_id']) || !$is_container) ? ' (' . htmlspecialchars(implode(' - ', $meta)) . ')' : ''; echo '' . htmlspecialchars($item['name']) . '' . $meta_str; echo ''; @@ -170,7 +176,7 @@ function render_rows_recursive($items, $level = 0) { h1 { text-align: center; margin-bottom: 5px; } p.desc { text-align: center; color: #666; margin-bottom: 30px; } - .carrier-section { margin-bottom: 30px; page-break-inside: avoid; } + .carrier-section { margin-bottom: 30px; } .carrier-title { font-size: 14pt; border-bottom: 2px solid #000; margin-bottom: 10px; padding-bottom: 5px; } table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }