开发者

How can I have the same number count for invoice and credit memo in Magento?

How can I have the same number count for invoice and credit memo in Magento? magento use two开发者_如何学Python different counters, I need an univocal count number for invoices and credit memos.

thanks

edit: fixed text


I wouldn't touch that, those numbers are mean to be different on purpose. My site has far more invoices than credit memos. They're just not the same thing.


I think the extension Fooman_SameOrderInvoiceNumber should help you.


I did it, I wrote an observer for change the increment_id

public function sales_order_creditmemo_save_before($observer)
  {


    $creditmemo = $observer->getCreditmemo();
    $order = $creditmemo->getOrder();
    $store_id = $order->getStore()->getStoreId();

    $entity_type_model=Mage::getSingleton('eav/config')->getEntityType('invoice');

    $new_incr_id = $entity_type_model->fetchNewIncrementId($store_id);

    $creditmemo->setIncrementId($new_incr_id);

  } 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜