Fix undefined vars in export invoice / quote pdf fix regression company logo path in export invoice / quote
This commit is contained in:
@@ -365,6 +365,9 @@ if (isset($_GET['export_quote_pdf'])) {
|
|||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
// Load items
|
// Load items
|
||||||
|
$sub_total = 0;
|
||||||
|
$total_tax = 0;
|
||||||
|
|
||||||
$sql_items = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE item_quote_id = $quote_id ORDER BY item_order ASC");
|
$sql_items = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE item_quote_id = $quote_id ORDER BY item_order ASC");
|
||||||
while ($item = mysqli_fetch_array($sql_items)) {
|
while ($item = mysqli_fetch_array($sql_items)) {
|
||||||
$name = $item['item_name'];
|
$name = $item['item_name'];
|
||||||
@@ -585,6 +588,9 @@ if (isset($_GET['export_invoice_pdf'])) {
|
|||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
// Load items
|
// Load items
|
||||||
|
$sub_total = 0;
|
||||||
|
$total_tax = 0;
|
||||||
|
|
||||||
$sql_items = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE item_invoice_id = $invoice_id ORDER BY item_order ASC");
|
$sql_items = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE item_invoice_id = $invoice_id ORDER BY item_order ASC");
|
||||||
while ($item = mysqli_fetch_array($sql_items)) {
|
while ($item = mysqli_fetch_array($sql_items)) {
|
||||||
$name = $item['item_name'];
|
$name = $item['item_name'];
|
||||||
|
|||||||
@@ -2066,7 +2066,7 @@ if (isset($_GET['export_invoice_pdf'])) {
|
|||||||
<tr>
|
<tr>
|
||||||
<td width="40%">';
|
<td width="40%">';
|
||||||
if (!empty($company_logo) && file_exists("../uploads/settings/$company_logo")) {
|
if (!empty($company_logo) && file_exists("../uploads/settings/$company_logo")) {
|
||||||
$html .= '<img src="../uploads/settings/' . $company_logo . '" width="120">';
|
$html .= '<img src="/uploads/settings/' . $company_logo . '" width="120">';
|
||||||
}
|
}
|
||||||
$html .= '</td>
|
$html .= '</td>
|
||||||
<td width="60%" align="right">
|
<td width="60%" align="right">
|
||||||
@@ -2117,6 +2117,9 @@ if (isset($_GET['export_invoice_pdf'])) {
|
|||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
// Load items
|
// Load items
|
||||||
|
$sub_total = 0;
|
||||||
|
$total_tax = 0;
|
||||||
|
|
||||||
$sql_items = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE item_invoice_id = $invoice_id ORDER BY item_order ASC");
|
$sql_items = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE item_invoice_id = $invoice_id ORDER BY item_order ASC");
|
||||||
while ($item = mysqli_fetch_array($sql_items)) {
|
while ($item = mysqli_fetch_array($sql_items)) {
|
||||||
$name = $item['item_name'];
|
$name = $item['item_name'];
|
||||||
|
|||||||
@@ -680,7 +680,7 @@ if (isset($_GET['export_quote_pdf'])) {
|
|||||||
<tr>
|
<tr>
|
||||||
<td width="40%">';
|
<td width="40%">';
|
||||||
if (!empty($company_logo) && file_exists("../uploads/settings/$company_logo")) {
|
if (!empty($company_logo) && file_exists("../uploads/settings/$company_logo")) {
|
||||||
$html .= '<img src="../uploads/settings/' . $company_logo . '" width="120">';
|
$html .= '<img src="/uploads/settings/' . $company_logo . '" width="120">';
|
||||||
}
|
}
|
||||||
$html .= '</td>
|
$html .= '</td>
|
||||||
<td width="60%" align="right">
|
<td width="60%" align="right">
|
||||||
@@ -734,6 +734,9 @@ if (isset($_GET['export_quote_pdf'])) {
|
|||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
// Load items
|
// Load items
|
||||||
|
$sub_total = 0;
|
||||||
|
$total_tax = 0;
|
||||||
|
|
||||||
$sql_items = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE item_quote_id = $quote_id ORDER BY item_order ASC");
|
$sql_items = mysqli_query($mysqli, "SELECT * FROM invoice_items WHERE item_quote_id = $quote_id ORDER BY item_order ASC");
|
||||||
while ($item = mysqli_fetch_array($sql_items)) {
|
while ($item = mysqli_fetch_array($sql_items)) {
|
||||||
$name = $item['item_name'];
|
$name = $item['item_name'];
|
||||||
|
|||||||
Reference in New Issue
Block a user