|
|
|
@ -21,12 +21,12 @@ def send_for_accountant(sender, instance, created, **kwargs): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@receiver(post_save, sender=Transaction) |
|
|
|
@receiver(post_save, sender=Transaction) |
|
|
|
def add_invoice_history(sender, instance,created, **kwargs): |
|
|
|
def add_invoice_history(sender, instance, created, **kwargs): |
|
|
|
if 'add' in instance.type: |
|
|
|
if 'add' in instance.type: |
|
|
|
inv_history = InvoiceHistory() |
|
|
|
inv_history = InvoiceHistory() |
|
|
|
inv_history.comment = 'Пополнение счета' |
|
|
|
inv_history.comment = 'Пополнение счета' |
|
|
|
inv_history.sum = instance.sum |
|
|
|
inv_history.sum = instance.sum |
|
|
|
inv_history.user = instance.user |
|
|
|
inv_history.user = instance.customer |
|
|
|
inv_history.save() |
|
|
|
inv_history.save() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|