def get_sales_report(account, vendor, date_type, date, path):
    reporter = Reporter()
    try:
        result = reporter.asc_get_sales_report(account, vendor, date_type,
                                               date)
        filename = result.headers['filename']
        with open(os.path.join(path, filename), 'wb') as f:
            f.write(result.content)
        click.echo('Report saved to {}'.format(os.path.join(path, filename)))
    except Exception as exc:
        click.echo(str(exc))