fix(tally): Ignore unhandled vouchers silently (#18430)
Vouchers that affect inventory entries but are not of type Sales, Purchase, Credit Note, Debit Note are not handled. Custom Vouchers are also not handled.
This commit is contained in:
parent
16a0458e29
commit
195465cdd9
@ -296,7 +296,9 @@ class TallyMigration(Document):
|
||||
else:
|
||||
function = voucher_to_journal_entry
|
||||
try:
|
||||
vouchers.append(function(voucher))
|
||||
processed_voucher = function(voucher)
|
||||
if processed_voucher:
|
||||
vouchers.append(processed_voucher)
|
||||
except:
|
||||
self.log(voucher)
|
||||
return vouchers
|
||||
@ -342,6 +344,10 @@ class TallyMigration(Document):
|
||||
account_field = "credit_to"
|
||||
account_name = encode_company_abbr(self.tally_creditors_account, self.erpnext_company)
|
||||
price_list_field = "buying_price_list"
|
||||
else:
|
||||
# Do not handle vouchers other than "Purchase", "Debit Note", "Sales" and "Credit Note"
|
||||
# Do not handle Custom Vouchers either
|
||||
return
|
||||
|
||||
invoice = {
|
||||
"doctype": doctype,
|
||||
|
Loading…
x
Reference in New Issue
Block a user