سؤال

Does anyone know how to set purchase order invoices automatically to "Unpaid" in Magento 2? Right now they are automatically marked as paid, but they should really be marked to Unpaid, and then set to Paid by the the administrator when the money is received.

هل كانت مفيدة؟

المحلول

Okay, I found out that to change this I would need to change this to true:

vendor/magento/module-payment/Model/Method/AbstractMethod.php

protected $_canCapture = true;

Then to make it the default value:

vendor/magento/module-sales/view/adminhtml/templates/order/invoice/create/

<option selected value="not_capture"><?= $block->escapeHtml(__('Not Capture')) ?></option>

Obviously I should put these changes in a new module.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top