'Signal receiver that saves a snapshot of an invoice.
Arguments:
sender: Not used, but required by Django signals.
instance (Invoice, InvoiceItem, or InvoiceTransaction)'

@staticmethod
def snapshot_receiver(sender, instance, **kwargs):

    if isinstance(instance, Invoice):
        InvoiceHistory.save_invoice_snapshot(instance)
    elif hasattr(instance, 'invoice'):
        InvoiceHistory.save_invoice_snapshot(instance.invoice)
