diff --git a/Block/Adminhtml/DunningBlockButton.php b/Block/Adminhtml/DunningBlockButton.php
new file mode 100644
index 0000000..cab7579
--- /dev/null
+++ b/Block/Adminhtml/DunningBlockButton.php
@@ -0,0 +1,90 @@
+coreRegistry = $registry;
+ parent::__construct($context, $data);
+ }
+
+ protected function _construct()
+ {
+ $this->addButton(
+ 'banksync_block_dunning_button',
+ [
+ 'label' => $this->getLabel(),
+ 'class' => 'dunning_block',
+ 'onclick' => "setLocation('{$this->getTargetUrl()}')",
+ ]
+ );
+
+ parent::_construct();
+ }
+
+ /**
+ * @return string
+ */
+ protected function getLabel(): string
+ {
+ return __(
+ $this->invoiceIsBlocked() ? 'Remove dunning block' : 'Dunning block'
+ );
+ }
+
+ /**
+ * @return bool
+ */
+ protected function invoiceIsBlocked(): bool
+ {
+ return !empty($this->getInvoice()->getBanksyncDunningBlockedAt());
+ }
+
+ /**
+ * @return Invoice
+ */
+ protected function getInvoice(): EntityInterface
+ {
+ return $this->coreRegistry->registry('current_invoice');
+ }
+
+ /**
+ * @return string
+ */
+ protected function getTargetUrl(): string
+ {
+ $setBlocked = $this->invoiceIsBlocked() ? 0 : 1;
+ return $this->getUrl("banksync/dunning/block", ['invoice_id' => $this->getInvoiceId(), 'set_blocked' => $setBlocked]);
+ }
+
+ /**
+ * @return integer
+ */
+ protected function getInvoiceId(): int
+ {
+ return $this->getInvoice()->getId();
+ }
+}
diff --git a/Controller/Adminhtml/Dunning/Block.php b/Controller/Adminhtml/Dunning/Block.php
new file mode 100644
index 0000000..6d4bdc3
--- /dev/null
+++ b/Controller/Adminhtml/Dunning/Block.php
@@ -0,0 +1,57 @@
+invoiceRepository = $invoiceRepository;
+ $this->logger = $logger;
+ }
+
+ /**
+ * @return Redirect
+ * @throws NoSuchEntityException
+ * @throws InputException
+ */
+ public function execute()
+ {
+ $invoiceId = $this->getRequest()->getParam('invoice_id');
+ $setBlocked = !empty($this->getRequest()->getParam('set_blocked'));
+
+ $invoice = $this->invoiceRepository->get($invoiceId);
+ if ($setBlocked) {
+ $this->logger->info('Invoice ' . $invoice->getIncrementId() . ' blocked for dunning');
+ $invoice->setBanksyncDunningBlockedAt(date('Y-m-d H:i:s'));
+ } else {
+ $this->logger->info('Invoice ' . $invoice->getIncrementId() . ' unblocked for dunning');
+ $invoice->setBanksyncDunningBlockedAt(null);
+ }
+ $this->invoiceRepository->save($invoice);
+
+ $redirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
+ $redirect->setPath('sales/invoice/view', ['invoice_id' => $invoiceId]);
+
+ return $redirect;
+ }
+}
diff --git a/Helper/Dunning.php b/Helper/Dunning.php
index 5fdfbe7..705ea0d 100644
--- a/Helper/Dunning.php
+++ b/Helper/Dunning.php
@@ -280,7 +280,8 @@ public function getOpenInvoices(int $storeId): InvoiceCollection
->addFieldToFilter('main_table.created_at', ['gt' => $minCreationDate])
->addFieldToFilter('main_table.created_at', ['lt' => $latestCreationDate])
->addFieldToFilter('main_table.store_id', $storeId)
- ->addFieldToFilter('is_banksynced', ['eq' => 0]);
+ ->addFieldToFilter('is_banksynced', ['eq' => 0])
+ ->addFieldToFilter('banksync_dunning_blocked_at', ['null' => true]);
$paymentMethods = $this->config->getPaymentMethods();
if (!empty($paymentMethods)) {
diff --git a/etc/db_schema.xml b/etc/db_schema.xml
index 40e8e4e..c765f43 100644
--- a/etc/db_schema.xml
+++ b/etc/db_schema.xml
@@ -109,4 +109,7 @@