Skip to content

Commit

Permalink
Update classes/order/OrderInvoice.php
Browse files Browse the repository at this point in the history
Co-authored-by: Krystian Podemski <kpodemski@users.noreply.github.com>
  • Loading branch information
ShaiMagal and kpodemski authored Oct 27, 2024
1 parent f6b97b5 commit c750dcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/order/OrderInvoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public static function getInvoiceByNumber($invoiceNumber, $orderId = null)
$id_order_invoice = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(
'SELECT `id_order_invoice`
FROM `' . _DB_PREFIX_ . 'order_invoice`
WHERE `number` = ' . (int) $invoiceNumber . (!empty($id_order) ? ' && `id_order` = ' . (int) $id_order : '')
WHERE `number` = ' . (int) $invoiceNumber . (!empty($orderId) ? ' AND `id_order` = ' . (int) $orderId : '')
);

return $id_order_invoice ? new OrderInvoice((int) $id_order_invoice) : false;
Expand Down

0 comments on commit c750dcf

Please sign in to comment.