Skip to content

Commit

Permalink
fix: Multicurrency invoices using subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
deepeshgarg007 committed Dec 16, 2021
1 parent 2be62c2 commit 0e4842b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions erpnext/accounts/doctype/subscription/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
get_accounting_dimensions,
)
from erpnext.accounts.doctype.subscription_plan.subscription_plan import get_plan_rate
from erpnext.accounts.party import get_party_account_currency


class Subscription(Document):
Expand Down Expand Up @@ -355,6 +356,9 @@ def create_invoice(self, prorate):
if frappe.db.get_value('Supplier', self.party, 'tax_withholding_category'):
invoice.apply_tds = 1

### Add party currency to invoice
invoice.currency = get_party_account_currency(self.party_type, self.party, self.company)

## Add dimensions in invoice for subscription:
accounting_dimensions = get_accounting_dimensions()

Expand Down

0 comments on commit 0e4842b

Please sign in to comment.