Do not show table fields and header if data doesnt exist, also removed the client footer on export Client IT Documentaiton

This commit is contained in:
johnnyq
2022-02-15 12:59:57 -05:00
parent 63ca643e3c
commit b3ebb21989

View File

@@ -6484,15 +6484,7 @@ if(isset($_GET['export_client_pdf'])){
title: '<?php echo $client_name; ?>- IT Documentation', title: '<?php echo $client_name; ?>- IT Documentation',
author: <?php echo json_encode($session_company_name); ?> author: <?php echo json_encode($session_company_name); ?>
}, },
footer: {
columns: [
{
text: <?php echo json_encode($client_name); ?>,
style: 'documentFooterCenter'
},
]
},
pageMargins: [ 15, 15, 15, 15 ], pageMargins: [ 15, 15, 15, 15 ],
content: [ content: [
@@ -6561,6 +6553,7 @@ if(isset($_GET['export_client_pdf'])){
}, },
//Contacts Start //Contacts Start
<?php if(mysqli_num_rows($sql_contacts) > 0){ ?>
{ {
text: 'Contacts', text: 'Contacts',
style: 'title' style: 'title'
@@ -6636,9 +6629,11 @@ if(isset($_GET['export_client_pdf'])){
] ]
} }
}, },
<?php } ?>
//Contact END //Contact END
//Locations Start //Locations Start
<?php if(mysqli_num_rows($sql_locations) > 0){ ?>
{ {
text: 'Locations', text: 'Locations',
style: 'title' style: 'title'
@@ -6693,9 +6688,11 @@ if(isset($_GET['export_client_pdf'])){
] ]
} }
}, },
<?php } ?>
//Locations END //Locations END
//Vendors Start //Vendors Start
<?php if(mysqli_num_rows($sql_vendors) > 0){ ?>
{ {
text: 'Vendors', text: 'Vendors',
style: 'title' style: 'title'
@@ -6767,10 +6764,12 @@ if(isset($_GET['export_client_pdf'])){
] ]
} }
}, },
<?php } ?>
//Vendors END //Vendors END
//Logins Start //Logins Start
<?php if(isset($_GET['passwords'])){ ?> <?php if(isset($_GET['passwords'])){ ?>
<?php if(mysqli_num_rows($sql_logins) > 0){ ?>
{ {
text: 'Logins', text: 'Logins',
style: 'title' style: 'title'
@@ -6840,10 +6839,16 @@ if(isset($_GET['export_client_pdf'])){
] ]
} }
}, },
<?php } ?> <?php
}
}
?>
//Logins END //Logins END
//Assets Start //Assets Start
<?php if(mysqli_num_rows($sql_assets) > 0){ ?>
{ {
text: 'Assets', text: 'Assets',
style: 'title' style: 'title'
@@ -6944,9 +6949,11 @@ if(isset($_GET['export_client_pdf'])){
] ]
} }
}, },
<?php } ?>
//Assets END //Assets END
//Software Start //Software Start
<?php if(mysqli_num_rows($sql_software) > 0){ ?>
{ {
text: 'Software', text: 'Software',
style: 'title' style: 'title'
@@ -7007,9 +7014,11 @@ if(isset($_GET['export_client_pdf'])){
] ]
} }
}, },
<?php } ?>
//Software END //Software END
//Networks Start //Networks Start
<?php if(mysqli_num_rows($sql_networks) > 0){ ?>
{ {
text: 'Networks', text: 'Networks',
style: 'title' style: 'title'
@@ -7079,9 +7088,11 @@ if(isset($_GET['export_client_pdf'])){
] ]
} }
}, },
<?php } ?>
//Networks END //Networks END
//Domains Start //Domains Start
<?php if(mysqli_num_rows($sql_domains) > 0){ ?>
{ {
text: 'Domains', text: 'Domains',
style: 'title' style: 'title'
@@ -7124,9 +7135,11 @@ if(isset($_GET['export_client_pdf'])){
] ]
} }
}, },
<?php } ?>
//Domains END //Domains END
//Certificates Start //Certificates Start
<?php if(mysqli_num_rows($sql_certficates) > 0){ ?>
{ {
text: 'Certificates', text: 'Certificates',
style: 'title' style: 'title'
@@ -7187,6 +7200,7 @@ if(isset($_GET['export_client_pdf'])){
] ]
} }
}, },
<?php } ?>
//Certificates END //Certificates END