Compare commits

..

15 Commits

Author SHA1 Message Date
Nabin Hait
d977333a99 Merge branch 'hotfix' 2017-10-02 12:28:26 +05:30
Nabin Hait
3a2834c7ad bumped to version 9.0.6 2017-10-02 12:58:26 +06:00
rohitwaghchaure
88491715e0 [Fix] select batch not displaying in the modal, duplicate invoice making after sync (#11005) 2017-10-02 12:13:36 +05:30
Nabin Hait
00a48ad4e5 Merge branch 'hotfix' 2017-10-02 12:09:00 +05:30
Nabin Hait
def308a433 bumped to version 9.0.5 2017-10-02 12:38:59 +06:00
Nabin Hait
9b98d7fa14 Gst doctype roles (#10984)
* Removed default permission from GST doctypes

* default permission from GST doctypes
2017-10-02 11:38:40 +05:30
Nabin Hait
cb48404bd2 Revert "Fixes for uom in get_item_details (#10986)" (#11009)
This reverts commit 5b58e489a8.
2017-10-02 11:37:18 +05:30
Nabin Hait
5b58e489a8 Fixes for uom in get_item_details (#10986) 2017-10-02 11:36:10 +05:30
Rushabh Mehta
b9fe14631d [fix] healthcare setup 2017-09-30 10:46:56 +05:30
Rushabh Mehta
e292c83114 Merge branch 'hotfix' 2017-09-29 16:22:01 +05:30
Rushabh Mehta
e1a4b3e4bc bumped to version 9.0.4 2017-09-29 16:52:01 +06:00
Rushabh Mehta
d3a48a83fd [fix] bom.py, dont use keyword 2017-09-29 15:50:17 +05:30
Rushabh Mehta
80d24f83f8 [fix] item variant description 2017-09-29 15:39:03 +05:30
Rushabh Mehta
3c14c5a16c [fix] tax_rule.py args 2017-09-29 13:21:22 +05:30
Rushabh Mehta
2b87d100fa [fix] https://github.com/frappe/erpnext/issues/10956 2017-09-28 15:21:36 +05:30
13 changed files with 73 additions and 78 deletions

View File

@@ -4,7 +4,7 @@ import inspect
import frappe
from erpnext.hooks import regional_overrides
__version__ = '9.0.3'
__version__ = '9.0.6'
def get_default_company(user=None):
'''Get default company for user'''

View File

@@ -417,6 +417,7 @@ def make_contact(args,customer):
'link_doctype': 'Customer',
'link_name': customer
})
doc.flags.ignore_mandatory = True
doc.save(ignore_permissions=True)
def make_address(args, customer):
@@ -441,6 +442,7 @@ def make_address(args, customer):
address.is_primary_address = 1
address.is_shipping_address = 1
address.update(args)
address.flags.ignore_mandatory = True
address.save(ignore_permissions = True)
def make_email_queue(email_queue):

View File

@@ -113,6 +113,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
});
this.page.add_menu_item(__("Sync Offline Invoices"), function () {
me.freeze_screen = true;
me.sync_sales_invoice()
});
@@ -1684,6 +1685,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
set_interval_for_si_sync: function () {
var me = this;
setInterval(function () {
me.freeze_screen = false;
me.sync_sales_invoice()
}, 60000)
},
@@ -1697,9 +1699,12 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
this.freeze = this.customer_doc.display
}
freeze_screen = this.freeze_screen || false;
if ((this.si_docs.length || this.email_queue_list || this.customers_list) && !this.freeze) {
frappe.call({
method: "erpnext.accounts.doctype.sales_invoice.pos.make_invoice",
freeze: freeze_screen,
args: {
doc_list: me.si_docs,
email_queue_list: me.email_queue_list,

View File

@@ -320,11 +320,15 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
from erpnext.accounts.doctype.tax_rule.tax_rule import get_tax_template, get_party_details
args = {
party_type.lower(): party,
"customer_group": customer_group,
"supplier_type": supplier_type,
"company": company
}
if customer_group:
args['customer_group'] = customer_group
if supplier_type:
args['supplier_type'] = supplier_type
if billing_address or shipping_address:
args.update(get_party_details(party, party_type, {"billing_address": billing_address, \
"shipping_address": shipping_address }))

View File

@@ -195,7 +195,7 @@ def copy_attributes_to_variant(item, variant):
if variant.attributes:
variant.description += "\n"
for d in variant.attributes:
variant.description += "<p>" + d.attribute + ": " + cstr(d.attribute_value) + "</p>"
variant.description += "<div>" + d.attribute + ": " + cstr(d.attribute_value) + "</div>"
def make_variant_item_code(template_item_code, template_item_name, variant):
"""Uses template's item code and abbreviations to make variant's item code"""

View File

@@ -36,7 +36,7 @@ def execute(filters=None):
status_map = {"Present": "P", "Absent": "A", "Half Day": "HD", "On Leave": "L", "None": "", "Holiday":"<b>H</b>"}
if status == "None" and holiday_map:
emp_holiday_list = emp_det.holiday_list if emp_det.holiday_list else default_holiday_list
if (day+1) in holiday_map[emp_holiday_list]:
if emp_holiday_list in holiday_map and (day+1) in holiday_map[emp_holiday_list]:
status = "Holiday"
row.append(status_map[status])
@@ -45,7 +45,7 @@ def execute(filters=None):
elif status == "Absent":
total_a += 1
elif status == "On Leave":
total_l += 1
total_l += 1
elif status == "Half Day":
total_p += 0.5
total_a += 0.5

View File

@@ -95,8 +95,8 @@ class BOM(WebsiteGenerator):
self.validate_bom_currecny(item)
ret = self.get_bom_material_detail({
"item_code": item.item_code,
"item_name": item.item_name,
"item_code": item.item_code,
"item_name": item.item_name,
"bom_no": item.bom_no,
"stock_qty": item.stock_qty
})
@@ -312,7 +312,7 @@ class BOM(WebsiteGenerator):
li.append("{0} on row {1}".format(i.item_code, i.idx))
duplicate_list = '<br>' + '<br>'.join(li)
frappe.throw(_("Same item has been entered multiple times. {list}").format(list=duplicate_list))
frappe.throw(_("Same item has been entered multiple times. {0}").format(duplicate_list))
def check_recursion(self):
""" Check whether recursion occurs in any bom"""
@@ -346,7 +346,7 @@ class BOM(WebsiteGenerator):
count = 0
if not bom_list:
bom_list = []
if self.name not in bom_list:
bom_list.append(self.name)

View File

@@ -96,7 +96,17 @@ erpnext.SerialNoBatchSelector = Class.extend({
if(this.show_dialog) {
let d = this.item;
this.dialog.set_value('serial_no', d.serial_no);
if (d.has_serial_no && d.serial_no) {
this.dialog.set_value('serial_no', d.serial_no);
} else if (d.batch_no) {
this.dialog.fields_dict.batches.df.data.push({
'batch_no': d.batch_no,
'actual_qty': d.actual_qty,
'selected_qty': d.qty
});
this.dialog.fields_dict.batches.grid.refresh();
}
}
this.dialog.show();
@@ -116,8 +126,10 @@ erpnext.SerialNoBatchSelector = Class.extend({
}
values.batches.map((batch, i) => {
if(!batch.selected_qty || batch.selected_qty === 0 ) {
frappe.throw(__("Please select quantity on row " + (i+1)));
return false;
if (!this.show_dialog) {
frappe.throw(__("Please select quantity on row " + (i+1)));
return false;
}
}
});
return true;
@@ -125,9 +137,11 @@ erpnext.SerialNoBatchSelector = Class.extend({
} else {
let serial_nos = values.serial_no || '';
if (!serial_nos || !serial_nos.replace(/\s/g, '').length) {
frappe.throw(__("Please enter serial numbers for serialized item "
+ values.item_code));
return false;
if (!this.show_dialog) {
frappe.throw(__("Please enter serial numbers for serialized item "
+ values.item_code));
return false;
}
}
return true;
}

View File

@@ -84,34 +84,13 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-08-31 14:38:52.220743",
"modified_by": "ewdszx@ed.ews",
"modified": "2017-09-29 14:38:52.220743",
"modified_by": "Administrator",
"module": "Regional",
"name": "GST HSN Code",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,

View File

@@ -83,34 +83,13 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2017-08-31 14:39:15.625952",
"modified_by": "ewdszx@ed.ews",
"modified": "2017-09-29 14:39:15.625952",
"modified_by": "Administrator",
"module": "Regional",
"name": "GST Settings",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 0,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,

View File

@@ -72,7 +72,6 @@ def add_custom_roles_for_reports():
def add_permissions():
for doctype in ('GST HSN Code', 'GST Settings'):
add_permission(doctype, 'Accounts Manager', 0)
add_permission(doctype, 'All', 0)
def add_print_formats():

View File

@@ -89,6 +89,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
this.cart = new POSCart({
frm: this.frm,
wrapper: this.wrapper.find('.cart-container'),
pos_profile: this.pos_profile,
events: {
on_customer_change: (customer) => this.frm.set_value('customer', customer),
on_field_change: (item_code, field, value) => {
@@ -196,6 +197,7 @@ erpnext.pos.PointOfSale = class PointOfSale {
this.update_item_in_frm(item)
.then(() => {
// update cart
this.remove_item_from_cart(item);
this.update_cart_data(item);
});
}, true);
@@ -215,12 +217,18 @@ erpnext.pos.PointOfSale = class PointOfSale {
return this.frm.script_manager
.trigger('qty', item.doctype, item.name)
.then(() => {
if (field === 'qty' && value === 0) {
frappe.model.clear_doc(item.doctype, item.name);
if (field === 'qty') {
this.remove_item_from_cart(item);
}
});
}
remove_item_from_cart(item) {
if (item.qty === 0) {
frappe.model.clear_doc(item.doctype, item.name);
}
}
make_payment_modal() {
this.payment = new Payment({
frm: this.frm,
@@ -363,10 +371,11 @@ erpnext.pos.PointOfSale = class PointOfSale {
};
class POSCart {
constructor({frm, wrapper, events}) {
constructor({frm, wrapper, pos_profile, events}) {
this.frm = frm;
this.wrapper = wrapper;
this.events = events;
this.pos_profile = pos_profile;
this.make();
this.bind_events();
}
@@ -514,6 +523,7 @@ class POSCart {
}
make_customer_field() {
let customer = this.frm.doc.customer || this.pos_profile['customer'];
this.customer_field = frappe.ui.form.make_control({
df: {
fieldtype: 'Link',
@@ -521,7 +531,6 @@ class POSCart {
fieldname: 'customer',
options: 'Customer',
reqd: 1,
default: this.frm.doc.customer,
onchange: () => {
this.events.on_customer_change(this.customer_field.get_value());
}
@@ -529,6 +538,10 @@ class POSCart {
parent: this.wrapper.find('.customer-field'),
render_input: true
});
if (customer) {
this.customer_field.set_value(customer);
}
}
make_numpad() {
@@ -919,7 +932,7 @@ class POSItems {
}
if(batch_no) {
this.events.update_cart(items[0].item_code,
'batch_no', serial_no);
'batch_no', batch_no);
this.search_field.set_value('');
}
});

View File

@@ -191,21 +191,21 @@ def create_healthcare_item_groups():
def create_lab_test_items():
records = [
{"doctype": "Item", "item_code": "MCH", "item_name": "MCH", "item_group": "Laboratory",
"stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
{"doctype": "Item", "item_code": "LDL", "item_name": "LDL", "item_group": "Laboratory",
"stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
{"doctype": "Item", "item_code": "GTT", "item_name": "GTT", "item_group": "Laboratory",
"stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
{"doctype": "Item", "item_code": "HDL", "item_name": "HDL", "item_group": "Laboratory",
"stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
{"doctype": "Item", "item_code": "BILT", "item_name": "BILT", "item_group": "Laboratory",
"stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
{"doctype": "Item", "item_code": "BILD", "item_name": "BILD", "item_group": "Laboratory",
"stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
{"doctype": "Item", "item_code": "BP", "item_name": "BP", "item_group": "Laboratory",
"stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
{"doctype": "Item", "item_code": "BS", "item_name": "BS", "item_group": "Laboratory",
"stock_uom": "Unit", "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1}
"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1}
]
insert_record(records)