Compare commits

...

14 Commits

Author SHA1 Message Date
mbauskar
654ccb84f4 Merge branch 'hotfix' 2017-06-21 13:17:12 +05:30
mbauskar
9b4690995e bumped to version 8.0.51 2017-06-21 13:47:12 +06:00
Makarand Bauskar
2c67b01335 Merge pull request #9404 from mbauskar/hotfix
make quotation against lead company name (#9188)
2017-06-21 12:57:08 +05:30
Manas Solanki
29ba4143f9 make quotation against lead company name (#9188) 2017-06-21 12:55:27 +05:30
Makarand Bauskar
c7cfa16f8c Merge pull request #9391 from saurabh6790/fix_make_variant_item_code
[minor][fix] pass template item name to make_variant_item_code
2017-06-21 11:58:07 +05:30
Saurabh
8d269beb45 [minor][fix] pass template item name to make_variant_item_code 2017-06-20 20:14:14 +05:30
Makarand Bauskar
cd5dd890aa Merge pull request #9384 from nick9822/nick9822-patch-2
Bug while fetching stock balance of new item.
2017-06-20 19:52:28 +05:30
nick9822
cc699a94fd Bug while fetching new item balance. 2017-06-20 17:13:29 +05:30
Nabin Hait
84bc5601eb Total sales cost in Project should be updated based on base_grand_total (#9302)
* Total sales cost in Project should be updated based on base_grand_total

* Patch to update sales cost in Project in base currency
2017-06-16 12:13:51 +05:30
mbauskar
ac13627222 Merge branch 'hotfix' 2017-06-15 16:05:49 +05:30
mbauskar
489550ed59 bumped to version 8.0.50 2017-06-15 16:35:49 +06:00
Makarand Bauskar
950ad36352 Merge pull request #9306 from nabinhait/in_words_col_len
Change column length of in_words
2017-06-15 16:03:09 +05:30
Makarand Bauskar
a4af7cb7d3 removed extra quote from query 2017-06-15 16:02:44 +05:30
Nabin Hait
5aee7d1b70 Change column length of in_words 2017-06-15 15:35:08 +05:30
8 changed files with 36 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
__version__ = '8.0.49'
__version__ = '8.0.51'
def get_default_company(user=None):

View File

@@ -150,8 +150,7 @@ def make_quotation(source_name, target_doc=None):
{"Lead": {
"doctype": "Quotation",
"field_map": {
"name": "lead",
"lead_name": "customer_name",
"name": "lead"
}
}}, target_doc)
target_doc.quotation_to = "Lead"

View File

@@ -400,3 +400,5 @@ erpnext.patches.v8_0.delete_schools_depricated_doctypes
erpnext.patches.v8_0.update_customer_pos_id
erpnext.patches.v8_0.rename_items_in_status_field_of_material_request
erpnext.patches.v8_0.delete_bin_indexes
erpnext.patches.v8_0.update_sales_cost_in_project
erpnext.patches.v8_0.change_in_words_varchar_length

View File

@@ -0,0 +1,16 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
doctypes = frappe.db.sql_list("""select parent from tabDocField where fieldname = 'in_words'""")
for dt in doctypes:
for fieldname in ("in_words", "base_in_words"):
frappe.db.sql("alter table `tab{0}` change column `{1}` `{2}` varchar(255)"
.format(dt, fieldname, fieldname))
frappe.db.sql("""alter table `tabJournal Entry`
change column `total_amount_in_words` `total_amount_in_words` varchar(255)""")

View File

@@ -0,0 +1,12 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""
update `tabProject` p
set total_sales_cost = (select sum(base_grand_total)
from `tabSales Order` where project=p.name and docstatus=1)
""")

View File

@@ -178,7 +178,7 @@ class Project(Document):
self.total_purchase_cost = total_purchase_cost and total_purchase_cost[0][0] or 0
def update_sales_costing(self):
total_sales_cost = frappe.db.sql("""select sum(grand_total)
total_sales_cost = frappe.db.sql("""select sum(base_grand_total)
from `tabSales Order` where project = %s and docstatus=1""", self.name)
self.total_sales_cost = total_sales_cost and total_sales_cost[0][0] or 0

View File

@@ -37,7 +37,8 @@ class Item(WebsiteGenerator):
if frappe.db.get_default("item_naming_by")=="Naming Series":
if self.variant_of:
if not self.item_code:
self.item_code = make_variant_item_code(self.variant_of, self)
template_item_name = frappe.db.get_value("Item", self.variant_of, "item_name")
self.item_code = make_variant_item_code(self.variant_of, template_item_name, self)
else:
from frappe.model.naming import make_autoname
self.item_code = make_autoname(self.naming_series+'.#####')

View File

@@ -65,7 +65,7 @@ def get_stock_balance(item_code, warehouse, posting_date=None, posting_time=None
if with_valuation_rate:
return (last_entry.qty_after_transaction, last_entry.valuation_rate) if last_entry else (0.0, 0.0)
else:
return last_entry.qty_after_transaction or 0.0
return last_entry.qty_after_transaction if last_entry else 0.0
def get_latest_stock_balance():
bin_map = {}