get client id for logging when adding recurring items

This commit is contained in:
johnnyq 2024-11-18 14:08:13 -05:00
parent c9b38b2b5f
commit 32158872b2
4 changed files with 4 additions and 4 deletions

View File

@ -228,7 +228,7 @@
<div class="tab-pane fade" id="pills-photo<?php echo $contact_id; ?>">
<div class="mb-3 text-center">
<?php if (!empty($contact_photo)) { ?>
<?php if ($contact_photo) { ?>
<img class="img-fluid" alt="contact_photo" src="<?php echo "uploads/clients/$client_id/$contact_photo"; ?>">
<?php } else { ?>
<span class="fa-stack fa-4x">

View File

@ -111,7 +111,6 @@ if (isset($_POST['add_client'])) {
$_SESSION['alert_message'] = "Client <strong>$name</strong> created";
header("Location: clients.php");
exit;
}

View File

@ -46,7 +46,7 @@ if (isset($_POST['add_contact'])) {
}
// Check for and process image/photo
if ($_FILES['file']['tmp_name']) {
if (isset($_FILES['file']['tmp_name'])) {
if ($new_file_name = checkFileUpload($_FILES['file'], array('jpg', 'jpeg', 'gif', 'png'))) {
$file_tmp_path = $_FILES['file']['tmp_name'];
@ -122,7 +122,7 @@ if (isset($_POST['edit_contact'])) {
mysqli_query($mysqli,"UPDATE contacts SET contact_name = '$name', contact_title = '$title', contact_phone = '$phone', contact_extension = '$extension', contact_mobile = '$mobile', contact_email = '$email', contact_pin = '$pin', contact_notes = '$notes', contact_important = $contact_important, contact_billing = $contact_billing, contact_technical = $contact_technical, contact_department = '$department', contact_location_id = $location_id, contact_user_id = $contact_user_id WHERE contact_id = $contact_id");
// Upload Photo
if ($_FILES['file']['tmp_name']) {
if (isset($_FILES['file']['tmp_name'])) {
if ($new_file_name = checkFileUpload($_FILES['file'], array('jpg', 'jpeg', 'gif', 'png'))) {
// Set directory in which the uploaded file will be moved

View File

@ -324,6 +324,7 @@ if (isset($_POST['add_recurring_item'])) {
$recurring_discount = floatval($row['recurring_discount_amount']);
$recurring_invoice_prefix = sanitizeInput($row['recurring_prefix']);
$recurring_invoice_number = intval($row['recurring_number']);
$client_id = intval($row['recurring_client_id']);
//add up all the items
$sql = mysqli_query($mysqli,"SELECT * FROM invoice_items WHERE item_recurring_id = $recurring_id");