diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index 676a5cae22c..6c3e3748892 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -1133,11 +1133,17 @@ if ($action == 'create') {
print_date_range($db->jdate($line->date_start), $db->jdate($line->date_end));
print "\n";
}
+
+ // unit of order
+ $unit_order = ''
+ if ($conf->global->PRODUCT_USE_UNITS) {
+ $unit_order = measuringUnitString($line->fk_unit);
+ }
// Qty
print '
'.$line->qty;
print '';
- print ' | ';
+ print ''.$unit_order.'';
$qtyProdCom = $line->qty;
// Qty already shipped
@@ -1145,7 +1151,7 @@ if ($action == 'create') {
$quantityDelivered = $object->expeditions[$line->id];
print $quantityDelivered;
print '';
- print '';
+ print ''.$unit_order.'';
// Qty to ship
$quantityAsked = $line->qty;
@@ -2030,7 +2036,7 @@ if ($action == 'create') {
// Get list of products already sent for same source object into $alreadysent
$alreadysent = array();
if ($origin && $origin_id > 0) {
- $sql = "SELECT obj.rowid, obj.fk_product, obj.label, obj.description, obj.product_type as fk_product_type, obj.qty as qty_asked, obj.date_start, obj.date_end";
+ $sql = "SELECT obj.rowid, obj.fk_product, obj.label, obj.description, obj.product_type as fk_product_type, obj.qty as qty_asked, obj.fk_unit, obj.date_start, obj.date_end";
$sql .= ", ed.rowid as shipmentline_id, ed.qty as qty_shipped, ed.fk_expedition as expedition_id, ed.fk_origin_line, ed.fk_entrepot";
$sql .= ", e.rowid as shipment_id, e.ref as shipment_ref, e.date_creation, e.date_valid, e.date_delivery, e.date_expedition";
//if ($conf->delivery_note->enabled) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received";
@@ -2149,9 +2155,14 @@ if ($action == 'create') {
print_date_range($lines[$i]->date_start, $lines[$i]->date_end);
print "\n";
}
+
+ $unit_order = ''
+ if ($conf->global->PRODUCT_USE_UNITS) {
+ $unit_order = measuringUnitString($lines[$i]->fk_unit);
+ }
// Qty ordered
- print ''.$lines[$i]->qty_asked.' | ';
+ print ''.$lines[$i]->qty_asked.' '.$unit_order.' | ';
// Qty in other shipments (with shipment and warehouse used)
if ($origin && $origin_id > 0) {
@@ -2215,7 +2226,7 @@ if ($action == 'create') {
print '';
print '';
// Qty to ship or shipped
- print ' | ';
+ print ''.$unit_order.' | ';
// Warehouse source
print ''.$formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).' | ';
// Batch number managment
@@ -2226,7 +2237,7 @@ if ($action == 'create') {
foreach ($lines[$i]->details_entrepot as $detail_entrepot) {
print '
';
// Qty to ship or shipped
- print ' | ';
+ print ''.$unit_order.' | ';
// Warehouse source
print ''.$formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl'.$detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).' | ';
// Batch number managment
@@ -2241,7 +2252,7 @@ if ($action == 'create') {
print '';
print '
';
// Qty to ship or shipped
- print ' | ';
+ print ''.$unit_order.' | ';
// Warehouse source
print ' | ';
// Batch number managment
@@ -2253,7 +2264,7 @@ if ($action == 'create') {
print '';
} else {
// Qty to ship or shipped
- print ''.$lines[$i]->qty_shipped.' | ';
+ print ''.$lines[$i]->qty_shipped.' '.$unit_order.' | ';
// Warehouse source
if (!empty($conf->stock->enabled)) {