diff --git a/vendor/magento/module-purchase-order/Model/Validator/ActionReady/PlaceOrderValidator.php b/vendor/magento/module-purchase-order/Model/Validator/ActionReady/PlaceOrderValidator.php
index 69e1169e080c..d3b0cbe8bd9f 100644
--- a/vendor/magento/module-purchase-order/Model/Validator/ActionReady/PlaceOrderValidator.php
+++ b/vendor/magento/module-purchase-order/Model/Validator/ActionReady/PlaceOrderValidator.php
@@ -20,6 +20,7 @@ class PlaceOrderValidator implements ValidatorInterface
public function validate(PurchaseOrderInterface $purchaseOrder): bool
{
$status = $purchaseOrder->getStatus();
+ $quote = $purchaseOrder->getSnapshotQuote();
$placeOrderStatuses = [
PurchaseOrderInterface::STATUS_APPROVED,
PurchaseOrderInterface::STATUS_ORDER_FAILED
@@ -27,6 +28,7 @@ public function validate(PurchaseOrderInterface $purchaseOrder): bool
if (!in_array($status, $placeOrderStatuses)
|| (null != $purchaseOrder->getOrderId())
|| !$purchaseOrder->getQuoteId()
+ || $quote->getHasError()
) {
return false;
}
diff --git a/vendor/magento/module-purchase-order/view/frontend/templates/purchaseorder/view/info/buttons.phtml b/vendor/magento/module-purchase-order/view/frontend/templates/purchaseorder/view/info/buttons.phtml
index 6310f5164a92..e6dbcaa6d86b 100644
--- a/vendor/magento/module-purchase-order/view/frontend/templates/purchaseorder/view/info/buttons.phtml
+++ b/vendor/magento/module-purchase-order/view/frontend/templates/purchaseorder/view/info/buttons.phtml
@@ -47,9 +47,11 @@
paymentRequired()): ?>
+ hasError()): ?>
+