Recently I've developed a problem where I cant refund credit memo's and get this error
Cannot save the credit memo.
This is the error log message, can anyone advise on how to fix this, recently I updated these extensions. (ASchroder_SMTPPro, Meanbee_Royalmail and m2epro_ebay_magento)
Disabling them does not resolve the problem so i'm not sure if the updates are related to problem
2014-11-26T17:41:39+00:00 ERR (3):
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '100000396' for key 'UNQ_SALES_FLAT_CREDITMEMO_INCREMENT_ID'' in /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php:63442
Stack trace:
#0 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(63442): PDOStatement->execute(Array)
#1 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/Varien_Db_Statement_Pdo_Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(63030): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(52712): Zend_Db_Statement->execute(Array)
#4 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(53748): Zend_Db_Adapter_Abstract->query('INSERT INTO `sa...', Array)
#5 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(54584): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `sa...', Array)
#6 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(52807): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `sa...', Array)
#7 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(11877): Zend_Db_Adapter_Abstract->insert('sales_flat_cred...', Array)
#8 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/Mage_Sales_Model_Resource_Order_Abstract.php(425): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Sales_Model_Order_Creditmemo))
#9 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(5671): Mage_Sales_Model_Resource_Order_Abstract->save(Object(Mage_Sales_Model_Order_Creditmemo))
#10 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/Mage_Core_Model_Resource_Transaction.php(151): Mage_Core_Model_Abstract->save()
#11 /var/www/vhosts/xxxx.com/httpdocs/cart/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php(178): Mage_Core_Model_Resource_Transaction->save()
#12 /var/www/vhosts/xxxx.com/httpdocs/cart/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php(311): Mage_Adminhtml_Sales_Order_CreditmemoController->_saveCreditmemo(Object(Mage_Sales_Model_Order_Creditmemo))
#13 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(13582): Mage_Adminhtml_Sales_Order_CreditmemoController->saveAction()
#14 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(17945): Mage_Core_Controller_Varien_Action->dispatch('save')
#15 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(17502): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#16 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(20079): Mage_Core_Controller_Varien_Front->dispatch()
#17 /var/www/vhosts/xxxx.com/httpdocs/cart/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#18 /var/www/vhosts/xxxx.com/httpdocs/cart/index.php(87): Mage::run('', 'store')
#19 {main}
Next exception
'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '100000396' for key 'UNQ_SALES_FLAT_CREDITMEMO_INCREMENT_ID'' in /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php:63448
Stack trace:
#0 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/Varien_Db_Statement_Pdo_Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(63030): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(52712): Zend_Db_Statement->execute(Array)
#3 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(53748): Zend_Db_Adapter_Abstract->query('INSERT INTO `sa...', Array)
#4 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(54584): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `sa...', Array)
#5 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(52807): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `sa...', Array)
#6 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(11877): Zend_Db_Adapter_Abstract->insert('sales_flat_cred...', Array)
#7 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/Mage_Sales_Model_Resource_Order_Abstract.php(425): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Sales_Model_Order_Creditmemo))
#8 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(5671): Mage_Sales_Model_Resource_Order_Abstract->save(Object(Mage_Sales_Model_Order_Creditmemo))
#9 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/Mage_Core_Model_Resource_Transaction.php(151): Mage_Core_Model_Abstract->save()
#10 /var/www/vhosts/xxxx.com/httpdocs/cart/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php(178): Mage_Core_Model_Resource_Transaction->save()
#11 /var/www/vhosts/xxxx.com/httpdocs/cart/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php(311): Mage_Adminhtml_Sales_Order_CreditmemoController->_saveCreditmemo(Object(Mage_Sales_Model_Order_Creditmemo))
#12 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(13582): Mage_Adminhtml_Sales_Order_CreditmemoController->saveAction()
#13 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(17945): Mage_Core_Controller_Varien_Action->dispatch('save')
#14 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(17502): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /var/www/vhosts/xxxx.com/httpdocs/cart/includes/src/__default.php(20079): Mage_Core_Controller_Varien_Front->dispatch()
#16 /var/www/vhosts/xxxx.com/httpdocs/cart/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#17 /var/www/vhosts/xxxx.com/httpdocs/cart/index.php(87): Mage::run('', 'store')
#18 {main}