Merge branch 'develop' into gst-category
This commit is contained in:
commit
19f78c2f31
@ -58,15 +58,24 @@ def get_party_tax_withholding_details(inv, tax_withholding_category=None):
|
|||||||
pan_no = ''
|
pan_no = ''
|
||||||
parties = []
|
parties = []
|
||||||
party_type, party = get_party_details(inv)
|
party_type, party = get_party_details(inv)
|
||||||
|
has_pan_field = frappe.get_meta(party_type).has_field("pan")
|
||||||
|
|
||||||
if not tax_withholding_category:
|
if not tax_withholding_category:
|
||||||
tax_withholding_category, pan_no = frappe.db.get_value(party_type, party, ['tax_withholding_category', 'pan'])
|
if has_pan_field:
|
||||||
|
fields = ['tax_withholding_category', 'pan']
|
||||||
|
else:
|
||||||
|
fields = ['tax_withholding_category']
|
||||||
|
|
||||||
|
tax_withholding_details = frappe.db.get_value(party_type, party, fields, as_dict=1)
|
||||||
|
|
||||||
|
tax_withholding_category = tax_withholding_details.get('tax_withholding_category')
|
||||||
|
pan_no = tax_withholding_details.get('pan')
|
||||||
|
|
||||||
if not tax_withholding_category:
|
if not tax_withholding_category:
|
||||||
return
|
return
|
||||||
|
|
||||||
# if tax_withholding_category passed as an argument but not pan_no
|
# if tax_withholding_category passed as an argument but not pan_no
|
||||||
if not pan_no:
|
if not pan_no and has_pan_field:
|
||||||
pan_no = frappe.db.get_value(party_type, party, 'pan')
|
pan_no = frappe.db.get_value(party_type, party, 'pan')
|
||||||
|
|
||||||
# Get others suppliers with the same PAN No
|
# Get others suppliers with the same PAN No
|
||||||
|
@ -6,6 +6,8 @@ def execute():
|
|||||||
if not company:
|
if not company:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
frappe.reload_doc('regional', 'doctype', 'lower_deduction_certificate')
|
||||||
|
|
||||||
ldc = frappe.qb.DocType("Lower Deduction Certificate").as_("ldc")
|
ldc = frappe.qb.DocType("Lower Deduction Certificate").as_("ldc")
|
||||||
supplier = frappe.qb.DocType("Supplier")
|
supplier = frappe.qb.DocType("Supplier")
|
||||||
|
|
||||||
|
@ -1195,7 +1195,7 @@
|
|||||||
"*": {
|
"*": {
|
||||||
"item_tax_templates": [
|
"item_tax_templates": [
|
||||||
{
|
{
|
||||||
"title": "GST 9%",
|
"title": "GST 18%",
|
||||||
"taxes": [
|
"taxes": [
|
||||||
{
|
{
|
||||||
"tax_type": {
|
"tax_type": {
|
||||||
|
Loading…
Reference in New Issue
Block a user