mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 15:41:24 +00:00
Update CanBeBought.php
This commit is contained in:
@@ -37,8 +37,8 @@ trait CanBeBought
|
|||||||
*/
|
*/
|
||||||
public function getBuyablePrice(): Money
|
public function getBuyablePrice(): Money
|
||||||
{
|
{
|
||||||
if (($price = $this->getAttribute('price'))) {
|
if (($price = $this->getAttribute('price')) && ($currency = $this->getAttribute('currency'))) {
|
||||||
return new Money($price);
|
return new Money($price, $currency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user