Merge pull request #16370 from rohitwaghchaure/show_outward_entries_in_negative

Show outward entries in negative for Bank Clearance Summary report
This commit is contained in:
rohitwaghchaure 2019-01-24 22:13:40 +05:30 committed by GitHub
commit 7e4cf62a15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,8 +36,8 @@ def get_conditions(filters):
def get_entries(filters):
conditions = get_conditions(filters)
journal_entries = frappe.db.sql("""SELECT
"Journal Entry", jv.name, jv.posting_date, jv.cheque_no, jv.clearance_date, jvd.against_account,
if((jvd.debit - jvd.credit) < 0, (jvd.debit - jvd.credit) * -1, (jvd.debit - jvd.credit))
"Journal Entry", jv.name, jv.posting_date, jv.cheque_no,
jv.clearance_date, jvd.against_account, jvd.debit - jvd.credit
FROM
`tabJournal Entry Account` jvd, `tabJournal Entry` jv
WHERE
@ -46,7 +46,7 @@ def get_entries(filters):
payment_entries = frappe.db.sql("""SELECT
"Payment Entry", name, posting_date, reference_no, clearance_date, party,
if(paid_from=%(account)s, paid_amount, received_amount)
if(paid_from=%(account)s, paid_amount * -1, received_amount)
FROM
`tabPayment Entry`
WHERE