Completely remove the last bits of departments

This commit is contained in:
johnnyq
2022-04-29 16:50:25 -04:00
parent 7b35431021
commit 0641b0bfd4
8 changed files with 11 additions and 175 deletions

View File

@@ -4408,7 +4408,7 @@ if(isset($_GET['export_client_contacts_csv'])){
$client_name = $row['client_name'];
//Contacts
$sql = mysqli_query($mysqli,"SELECT * FROM contacts LEFT JOIN departments ON contact_department_id = department_id WHERE contact_client_id = $client_id ORDER BY contact_name ASC");
$sql = mysqli_query($mysqli,"SELECT * FROM contacts WHERE contact_client_id = $client_id ORDER BY contact_name ASC");
if($sql->num_rows > 0){
$delimiter = ",";
$filename = $client_name . "-Contacts-" . date('Y-m-d') . ".csv";
@@ -4422,7 +4422,7 @@ if(isset($_GET['export_client_contacts_csv'])){
//output each row of the data, format line as csv and write to file pointer
while($row = $sql->fetch_assoc()){
$lineData = array($row['contact_name'], $row['contact_title'], $row['department_name'], $row['contact_email'], formatPhoneNumber($row['contact_phone']), $row['contact_extension'], formatPhoneNumber($row['contact_mobile']), $row['contact_notes']);
$lineData = array($row['contact_name'], $row['contact_title'], $row['contact_department'], $row['contact_email'], formatPhoneNumber($row['contact_phone']), $row['contact_extension'], formatPhoneNumber($row['contact_mobile']), $row['contact_notes']);
fputcsv($f, $lineData, $delimiter);
}
@@ -7433,7 +7433,7 @@ if(isset($_GET['export_client_pdf'])){
$contact_email = $row['contact_email'];
$client_website = $row['client_website'];
$sql_contacts = mysqli_query($mysqli,"SELECT * FROM contacts LEFT JOIN departments ON contact_department_id = department_id WHERE contact_client_id = $client_id ORDER BY contact_name ASC");
$sql_contacts = mysqli_query($mysqli,"SELECT * FROM contacts WHERE contact_client_id = $client_id ORDER BY contact_name ASC");
$sql_locations = mysqli_query($mysqli,"SELECT * FROM locations WHERE location_client_id = $client_id ORDER BY location_name ASC");
$sql_vendors = mysqli_query($mysqli,"SELECT * FROM vendors WHERE vendor_client_id = $client_id ORDER BY vendor_name ASC");
if(isset($_GET['passwords'])){
@@ -7588,7 +7588,7 @@ if(isset($_GET['export_client_pdf'])){
}
$contact_mobile = formatPhoneNumber($row['contact_mobile']);
$contact_email = $row['contact_email'];
$department_name = $row['department_name'];
$contact_department = $row['contact_department'];
?>
[
@@ -7601,7 +7601,7 @@ if(isset($_GET['export_client_pdf'])){
style: 'item'
},
{
text: <?php echo json_encode($department_name); ?>,
text: <?php echo json_encode($contact_department); ?>,
style: 'item'
},
{