Retrieves tax configuration from a POS Profile including sales taxes template details for point-of-sale invoice processing.
import frappe
from frappe import _
from frappe.model.mapper import get_mapped_doc
from erpnext.accounts.party import get_party_account
from frappe.utils import flt, add_days, getdate, nowdate
from frappe.utils.background_jobs import enqueue
from erpnext.controllers.sales_and_purchase_return import make_return_doc
from erpnext.stock.doctype.batch.batch import get_batch_no, get_batch_qty
from erpnext.accounts.utils import get_outstanding_invoices as _get_outstanding_invoices
@frappe.whitelist()
def get_pos_profile_taxes(pos_profile_name):
pos = frappe.get_cached_doc("POS Profile", pos_profile_name)
taxes = []
if pos.taxes_and_charges:
template = frappe.get_cached_doc(
"Sales Taxes and Charges Template", pos.taxes_and_charges
)
for t in templ
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key