Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kittiu committed Nov 3, 2023
1 parent d1dc0e0 commit 3e60109
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions frappe_etax_service/inet/inet_data_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,7 @@ def prepare_data(doc):
or doc.replaced_entry_id.etax_doctype
)
d["buyer_ref_document"] = doc.payment_reference
d["seller_branch_id"] = (
"00000"
if (
not doc.company_id.branch
or doc.company_id.branch.lower() in ["head office", "สำนักงานใหญ่"]
)
else doc.company_id.branch
)
d["seller_branch_id"] = doc._get_branch_id() or doc.company_id.branch
d["source_system"] = doc.env["ir.config_parameter"].sudo().get_param("web.base.url", "")
d["send_mail"] = (
"Y"
Expand All @@ -33,7 +26,7 @@ def prepare_data(doc):
d["seller_tax_id"] = doc.company_id.vat
d["buyer_name"] = doc.partner_id.name
d["buyer_tax_id"] = doc.partner_id.vat
d["buyer_branch_id"] = doc.branch_id.name or "00000"
d["buyer_branch_id"] = doc.partner_id.branch or "00000"
d["buyer_email"] = doc.partner_id.email
d["buyer_zip"] = doc.partner_id.zip
d["buyer_building_name"] = ""
Expand Down

0 comments on commit 3e60109

Please sign in to comment.