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:
|
else:
|
||||||
function = voucher_to_journal_entry
|
function = voucher_to_journal_entry
|
||||||
try:
|
try:
|
||||||
vouchers.append(function(voucher))
|
processed_voucher = function(voucher)
|
||||||
|
if processed_voucher:
|
||||||
|
vouchers.append(processed_voucher)
|
||||||
except:
|
except:
|
||||||
self.log(voucher)
|
self.log(voucher)
|
||||||
return vouchers
|
return vouchers
|
||||||
@ -342,6 +344,10 @@ class TallyMigration(Document):
|
|||||||
account_field = "credit_to"
|
account_field = "credit_to"
|
||||||
account_name = encode_company_abbr(self.tally_creditors_account, self.erpnext_company)
|
account_name = encode_company_abbr(self.tally_creditors_account, self.erpnext_company)
|
||||||
price_list_field = "buying_price_list"
|
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 = {
|
invoice = {
|
||||||
"doctype": doctype,
|
"doctype": doctype,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user