public function InvoiceItem::setQuantity in Commerce Invoice 8.2
Sets the invoice item quantity.
Parameters
string $quantity: The invoice item quantity.
Return value
$this
Overrides InvoiceItemInterface::setQuantity
File
- src/
Entity/ InvoiceItem.php, line 122
Class
- InvoiceItem
- Defines the invoice item entity class.
Namespace
Drupal\commerce_invoice\EntityCode
public function setQuantity($quantity) {
$this
->set('quantity', (string) $quantity);
$this
->recalculateTotalPrice();
return $this;
}