fix
This commit is contained in:
@@ -28,10 +28,12 @@ class Command(BaseCommand):
|
||||
if item.get("balances"):
|
||||
balance, created = CounterpartyBalance.objects.get_or_create(
|
||||
counterparty=counterparty,
|
||||
defaults=dict(
|
||||
balance_date=datetime.strptime(item['balances'][0]['start_date'], "%d.%m.%Y"),
|
||||
kredit_uzs=item['credit_amount'],
|
||||
debit_uzs=item['debt_amount'],
|
||||
)
|
||||
)
|
||||
for b in item["balances"]:
|
||||
if b["currency"]["symbol"].lower() == 'uzs':
|
||||
balance.balance_uzs = b['amount']
|
||||
|
||||
Reference in New Issue
Block a user