Skip to content

Commit

Permalink
Merge pull request #2 from ambimax/fix-invoice-problem
Browse files Browse the repository at this point in the history
fix-invoice-problem
  • Loading branch information
LuckAlexander authored Dec 21, 2023
2 parents 2e621c6 + 0d77653 commit 1b8b26b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/code/community/Itabs/Invoice/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ public function paymentMethodIsActive($observer)
return;
}

$customer = Mage::getSingleton('customer/session')->getCustomer();

$invoiceEnabled = $customer->getEnableInvoice();
if ($invoiceEnabled == 0) {
return;
}

/* @var $validationModel Itabs_Invoice_Model_Validation */
$validationModel = Mage::getModel('invoice/validation');
$observer->getEvent()->getResult()->isAvailable = $validationModel->isValid();
Expand Down

0 comments on commit 1b8b26b

Please sign in to comment.