Compare commits

..

23 Commits

Author SHA1 Message Date
Anand Doshi
8df5b5e3a1 Merge branch 'develop' 2015-11-10 11:31:29 +05:30
Anand Doshi
39982a5f02 bumped to version 6.7.8 2015-11-10 12:01:29 +06:00
Rushabh Mehta
8f228dd7f9 [fix] [minor] closed not in notifications 2015-11-10 11:28:35 +05:30
Rushabh Mehta
739aa4d51a [minor] allow pricing rule to have negative discount 2015-11-09 17:05:12 +05:30
Anand Doshi
87b5fcb3b5 Merge branch 'develop' 2015-11-09 13:17:49 +05:30
Anand Doshi
7489d29813 bumped to version 6.7.7 2015-11-09 13:47:49 +06:00
Anand Doshi
268d300030 Merge pull request #4297 from frappe/revert-4294-develop
Revert b28573ab03
2015-11-09 13:17:04 +05:30
Anand Doshi
7f77002015 Revert b28573ab03 2015-11-09 13:16:24 +05:30
Anand Doshi
b28573ab03 Merge pull request #4294 from neilLasrado/develop
[Minor fix] Allowed maintenance schedule to be imported via data import tool
2015-11-09 13:13:41 +05:30
Anand Doshi
c756ff67b0 Merge pull request #4296 from anandpdoshi/sales-order-allow-delivery
[fix] Allow both Purchase Order and Delivery from Sales Order, based on drop shipping checkbox
2015-11-09 13:13:14 +05:30
Anand Doshi
4e72ef1421 [fix] Allow both Purchase Order and Delivery from Sales Order, based on drop shipping checkbox 2015-11-09 13:01:49 +05:30
Neil Trini Lasrado
6b173f3a67 Allowed maintenance schedule to be imported via data import tool 2015-11-09 11:38:06 +05:30
Anand Doshi
fcfced624a Merge branch 'develop' 2015-11-07 15:40:22 +05:30
Anand Doshi
64949bfc4b bumped to version 6.7.6 2015-11-07 16:10:22 +06:00
Anand Doshi
438c4fb279 [patch] reload doctype Leave Allocation 2015-11-07 15:38:29 +05:30
Rushabh Mehta
ae4c8a6a48 Merge branch 'develop' 2015-11-06 16:54:17 +05:30
Rushabh Mehta
0d7213122a bumped to version 6.7.5 2015-11-06 17:24:17 +06:00
Rushabh Mehta
4268b0092a [minor] don't show po / mr buttons if delivered 2015-11-06 16:52:18 +05:30
Rushabh Mehta
64e31e9a4e [fix] process payroll 2015-11-06 14:47:12 +05:30
Rushabh Mehta
0a0c267edb Merge branch 'develop' 2015-11-06 11:45:09 +05:30
Rushabh Mehta
1a8d4b6ea7 bumped to version 6.7.4 2015-11-06 12:15:09 +06:00
Rushabh Mehta
97426776bd Merge pull request #4281 from nabinhait/address_fix
[fix] Clear addressed and contacts on a new form
2015-11-06 11:02:31 +05:30
Nabin Hait
915778fb69 [fix] Clear addressed and contacts on a new form 2015-10-30 14:43:13 +05:30
13 changed files with 46 additions and 21 deletions

View File

@@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '6.7.3'
__version__ = '6.7.8'

View File

@@ -59,7 +59,7 @@ class PricingRule(Document):
self.set(f, None)
def validate_price_or_discount(self):
for field in ["Price", "Discount Percentage"]:
for field in ["Price"]:
if flt(self.get(frappe.scrub(field))) < 0:
throw(_("{0} can not be negative").format(field))
@@ -168,7 +168,11 @@ def get_pricing_rules(args):
field = frappe.scrub(parenttype)
condition = ""
if args.get(field):
lft, rgt = frappe.db.get_value(parenttype, args[field], ["lft", "rgt"])
try:
lft, rgt = frappe.db.get_value(parenttype, args[field], ["lft", "rgt"])
except TypeError:
frappe.throw(_("Invalid {0}").format(args[field]))
parent_groups = frappe.db.sql_list("""select name from `tab%s`
where lft<=%s and rgt>=%s""" % (parenttype, '%s', '%s'), (lft, rgt))

View File

@@ -12,6 +12,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
if(doc.__islocal){
hide_field(['address_html','contact_html']);
erpnext.utils.clear_address_and_contact(cur_frm);
}
else{
unhide_field(['address_html','contact_html']);

View File

@@ -37,6 +37,8 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({
if(!this.frm.doc.__islocal) {
erpnext.utils.render_address_and_contact(cur_frm);
} else {
erpnext.utils.clear_address_and_contact(cur_frm);
}
},

View File

@@ -29,7 +29,7 @@ blogs.
"""
app_icon = "icon-th"
app_color = "#e74c3c"
app_version = "6.7.3"
app_version = "6.7.8"
source_link = "https://github.com/frappe/erpnext"
error_report_email = "support@erpnext.com"

View File

@@ -196,11 +196,11 @@ class ProcessPayroll(Document):
journal_entry.set("accounts", [
{
"account": salary_account,
"debit": amount
"debit_in_account_currency": amount
},
{
"account": default_bank_account,
"credit": amount
"credit_in_account_currency": amount
},
])

View File

@@ -2,6 +2,7 @@ from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doctype("Leave Allocation")
if frappe.db.has_column("Leave Allocation", "fiscal_year"):
for leave_allocation in frappe.db.sql("select name, fiscal_year from `tabLeave Allocation`", as_dict=True):
dates = frappe.db.get_value("Fiscal Year", leave_allocation["fiscal_year"],

View File

@@ -100,6 +100,11 @@ $.extend(erpnext, {
$.extend(erpnext.utils, {
clear_address_and_contact: function(frm) {
$(frm.fields_dict['address_html'].wrapper).html("");
frm.fields_dict['contact_html'] && $(frm.fields_dict['contact_html'].wrapper).html("");
},
render_address_and_contact: function(frm) {
// render address
$(frm.fields_dict['address_html'].wrapper)

View File

@@ -14,6 +14,8 @@ frappe.ui.form.on("Customer", "refresh", function(frm) {
if(!frm.doc.__islocal) {
erpnext.utils.render_address_and_contact(frm);
} else {
erpnext.utils.clear_address_and_contact(frm);
}
var grid = cur_frm.get_field("sales_team").grid;

View File

@@ -15,22 +15,31 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
refresh: function(doc, dt, dn) {
this._super();
this.frm.dashboard.reset();
var is_delivered_by_supplier = false;
var is_delivery_note = false;
var allow_purchase = false;
var allow_delivery = false;
if(doc.docstatus==1) {
if(doc.status != 'Stopped' && doc.status != 'Closed') {
$.each(cur_frm.doc.items, function(i, item){
if(item.delivered_by_supplier == 1 || item.supplier){
if(item.qty > flt(item.ordered_qty))
is_delivered_by_supplier = true;
for (var i in cur_frm.doc.items) {
var item = cur_frm.doc.items[i];
if(item.delivered_by_supplier === 1 || item.supplier){
if(item.qty > flt(item.ordered_qty)
&& item.qty > flt(item.delivered_qty)) {
allow_purchase = true;
}
}
else{
if(item.qty > flt(item.delivered_qty))
is_delivery_note = true;
if (item.delivered_by_supplier===0) {
if(item.qty > flt(item.delivered_qty)) {
allow_delivery = true;
}
}
})
if (allow_delivery && allow_purchase) {
break;
}
}
// material request
if(!doc.order_type || ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1
@@ -39,7 +48,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
}
// make purchase order
if(flt(doc.per_delivered, 2) < 100 && is_delivered_by_supplier) {
if(flt(doc.per_delivered, 2) < 100 && allow_purchase) {
cur_frm.add_custom_button(__('Purchase Order'), cur_frm.cscript.make_purchase_order);
}
@@ -62,7 +71,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
}
// delivery note
if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && is_delivery_note) {
if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) {
cur_frm.add_custom_button(__('Delivery'), this.make_delivery_note).addClass("btn-primary");
}

View File

@@ -5,6 +5,7 @@ cur_frm.cscript.refresh = function(doc,dt,dn){
if(doc.__islocal){
hide_field(['address_html', 'contact_html']);
erpnext.utils.clear_address_and_contact(cur_frm);
}
else{
unhide_field(['address_html', 'contact_html']);

View File

@@ -15,7 +15,7 @@ def get_notification_config():
"Opportunity": {"status": "Open"},
"Quotation": {"docstatus": 0},
"Sales Order": {
"status": ("not in", ("Stopped", "Completed")),
"status": ("not in", ("Stopped", "Completed", "Closed")),
"docstatus": ("<", 2)
},
"Journal Entry": {"docstatus": 0},
@@ -29,7 +29,7 @@ def get_notification_config():
"Stock Entry": {"docstatus": 0},
"Material Request": {"docstatus": 0},
"Purchase Order": {
"status": ("not in", ("Stopped", "Completed")),
"status": ("not in", ("Stopped", "Completed", "Closed")),
"docstatus": ("<", 2)
},
"Production Order": { "status": "In Process" },

View File

@@ -1,6 +1,6 @@
from setuptools import setup, find_packages
version = "6.7.3"
version = "6.7.8"
with open("requirements.txt", "r") as f:
install_requires = f.readlines()