Files
itflow/agent/modals/client/client_import.php

33 lines
2.2 KiB
PHP

<?php
require_once '../../../includes/modal_header.php';
ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-users me-2"></i>Import Clients</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<div class="modal-body">
<p><strong>Importing Multiple Contacts:</strong><br>When importing a client, only one contact (which will become the primary contact) and one location (which will become the primary location) can be added initially. To add additional contacts, you will need to click into each client, navigate to the Contacts section, and import multiple contacts individually for each client.</p>
<p><strong>A CSV file with these headings</strong>, in any order - leave out the ones you don't have. Only Client Name is needed, and a file exported from the clients list imports as it is:<br><?= escapeHtml(importHeadingsText('clients')) ?></p>
<p class="small text-body-secondary mb-0">Lead and Tax Exempt take Yes. Tax Rate is one of your tax rates, by name. Tags are separated by commas, and dates are YYYY-MM-DD. A client's rates and net terms come from its contract, else the defaults in Admin > Settings > Defaults. An Hourly Rate or Payment Terms (days) other than the defaults gives the client a Standard terms contract carrying them - leave them empty for the defaults.</p>
<hr>
<div class="mb-3 my-4">
<input type="file" class="form-control" name="file" accept=".csv" required>
</div>
<hr>
<div>Download: <a class="text-bold" href="post.php?download_clients_csv_template">sample csv template</a></div>
</div>
<div class="modal-footer">
<button type="submit" name="import_clients_csv" class="btn btn-primary text-strong"><i class="fas fa-upload me-2"></i>Import</button>
<button type="button" class="btn btn-light" data-bs-dismiss="modal"><i class="fa fa-times me-2"></i>Cancel</button>
</div>
</form>
<?php
require_once '../../../includes/modal_footer.php';