// Improve collections : where() method reworked (prototype changed) + validation of fields
This commit is contained in:
@@ -1337,7 +1337,7 @@ class OrderCore extends ObjectModel
|
||||
public function getOrderPaymentCollection()
|
||||
{
|
||||
$order_payments = new Collection('OrderPayment');
|
||||
$order_payments->where('id_order = '.(int)$this->id);
|
||||
$order_payments->where('id_order', '=', $this->id);
|
||||
return $order_payments;
|
||||
}
|
||||
|
||||
@@ -1426,7 +1426,7 @@ class OrderCore extends ObjectModel
|
||||
public function getInvoicesCollection()
|
||||
{
|
||||
$order_invoices = new Collection('OrderInvoice');
|
||||
$order_invoices->where('id_order = '.(int)$this->id);
|
||||
$order_invoices->where('id_order', '=', $this->id);
|
||||
return $order_invoices;
|
||||
}
|
||||
|
||||
|
||||
@@ -503,7 +503,7 @@ class OrderInvoiceCore extends ObjectModel
|
||||
public function getOrderPaymentCollection()
|
||||
{
|
||||
$order_payments = new Collection('OrderPayment');
|
||||
$order_payments->where('id_order_invoice = '.(int)$this->id);
|
||||
$order_payments->where('id_order_invoice', '=', $this->id);
|
||||
return $order_payments;
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ class OrderPaymentCore extends ObjectModel
|
||||
public static function getByInvoiceId($id_invoice)
|
||||
{
|
||||
$payments = new Collection('OrderPayment');
|
||||
$payments->where('a.id_order_invoice = '.(int)$id_invoice);
|
||||
$payments->where('id_order_invoice', '=', $id_invoice);
|
||||
return $payments;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user