fix: sider fixes
This commit is contained in:
parent
1dfb5eb535
commit
b37ff0d3cf
@ -8,18 +8,17 @@ frappe.ui.form.on('South Africa VAT Settings', {
|
|||||||
filters: {
|
filters: {
|
||||||
country: "South Africa",
|
country: "South Africa",
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
frm.set_query("account", "vat_accounts", function(doc, cdt, cdn) {
|
frm.set_query("account", "vat_accounts", function(doc, cdt, cdn) {
|
||||||
var row = locals[cdt][cdn];
|
var row = locals[cdt][cdn];
|
||||||
console.log(row);
|
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
company: frm.doc.company,
|
company: frm.doc.company,
|
||||||
account_type: "Tax",
|
account_type: "Tax",
|
||||||
is_group: 0
|
is_group: 0
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe, json
|
import frappe
|
||||||
|
import json
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import flt, formatdate, now_datetime, getdate
|
from frappe.utils import formatdate
|
||||||
from datetime import date
|
|
||||||
|
|
||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
return VATAuditReport(filters).run()
|
return VATAuditReport(filters).run()
|
||||||
@ -39,7 +39,7 @@ class VATAuditReport(object):
|
|||||||
return self.columns, self.data
|
return self.columns, self.data
|
||||||
|
|
||||||
def get_sa_vat_accounts(self):
|
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")
|
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:
|
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"))
|
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():
|
for rate, section in consolidated_data.items():
|
||||||
rate = int(rate)
|
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}
|
section_head = {"posting_date": label}
|
||||||
total_gross = total_tax = total_net = 0
|
total_gross = total_tax = total_net = 0
|
||||||
self.data.append(section_head)
|
self.data.append(section_head)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe, os, json
|
# import frappe, os, json
|
||||||
from frappe.permissions import add_permission, update_permission_property
|
from frappe.permissions import add_permission, update_permission_property
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user