fixes in AR/AP reports

This commit is contained in:
Nabin Hait
2012-10-19 12:18:31 +05:30
parent 49c93661c1
commit fbdd7fc49f
6 changed files with 116 additions and 84 deletions

View File

@@ -1,11 +1,16 @@
SELECT DISTINCT `tabGL Entry`.`Aging_date`,`tabGL Entry`.`account`, `tabGL Entry`.`against_voucher_type`, `tabGL Entry`.`against_voucher`,`tabGL Entry`.`voucher_type`,`tabGL Entry`.`voucher_no`, `tabGL Entry`.`remarks`, `tabGL Entry`.`credit`
FROM `tabGL Entry`,`tabAccount`
WHERE `tabGL Entry`.`posting_date`>= '%(posting_date)s'
AND `tabGL Entry`.`posting_date`<= '%(posting_date1)s'
AND `tabGL Entry`.`account` LIKE '%(account)s%%'
AND `tabGL Entry`.`company` LIKE '%(company)s%%'
AND ((ifnull(`tabGL Entry`.voucher_type,'') = 'Purchase Invoice' and `tabGL Entry`.credit>0) OR `tabGL Entry`.voucher_type = 'Journal Voucher')
AND `tabGL Entry`.`is_cancelled` = 'No'
AND `tabAccount`.master_type = 'Supplier'
AND `tabAccount`.name = `tabGL Entry`.account
ORDER BY `tabGL Entry`.`posting_date`
SELECT DISTINCT
`tabGL Entry`.`Aging_date`,`tabGL Entry`.`account`, `tabGL Entry`.`against_voucher_type`,
`tabGL Entry`.`against_voucher`,`tabGL Entry`.`voucher_type`,`tabGL Entry`.`voucher_no`,
`tabGL Entry`.`remarks`, `tabGL Entry`.`credit`
FROM
`tabGL Entry`,`tabAccount`
WHERE
`tabGL Entry`.`posting_date`<= '%(posting_date1)s'
AND `tabGL Entry`.`account` LIKE '%(account)s%%'
AND `tabGL Entry`.`company` LIKE '%(company)s%%'
AND ((ifnull(`tabGL Entry`.`voucher_type`,'') = 'Purchase Invoice'
AND `tabGL Entry`.`credit`>0) OR `tabGL Entry`.voucher_type = 'Journal Voucher')
AND `tabGL Entry`.`is_cancelled` = 'No'
AND `tabAccount`.master_type = 'Supplier'
AND `tabAccount`.name = `tabGL Entry`.account
ORDER BY `tabGL Entry`.`posting_date`