Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1510 Widoki

how to  the display of Debit, Credit, and Amount in Currency in USD directly in the Journal Items  

even my base currency is iQD 

for example

i have transaction in usd but system shows debit and credit in IQD because my company currency IQD i want see the debit and credit in usd in journal item? i add compute field and write this code but not work can you give me correct code ? 

Debit field 

result = 0

for line in self:

    if line.currency_id and line.currency_id.name == 'USD':

        result += line.debit

    elif line.amount_currency and line.debit:

        result += line.amount_currency

    else:

        result += 0


Credit field
result = 0

for line in self:

    if line.currency_id and line.currency_id.name == 'USD':

        result += line.credit

    elif line.amount_currency and line.credit:

        result += line.amount_currency

    else:

        result += 0


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lip 25
1530
2
mar 25
1772
0
lut 25
1379
0
lut 25
1630
2
lut 25
2713