[*] BO : Improvement invoices management

This commit is contained in:
jBreux
2011-12-16 09:14:11 +00:00
parent 3653774e17
commit a4f970280c
12 changed files with 189 additions and 46 deletions
+14
View File
@@ -1397,6 +1397,20 @@ class OrderCore extends ObjectModel
return $order_invoices;
}
/**
* Get all not paid invoices for the current order
* @since 1.5.0.2
* @return Collection of Order invoice not paid
*/
public function getNotPaidInvoicesCollection()
{
$invoices = $this->getInvoicesCollection();
foreach ($invoices as $key => $invoice)
if ($invoice->isPaid())
unset($invoices[$key]);
return $invoices;
}
/**
* Get total paid
*