[*] BO : Improvement invoices management

This commit is contained in:
jBreux
2011-12-16 09:14:11 +00:00
parent fbb7f9afa7
commit ccb0731126
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;
}
}