Merge pull request #1301 from akhileshdarjee/hotfix
pos view showing inclusive taxes
diff --git a/accounts/report/accounts_receivable/accounts_receivable.py b/accounts/report/accounts_receivable/accounts_receivable.py
index 781db2a..de96abb 100644
--- a/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/accounts/report/accounts_receivable/accounts_receivable.py
@@ -42,7 +42,7 @@
for gle in self.get_entries_till(self.filters.report_date):
if self.is_receivable(gle, future_vouchers):
outstanding_amount = self.get_outstanding_amount(gle, self.filters.report_date)
- if abs(outstanding_amount) > 0.01:
+ if abs(outstanding_amount) > 0.0:
due_date = self.get_due_date(gle)
invoiced_amount = gle.debit if (gle.debit > 0) else 0
payment_received = invoiced_amount - outstanding_amount
@@ -78,15 +78,23 @@
if getdate(e.posting_date) <= report_date)
def is_receivable(self, gle, future_vouchers):
- return ((not gle.against_voucher) or (gle.against_voucher==gle.voucher_no) or
- ((gle.against_voucher_type, gle.against_voucher) in future_vouchers))
+ return (
+ # advance
+ (not gle.against_voucher) or
+
+ # sales invoice
+ (gle.against_voucher==gle.voucher_no and gle.debit > 0) or
+
+ # entries adjusted with future vouchers
+ ((gle.against_voucher_type, gle.against_voucher) in future_vouchers)
+ )
def get_outstanding_amount(self, gle, report_date):
payment_received = 0.0
for e in self.get_gl_entries_for(gle.account, gle.voucher_type, gle.voucher_no):
if getdate(e.posting_date) <= report_date and e.name!=gle.name:
payment_received += (flt(e.credit) - flt(e.debit))
-
+
return flt(gle.debit) - flt(gle.credit) - payment_received
def get_customer(self, account):
@@ -180,4 +188,4 @@
if index is None: index = 3
outstanding_range[index] = outstanding_amount
- return [age] + outstanding_range
\ No newline at end of file
+ return [age] + outstanding_range
diff --git a/config.json b/config.json
index d88d224..8499ee8 100644
--- a/config.json
+++ b/config.json
@@ -1,6 +1,6 @@
{
"app_name": "ERPNext",
- "app_version": "3.4.9",
+ "app_version": "3.5.1",
"base_template": "app/portal/templates/base.html",
"modules": {
"Accounts": {
@@ -74,5 +74,5 @@
"type": "module"
}
},
- "requires_framework_version": "==3.4.4"
+ "requires_framework_version": "==3.5.0"
}
\ No newline at end of file