fix: sider fixes

This commit is contained in:
Anuja Pawar 2021-07-14 15:06:56 +05:30
parent 1dfb5eb535
commit b37ff0d3cf
3 changed files with 21 additions and 22 deletions

View File

@ -8,18 +8,17 @@ frappe.ui.form.on('South Africa VAT Settings', {
filters: {
country: "South Africa",
}
}
};
});
frm.set_query("account", "vat_accounts", function(doc, cdt, cdn) {
var row = locals[cdt][cdn];
console.log(row);
return {
filters: {
company: frm.doc.company,
account_type: "Tax",
is_group: 0
}
}
})
};
});
}
});

View File

@ -2,10 +2,10 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, json
import frappe
import json
from frappe import _
from frappe.utils import flt, formatdate, now_datetime, getdate
from datetime import date
from frappe.utils import formatdate
def execute(filters=None):
return VATAuditReport(filters).run()
@ -39,7 +39,7 @@ class VATAuditReport(object):
return self.columns, self.data
def get_sa_vat_accounts(self):
self.sa_vat_accounts = frappe.get_list("South Africa VAT Account", \
self.sa_vat_accounts = frappe.get_list("South Africa VAT Account",
filters = {"parent":self.filters.company}, pluck="account")
if not self.sa_vat_accounts and not frappe.flags.in_test and not frappe.flags.in_migrate:
frappe.throw(_("Please set VAT Accounts in South Africa VAT Settings"))
@ -150,7 +150,7 @@ class VATAuditReport(object):
for rate, section in consolidated_data.items():
rate = int(rate)
label = frappe.bold(_("Standard Rate ") + section_name + str(rate) + "%")
label = frappe.bold(_("Standard Rate ") + section_name + " " + str(rate) + "%")
section_head = {"posting_date": label}
total_gross = total_tax = total_net = 0
self.data.append(section_head)

View File

@ -3,7 +3,7 @@
from __future__ import unicode_literals
import frappe, os, json
# import frappe, os, json
from frappe.permissions import add_permission, update_permission_property
def setup():