$orderId=10001;
$order = Mage::getModel('sales/order')->load($orderId);
if ($order->hasInvoices())
{
$invoiceArray = array();
foreach ($order->getInvoiceCollection() as $invoice)
{
//to see details of invoice
echo "<pre>";
print_r($invoice);
echo "</pre>";
$invoiceArray[] = $invoice->getIncrementId();
}
}
$order = Mage::getModel('sales/order')->load($orderId);
if ($order->hasInvoices())
{
$invoiceArray = array();
foreach ($order->getInvoiceCollection() as $invoice)
{
//to see details of invoice
echo "<pre>";
print_r($invoice);
echo "</pre>";
$invoiceArray[] = $invoice->getIncrementId();
}
}