Skip to content
Snippets Groups Projects
Commit 9785e9b2 authored by Laurent Destailleur's avatar Laurent Destailleur Committed by GitHub
Browse files

Update commonobject.class.php

parent 7ae405a2
No related branches found
No related tags found
No related merge requests found
......@@ -2963,20 +2963,20 @@ abstract class CommonObject
foreach ($this->lines as $line)
{
$totalOrdered+=$line->qty_asked ?: 0; // defined for shipment only
$totalToShip+= $line->qty_shipped ?: 0; // defined for shipment only
$totalOrdered+=($line->qty_asked ? $line->qty_asked : 0); // defined for shipment only
$totalToShip+=($line->qty_shipped ? $line->qty_shipped : 0); // defined for shipment only
// Define qty, weight, volume, weight_units, volume_units
if ($this->element == 'shipping') {
// for shipments
$qty = $line->qty_shipped ?: 0;
$qty = $line->qty_shipped ? $line->qty_shipped : 0;
}
else {
$qty = $line->qty ?: 0;
$qty = $line->qty ? $line->qty : 0;
}
$weight = $line->weight ?: 0;
$volume = $line->volume ?: 0;
$weight = $line->weight ? $line->weight : 0;
$volume = $line->volume ? $line->volume : 0;
$weight_units=$line->weight_units;
$volume_units=$line->volume_units;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment