resolved merge conflicts
This commit is contained in:
commit
f3be738b68
@ -4,7 +4,7 @@ import inspect
|
|||||||
import frappe
|
import frappe
|
||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
|
|
||||||
__version__ = '8.7.0'
|
__version__ = '8.7.1'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -68,7 +68,8 @@ frappe.ui.form.on('Account', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else if (cint(frm.doc.is_group) == 0) {
|
} else if (cint(frm.doc.is_group) == 0
|
||||||
|
&& frappe.boot.user.can_read.indexOf("GL Entry") !== -1) {
|
||||||
cur_frm.add_custom_button(__('Ledger'), function () {
|
cur_frm.add_custom_button(__('Ledger'), function () {
|
||||||
frappe.route_options = {
|
frappe.route_options = {
|
||||||
"account": frm.doc.name,
|
"account": frm.doc.name,
|
||||||
|
@ -718,7 +718,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-04-27 13:18:06.617940",
|
"modified": "2017-08-03 12:40:09.611951",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "GL Entry",
|
"name": "GL Entry",
|
||||||
@ -786,7 +786,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 1,
|
"quick_entry": 1,
|
||||||
"read_only": 1,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"search_fields": "voucher_no,account,posting_date,against_voucher",
|
"search_fields": "voucher_no,account,posting_date,against_voucher",
|
||||||
"show_name_in_global_search": 0,
|
"show_name_in_global_search": 0,
|
||||||
|
23
erpnext/accounts/doctype/gl_entry/test_gl_entry.js
Normal file
23
erpnext/accounts/doctype/gl_entry/test_gl_entry.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
// rename this file from _test_[name] to test_[name] to activate
|
||||||
|
// and remove above this line
|
||||||
|
|
||||||
|
QUnit.test("test: GL Entry", function (assert) {
|
||||||
|
let done = assert.async();
|
||||||
|
|
||||||
|
// number of asserts
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
frappe.run_serially('GL Entry', [
|
||||||
|
// insert a new GL Entry
|
||||||
|
() => frappe.tests.make([
|
||||||
|
// values to be set
|
||||||
|
{key: 'value'}
|
||||||
|
]),
|
||||||
|
() => {
|
||||||
|
assert.equal(cur_frm.doc.key, 'value');
|
||||||
|
},
|
||||||
|
() => done()
|
||||||
|
]);
|
||||||
|
|
||||||
|
});
|
@ -510,7 +510,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
|
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
if self.update_stock and valuation_tax:
|
if self.auto_accounting_for_stock and self.update_stock and valuation_tax:
|
||||||
for cost_center, amount in valuation_tax.items():
|
for cost_center, amount in valuation_tax.items():
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict({
|
self.get_gl_dict({
|
||||||
|
@ -5,6 +5,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
import unittest, copy
|
import unittest, copy
|
||||||
from frappe.utils import nowdate, add_days, flt
|
from frappe.utils import nowdate, add_days, flt
|
||||||
|
from frappe.model.dynamic_links import get_dynamic_link_map
|
||||||
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry, get_qty_after_transaction
|
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry, get_qty_after_transaction
|
||||||
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import unlink_payment_on_cancel_of_invoice
|
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import unlink_payment_on_cancel_of_invoice
|
||||||
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
|
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
|
||||||
@ -119,6 +120,10 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
pe.insert()
|
pe.insert()
|
||||||
pe.submit()
|
pe.submit()
|
||||||
|
|
||||||
|
link_data = get_dynamic_link_map().get('Sales Invoice', [])
|
||||||
|
link_doctypes = [d.parent for d in link_data]
|
||||||
|
self.assertEquals(link_doctypes[-1], 'GL Entry')
|
||||||
|
|
||||||
unlink_payment_on_cancel_of_invoice(0)
|
unlink_payment_on_cancel_of_invoice(0)
|
||||||
si = frappe.get_doc('Sales Invoice', si.name)
|
si = frappe.get_doc('Sales Invoice', si.name)
|
||||||
self.assertRaises(frappe.LinkExistsError, si.cancel)
|
self.assertRaises(frappe.LinkExistsError, si.cancel)
|
||||||
|
@ -340,6 +340,11 @@ class ProcessPayroll(Document):
|
|||||||
})
|
})
|
||||||
journal_entry.set("accounts", account_amt_list)
|
journal_entry.set("accounts", account_amt_list)
|
||||||
return journal_entry.as_dict()
|
return journal_entry.as_dict()
|
||||||
|
else:
|
||||||
|
frappe.msgprint(
|
||||||
|
_("There are no submitted Salary Slips to process."),
|
||||||
|
title="Error", indicator="red"
|
||||||
|
)
|
||||||
|
|
||||||
def update_salary_slip_status(self, jv_name = None):
|
def update_salary_slip_status(self, jv_name = None):
|
||||||
ss_list = self.get_sal_slip_list(ss_status=1)
|
ss_list = self.get_sal_slip_list(ss_status=1)
|
||||||
|
@ -430,3 +430,5 @@ erpnext.patches.v8_5.update_existing_data_in_project_type
|
|||||||
erpnext.patches.v8_5.set_default_mode_of_payment
|
erpnext.patches.v8_5.set_default_mode_of_payment
|
||||||
erpnext.patches.v8_5.update_customer_group_in_POS_profile
|
erpnext.patches.v8_5.update_customer_group_in_POS_profile
|
||||||
erpnext.patches.v8_6.update_timesheet_company_from_PO
|
erpnext.patches.v8_6.update_timesheet_company_from_PO
|
||||||
|
erpnext.patches.v8_6.set_write_permission_for_quotation_for_sales_manager
|
||||||
|
erpnext.patches.v8_5.remove_project_type_property_setter
|
@ -26,7 +26,7 @@ def execute():
|
|||||||
if not sales_invoice or not serial_nos:
|
if not sales_invoice or not serial_nos:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
serial_nos = ["'%s'"%no for no in serial_nos.split("\n")]
|
serial_nos = ["'%s'"%frappe.db.escape(no) for no in serial_nos.split("\n")]
|
||||||
|
|
||||||
frappe.db.sql("""
|
frappe.db.sql("""
|
||||||
UPDATE
|
UPDATE
|
||||||
@ -36,7 +36,7 @@ def execute():
|
|||||||
WHERE
|
WHERE
|
||||||
name in ({serial_nos})
|
name in ({serial_nos})
|
||||||
""".format(
|
""".format(
|
||||||
sales_invoice=sales_invoice,
|
sales_invoice=frappe.db.escape(sales_invoice),
|
||||||
serial_nos=",".join(serial_nos)
|
serial_nos=",".join(serial_nos)
|
||||||
)
|
)
|
||||||
)
|
)
|
17
erpnext/patches/v8_5/remove_project_type_property_setter.py
Normal file
17
erpnext/patches/v8_5/remove_project_type_property_setter.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
ps = frappe.db.get_value('Property Setter', dict(doc_type='Project', field_name='project_type',
|
||||||
|
property='options'))
|
||||||
|
if ps:
|
||||||
|
frappe.delete_doc('Property Setter', ps)
|
||||||
|
|
||||||
|
project_types = frappe.db.sql_list('select distinct project_type from tabProject')
|
||||||
|
|
||||||
|
for project_type in project_types:
|
||||||
|
if not frappe.db.exists("Project Type", project_type):
|
||||||
|
p_type = frappe.get_doc({
|
||||||
|
"doctype": "Project Type",
|
||||||
|
"project_type": project_type
|
||||||
|
})
|
||||||
|
p_type.insert()
|
@ -0,0 +1,11 @@
|
|||||||
|
# Copyright (c) 2017, Frappe and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
# Set write permission to permlevel 1 for sales manager role in Quotation doctype
|
||||||
|
frappe.db.sql(""" update `tabCustom DocPerm` set `tabCustom DocPerm`.write = 1
|
||||||
|
where `tabCustom DocPerm`.parent = 'Quotation' and `tabCustom DocPerm`.role = 'Sales Manager'
|
||||||
|
and `tabCustom DocPerm`.permlevel = 1 """)
|
@ -2602,7 +2602,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 1,
|
"max_attachments": 1,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-07-25 08:14:35.355019",
|
"modified": "2017-08-02 18:15:38.198698",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Quotation",
|
"name": "Quotation",
|
||||||
@ -2668,7 +2668,7 @@
|
|||||||
"set_user_permissions": 0,
|
"set_user_permissions": 0,
|
||||||
"share": 0,
|
"share": 0,
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 0
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 1,
|
"amend": 1,
|
||||||
|
@ -85,7 +85,7 @@ def get_price(item_code, template_item_code, price_list, qty=1):
|
|||||||
|
|
||||||
if pricing_rule:
|
if pricing_rule:
|
||||||
if pricing_rule.pricing_rule_for == "Discount Percentage":
|
if pricing_rule.pricing_rule_for == "Discount Percentage":
|
||||||
price[0].price_list_rate = flt(price[0].price_list_rate * (1.0 - (pricing_rule.discount_percentage / 100.0)))
|
price[0].price_list_rate = flt(price[0].price_list_rate * (1.0 - (flt(pricing_rule.discount_percentage) / 100.0)))
|
||||||
|
|
||||||
if pricing_rule.pricing_rule_for == "Price":
|
if pricing_rule.pricing_rule_for == "Price":
|
||||||
price[0].price_list_rate = pricing_rule.price_list_rate
|
price[0].price_list_rate = pricing_rule.price_list_rate
|
||||||
|
Loading…
Reference in New Issue
Block a user