GX-Bug #54063 » invoice-number-mail-subject-fix.patch
src/admin/gm_pdf_order.php (revision ) | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
/* -------------------------------------------------------------- |
3 |
gm_pdf_order.php 2017-07-21
|
|
3 |
gm_pdf_order.php 2017-10-03
|
|
4 | 4 |
Gambio GmbH |
5 | 5 |
http://www.gambio.de |
6 | 6 |
Copyright (c) 2017 Gambio GmbH |
... | ... | |
893 | 893 |
$order_check['customers_firstname'] = ''; |
894 | 894 |
$order_check['customers_lastname'] = ''; |
895 | 895 |
|
896 |
$subject = str_replace('{INVOICE_ID}', $order_check['gm_orders_code'], $_POST['gm_subject']); |
|
896 |
$mailInvoiceNumber = $order_check['gm_orders_code']; |
|
897 |
|
|
898 |
$sql = 'SELECT `invoice_number` |
|
899 |
FROM `invoices` |
|
900 |
WHERE `order_id` = ' . (int)$_GET['oID'] . ' |
|
901 |
ORDER BY `invoice_date` DESC |
|
902 |
LIMIT 1'; |
|
903 |
$mailInvoiceNumberResult = xtc_db_query($sql); |
|
904 |
if(xtc_db_num_rows($mailInvoiceNumberResult)) |
|
905 |
{ |
|
906 |
$mailInvoiceNumberRow = xtc_db_fetch_array($mailInvoiceNumberResult); |
|
907 |
$mailInvoiceNumber = $mailInvoiceNumberRow['invoice_number']; |
|
908 |
} |
|
909 |
|
|
910 |
$subject = str_replace('{INVOICE_ID}', $mailInvoiceNumber, $_POST['gm_subject']); |
|
897 | 911 |
} |
898 | 912 |
|
899 | 913 |
if(!filter_var($order_check['customers_email_address'], FILTER_VALIDATE_EMAIL)) |