[*] BO : Improvement invoices management

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11291 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
jBreux
2011-12-16 09:14:11 +00:00
parent b14b35d67f
commit 8a73986a76
12 changed files with 189 additions and 46 deletions
+14 -1
View File
@@ -81,8 +81,21 @@ class OrderPaymentCore extends ObjectModel
{
return Db::getInstance()->ExecuteS('
SELECT *
FROM `'._DB_PREFIX_.'payment_order`
FROM `'._DB_PREFIX_.'order_payment`
WHERE `id_order` = '.(int)$id_order);
}
/**
* Get Order Payments By Invoice ID
* @static
* @param $id_invoice Invoice ID
* @return Collection Collection
*/
public static function getByInvoiceId($id_invoice)
{
$payments = new Collection('OrderPayment');
$payments->where('a.id_order_invoice = '.(int)$id_invoice);
return $payments;
}
}