def export_sale_data(saledata):
    """returns dict of relevant fields from SaleData object"""
    if saledata.sale_date:
        sale_date = saledata.sale_date.strftime('%d %B %Y')
    else:
        sale_date = ""
    return {
        "id": saledata.pk,
        "artwork": saledata.artwork.pk if saledata.artwork else None,
        "buyer": saledata.buyer.pk if saledata.buyer else None,
        "agent": saledata.agent.pk if saledata.agent else None,
        "notes": saledata.notes,
        "saleCurrency": saledata.sale_currency,
        "salePrice": saledata.sale_price,
        "discount": saledata.discount,
        "agentFee": saledata.agent_fee,
        "amountToArtist": saledata.amount_to_artist,
        "saleDate": sale_date
    }