Yireo support forum

TOPIC: Reset invoice number after deleting

Filippo [56] Created a new topic. 02 Feb 2012 11:24 #8918

Reset invoice number after deleting

Hi.
I bought this extension mainly to test the shop I'm configuring for a customer as much as I like, being able to delete my test orders in any moment and setting it back, ready to use.
It's important for me to start invoices and orders (especially invoices, the number must be sequential and must start from 1) from 1 and, after deleting my test orders, having back my old numebers.
Any way to do it?
Thanks

The administrator has disabled public write access.
jisse@yireo.com Replied the topic. 02 Feb 2012 13:49 #8922

Reset invoice number after deleting

Hi,

Actually this was on the roadmap of Delete-Any-Order some time, we've made some time for this now, and just released 0.9.10 which offers this feature. You need to upgrade, and then enable the new "Reset Increments ID" option in the Magento System Configuration.
www.yireo.com/software/delete-any-order

It's actually a bit more complicated than just having sequential orders. Some people (like we) actually do not care about sequantiality, and in those circumstances orders can be number 1, 5, 7 and 8 - removing order 5 should of course not reset the increment-ID to 5. Because of this, the reset-functionality actually just checks for the highest increment-ID that is used, and makes sure that is used for incrementation.

Regards,

Jisse Reitsma
Yireo Team
The administrator has disabled public write access.
Filippo [56] Replied the topic. 02 Feb 2012 14:19 #8924

Reset invoice number after deleting

Thank you for the support.
I think I already got this version, I purchased this extension just two hours ago.
In system options I only got "Reset stock" options. Am I looking on the wrong place?

The administrator has disabled public write access.
jisse@yireo.com Replied the topic. 02 Feb 2012 15:20 #8926

Reset invoice number after deleting

Hi,

I think you are misunderstanding. My post came after your post, and therefor the bugfix that you requested also came after your request. Click on the link I posted, and compare that version-number with the version you downloaded. The update I'm talking about has been made available just now.

Regards,

Jisse Reitsma
Yireo Team
The administrator has disabled public write access.
Filippo [56] Replied the topic. 03 Feb 2012 08:06 #8932

Reset invoice number after deleting

Ah ok, thanks very much

The administrator has disabled public write access.
Ghassen [F7] Replied the topic. 09 Aug 2012 08:37 #10758

Reset invoice number after deleting

Hello,
I am using your last extension in our magento 1.5 , and when I set the option decrement ID : on
and trying deleting some orders I get this error:

There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: XXXXXXXXX
when I went to var/repoort I get this in error file:

a:5:{i:0;s:313:"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`databese`.`eav_entity_store`, CONSTRAINT `FK_eav_entity_store_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCA)";i:1;s:2204:"#0 /homez.421/../www/../lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /homez.421/../www/../lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /homez.421/../www/../lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ea...', Array)
#3 /homez.421/../www/../lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ea...', Array)
#4 /homez.421/../www/../lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ea...', Array)
#5 /homez.421/../www/../app/code/core/Mage/Core/Model/Mysql4/Abstract.php(414): Zend_Db_Adapter_Abstract->insert('eav_entity_stor...', Array)
#6 /homez.421/../www/../app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Mysql4_Abstract->save(Object(Mage_Eav_Model_Entity_Store))
#7 /homez.421/../www/../app/code/community/Yireo/DeleteAnyOrder/Model/Order.php(348): Mage_Core_Model_Abstract->save()
#8 /homez.421/../www/../app/code/community/Yireo/DeleteAnyOrder/Model/Order.php(182): Yireo_DeleteAnyOrder_Model_Order->resetShipmentIncrementId('1')
#9 /homez.421/../www/../app/code/community/Yireo/DeleteAnyOrder/controllers/IndexController.php(93): Yireo_DeleteAnyOrder_Model_Order->delete('199')
#10 /homez.421/../www/../app/code/core/Mage/Core/Controller/Varien/Action.php(420): Yireo_DeleteAnyOrder_IndexController->deleteAction()
#11 /homez.421/../www/../app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(253): Mage_Core_Controller_Varien_Action->dispatch('delete')
#12 /homez.421/../www/../app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /homez.421/../www/../app/code/core/Mage/Core/Model/App.php(340): Mage_Core_Controller_Varien_Front->dispatch()
#14 /homez.421/../www/../app/Mage.php(627): Mage_Core_Model_App->run(Array)
#15 /homez.421/../www/../index.php(80): Mage::run('', 'store')
#16 {main}";s:3:"url";s:44:"/index.php/deleteanyorder/index/delete/id/0/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

thank you in advance for the help. Best wishes

Last Edit: 09 Aug 2012 08:39 by Ghassen [F7].

The administrator has disabled public write access.
jisse@yireo.com Replied the topic. 09 Aug 2012 11:42 #10761

Reset invoice number after deleting

Hi,

We have not yet encountered this error. Have you made sure that under the "Analysis" page there are left-overs whatsoever? If so, remove them first. If they are still there in the database, it is likely the database is going to complain.

For the record, could you post your Yireo Order number? It seems you have not made a purchase under the account that you are posting here under.

Hope this helps.

Regards,

Jisse Reitsma
Yireo Team
The administrator has disabled public write access.
Ghassen [F7] Replied the topic. 09 Aug 2012 13:00 #10764

Reset invoice number after deleting

Hello, thank you for the answer.
so I am a webmaster of a magento 1.5 store, and my client bought your extension.
so it's normally that my client had another account than me.

1/ when decrement ID is set to: no
all is working very well

2/ but when decrement ID is set to: yes
I am having the error above:
"
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: XXXXXXXXX "

there are any fix for that? thnak you.

The administrator has disabled public write access.
jisse@yireo.com Replied the topic. 10 Aug 2012 05:14 #10768

Reset invoice number after deleting

Hi,

So if I understand it correctly, if you browse the "Analysis" page, you are not seeing any left-overs. Unfortunately we can't reproduce anything of this kind. The tricks that Delete-Any-Order applies only works on a non-corrupt database. Could you send a dump of this database to This email address is being protected from spambots. You need JavaScript enabled to view it. so we can test why things fail here?

Regards,

Jisse Reitsma
Yireo Team
The administrator has disabled public write access.
Ghassen [F7] Replied the topic. 15 Aug 2012 08:18 #10815

Reset invoice number after deleting

Hello,
after analysing the database I am having this:
Class Obsolete entries
downloadable 0
sales/order_address 0
sales/order_creditmemo 0
sales/order_creditmemo_comment 0
sales/order_creditmemo_item 0
sales/order_grid 0
sales/order_invoice 0
sales/order_invoice_comment 0
sales/order_invoice_item 0
sales/order_item 0
sales/order_payment 0
sales/order_shipment 0
sales/order_shipment_comment 0
sales/order_shipment_item 0
sales/order_shipment_track 0
sales/order_status_history 0
sales/order_tax 0
sales_flat_order 0

so the database is ok I think.I can't understand why this bug is done.
the problem is when the DECREMENT ID is set to : ON
it bugs, but when verifying I see that it deleted the order.

The administrator has disabled public write access.
jisse@yireo.com Replied the topic. 15 Aug 2012 15:24 #10828

Reset invoice number after deleting

Could you send a dump of this database to This email address is being protected from spambots. You need JavaScript enabled to view it. so we can test why things fail here?

Otherwise, we are unsure if we can be of any further help. We have tested this in about 20 environments so far (production and testing, various Magento versions). And actually, we have not yet encountered anything like this yet.

Please note that for proper usage of Delete-Any-Order, the Magento database MUST be free of errors. In all of the cases, where Delete-Any-Order failed to work properly, we encountered corrupt databases. This extension not working properly could then be the least of your problems. If you want to know for sure, Magento offers a free download of the Magento Database Repair Tool.

Regards,

Jisse Reitsma
Yireo Team
The administrator has disabled public write access.
Powered by Kunena Forum