Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to get the invoice statut (payed, cancelled) from the Admin > Sales > Orders Page ? 
 
Kiwii
Jr. Member
 
Avatar
Total Posts:  14
Joined:  2008-02-06
Besançon
 

Hi,

I am in a blackhole..if you can give your brillant idea, in advance thank you so much.

I would like to display (via the modified Expeditor extension) the invoide state (payed, cancelled) but I can’t get this information with this construction :

$orderIds $this->getRequest()->getPost('order_ids');

if (!empty(
$orderIds)) {
  
foreach ($orderIds as $orderId{

  $invoice 
Mage::helper('sales')->getModel('sales/order_invoice')->load($orderId); 

  echo 
$invoice->getStatus();
 
}
}

If you have an idea, reply to this post please.

Thank you.

Jérémie

 
Magento Community Magento Community
Magento Community
Magento Community
 
nico5
Sr. Member
 
Avatar
Total Posts:  214
Joined:  2008-02-19
France
 

Hi,

$orderIds $this->getRequest()->getPost('order_ids');

if (!empty(
$orderIds)) {
  
foreach ($orderIds as $orderId{

  $_order 
Mage::getModel('sales/order')->load($orderId); 

  echo 
$_order->getStatus();
 
}
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Kiwii
Jr. Member
 
Avatar
Total Posts:  14
Joined:  2008-02-06
Besançon
 

Thanks for you answer Nico5,

I already have these information : processing, canceled, pending.

But il would like to get the invoice statut like : payed, refused. In fact it’s for checking if the bank sent the transaction.
With ATOS i can’t see from my csv export if the transfaction is success or not.

Do you have an idea ?

Thank you so much for spending time.

Jérémie

 
Magento Community Magento Community
Magento Community
Magento Community
 
nico5
Sr. Member
 
Avatar
Total Posts:  214
Joined:  2008-02-19
France
 

Try :

echo $invoice->getState();
 
Magento Community Magento Community
Magento Community
Magento Community
 
Kiwii
Jr. Member
 
Avatar
Total Posts:  14
Joined:  2008-02-06
Besançon
 

Thanks Nico5,

It give me only the statut NEW or CANCELED

But i need to get the invoice statut like PAYED.
So… I think will have to do an access to the invoice object no ?

I’m blocked :-(

Thank you again Nico5

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top