code: protected function updateWeightTotal(SaleInterface $sale)
      {
          $weightTotal = $this->weightCalculator->calculateSale($sale);
  
          if ($sale->getWeightTotal() != $weightTotal) {
              $sale->setWeightTotal($weightTotal);
  
              return true;
          }
  
          return false;
      }
docs: Updates the total weight.
  
  @param SaleInterface $sale
  
  @return bool Whether the sale has been changed or not.