Compare commits

..

9 Commits

Author SHA1 Message Date
Saurabh
b296bb1551 Merge branch 'hotfix' 2017-07-25 16:15:50 +05:30
Saurabh
e7c14fcc3d bumped to version 8.5.5 2017-07-25 16:45:49 +06:00
Saurabh
6436b9d089 Merge pull request #10080 from rohitwaghchaure/hotfix
[Fix] Negative amount showing in the grand total for multicurrency if discount has applied
2017-07-25 15:43:00 +05:30
Rohit Waghchaure
baa937aa52 [Fix] Negative amount showing in the grand total for multicurrency if discount has applied 2017-07-25 15:26:01 +05:30
bcornwellmott
1c32f5ace9 Whitelist method for adding production orders ops (#9997) 2017-07-24 22:43:44 +05:30
mbauskar
27334c28a9 Merge branch 'hotfix' 2017-07-20 16:49:30 +05:30
mbauskar
ea50c9d1be bumped to version 8.5.4 2017-07-20 17:19:30 +06:00
Rushabh Mehta
35da7d1fb4 [minor] we buy is also checked by default 2017-07-20 15:58:20 +05:30
Rushabh Mehta
ced14cc789 [fix] setup-wizard 2017-07-20 15:55:54 +05:30
5 changed files with 25 additions and 11 deletions

View File

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

View File

@@ -510,6 +510,12 @@ def check_if_scrap_warehouse_mandatory(bom_no):
return res
@frappe.whitelist()
def set_production_order_ops(name):
po = frappe.get_doc('Production Order', name)
po.set_production_order_operations()
po.save()
@frappe.whitelist()
def make_stock_entry(production_order_id, purpose, qty=None):
production_order = frappe.get_doc("Production Order", production_order_id)

View File

@@ -40,8 +40,10 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
},
calculate_discount_amount: function(){
if (frappe.meta.get_docfield(this.frm.doc.doctype, "discount_amount"))
if (frappe.meta.get_docfield(this.frm.doc.doctype, "discount_amount")) {
this.set_discount_amount();
this.apply_discount_amount();
}
},
_calculate_taxes_and_totals: function() {
@@ -451,6 +453,13 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
}
},
set_discount_amount: function() {
if(this.frm.doc.additional_discount_percentage) {
this.frm.doc.discount_amount = flt(flt(this.frm.doc[frappe.scrub(this.frm.doc.apply_discount_on)])
* this.frm.doc.additional_discount_percentage / 100, precision("discount_amount"));
}
},
apply_discount_amount: function() {
var me = this;
var distributed_amount = 0.0;

View File

@@ -236,7 +236,7 @@ var erpnext_slides = [
help: __("List your tax heads (e.g. VAT, Customs etc; they should have unique names) and their standard rates. This will create a standard template, which you can edit and add more later."),
add_more: 1,
max_count: 3,
mandatory_entry: 1,
mandatory_entry: 0,
fields: [
{fieldtype:"Section Break"},
{fieldtype:"Data", fieldname:"tax", label:__("Tax"),
@@ -308,8 +308,10 @@ var erpnext_slides = [
options:[__("Unit"), __("Nos"), __("Box"), __("Pair"), __("Kg"), __("Set"),
__("Hour"), __("Minute"), __("Litre"), __("Meter"), __("Gram")],
"default": __("Unit"), static: 1},
{fieldtype: "Check", fieldname: "is_sales_item", label:__("We sell this Item"), default: 1, static: 1},
{fieldtype: "Check", fieldname: "is_purchase_item", label:__("We buy this Item"), static: 1},
{fieldtype: "Check", fieldname: "is_sales_item",
label:__("We sell this Item"), default: 1, static: 1},
{fieldtype: "Check", fieldname: "is_purchase_item",
label:__("We buy this Item"), default: 1, static: 1},
{fieldtype:"Column Break"},
{fieldtype:"Currency", fieldname:"item_price", label:__("Rate"), static: 1},
{fieldtype:"Attach Image", fieldname:"item_img", label:__("Attach Image"), is_private: 0, static: 1},

View File

@@ -287,12 +287,9 @@ def make_tax_account_and_template(company, account_name, tax_rate, template_name
if accounts:
make_sales_and_purchase_tax_templates(accounts, template_name)
except frappe.NameError, e:
if e.args[2][0]==1062:
pass
else:
raise
except RootNotEditable, e:
except frappe.NameError:
pass
except RootNotEditable:
pass
def get_tax_account_group(company):