mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
Merge branch 'develop' into patch-9
This commit is contained in:
@@ -447,7 +447,7 @@
|
|||||||
{
|
{
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"fieldname": "po_no",
|
"fieldname": "po_no",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Data",
|
||||||
"hide_days": 1,
|
"hide_days": 1,
|
||||||
"hide_seconds": 1,
|
"hide_seconds": 1,
|
||||||
"label": "Customer's Purchase Order",
|
"label": "Customer's Purchase Order",
|
||||||
@@ -1946,7 +1946,7 @@
|
|||||||
"idx": 181,
|
"idx": 181,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-08-03 23:31:12.675040",
|
"modified": "2020-08-27 01:56:28.532140",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice",
|
"name": "Sales Invoice",
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from frappe.utils import cint, flt, round_based_on_smallest_currency_fraction
|
|||||||
from erpnext.controllers.accounts_controller import validate_conversion_rate, \
|
from erpnext.controllers.accounts_controller import validate_conversion_rate, \
|
||||||
validate_taxes_and_charges, validate_inclusive_tax
|
validate_taxes_and_charges, validate_inclusive_tax
|
||||||
from erpnext.stock.get_item_details import _get_item_tax_template
|
from erpnext.stock.get_item_details import _get_item_tax_template
|
||||||
|
from erpnext.accounts.doctype.pricing_rule.utils import get_applied_pricing_rules
|
||||||
|
|
||||||
class calculate_taxes_and_totals(object):
|
class calculate_taxes_and_totals(object):
|
||||||
def __init__(self, doc):
|
def __init__(self, doc):
|
||||||
@@ -209,7 +210,7 @@ class calculate_taxes_and_totals(object):
|
|||||||
elif tax.charge_type == "On Previous Row Total":
|
elif tax.charge_type == "On Previous Row Total":
|
||||||
current_tax_fraction = (tax_rate / 100.0) * \
|
current_tax_fraction = (tax_rate / 100.0) * \
|
||||||
self.doc.get("taxes")[cint(tax.row_id) - 1].grand_total_fraction_for_current_item
|
self.doc.get("taxes")[cint(tax.row_id) - 1].grand_total_fraction_for_current_item
|
||||||
|
|
||||||
elif tax.charge_type == "On Item Quantity":
|
elif tax.charge_type == "On Item Quantity":
|
||||||
inclusive_tax_amount_per_qty = flt(tax_rate)
|
inclusive_tax_amount_per_qty = flt(tax_rate)
|
||||||
|
|
||||||
@@ -607,7 +608,7 @@ class calculate_taxes_and_totals(object):
|
|||||||
base_rate_with_margin = 0.0
|
base_rate_with_margin = 0.0
|
||||||
if item.price_list_rate:
|
if item.price_list_rate:
|
||||||
if item.pricing_rules and not self.doc.ignore_pricing_rule:
|
if item.pricing_rules and not self.doc.ignore_pricing_rule:
|
||||||
for d in json.loads(item.pricing_rules):
|
for d in get_applied_pricing_rules(item.pricing_rules):
|
||||||
pricing_rule = frappe.get_cached_doc('Pricing Rule', d)
|
pricing_rule = frappe.get_cached_doc('Pricing Rule', d)
|
||||||
|
|
||||||
if (pricing_rule.margin_type == 'Amount' and pricing_rule.currency == self.doc.currency)\
|
if (pricing_rule.margin_type == 'Amount' and pricing_rule.currency == self.doc.currency)\
|
||||||
|
|||||||
@@ -226,7 +226,9 @@ let check_and_set_availability = function(frm) {
|
|||||||
primary_action_label: __('Book'),
|
primary_action_label: __('Book'),
|
||||||
primary_action: function() {
|
primary_action: function() {
|
||||||
frm.set_value('appointment_time', selected_slot);
|
frm.set_value('appointment_time', selected_slot);
|
||||||
frm.set_value('duration', duration);
|
if (!frm.doc.duration) {
|
||||||
|
frm.set_value('duration', duration);
|
||||||
|
}
|
||||||
frm.set_value('practitioner', d.get_value('practitioner'));
|
frm.set_value('practitioner', d.get_value('practitioner'));
|
||||||
frm.set_value('department', d.get_value('department'));
|
frm.set_value('department', d.get_value('department'));
|
||||||
frm.set_value('appointment_date', d.get_value('appointment_date'));
|
frm.set_value('appointment_date', d.get_value('appointment_date'));
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ def update_latest_price_in_all_boms():
|
|||||||
update_cost()
|
update_cost()
|
||||||
|
|
||||||
def replace_bom(args):
|
def replace_bom(args):
|
||||||
|
frappe.db.auto_commit_on_many_writes = 1
|
||||||
args = frappe._dict(args)
|
args = frappe._dict(args)
|
||||||
|
|
||||||
doc = frappe.get_doc("BOM Update Tool")
|
doc = frappe.get_doc("BOM Update Tool")
|
||||||
@@ -97,6 +98,8 @@ def replace_bom(args):
|
|||||||
doc.new_bom = args.new_bom
|
doc.new_bom = args.new_bom
|
||||||
doc.replace_bom()
|
doc.replace_bom()
|
||||||
|
|
||||||
|
frappe.db.auto_commit_on_many_writes = 0
|
||||||
|
|
||||||
def update_cost():
|
def update_cost():
|
||||||
frappe.db.auto_commit_on_many_writes = 1
|
frappe.db.auto_commit_on_many_writes = 1
|
||||||
bom_list = get_boms_in_bottom_up_order()
|
bom_list = get_boms_in_bottom_up_order()
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ def get_data():
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': _('Support'),
|
'label': _('Support'),
|
||||||
'items': ['Issue', 'Maintenance Visit']
|
'items': ['Issue', 'Maintenance Visit', 'Installation Note', 'Warranty Claim']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': _('Projects'),
|
'label': _('Projects'),
|
||||||
|
|||||||
@@ -20,6 +20,13 @@ frappe.ready(() => {
|
|||||||
options: 'Email',
|
options: 'Email',
|
||||||
reqd: 1
|
reqd: 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldtype: 'Data',
|
||||||
|
label: __('Phone Number'),
|
||||||
|
fieldname: 'phone',
|
||||||
|
options: 'Phone',
|
||||||
|
reqd: 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fieldtype: 'Data',
|
fieldtype: 'Data',
|
||||||
label: __('Subject'),
|
label: __('Subject'),
|
||||||
|
|||||||
Reference in New Issue
Block a user