Merge pull request #17426 from adityahase/fix-py3-regional-france
fix(py3): Undefined variable
This commit is contained in:
commit
0af45b41d7
@ -69,19 +69,19 @@ def get_gl_entries(filters):
|
|||||||
|
|
||||||
gl_entries = frappe.db.sql("""
|
gl_entries = frappe.db.sql("""
|
||||||
select
|
select
|
||||||
gl.posting_date as GlPostDate, gl.name as GlName, gl.account, gl.transaction_date,
|
gl.posting_date as GlPostDate, gl.name as GlName, gl.account, gl.transaction_date,
|
||||||
sum(gl.debit) as debit, sum(gl.credit) as credit,
|
sum(gl.debit) as debit, sum(gl.credit) as credit,
|
||||||
sum(gl.debit_in_account_currency) as debitCurr, sum(gl.credit_in_account_currency) as creditCurr,
|
sum(gl.debit_in_account_currency) as debitCurr, sum(gl.credit_in_account_currency) as creditCurr,
|
||||||
gl.voucher_type, gl.voucher_no, gl.against_voucher_type,
|
gl.voucher_type, gl.voucher_no, gl.against_voucher_type,
|
||||||
gl.against_voucher, gl.account_currency, gl.against,
|
gl.against_voucher, gl.account_currency, gl.against,
|
||||||
gl.party_type, gl.party,
|
gl.party_type, gl.party,
|
||||||
inv.name as InvName, inv.title as InvTitle, inv.posting_date as InvPostDate,
|
inv.name as InvName, inv.title as InvTitle, inv.posting_date as InvPostDate,
|
||||||
pur.name as PurName, pur.title as PurTitle, pur.posting_date as PurPostDate,
|
pur.name as PurName, pur.title as PurTitle, pur.posting_date as PurPostDate,
|
||||||
jnl.cheque_no as JnlRef, jnl.posting_date as JnlPostDate, jnl.title as JnlTitle,
|
jnl.cheque_no as JnlRef, jnl.posting_date as JnlPostDate, jnl.title as JnlTitle,
|
||||||
pay.name as PayName, pay.posting_date as PayPostDate, pay.title as PayTitle,
|
pay.name as PayName, pay.posting_date as PayPostDate, pay.title as PayTitle,
|
||||||
cus.customer_name, cus.name as cusName,
|
cus.customer_name, cus.name as cusName,
|
||||||
sup.supplier_name, sup.name as supName
|
sup.supplier_name, sup.name as supName
|
||||||
|
|
||||||
from `tabGL Entry` gl
|
from `tabGL Entry` gl
|
||||||
left join `tabSales Invoice` inv on gl.voucher_no = inv.name
|
left join `tabSales Invoice` inv on gl.voucher_no = inv.name
|
||||||
left join `tabPurchase Invoice` pur on gl.voucher_no = pur.name
|
left join `tabPurchase Invoice` pur on gl.voucher_no = pur.name
|
||||||
@ -118,7 +118,7 @@ def get_result_as_list(data, filters):
|
|||||||
if account_number[0] is not None:
|
if account_number[0] is not None:
|
||||||
CompteNum = account_number[0]
|
CompteNum = account_number[0]
|
||||||
else:
|
else:
|
||||||
frappe.throw(_("Account number for account {0} is not available.<br> Please setup your Chart of Accounts correctly.").format(account.name))
|
frappe.throw(_("Account number for account {0} is not available.<br> Please setup your Chart of Accounts correctly.").format(d.get("account")))
|
||||||
|
|
||||||
if d.get("party_type") == "Customer":
|
if d.get("party_type") == "Customer":
|
||||||
CompAuxNum = d.get("cusName")
|
CompAuxNum = d.get("cusName")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user