Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

Credit notes - deleting Order
(1 viewing) (1) Guest
Support forum for customers who have purchased this product. Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: Credit notes - deleting Order

Credit notes - deleting Order 10 years, 7 months ago #43985

Hi support team.

Thank you for adding credit note functionality to VM Invoice. Great job.
If i would like to delete the order created for the credit note in Virtuemart i get the following error.

vmError: VirtueMartModelOrders::remove 3224
Bestellungen konnte nicht gelöscht werden.

Has this to be fixed by Virtuemart or how is it possible to delete wrongly created credit notes?

Best regards

Michael
The topic has been locked.

Re: Credit notes - deleting Order 10 years, 7 months ago #44006

  • pama
  • OFFLINE
  • Posts: 489
Hello. It is because unproper behavior of VM that it will not delete order without payment method (that is credit note).

We will include fix of this in next release, where will be possible to delete orders directly from VM Invoice.

You can fix it also by modifying VM code.
Open file administrator/component/com_virtuemart/tables/orders.php and find line 150.

Replace this part (lines 150 - 156)

 
$paymentTable = '#__virtuemart_payment_plg_'. $this->_db->loadResult();
 
$this->_db->setQuery('DELETE from `'.$paymentTable.'` WHERE `virtuemart_order_id` = ' . $id);
if ($this->_db->query() === false) {
vmError($this->_db->getError());
return false;
} /*vm_order_shipment NOT EXIST have to find the table name*/
 


with

 
if ($paymentName = $this->_db->loadResult()){
$paymentTable = '#__virtuemart_payment_plg_'. $paymentName;
$this->_db->setQuery('DELETE from `'.$paymentTable.'` WHERE `virtuemart_order_id` = ' . $id);
if ($this->_db->query() === false) {
vmError($this->_db->getError());
return false;
}
}
 
ARTIO Support Team
Last Edit: 10 years, 7 months ago by pama.
The topic has been locked.

Re: Credit notes - deleting Order 10 years, 7 months ago #44008

Hi support team.

Thank you so much for your quick solution, that works great.

Best regards

Michael
The topic has been locked.
  • Page:
  • 1
Přihlášení uživatele Prázdný