mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-28 09:24:45 +00:00
Merge branch 'hotfix'
This commit is contained in:
@@ -23,9 +23,6 @@ script:
|
|||||||
- cd ~/frappe-bench
|
- cd ~/frappe-bench
|
||||||
- bench get-app erpnext $TRAVIS_BUILD_DIR
|
- bench get-app erpnext $TRAVIS_BUILD_DIR
|
||||||
- bench use test_site
|
- bench use test_site
|
||||||
- bench setup redis-cache
|
|
||||||
- bench setup redis-async-broker
|
|
||||||
- bench setup procfile --with-celery-broker
|
|
||||||
- bench reinstall
|
- bench reinstall
|
||||||
- bench build
|
- bench build
|
||||||
- bench build-website
|
- bench build-website
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
__version__ = '6.27.5'
|
__version__ = '6.27.6'
|
||||||
|
|||||||
@@ -353,25 +353,31 @@ class JournalEntry(AccountsController):
|
|||||||
self.remark = ("\n").join(r) #User Remarks is not mandatory
|
self.remark = ("\n").join(r) #User Remarks is not mandatory
|
||||||
|
|
||||||
def set_print_format_fields(self):
|
def set_print_format_fields(self):
|
||||||
total_amount = 0.0
|
bank_amount = party_amount = total_amount = 0.0
|
||||||
bank_account_currency = None
|
currency = bank_account_currency = party_account_currency = pay_to_recd_from= None
|
||||||
pay_to_recd_from = None
|
|
||||||
for d in self.get('accounts'):
|
for d in self.get('accounts'):
|
||||||
if d.party_type and d.party:
|
if d.party_type and d.party:
|
||||||
if not pay_to_recd_from:
|
if not pay_to_recd_from:
|
||||||
pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
|
pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
|
||||||
"customer_name" if d.party_type=="Customer" else "supplier_name")
|
"customer_name" if d.party_type=="Customer" else "supplier_name")
|
||||||
|
|
||||||
|
party_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
|
||||||
|
party_account_currency = d.account_currency
|
||||||
|
|
||||||
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
|
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
|
||||||
total_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
|
bank_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
|
||||||
bank_account_currency = d.account_currency
|
bank_account_currency = d.account_currency
|
||||||
|
|
||||||
if pay_to_recd_from:
|
if pay_to_recd_from:
|
||||||
self.pay_to_recd_from = pay_to_recd_from
|
self.pay_to_recd_from = pay_to_recd_from
|
||||||
else:
|
if bank_amount:
|
||||||
total_amount = 0
|
total_amount = bank_amount
|
||||||
|
currency = bank_account_currency
|
||||||
|
else:
|
||||||
|
total_amount = party_amount
|
||||||
|
currency = party_account_currency
|
||||||
|
|
||||||
self.set_total_amount(total_amount, bank_account_currency)
|
self.set_total_amount(total_amount, currency)
|
||||||
|
|
||||||
def set_total_amount(self, amt, currency):
|
def set_total_amount(self, amt, currency):
|
||||||
self.total_amount = amt
|
self.total_amount = amt
|
||||||
|
|||||||
@@ -375,7 +375,7 @@ class SalesInvoice(SellingController):
|
|||||||
frappe.throw(_("Cash or Bank Account is mandatory for making payment entry"))
|
frappe.throw(_("Cash or Bank Account is mandatory for making payment entry"))
|
||||||
|
|
||||||
if flt(self.paid_amount) + flt(self.write_off_amount) \
|
if flt(self.paid_amount) + flt(self.write_off_amount) \
|
||||||
- flt(self.base_grand_total) > 1/(10**(self.precision("base_grand_total") + 1)):
|
- flt(self.grand_total) > 1/(10**(self.precision("grand_total") + 1)):
|
||||||
frappe.throw(_("""Paid amount + Write Off Amount can not be greater than Grand Total"""))
|
frappe.throw(_("""Paid amount + Write Off Amount can not be greater than Grand Total"""))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"modified": "2015-11-02 12:32:02.048551",
|
"modified": "2016-04-04 17:27:19.104519",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Delivered Items To Be Billed",
|
"name": "Delivered Items To Be Billed",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`qty` - ifnull((select sum(qty) from `tabSales Invoice Item` \n\t where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n\t `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabDelivery Note Item`.`base_amount` - ifnull((select sum(base_amount) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n (`tabDelivery Note Item`.qty > ifnull((select sum(qty) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\norder by `tabDelivery Note`.`name` desc",
|
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t`tabDelivery Note Item`.`billed_amt` as \"Pending Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n `tabDelivery Note`.per_billed < 100\norder by `tabDelivery Note`.`name` desc",
|
||||||
"ref_doctype": "Sales Invoice",
|
"ref_doctype": "Sales Invoice",
|
||||||
"report_name": "Delivered Items To Be Billed",
|
"report_name": "Delivered Items To Be Billed",
|
||||||
"report_type": "Query Report"
|
"report_type": "Query Report"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"modified": "2016-02-23 18:48:42.372321",
|
"modified": "2016-04-01 08:26:43.868609",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Ordered Items To Be Billed",
|
"name": "Ordered Items To Be Billed",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"modified": "2016-02-23 18:51:21.968327",
|
"modified": "2016-04-01 08:27:32.122070",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Order Items To Be Billed",
|
"name": "Purchase Order Items To Be Billed",
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"modified": "2015-11-02 12:33:11.681513",
|
"modified": "2016-04-04 17:27:29.449124",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Received Items To Be Billed",
|
"name": "Received Items To Be Billed",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabPurchase Receipt Item`.`qty` - ifnull((select sum(qty) from `tabPurchase Invoice Item` \n\t where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n\t `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Qty:Float:110\",\n\t(`tabPurchase Receipt Item`.`base_amount` - ifnull((select sum(base_amount) \n from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.docstatus = 1 and `tabPurchase Receipt`.status != \"Closed\" and \n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n (`tabPurchase Receipt Item`.qty > ifnull((select sum(qty) from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus=1 and \n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\norder by `tabPurchase Receipt`.`name` desc",
|
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t`tabPurchase Receipt Item`.`billed_amt` as \"Pending Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.docstatus = 1 and `tabPurchase Receipt`.status != \"Closed\" and \n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n `tabPurchase Receipt`.per_billed < 100\norder by `tabPurchase Receipt`.`name` desc",
|
||||||
"ref_doctype": "Purchase Invoice",
|
"ref_doctype": "Purchase Invoice",
|
||||||
"report_name": "Received Items To Be Billed",
|
"report_name": "Received Items To Be Billed",
|
||||||
"report_type": "Query Report"
|
"report_type": "Query Report"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"modified": "2016-02-22 11:27:39.445257",
|
"modified": "2016-04-01 08:26:52.361800",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Buying",
|
"module": "Buying",
|
||||||
"name": "Item-wise Purchase History",
|
"name": "Item-wise Purchase History",
|
||||||
|
|||||||
@@ -184,8 +184,8 @@ def item_query(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
idx desc,
|
idx desc,
|
||||||
name, item_name
|
name, item_name
|
||||||
limit %(start)s, %(page_len)s """.format(key=searchfield,
|
limit %(start)s, %(page_len)s """.format(key=searchfield,
|
||||||
fcond=get_filters_cond(doctype, filters, conditions),
|
fcond=get_filters_cond(doctype, filters, conditions).replace('%', '%%'),
|
||||||
mcond=get_match_cond(doctype)),
|
mcond=get_match_cond(doctype).replace('%', '%%')),
|
||||||
{
|
{
|
||||||
"today": nowdate(),
|
"today": nowdate(),
|
||||||
"txt": "%%%s%%" % txt,
|
"txt": "%%%s%%" % txt,
|
||||||
|
|||||||
@@ -419,6 +419,8 @@ class calculate_taxes_and_totals(object):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.doc.round_floats_in(self.doc, ["grand_total", "total_advance", "write_off_amount"])
|
self.doc.round_floats_in(self.doc, ["grand_total", "total_advance", "write_off_amount"])
|
||||||
|
self._set_in_company_currency(self.doc, ['write_off_amount'])
|
||||||
|
|
||||||
if self.doc.party_account_currency == self.doc.currency:
|
if self.doc.party_account_currency == self.doc.currency:
|
||||||
total_amount_to_pay = flt(self.doc.grand_total - self.doc.total_advance
|
total_amount_to_pay = flt(self.doc.grand_total - self.doc.total_advance
|
||||||
- flt(self.doc.write_off_amount), self.doc.precision("grand_total"))
|
- flt(self.doc.write_off_amount), self.doc.precision("grand_total"))
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
|
|||||||
app_description = """ERP made simple"""
|
app_description = """ERP made simple"""
|
||||||
app_icon = "icon-th"
|
app_icon = "icon-th"
|
||||||
app_color = "#e74c3c"
|
app_color = "#e74c3c"
|
||||||
app_version = "6.27.5"
|
app_version = "6.27.6"
|
||||||
app_email = "info@erpnext.com"
|
app_email = "info@erpnext.com"
|
||||||
app_license = "GNU General Public License (v3)"
|
app_license = "GNU General Public License (v3)"
|
||||||
source_link = "https://github.com/frappe/erpnext"
|
source_link = "https://github.com/frappe/erpnext"
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ class ProductionPlanningTool(Document):
|
|||||||
|
|
||||||
item_condition = ""
|
item_condition = ""
|
||||||
if self.fg_item:
|
if self.fg_item:
|
||||||
item_condition = ' and so_item.item_code = "' + self.fg_item + '"'
|
item_condition = ' and so_item.item_code = "{0}"'.format(frappe.db.escape(self.fg_item))
|
||||||
|
|
||||||
items = frappe.db.sql("""select distinct parent, item_code, warehouse,
|
items = frappe.db.sql("""select distinct parent, item_code, warehouse,
|
||||||
(qty - delivered_qty) as pending_qty
|
(qty - delivered_qty) as pending_qty
|
||||||
@@ -139,7 +139,7 @@ class ProductionPlanningTool(Document):
|
|||||||
(", ".join(["%s"] * len(so_list)), item_condition), tuple(so_list), as_dict=1)
|
(", ".join(["%s"] * len(so_list)), item_condition), tuple(so_list), as_dict=1)
|
||||||
|
|
||||||
if self.fg_item:
|
if self.fg_item:
|
||||||
item_condition = ' and pi.item_code = "' + self.fg_item + '"'
|
item_condition = ' and pi.item_code = "{0}"'.format(frappe.db.escape(self.fg_item))
|
||||||
|
|
||||||
packed_items = frappe.db.sql("""select distinct pi.parent, pi.item_code, pi.warehouse as warehouse,
|
packed_items = frappe.db.sql("""select distinct pi.parent, pi.item_code, pi.warehouse as warehouse,
|
||||||
(((so_item.qty - so_item.delivered_qty) * pi.qty) / so_item.qty)
|
(((so_item.qty - so_item.delivered_qty) * pi.qty) / so_item.qty)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"modified": "2016-01-28 14:59:04.611174",
|
"modified": "2016-04-01 08:26:55.705992",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Item-wise Sales History",
|
"name": "Item-wise Sales History",
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
{
|
{
|
||||||
|
"add_total_row": 0,
|
||||||
"apply_user_permissions": 1,
|
"apply_user_permissions": 1,
|
||||||
"creation": "2013-08-20 15:08:10",
|
"creation": "2013-08-20 15:08:10",
|
||||||
|
"disabled": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"modified": "2014-06-03 07:18:17.128918",
|
"modified": "2016-04-01 08:27:14.436178",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Items To Be Requested",
|
"name": "Items To Be Requested",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"modified": "2015-11-04 12:00:40.085130",
|
"modified": "2016-04-01 08:27:03.318987",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Ordered Items To Be Delivered",
|
"name": "Ordered Items To Be Delivered",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"modified": "2015-11-04 12:01:22.108641",
|
"modified": "2016-04-01 08:26:59.904034",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Purchase Order Items To Be Received",
|
"name": "Purchase Order Items To Be Received",
|
||||||
|
|||||||
@@ -85,13 +85,18 @@ cur_frm.add_fetch('item_code', 'description', 'description');
|
|||||||
cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
|
cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
|
||||||
if(doc.serial_no) {
|
if(doc.serial_no) {
|
||||||
return{
|
return{
|
||||||
filters:{ 'serial_no': doc.serial_no}
|
doctype: "Serial No",
|
||||||
|
fields: "item_code",
|
||||||
|
filters:{
|
||||||
|
name: doc.serial_no
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return{
|
return{
|
||||||
filters:[
|
filters:[
|
||||||
['Item', 'docstatus', '!=', 2]
|
['Item', 'docstatus', '!=', 2],
|
||||||
|
['Item', 'disabled', '=', 0]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -1,7 +1,7 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
from pip.req import parse_requirements
|
from pip.req import parse_requirements
|
||||||
|
|
||||||
version = "6.27.5"
|
version = "6.27.6"
|
||||||
requirements = parse_requirements("requirements.txt", session="")
|
requirements = parse_requirements("requirements.txt", session="")
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
|||||||
Reference in New Issue
Block a user