We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    If you are facing error as per the below,
    Then the first step is to override the purchase order mixin js file on your theme and add the below code.
    /**
     * Copyright © Magento, Inc. All rights reserved.
     * See COPYING.txt for license details.
     */
    define([
        'mage/utils/wrapper',
        'Magento_PurchaseOrder/js/action/place-order-purchase-quote',
        'jquery'
    ], function (wrapper, placeOrderPurchaseQuote,$) {
        'use strict';
    
        return function (placeOrder) {
            return wrapper.wrap(placeOrder, function (originalAction, paymentData, messageContainer) {
                if (window.checkoutConfig.isPurchaseOrder) {
                    var agreementsConfig = window.checkoutConfig.checkoutAgreements;
                    if (agreementsConfig.isEnabled) {
                        var agreementForm,
                            agreementData,
                            agreementIds;
                        agreementForm = $('.payment-method._active div[data-role=checkout-agreements] .checkout-agreement input');
                        agreementData = agreementForm.serializeArray();
                        agreementIds = [];
    
                        agreementData.forEach(function (item) {
                            agreementIds.push(item.value);
                        });
    
                        if (paymentData['extension_attributes'] === undefined) {
                            paymentData['extension_attributes'] = {};
                        }
    
                        paymentData['extension_attributes']['agreement_ids'] = agreementIds;
                    }
                    return placeOrderPurchaseQuote(paymentData, messageContainer);
                }
    
                return originalAction(paymentData, messageContainer);
            });
        };
    });
    

    at

    app/design/frontend/Vendor/Theme/Magento_PurchaseOrder/web/js/action/place-order-mixin.js

    That’s it.

    Fill the below form if you need any Magento relate help/advise/consulting.

    With Only Agency that provides a 24/7 emergency support.

      Get a Free Quote