mirror of
https://github.com/itflow-org/itflow
synced 2026-03-15 02:04:50 +00:00
Merge pull request #839 from twetech/Create-Payment-Bugfix
Fix email data assignment and select option bug in invoice.php and ticket_invoice_add_modal.php
This commit is contained in:
@@ -686,14 +686,14 @@ if (isset($_POST['add_payment'])) {
|
|||||||
'body' => $body
|
'body' => $body
|
||||||
];
|
];
|
||||||
|
|
||||||
$email_data = $email;
|
$email_data[] = $email;
|
||||||
|
|
||||||
// Get Email ID for reference
|
// Get Email ID for reference
|
||||||
$email_id = mysqli_insert_id($mysqli);
|
$email_id = mysqli_insert_id($mysqli);
|
||||||
|
|
||||||
// Email Logging
|
// Email Logging
|
||||||
|
|
||||||
$_SESSION['alert_message'] .= "Email receipt sent ";
|
$_SESSION['alert_message'] = "Email receipt sent ";
|
||||||
|
|
||||||
mysqli_query($mysqli,"INSERT INTO history SET history_status = 'Sent', history_description = 'Emailed Receipt!', history_invoice_id = $invoice_id");
|
mysqli_query($mysqli,"INSERT INTO history SET history_status = 'Sent', history_description = 'Emailed Receipt!', history_invoice_id = $invoice_id");
|
||||||
|
|
||||||
@@ -719,7 +719,7 @@ if (isset($_POST['add_payment'])) {
|
|||||||
'body' => $body
|
'body' => $body
|
||||||
];
|
];
|
||||||
|
|
||||||
$email_data = $email;
|
$email_data[] = $email;
|
||||||
|
|
||||||
// Get Email ID for reference
|
// Get Email ID for reference
|
||||||
$email_id = mysqli_insert_id($mysqli);
|
$email_id = mysqli_insert_id($mysqli);
|
||||||
@@ -736,7 +736,7 @@ if (isset($_POST['add_payment'])) {
|
|||||||
|
|
||||||
// Add emails to queue
|
// Add emails to queue
|
||||||
if (!empty($email)) {
|
if (!empty($email)) {
|
||||||
addToMailQueue($mysqli, $email);
|
addToMailQueue($mysqli, $email_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Update Invoice Status
|
//Update Invoice Status
|
||||||
|
|||||||
@@ -121,10 +121,13 @@ $addToExistingInvoice = isset($_GET['ticket_id']) && isset($_GET['invoice_id']);
|
|||||||
$invoice_due = nullable_htmlentities($row['invoice_due']);
|
$invoice_due = nullable_htmlentities($row['invoice_due']);
|
||||||
$invoice_amount = floatval($row['invoice_amount']);
|
$invoice_amount = floatval($row['invoice_amount']);
|
||||||
|
|
||||||
|
if (isset($invoice_id)) {
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $invoice_id; ?>" <?php if ($invoice_id == $_GET['invoice_id']) echo "selected"; ?>><?php echo "$invoice_prefix$invoice_number $invoice_scope"; ?></option>
|
<option value="<?php echo $invoice_id; ?>" <?php if ($invoice_id == $_GET['invoice_id']) {
|
||||||
|
echo "selected";
|
||||||
|
}?>><?php echo "$invoice_prefix$invoice_number $invoice_scope"; ?></option>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@@ -150,7 +153,9 @@ $addToExistingInvoice = isset($_GET['ticket_id']) && isset($_GET['invoice_id']);
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Item Description</label>
|
<label>Item Description</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<textarea class="form-control" rows="5" name="item_description"><?php echo "# $contact_name - $asset_name - $ticket_date\nTicket $ticket_prefix$ticket_number\n$ticket_subject\nTT: $ticket_total_reply_time"; ?></textarea>
|
<textarea class="form-control" rows="5" name="item_description">
|
||||||
|
<?php echo "# $contact_name - $asset_name - $ticket_date\nTicket $ticket_prefix$ticket_number\n$ticket_subject\nTT: $ticket_total_reply_time"; ?>
|
||||||
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user