mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 23:49:19 +00:00
Merge pull request #6115 from rohitwaghchaure/pos_stock_update_issue
[POS] Fixed stock update issue
This commit is contained in:
@@ -13,9 +13,9 @@ from erpnext.controllers.accounts_controller import get_taxes_and_charges
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_pos_data():
|
def get_pos_data():
|
||||||
doc = frappe.new_doc('Sales Invoice')
|
doc = frappe.new_doc('Sales Invoice')
|
||||||
doc.update_stock = 1;
|
|
||||||
doc.is_pos = 1;
|
doc.is_pos = 1;
|
||||||
pos_profile = get_pos_profile(doc.company) or {}
|
pos_profile = get_pos_profile(doc.company) or {}
|
||||||
|
doc.update_stock = pos_profile.get('update_stock')
|
||||||
|
|
||||||
if pos_profile.get('name'):
|
if pos_profile.get('name'):
|
||||||
pos_profile = frappe.get_doc('POS Profile', pos_profile.get('name'))
|
pos_profile = frappe.get_doc('POS Profile', pos_profile.get('name'))
|
||||||
@@ -105,7 +105,7 @@ def update_tax_table(doc):
|
|||||||
|
|
||||||
def get_items(doc, pos_profile):
|
def get_items(doc, pos_profile):
|
||||||
item_list = []
|
item_list = []
|
||||||
for item in frappe.get_all("Item", fields=["*"], filters={'disabled': 0, 'has_variants': 0}):
|
for item in frappe.get_all("Item", fields=["*"], filters={'disabled': 0, 'has_variants': 0, 'is_sales_item': 1}):
|
||||||
item_doc = frappe.get_doc('Item', item.name)
|
item_doc = frappe.get_doc('Item', item.name)
|
||||||
if item_doc.taxes:
|
if item_doc.taxes:
|
||||||
item.taxes = json.dumps(dict(([d.tax_type, d.tax_rate] for d in
|
item.taxes = json.dumps(dict(([d.tax_type, d.tax_rate] for d in
|
||||||
|
|||||||
Reference in New Issue
Block a user