fix
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
from core.apps.finance.models import Counterparty
|
||||
from core.apps.counterparty.utils.counterparty import update_counterparty_balance
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Barcha counterpartylardagi debit va kredit balanslarini yangilash'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
counterparties = Counterparty.objects.all()
|
||||
for counterparty in counterparties:
|
||||
update_counterparty_balance(counterparty)
|
||||
self.stdout.write(
|
||||
self.style.SUCCESS(
|
||||
f'✓ {counterparties.count()} ta counterparty yangilandi'
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user