From 9269c86339365dbb37032cd1e83cec8ef9bb2420 Mon Sep 17 00:00:00 2001 From: ankitjavalkarwork Date: Thu, 27 Nov 2014 17:13:36 +0530 Subject: [PATCH 01/47] Display mobile no of contact --- erpnext/public/js/templates/contact_list.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/templates/contact_list.html b/erpnext/public/js/templates/contact_list.html index c4c058c117b..94af7ef4f2e 100644 --- a/erpnext/public/js/templates/contact_list.html +++ b/erpnext/public/js/templates/contact_list.html @@ -14,8 +14,11 @@ {% if(contact_list[i].phone) { %} {%= __("Phone") %}: {%= contact_list[i].phone %}
{% } %} + {% if(contact_list[i].mobile_no) { %} + {%= __("Mobile No.") %}: {%= contact_list[i].mobile_no %}
+ {% } %} {% if(contact_list[i].email_id) { %} - {%= __("Email Id") %}: {%= contact_list[i].email_id %} + {%= __("Email ID") %}: {%= contact_list[i].email_id %} {% } %}

From 9440d080d4f007bd4a292ce268b790974b036f57 Mon Sep 17 00:00:00 2001 From: ankitjavalkarwork Date: Thu, 27 Nov 2014 17:28:53 +0530 Subject: [PATCH 02/47] Print Hide Recurring Order/Invoice based fields --- .../doctype/purchase_invoice/purchase_invoice.json | 8 +++++--- .../buying/doctype/purchase_order/purchase_order.json | 11 +++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 7e374002f2a..266aae4aedb 100755 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -800,7 +800,8 @@ "fieldtype": "Date", "label": "From Date", "no_copy": 1, - "permlevel": 0 + "permlevel": 0, + "print_hide": 1 }, { "allow_on_submit": 1, @@ -810,7 +811,8 @@ "fieldtype": "Date", "label": "To Date", "no_copy": 1, - "permlevel": 0 + "permlevel": 0, + "print_hide": 1 }, { "allow_on_submit": 1, @@ -878,7 +880,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-10-08 14:23:20.234176", + "modified": "2014-11-27 17:28:20.133701", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json index f072b65a461..a57f5441ee5 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.json +++ b/erpnext/buying/doctype/purchase_order/purchase_order.json @@ -685,7 +685,8 @@ "label": "Recurring Type", "no_copy": 1, "options": "Monthly\nQuarterly\nHalf-yearly\nYearly", - "permlevel": 0 + "permlevel": 0, + "print_hide": 1 }, { "allow_on_submit": 1, @@ -695,7 +696,8 @@ "fieldtype": "Date", "label": "From Date", "no_copy": 1, - "permlevel": 0 + "permlevel": 0, + "print_hide": 1 }, { "allow_on_submit": 1, @@ -705,7 +707,8 @@ "fieldtype": "Date", "label": "To Date", "no_copy": 1, - "permlevel": 0 + "permlevel": 0, + "print_hide": 1 }, { "allow_on_submit": 1, @@ -772,7 +775,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-10-08 14:23:29.718779", + "modified": "2014-11-27 17:27:38.839440", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order", From 3d65d9602ee6dc7cdbfa2efe5241d77ecfdc7ff2 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 28 Nov 2014 14:56:10 +0530 Subject: [PATCH 03/47] [error-reports] --- erpnext/accounts/doctype/sales_invoice/pos.js | 5 +++++ erpnext/hr/doctype/leave_application/leave_application.py | 6 +++--- erpnext/translations/es.csv | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/pos.js b/erpnext/accounts/doctype/sales_invoice/pos.js index 8c6e3cdb827..d9ef6d85626 100644 --- a/erpnext/accounts/doctype/sales_invoice/pos.js +++ b/erpnext/accounts/doctype/sales_invoice/pos.js @@ -233,6 +233,11 @@ erpnext.POS = Class.extend({ }, make_item_list: function() { var me = this; + if(!this.price_list) { + msgprint(__("Price List not found or disabled")); + return; + } + me.item_timeout = null; frappe.call({ method: 'erpnext.accounts.doctype.sales_invoice.pos.get_items', diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index 63eb7961c43..e6742bb71f3 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -203,15 +203,15 @@ class LeaveApplication(Document): def get_holidays(leave_app): tot_hol = frappe.db.sql("""select count(*) from `tabHoliday` h1, `tabHoliday List` h2, `tabEmployee` e1 where e1.name = %s and h1.parent = h2.name and e1.holiday_list = h2.name - and h1.holiday_date between %s and %s""", (leave_app.employee, leave_app.from_date, leave_app.to_date)) + and h1.holiday_date between %s and %s""", (leave_app.employee, leave_app.from_date, + leave_app.to_date)) # below line is needed. If an employee hasn't been assigned with any holiday list then above will return 0 rows. - tot_hol=tot_hol and flt(tot_hol[0][0]) or 0 if not tot_hol: tot_hol = frappe.db.sql("""select count(*) from `tabHoliday` h1, `tabHoliday List` h2 where h1.parent = h2.name and h1.holiday_date between %s and %s and ifnull(h2.is_default,0) = 1 and h2.fiscal_year = %s""", (leave_app.from_date, leave_app.to_date, leave_app.fiscal_year)) - return tot_hol and flt(tot_hol[0][0]) or 0 + return tot_hol and tot_hol[0][0] or 0 @frappe.whitelist() def get_total_leave_days(leave_app): diff --git a/erpnext/translations/es.csv b/erpnext/translations/es.csv index 0011fd1232a..d6add66959f 100644 --- a/erpnext/translations/es.csv +++ b/erpnext/translations/es.csv @@ -31,7 +31,7 @@ 1 Currency = [?] FractionFor e.g. 1 USD = 100 Cent,"1 moneda = [?] Fracción Por ejemplo, 1 USD = 100 Cent" 1. To maintain the customer wise item code and to make them searchable based on their code use this option,1 . Para mantener el código del artículo sabia cliente y para efectuar búsquedas en ellos en función de su uso de código de esta opción "Add / Edit"," Añadir / Editar < / a>" -"Add / Edit"," Añadir / Editar < / a>" +"Add / Edit"," Añadir / Editar < / a>" "Add / Edit"," Añadir / Editar < / a>" "

Default Template

Uses Jinja Templating and all the fields of Address (including Custom Fields if any) will be available

{{ address_line1 }}<br>{% if address_line2 %}{{ address_line2 }}<br>{% endif -%}{{ city }}<br>{% if state %}{{ state }}<br>{% endif -%}{% if pincode %} PIN:  {{ pincode }}<br>{% endif -%}{{ country }}<br>{% if phone %}Phone: {{ phone }}<br>{% endif -%}{% if fax %}Fax: {{ fax }}<br>{% endif -%}{% if email_id %}Email: {{ email_id }}<br>{% endif -%}
","

defecto plantilla

Usos Jinja plantillas y todos los campos de la Dirección ( incluyendo campos personalizados en su caso) estará disponible

  {{}} address_line1 
{% if address_line2%} {{}} address_line2
{ endif% -%} {{city}}
{% if estado%} {{Estado}} {% endif
-%} {% if%} pincode PIN: {{pincode}} {% endif
-%} {{país}}
{% if%} de teléfono Teléfono: {{phone}} {
endif% -%} {% if%} fax Fax: {{fax}} {% endif
-%} {% if%} email_ID Email: {{}} email_ID
; {% endif -%} " A Customer Group exists with same name please change the Customer name or rename the Customer Group,"Existe un Grupo de Clientes con el mismo nombre, por favor cambie el nombre del Cliente o cambie el nombre del Grupo de Clientes" @@ -2745,7 +2745,7 @@ Statement of Account,Estado de cuenta Static Parameters,Parámetros estáticos Status,estado Status must be one of {0},Estado debe ser uno de {0} -Status of {0} {1} is now {2},Situación de {0} {1} { 2 es ahora } +Status of {0} {1} is now {2},Situación de {0} {1} {2} es ahora Status updated to {0},Estado actualizado a {0} Statutory info and other general information about your Supplier,Información legal y otra información general acerca de su proveedor Stay Updated,Manténgase actualizado From 1b5afe737fe73668daaeae5ccc391e7155f4fb21 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 25 Nov 2014 15:29:23 +0530 Subject: [PATCH 04/47] Fixes in authorization rule based on average discount --- erpnext/selling/doctype/sales_order/sales_order.py | 13 +------------ .../authorization_control/authorization_control.py | 7 +++++-- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 498aec12b60..8153d8d8391 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -157,7 +157,7 @@ class SalesOrder(SellingController): self.check_credit(self.grand_total) - frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype, self.grand_total, self) + frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype, self.company, self.grand_total, self) self.update_prevdoc_status('submit') frappe.db.set(self, 'status', 'Submitted') @@ -357,17 +357,6 @@ def make_sales_invoice(source_name, target_doc=None): } }, target_doc, postprocess) - def set_advance_vouchers(source, target): - advance_voucher_list = [] - - advance_voucher = frappe.db.sql(""" - select - t1.name as voucher_no, t1.posting_date, t1.remark, t2.account, - t2.name as voucher_detail_no, {amount_query} as payment_amount, t2.is_advance - from - `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2 - """) - return doclist @frappe.whitelist() diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.py b/erpnext/setup/doctype/authorization_control/authorization_control.py index 8e7b0cefb06..fbf4b1cb361 100644 --- a/erpnext/setup/doctype/authorization_control/authorization_control.py +++ b/erpnext/setup/doctype/authorization_control/authorization_control.py @@ -98,9 +98,12 @@ class AuthorizationControl(TransactionBase): if doc_obj: price_list_rate, base_rate = 0, 0 for d in doc_obj.get(doc_obj.fname): - if d.base_price_list_rate and d.base_rate: - price_list_rate += flt(d.base_price_list_rate) + if d.base_rate: + price_list_rate += flt(d.base_price_list_rate) or flt(d.base_rate) base_rate += flt(d.base_rate) + if doc_obj.get("discount_amount"): + base_rate -= flt(doc_obj.discount_amount) + if price_list_rate: av_dis = 100 - flt(base_rate * 100 / price_list_rate) final_based_on = ['Grand Total','Average Discount','Customerwise Discount','Itemwise Discount'] From cc11045fd3ea86de19f4b78f509cc7eb68d3c3bb Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 28 Nov 2014 15:53:07 +0530 Subject: [PATCH 05/47] minor fix --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index af0a96ef67c..49845f68683 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -437,7 +437,7 @@ class AccountsController(TransactionBase): for order, jv_list in order_jv_map.items(): for jv in jv_list: if not advance_jv_against_si or jv not in advance_jv_against_si: - frappe.throw(_("Journal Voucher {0} is linked against Order {1}, hence it must be fetched as advance in Invoice as well.") + frappe.msgprint(_("Journal Voucher {0} is linked against Order {1}, check if it should be pulled as advance in this invoice.") .format(jv, order)) From 83db3e3ddb5c5f0013e78dbe545cf45ba4e739f9 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Mon, 1 Dec 2014 16:53:29 +0530 Subject: [PATCH 06/47] "From time" cannot be later than "To time" and hours cannot be negative --- erpnext/projects/doctype/time_log/test_time_log.py | 9 +++++++++ erpnext/projects/doctype/time_log/time_log.py | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/time_log/test_time_log.py b/erpnext/projects/doctype/time_log/test_time_log.py index 4a312adb41b..d0cf6a0328e 100644 --- a/erpnext/projects/doctype/time_log/test_time_log.py +++ b/erpnext/projects/doctype/time_log/test_time_log.py @@ -16,6 +16,15 @@ class TestTimeLog(unittest.TestCase): self.assertRaises(OverlapError, ts.insert) frappe.db.sql("delete from `tabTime Log`") + + def test_negative_hours(self): + frappe.db.sql("delete from `tabTime Log`") + test_time_log = frappe.new_doc("Time Log") + test_time_log.activity_type = "Communication" + test_time_log.from_time = "2013-01-01 11:00:00.000000" + test_time_log.to_time = "2013-01-01 10:00:00.000000" + self.assertRaises(frappe.ValidationError, test_time_log.save) + frappe.db.sql("delete from `tabTime Log`") test_records = frappe.get_test_records('Time Log') test_ignore = ["Time Log Batch", "Sales Invoice"] diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py index eb8afc7729b..b925114ceb9 100644 --- a/erpnext/projects/doctype/time_log/time_log.py +++ b/erpnext/projects/doctype/time_log/time_log.py @@ -19,10 +19,12 @@ class TimeLog(Document): self.set_status() self.validate_overlap() self.calculate_total_hours() - + def calculate_total_hours(self): from frappe.utils import time_diff_in_hours self.hours = time_diff_in_hours(self.to_time, self.from_time) + if self.hours < 0: + frappe.throw(_("\'From Time\' cannot be later than \'To Time\'")) def set_status(self): self.status = { From d0a44ca85c8cb30b2a507d0675611def890cea33 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Mon, 1 Dec 2014 23:31:53 +0530 Subject: [PATCH 07/47] Changed contact_date to Datetime so appointment or call with time can be scheduled --- erpnext/selling/doctype/lead/lead.json | 4 ++-- erpnext/selling/doctype/lead/lead.py | 1 + erpnext/selling/doctype/opportunity/opportunity.json | 4 ++-- erpnext/selling/doctype/opportunity/opportunity.py | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/doctype/lead/lead.json b/erpnext/selling/doctype/lead/lead.json index 2d3d49c8f89..7a1d6d69403 100644 --- a/erpnext/selling/doctype/lead/lead.json +++ b/erpnext/selling/doctype/lead/lead.json @@ -160,7 +160,7 @@ "allow_on_submit": 0, "description": "Add to calendar on this date", "fieldname": "contact_date", - "fieldtype": "Date", + "fieldtype": "Datetime", "in_filter": 1, "label": "Next Contact Date", "no_copy": 1, @@ -368,7 +368,7 @@ ], "icon": "icon-user", "idx": 1, - "modified": "2014-08-12 05:22:18.801092", + "modified": "2014-12-01 08:22:23.286314", "modified_by": "Administrator", "module": "Selling", "name": "Lead", diff --git a/erpnext/selling/doctype/lead/lead.py b/erpnext/selling/doctype/lead/lead.py index 98bed4dfc26..0fcfc1c3066 100644 --- a/erpnext/selling/doctype/lead/lead.py +++ b/erpnext/selling/doctype/lead/lead.py @@ -45,6 +45,7 @@ class Lead(SellingController): def add_calendar_event(self, opts=None, force=False): super(Lead, self).add_calendar_event({ "owner": self.lead_owner, + "starts_on": self.contact_date, "subject": ('Contact ' + cstr(self.lead_name)), "description": ('Contact ' + cstr(self.lead_name)) + \ (self.contact_by and ('. By : ' + cstr(self.contact_by)) or '') diff --git a/erpnext/selling/doctype/opportunity/opportunity.json b/erpnext/selling/doctype/opportunity/opportunity.json index 513fbc8bdb5..17291ad13f5 100644 --- a/erpnext/selling/doctype/opportunity/opportunity.json +++ b/erpnext/selling/doctype/opportunity/opportunity.json @@ -372,7 +372,7 @@ { "description": "Your sales person will get a reminder on this date to contact the customer", "fieldname": "contact_date", - "fieldtype": "Date", + "fieldtype": "Datetime", "label": "Next Contact Date", "oldfieldname": "contact_date", "oldfieldtype": "Date", @@ -416,7 +416,7 @@ "icon": "icon-info-sign", "idx": 1, "is_submittable": 1, - "modified": "2014-08-12 05:21:51.282397", + "modified": "2014-12-01 08:46:35.331148", "modified_by": "Administrator", "module": "Selling", "name": "Opportunity", diff --git a/erpnext/selling/doctype/opportunity/opportunity.py b/erpnext/selling/doctype/opportunity/opportunity.py index ba331f9052f..4420ad9e476 100644 --- a/erpnext/selling/doctype/opportunity/opportunity.py +++ b/erpnext/selling/doctype/opportunity/opportunity.py @@ -57,6 +57,7 @@ class Opportunity(TransactionBase): opts = frappe._dict() opts.description = "" + opts.contact_date = self.contact_date if self.customer: if self.contact_person: From 185af03fb2ee290feab48ab3c47464e4443cfc33 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Tue, 2 Dec 2014 14:18:10 +0530 Subject: [PATCH 08/47] Update time_log.py --- erpnext/projects/doctype/time_log/time_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py index b925114ceb9..7912ff65f9e 100644 --- a/erpnext/projects/doctype/time_log/time_log.py +++ b/erpnext/projects/doctype/time_log/time_log.py @@ -24,7 +24,7 @@ class TimeLog(Document): from frappe.utils import time_diff_in_hours self.hours = time_diff_in_hours(self.to_time, self.from_time) if self.hours < 0: - frappe.throw(_("\'From Time\' cannot be later than \'To Time\'")) + frappe.throw(_("'From Time' cannot be later than 'To Time'")) def set_status(self): self.status = { From b80d892eab56717fdf94d88029892d1fda27fef1 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Tue, 2 Dec 2014 14:19:29 +0530 Subject: [PATCH 09/47] removed unecessary backslash --- erpnext/projects/doctype/time_log/time_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/time_log/time_log.py b/erpnext/projects/doctype/time_log/time_log.py index b925114ceb9..7912ff65f9e 100644 --- a/erpnext/projects/doctype/time_log/time_log.py +++ b/erpnext/projects/doctype/time_log/time_log.py @@ -24,7 +24,7 @@ class TimeLog(Document): from frappe.utils import time_diff_in_hours self.hours = time_diff_in_hours(self.to_time, self.from_time) if self.hours < 0: - frappe.throw(_("\'From Time\' cannot be later than \'To Time\'")) + frappe.throw(_("'From Time' cannot be later than 'To Time'")) def set_status(self): self.status = { From d57b57a21d2ddfc52f09487718b167a905014c65 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 9 Dec 2014 11:55:59 +0530 Subject: [PATCH 10/47] Minor fix in accounts receivable report --- .../accounts_receivable.py | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 3dc81d13416..a2ed86da15f 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -13,17 +13,17 @@ class AccountsReceivableReport(object): self.age_as_on = getdate(nowdate()) \ if self.filters.report_date > getdate(nowdate()) \ else self.filters.report_date - + def run(self): customer_naming_by = frappe.db.get_value("Selling Settings", None, "cust_master_name") return self.get_columns(customer_naming_by), self.get_data(customer_naming_by) - + def get_columns(self, customer_naming_by): columns = [ _("Posting Date") + ":Date:80", _("Account") + ":Link/Account:150", _("Voucher Type") + "::110", _("Voucher No") + ":Dynamic Link/Voucher Type:120", - _("Due Date") + ":Date:80", - _("Invoiced Amount") + ":Currency:100", _("Payment Received") + ":Currency:100", + _("Due Date") + ":Date:80", + _("Invoiced Amount") + ":Currency:100", _("Payment Received") + ":Currency:100", _("Outstanding Amount") + ":Currency:100", _("Age") + ":Int:50", "0-30:Currency:100", "30-60:Currency:100", "60-90:Currency:100", _("90-Above") + ":Currency:100", _("Customer") + ":Link/Customer:200" @@ -69,27 +69,27 @@ class AccountsReceivableReport(object): # returns a distinct list return list(set([(e.voucher_type, e.voucher_no) for e in self.get_gl_entries() if getdate(e.posting_date) > report_date])) - + def get_entries_till(self, report_date): # returns a generator - return (e for e in self.get_gl_entries() + return (e for e in self.get_gl_entries() if getdate(e.posting_date) <= report_date) - + def is_receivable(self, gle, future_vouchers): return ( # advance - (not gle.against_voucher) or + (not gle.against_voucher) or # against sales order (gle.against_voucher_type == "Sales Order") or - + # sales invoice - (gle.against_voucher==gle.voucher_no and gle.debit > 0) or - + (gle.against_voucher==gle.voucher_no and gle.debit > 0) or + # entries adjusted with future vouchers ((gle.against_voucher_type, gle.against_voucher) in future_vouchers) ) - + def get_outstanding_amount(self, gle, report_date): payment_received = 0.0 for e in self.get_gl_entries_for(gle.account, gle.voucher_type, gle.voucher_no): @@ -97,7 +97,7 @@ class AccountsReceivableReport(object): payment_received += (flt(e.credit) - flt(e.debit)) return flt(gle.debit) - flt(gle.credit) - payment_received - + def get_customer(self, account): return self.get_account_map().get(account, {}).get("customer") or "" @@ -106,25 +106,25 @@ class AccountsReceivableReport(object): def get_territory(self, account): return self.get_account_map().get(account, {}).get("territory") or "" - + def get_account_map(self): if not hasattr(self, "account_map"): - self.account_map = dict(((r.name, r) for r in frappe.db.sql("""select + self.account_map = dict(((r.name, r) for r in frappe.db.sql("""select acc.name, cust.name as customer, cust.customer_name, cust.territory - from `tabAccount` acc left join `tabCustomer` cust + from `tabAccount` acc left join `tabCustomer` cust on cust.name=acc.master_name where acc.master_type="Customer" """, as_dict=True))) - + return self.account_map - + def get_due_date(self, gle): if not hasattr(self, "invoice_due_date_map"): # TODO can be restricted to posting date self.invoice_due_date_map = dict(frappe.db.sql("""select name, due_date from `tabSales Invoice` where docstatus=1""")) - + return gle.voucher_type == "Sales Invoice" \ and self.invoice_due_date_map.get(gle.voucher_no) or "" - + def get_gl_entries(self): if not hasattr(self, "gl_entries"): conditions, values = self.prepare_conditions() @@ -132,15 +132,15 @@ class AccountsReceivableReport(object): where docstatus < 2 {0} order by posting_date, account""".format(conditions), values, as_dict=True) return self.gl_entries - + def prepare_conditions(self): conditions = [""] values = {} - + if self.filters.company: conditions.append("company=%(company)s") values["company"] = self.filters.company - + if self.filters.account: conditions.append("account=%(account)s") values["account"] = self.filters.account @@ -149,11 +149,11 @@ class AccountsReceivableReport(object): if not account_map: frappe.throw(_("No Customer Accounts found.")) else: - accounts_list = ['"{0}"'.format(ac) for ac in account_map] + accounts_list = ['"{0}"'.format(ac.replace('"', '\"')) for ac in account_map] conditions.append("account in ({0})".format(", ".join(accounts_list))) - + return " and ".join(conditions), values - + def get_gl_entries_for(self, account, against_voucher_type, against_voucher): if not hasattr(self, "gl_entries_map"): self.gl_entries_map = {} @@ -163,7 +163,7 @@ class AccountsReceivableReport(object): .setdefault(gle.against_voucher_type, {})\ .setdefault(gle.against_voucher, [])\ .append(gle) - + return self.gl_entries_map.get(account, {})\ .get(against_voucher_type, {})\ .get(against_voucher, []) @@ -176,15 +176,15 @@ def get_ageing_data(age_as_on, entry_date, outstanding_amount): outstanding_range = [0.0, 0.0, 0.0, 0.0] if not (age_as_on and entry_date): return [0] + outstanding_range - + age = (getdate(age_as_on) - getdate(entry_date)).days or 0 index = None for i, days in enumerate([30, 60, 90]): if age <= days: index = i break - + if index is None: index = 3 outstanding_range[index] = outstanding_amount - + return [age] + outstanding_range From 7887ccb441fc5978e8538c07cc0b8815f9a9230b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 9 Dec 2014 14:34:14 +0530 Subject: [PATCH 11/47] Credit days fix --- erpnext/accounts/doctype/account/account.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 7195db8a94d..3874ac21467 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import frappe -from frappe.utils import flt, cstr, cint, getdate, add_days, formatdate +from frappe.utils import flt, cstr, cint, getdate from frappe import msgprint, throw, _ from frappe.model.document import Document @@ -176,15 +176,7 @@ class Account(Document): frappe.throw(_("Due Date cannot be before Posting Date")) elif credit_days is not None and diff > credit_days: - is_credit_controller = frappe.db.get_value("Accounts Settings", None, - "credit_controller") in frappe.user.get_roles() - - if is_credit_controller: - msgprint(_("Note: Due Date exceeds the allowed credit days by {0} day(s)").format( - diff - credit_days)) - else: - max_due_date = formatdate(add_days(posting_date, credit_days)) - frappe.throw(_("Due Date cannot be after {0}").format(max_due_date)) + msgprint(_("Note: Due Date exceeds the allowed credit days by {0} day(s)").format(diff - credit_days)) def validate_trash(self): """checks gl entries and if child exists""" From 690bcd7b66978ae1aa81a65d4c787959d8791f04 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 9 Dec 2014 16:36:33 +0530 Subject: [PATCH 12/47] Added leave approver name field in leave application --- .../leave_application/leave_application.js | 15 +++++++++++++++ .../leave_application/leave_application.json | 9 ++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js index ecaac4ac371..9ba988e2599 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.js +++ b/erpnext/hr/doctype/leave_application/leave_application.js @@ -118,3 +118,18 @@ cur_frm.cscript.calculate_total_days = function(doc, dt, dn) { } cur_frm.fields_dict.employee.get_query = erpnext.queries.employee; + +frappe.ui.form.on("Leave Application", "leave_approver", function(frm) { + frappe.call({ + "method": "frappe.client.get", + args: { + doctype: "User", + name: frm.doc.leave_approver + }, + callback: function (data) { + frappe.model.set_value(frm.doctype, frm.docname, "leave_approver_name", + data.message.first_name + + (data.message.last_name ? (" " + data.message.last_name) : "")) + } + }) +}) diff --git a/erpnext/hr/doctype/leave_application/leave_application.json b/erpnext/hr/doctype/leave_application/leave_application.json index 9e2ad53c795..8beed8b0285 100644 --- a/erpnext/hr/doctype/leave_application/leave_application.json +++ b/erpnext/hr/doctype/leave_application/leave_application.json @@ -24,6 +24,13 @@ "options": "User", "permlevel": 0 }, + { + "fieldname": "leave_approver_name", + "fieldtype": "Read Only", + "label": "Leave Approver Name", + "permlevel": 0, + "precision": "" + }, { "fieldname": "leave_type", "fieldtype": "Link", @@ -184,7 +191,7 @@ "idx": 1, "is_submittable": 1, "max_attachments": 3, - "modified": "2014-09-09 05:35:31.531651", + "modified": "2014-12-09 16:33:29.626849", "modified_by": "Administrator", "module": "HR", "name": "Leave Application", From c8f5c3cdbe6af2efb0d741d4de46f0d1b619d41d Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Tue, 9 Dec 2014 17:10:28 +0600 Subject: [PATCH 13/47] bumped to version 4.13.0 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index e8de3f40853..25937f019d7 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.12.0' +__version__ = '4.13.0' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 15f99a9ffc8..e128019099a 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.12.0" +app_version = "4.13.0" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 9bb8330480b..3c4bc377f27 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.12.0" +version = "4.13.0" with open("requirements.txt", "r") as f: install_requires = f.readlines() From b14cc0417d92a34303383e8790309306401b0d77 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 10 Dec 2014 12:27:54 +0530 Subject: [PATCH 14/47] Display tax amount after discount, if there is any discount amount --- .../sales_taxes_and_charges.json | 251 +++++++++--------- 1 file changed, 126 insertions(+), 125 deletions(-) diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json index 7bde84ff0cd..d820c871a50 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json +++ b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.json @@ -1,155 +1,156 @@ { - "autoname": "INVTD.######", - "creation": "2013-04-24 11:39:32", - "docstatus": 0, - "doctype": "DocType", + "autoname": "INVTD.######", + "creation": "2013-04-24 11:39:32", + "docstatus": 0, + "doctype": "DocType", "fields": [ { - "fieldname": "charge_type", - "fieldtype": "Select", - "in_list_view": 1, - "label": "Type", - "oldfieldname": "charge_type", - "oldfieldtype": "Select", - "options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total", - "permlevel": 0, + "fieldname": "charge_type", + "fieldtype": "Select", + "in_list_view": 1, + "label": "Type", + "oldfieldname": "charge_type", + "oldfieldtype": "Select", + "options": "\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total", + "permlevel": 0, "reqd": 1 - }, + }, { - "depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1", - "fieldname": "row_id", - "fieldtype": "Data", - "hidden": 0, - "label": "Reference Row #", - "oldfieldname": "row_id", - "oldfieldtype": "Data", + "depends_on": "eval:[\"On Previous Row Amount\", \"On Previous Row Total\"].indexOf(doc.charge_type)!==-1", + "fieldname": "row_id", + "fieldtype": "Data", + "hidden": 0, + "label": "Reference Row #", + "oldfieldname": "row_id", + "oldfieldtype": "Data", "permlevel": 0 - }, + }, { - "fieldname": "description", - "fieldtype": "Small Text", - "in_list_view": 1, - "label": "Description", - "oldfieldname": "description", - "oldfieldtype": "Small Text", - "permlevel": 0, - "print_width": "300px", - "reqd": 1, + "fieldname": "description", + "fieldtype": "Small Text", + "in_list_view": 1, + "label": "Description", + "oldfieldname": "description", + "oldfieldtype": "Small Text", + "permlevel": 0, + "print_width": "300px", + "reqd": 1, "width": "300px" - }, + }, { - "fieldname": "col_break_1", - "fieldtype": "Column Break", - "permlevel": 0, + "fieldname": "col_break_1", + "fieldtype": "Column Break", + "permlevel": 0, "width": "50%" - }, + }, { - "fieldname": "account_head", - "fieldtype": "Link", - "in_list_view": 0, - "label": "Account Head", - "oldfieldname": "account_head", - "oldfieldtype": "Link", - "options": "Account", - "permlevel": 0, - "reqd": 1, + "fieldname": "account_head", + "fieldtype": "Link", + "in_list_view": 0, + "label": "Account Head", + "oldfieldname": "account_head", + "oldfieldtype": "Link", + "options": "Account", + "permlevel": 0, + "reqd": 1, "search_index": 1 - }, + }, { - "default": ":Company", - "fieldname": "cost_center", - "fieldtype": "Link", - "in_list_view": 0, - "label": "Cost Center", - "oldfieldname": "cost_center_other_charges", - "oldfieldtype": "Link", - "options": "Cost Center", + "default": ":Company", + "fieldname": "cost_center", + "fieldtype": "Link", + "in_list_view": 0, + "label": "Cost Center", + "oldfieldname": "cost_center_other_charges", + "oldfieldtype": "Link", + "options": "Cost Center", "permlevel": 0 - }, + }, { - "fieldname": "rate", - "fieldtype": "Float", - "in_list_view": 1, - "label": "Rate", - "oldfieldname": "rate", - "oldfieldtype": "Currency", - "permlevel": 0, + "fieldname": "rate", + "fieldtype": "Float", + "in_list_view": 1, + "label": "Rate", + "oldfieldname": "rate", + "oldfieldtype": "Currency", + "permlevel": 0, "reqd": 1 - }, + }, { - "fieldname": "tax_amount", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Amount", - "oldfieldname": "tax_amount", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "read_only": 1, + "fieldname": "tax_amount", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Amount", + "oldfieldname": "tax_amount", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "read_only": 1, "reqd": 0 - }, + }, { - "fieldname": "total", - "fieldtype": "Currency", - "label": "Total", - "oldfieldname": "total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, + "fieldname": "total", + "fieldtype": "Currency", + "label": "Total", + "oldfieldname": "total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, "read_only": 1 - }, + }, { - "allow_on_submit": 0, - "description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount", - "fieldname": "included_in_print_rate", - "fieldtype": "Check", - "label": "Is this Tax included in Basic Rate?", - "no_copy": 0, - "permlevel": 0, - "print_hide": 1, - "print_width": "150px", - "report_hide": 1, + "allow_on_submit": 0, + "description": "If checked, the tax amount will be considered as already included in the Print Rate / Print Amount", + "fieldname": "included_in_print_rate", + "fieldtype": "Check", + "label": "Is this Tax included in Basic Rate?", + "no_copy": 0, + "permlevel": 0, + "print_hide": 1, + "print_width": "150px", + "report_hide": 1, "width": "150px" - }, + }, { - "fieldname": "tax_amount_after_discount_amount", - "fieldtype": "Currency", - "hidden": 1, - "label": "Tax Amount After Discount Amount", - "options": "Company:company:default_currency", - "permlevel": 0, + "depends_on": "eval:parent.discount_amount", + "fieldname": "tax_amount_after_discount_amount", + "fieldtype": "Currency", + "hidden": 0, + "label": "Tax Amount After Discount Amount", + "options": "Company:company:default_currency", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "item_wise_tax_detail", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Item Wise Tax Detail", - "oldfieldname": "item_wise_tax_detail", - "oldfieldtype": "Small Text", - "permlevel": 0, + "fieldname": "item_wise_tax_detail", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Item Wise Tax Detail", + "oldfieldname": "item_wise_tax_detail", + "oldfieldtype": "Small Text", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "parenttype", - "fieldtype": "Data", - "hidden": 1, - "in_filter": 1, - "label": "Parenttype", - "oldfieldname": "parenttype", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 1, + "fieldname": "parenttype", + "fieldtype": "Data", + "hidden": 1, + "in_filter": 1, + "label": "Parenttype", + "oldfieldname": "parenttype", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 1, "search_index": 1 } - ], - "hide_heading": 1, - "idx": 1, - "istable": 1, - "modified": "2014-05-30 03:43:39.740638", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Sales Taxes and Charges", - "owner": "Administrator", + ], + "hide_heading": 1, + "idx": 1, + "istable": 1, + "modified": "2014-12-10 12:26:41.222471", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Sales Taxes and Charges", + "owner": "Administrator", "permissions": [] -} +} \ No newline at end of file From 35ebe1bf781160c628503f4a285fce8c2a7c2dcf Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 10 Dec 2014 12:42:32 +0530 Subject: [PATCH 15/47] Tax amount in POS invoice print format --- erpnext/accounts/print_format/pos_invoice/pos_invoice.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/print_format/pos_invoice/pos_invoice.json b/erpnext/accounts/print_format/pos_invoice/pos_invoice.json index 83174b6c299..50b72d53994 100644 --- a/erpnext/accounts/print_format/pos_invoice/pos_invoice.json +++ b/erpnext/accounts/print_format/pos_invoice/pos_invoice.json @@ -3,9 +3,9 @@ "doc_type": "Sales Invoice", "docstatus": 0, "doctype": "Print Format", - "html": "\n\n

\n\t{{ doc.company }}
\n\t{{ doc.select_print_heading or _(\"Invoice\") }}
\n

\n

\n\t{{ _(\"Receipt No\") }}: {{ doc.name }}
\n\t{{ _(\"Date\") }}: {{ doc.get_formatted(\"posting_date\") }}
\n\t{{ _(\"Customer\") }}: {{ doc.customer_name }}\n

\n\n
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t{%- for item in doc.entries -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endfor -%}\n\t\n
{{ _(\"Item\") }}{{ _(\"Qty\") }}{{ _(\"Rate\") }}
\n\t\t\t\t{{ item.item_code }}\n\t\t\t\t{%- if item.item_name != item.item_code -%}\n\t\t\t\t\t
{{ item.item_name }}{%- endif -%}\n\t\t\t
{{ item.qty }}{{ item.amount }}
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- for row in doc.other_charges -%}\n\t\t{%- if not row.included_in_print_rate -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t\t{%- if doc.discount_amount -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n
\n\t\t\t\t{{ _(\"Net Total\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"net_total_export\") }}\n\t\t\t
\n\t\t\t\t{{ row.description }}\n\t\t\t\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t
\n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t
\n\t\t\t\t{{ _(\"Grand Total\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"grand_total_export\") }}\n\t\t\t
\n{% if doc.get(\"other_charges\", filters={\"included_in_print_rate\": 1}) %}\n
\n

Taxes Included:

\n\n\t\n\t\t{%- for row in doc.other_charges -%}\n\t\t{%- if row.included_in_print_rate -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t\n
\n\t\t\t\t{{ row.description }}\n\t\t\t\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t
\n{%- endif -%}\n
\n

{{ doc.terms or \"\" }}

\n

{{ _(\"Thank you, please visit again.\") }}

", + "html": "\n\n

\n\t{{ doc.company }}
\n\t{{ doc.select_print_heading or _(\"Invoice\") }}
\n

\n

\n\t{{ _(\"Receipt No\") }}: {{ doc.name }}
\n\t{{ _(\"Date\") }}: {{ doc.get_formatted(\"posting_date\") }}
\n\t{{ _(\"Customer\") }}: {{ doc.customer_name }}\n

\n\n
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t{%- for item in doc.entries -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endfor -%}\n\t\n
{{ _(\"Item\") }}{{ _(\"Qty\") }}{{ _(\"Rate\") }}
\n\t\t\t\t{{ item.item_code }}\n\t\t\t\t{%- if item.item_name != item.item_code -%}\n\t\t\t\t\t
{{ item.item_name }}{%- endif -%}\n\t\t\t
{{ item.qty }}{{ item.amount }}
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- for row in doc.other_charges -%}\n\t\t{%- if not row.included_in_print_rate -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t\t{%- if doc.discount_amount -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n
\n\t\t\t\t{{ _(\"Net Total\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"net_total_export\") }}\n\t\t\t
\n\t\t\t\t{{ row.description }}\n\t\t\t\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t
\n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t
\n\t\t\t\t{{ _(\"Grand Total\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"grand_total_export\") }}\n\t\t\t
\n{% if doc.get(\"other_charges\", filters={\"included_in_print_rate\": 1}) %}\n
\n

Taxes Included:

\n\n\t\n\t\t{%- for row in doc.other_charges -%}\n\t\t{%- if row.included_in_print_rate -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t{%- endfor -%}\n\t\n
\n\t\t\t\t{{ row.description }}\n\t\t\t\n\t\t\t\t{{ row.get_formatted(\"tax_amount_after_discount_amount\", doc) }}\n\t\t\t
\n{%- endif -%}\n
\n

{{ doc.terms or \"\" }}

\n

{{ _(\"Thank you, please visit again.\") }}

", "idx": 1, - "modified": "2014-07-22 02:08:26.603223", + "modified": "2014-12-10 12:37:10.854370", "modified_by": "Administrator", "module": "Accounts", "name": "POS Invoice", From 5cafcf66b0ee74ce198692536d2b242d71470d36 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 10 Dec 2014 23:59:04 +0530 Subject: [PATCH 16/47] Leave application fix --- erpnext/hr/doctype/leave_application/leave_application.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index e6742bb71f3..bac688b6f15 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -204,14 +204,14 @@ def get_holidays(leave_app): tot_hol = frappe.db.sql("""select count(*) from `tabHoliday` h1, `tabHoliday List` h2, `tabEmployee` e1 where e1.name = %s and h1.parent = h2.name and e1.holiday_list = h2.name and h1.holiday_date between %s and %s""", (leave_app.employee, leave_app.from_date, - leave_app.to_date)) + leave_app.to_date))[0][0] # below line is needed. If an employee hasn't been assigned with any holiday list then above will return 0 rows. if not tot_hol: tot_hol = frappe.db.sql("""select count(*) from `tabHoliday` h1, `tabHoliday List` h2 where h1.parent = h2.name and h1.holiday_date between %s and %s and ifnull(h2.is_default,0) = 1 and h2.fiscal_year = %s""", - (leave_app.from_date, leave_app.to_date, leave_app.fiscal_year)) - return tot_hol and tot_hol[0][0] or 0 + (leave_app.from_date, leave_app.to_date, leave_app.fiscal_year))[0][0] + return tot_hol @frappe.whitelist() def get_total_leave_days(leave_app): From bef80bab0d2959904d63c96b7b4c0473361d706d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 11 Dec 2014 16:27:18 +0530 Subject: [PATCH 17/47] Removed gross profit field from sales invoice --- .../doctype/sales_invoice/sales_invoice.js | 3 +-- .../doctype/sales_invoice/sales_invoice.json | 23 +------------------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index cc841e2ffcd..a50d69e97f0 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -225,8 +225,7 @@ $.extend(cur_frm.cscript, new erpnext.accounts.SalesInvoiceController({frm: cur_ // Hide Fields // ------------ cur_frm.cscript.hide_fields = function(doc) { - par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'gross_profit', - 'gross_profit_percent', 'get_advances_received', + par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances_received', 'advance_adjustment_details', 'sales_partner', 'commission_rate', 'total_commission', 'advances', 'from_date', 'to_date']; diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 3dcf136d455..b27a2abc756 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -568,27 +568,6 @@ "print_hide": 0, "read_only": 1 }, - { - "fieldname": "gross_profit", - "fieldtype": "Currency", - "label": "Gross Profit", - "oldfieldname": "gross_profit", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "gross_profit_percent", - "fieldtype": "Float", - "label": "Gross Profit (%)", - "oldfieldname": "gross_profit_percent", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1 - }, { "fieldname": "advances", "fieldtype": "Section Break", @@ -1213,7 +1192,7 @@ "icon": "icon-file-text", "idx": 1, "is_submittable": 1, - "modified": "2014-10-10 16:54:22.284284", + "modified": "2014-12-11 16:26:12.402110", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", From 3a34cadcb23b00969ec7f15fdfc9d84be4104157 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Wed, 10 Dec 2014 15:47:25 +0530 Subject: [PATCH 18/47] Fix - Total Fixed Cost with patch --- erpnext/manufacturing/doctype/bom/bom.js | 1 + erpnext/manufacturing/doctype/bom/bom.py | 5 ++++- erpnext/patches.txt | 1 + erpnext/patches/v4_2/recalculate_bom_costs.py | 17 +++++++++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 erpnext/patches/v4_2/recalculate_bom_costs.py diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index cb96478735f..1b1dc62fb1e 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -83,6 +83,7 @@ cur_frm.cscript.hour_rate = function(doc, dt, dn) { cur_frm.cscript.time_in_mins = cur_frm.cscript.hour_rate; +cur_frm.cscript.fixed_cycle_cost = cur_frm.cscript.hour_rate; cur_frm.cscript.item_code = function(doc, cdt, cdn) { get_bom_material_detail(doc, cdt, cdn); diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index e8a8682ceb3..199ade94c42 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -285,7 +285,10 @@ class BOM(Document): if not d.hour_rate: d.hour_rate = flt(w[0]) - fixed_cost += flt(w[1]) + if d.fixed_cycle_cost == None: + d.fixed_cycle_cost= flt(w[1]) + + fixed_cost += d.fixed_cycle_cost if d.hour_rate and d.time_in_mins: d.operating_cost = flt(d.hour_rate) * flt(d.time_in_mins) / 60.0 diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 4c975815c54..33fa396649c 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -89,3 +89,4 @@ erpnext.patches.v4_2.recalculate_bom_cost erpnext.patches.v4_2.fix_gl_entries_for_stock_transactions erpnext.patches.v4_2.update_requested_and_ordered_qty execute:frappe.delete_doc("DocType", "Contact Control") +erpnext.patches.v4_2.recalculate_bom_costs diff --git a/erpnext/patches/v4_2/recalculate_bom_costs.py b/erpnext/patches/v4_2/recalculate_bom_costs.py new file mode 100644 index 00000000000..8c887a83f0c --- /dev/null +++ b/erpnext/patches/v4_2/recalculate_bom_costs.py @@ -0,0 +1,17 @@ +# 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(): + for d in frappe.db.sql("""select name from `tabBOM` where docstatus < 2 and total_fixed_cost IS NOT NULL""", as_dict=1): + try: + bom = frappe.get_doc('BOM', d.name) + bom.ignore_validate_update_after_submit = True + bom.calculate_cost() + bom.save() + frappe.db.commit() + except: + frappe.db.rollback() + \ No newline at end of file From 6ddc487fb63f526f4103fd158f272177ba7b4616 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Thu, 11 Dec 2014 17:33:41 +0530 Subject: [PATCH 19/47] patch fix --- erpnext/patches/v4_2/recalculate_bom_costs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v4_2/recalculate_bom_costs.py b/erpnext/patches/v4_2/recalculate_bom_costs.py index 8c887a83f0c..25fd7f34590 100644 --- a/erpnext/patches/v4_2/recalculate_bom_costs.py +++ b/erpnext/patches/v4_2/recalculate_bom_costs.py @@ -5,7 +5,9 @@ from __future__ import unicode_literals import frappe def execute(): - for d in frappe.db.sql("""select name from `tabBOM` where docstatus < 2 and total_fixed_cost IS NOT NULL""", as_dict=1): + for d in frappe.db.sql("""select bom.name from `tabBOM` bom where bom.docstatus < 2 and + exists(select bom_item.name from `tabBOM Operation` bom_op where + bom.name = bom_op.parent and bom_op.fixed_cycle_cost IS NOT NULL)""", as_dict=1): try: bom = frappe.get_doc('BOM', d.name) bom.ignore_validate_update_after_submit = True From 4b83403a63d8259a97eebef8ee7eed9c988fefa3 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 12 Dec 2014 11:28:58 +0530 Subject: [PATCH 20/47] Fixed bom patch --- erpnext/patches/v4_2/recalculate_bom_costs.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v4_2/recalculate_bom_costs.py b/erpnext/patches/v4_2/recalculate_bom_costs.py index 25fd7f34590..c05fd037093 100644 --- a/erpnext/patches/v4_2/recalculate_bom_costs.py +++ b/erpnext/patches/v4_2/recalculate_bom_costs.py @@ -5,8 +5,8 @@ from __future__ import unicode_literals import frappe def execute(): - for d in frappe.db.sql("""select bom.name from `tabBOM` bom where bom.docstatus < 2 and - exists(select bom_item.name from `tabBOM Operation` bom_op where + for d in frappe.db.sql("""select bom.name from `tabBOM` bom where bom.docstatus < 2 and + exists(select bom_op.name from `tabBOM Operation` bom_op where bom.name = bom_op.parent and bom_op.fixed_cycle_cost IS NOT NULL)""", as_dict=1): try: bom = frappe.get_doc('BOM', d.name) @@ -16,4 +16,3 @@ def execute(): frappe.db.commit() except: frappe.db.rollback() - \ No newline at end of file From ad0bd4ca9299afec96a52be0ddacb7facc814eca Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 12 Dec 2014 12:49:45 +0530 Subject: [PATCH 21/47] Pull all customer's po no in delivery note when made from multiple sales order --- erpnext/selling/doctype/sales_order/sales_order.json | 3 ++- erpnext/selling/doctype/sales_order/sales_order.py | 8 ++++++++ erpnext/stock/doctype/delivery_note/delivery_note.json | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 69693a7bed6..6065ad5ad3b 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -175,6 +175,7 @@ "fieldtype": "Data", "hidden": 0, "label": "PO No", + "no_copy": 1, "oldfieldname": "po_no", "oldfieldtype": "Data", "permlevel": 0, @@ -1020,7 +1021,7 @@ "idx": 1, "is_submittable": 1, "issingle": 0, - "modified": "2014-10-08 14:22:44.717108", + "modified": "2014-12-12 12:35:09.652211", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 8153d8d8391..604ac111a6d 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -275,6 +275,14 @@ def make_material_request(source_name, target_doc=None): @frappe.whitelist() def make_delivery_note(source_name, target_doc=None): def set_missing_values(source, target): + if source.po_no: + if target.po_no: + target_po_no = target.po_no.split(", ") + target_po_no.append(source.po_no) + target.po_no = ", ".join(list(set(target_po_no))) if len(target_po_no) > 1 else target_po_no[0] + else: + target.po_no = source.po_no + target.ignore_pricing_rule = 1 target.run_method("set_missing_values") target.run_method("calculate_taxes_and_totals") diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index 4a957ff804e..2eeba506772 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -178,7 +178,7 @@ { "fieldname": "po_no", "fieldtype": "Data", - "hidden": 1, + "hidden": 0, "label": "Customer's Purchase Order No", "no_copy": 0, "oldfieldname": "po_no", @@ -1013,7 +1013,7 @@ "idx": 1, "in_create": 0, "is_submittable": 1, - "modified": "2014-09-09 05:35:30.700911", + "modified": "2014-12-12 12:36:59.262500", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", From a578f3e23a1dfd5dce1c3c09d280ccd4d98397f9 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Fri, 12 Dec 2014 17:22:09 +0600 Subject: [PATCH 22/47] bumped to version 4.13.1 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 25937f019d7..485017227f7 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.13.0' +__version__ = '4.13.1' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index e128019099a..e299406e6c9 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.13.0" +app_version = "4.13.1" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 3c4bc377f27..544873503bf 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.13.0" +version = "4.13.1" with open("requirements.txt", "r") as f: install_requires = f.readlines() From 90b51742561666a3e1cec78f1636c263a1f8019d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 15 Dec 2014 11:41:13 +0530 Subject: [PATCH 23/47] minor fix --- erpnext/templates/print_formats/includes/taxes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/templates/print_formats/includes/taxes.html b/erpnext/templates/print_formats/includes/taxes.html index bd1e709787b..61a78a32f0c 100644 --- a/erpnext/templates/print_formats/includes/taxes.html +++ b/erpnext/templates/print_formats/includes/taxes.html @@ -7,7 +7,7 @@
- {{ frappe.format_value(charge.tax_amount / doc.conversion_rate, + {{ frappe.format_value(frappe.utils.flt(charge.tax_amount) / doc.conversion_rate, table_meta.get_field("tax_amount"), doc, currency=doc.currency) }}
From 3cd7a45c1b1da4fc55aa2a8dfb22e826826e8cbe Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 15 Dec 2014 14:56:58 +0530 Subject: [PATCH 24/47] Translation fixes --- erpnext/translations/ar.csv | 48 ++++++++++++++++++------------------- erpnext/translations/el.csv | 26 ++++++++++---------- erpnext/translations/es.csv | 2 +- erpnext/translations/fr.csv | 2 +- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/erpnext/translations/ar.csv b/erpnext/translations/ar.csv index 54462f642dd..63ed8061553 100644 --- a/erpnext/translations/ar.csv +++ b/erpnext/translations/ar.csv @@ -85,7 +85,7 @@ Accounting,المحاسبة "Accounting entry frozen up to this date, nobody can do / modify entry except role specified below.",قيد محاسبي المجمدة تصل إلى هذا التاريخ، لا أحد يمكن أن تفعل / تعديل إدخال باستثناء دور المحددة أدناه. Accounting journal entries.,المحاسبة إدخالات دفتر اليومية. Accounts,حسابات -Accounts Browser,متصفح الحسابات +Accounts Browser,متصفح الحسابات Accounts Frozen Upto,حسابات مجمدة حتي Accounts Payable,ذمم دائنة Accounts Receivable,حسابات القبض @@ -253,8 +253,8 @@ Approving Role,الموافقة على دور Approving Role cannot be same as role the rule is Applicable To,الموافقة دور لا يمكن أن يكون نفس دور القاعدة تنطبق على Approving User,الموافقة العضو Approving User cannot be same as user the rule is Applicable To,الموافقة العضو لا يمكن أن يكون نفس المستخدم القاعدة تنطبق على -Are you sure you want to STOP ,Are you sure you want to STOP -Are you sure you want to UNSTOP ,Are you sure you want to UNSTOP +Are you sure you want to STOP ,Are you sure you want to STOP +Are you sure you want to UNSTOP ,Are you sure you want to UNSTOP Arrear Amount,متأخرات المبلغ "As Production Order can be made for this item, it must be a stock item.",كما يمكن أن يتم ترتيب الإنتاج لهذا البند، يجب أن يكون بند الأوراق المالية . As per Stock UOM,وفقا للأوراق UOM @@ -283,7 +283,7 @@ Auto Accounting For Stock Settings,السيارات المحاسبة المال Auto Material Request,السيارات مادة طلب Auto-raise Material Request if quantity goes below re-order level in a warehouse,لصناعة السيارات في رفع طلب المواد إذا كمية يذهب دون مستوى إعادة الطلب في مستودع Automatically compose message on submission of transactions.,يؤلف تلقائيا رسالة على تقديم المعاملات. -Automatically extract Job Applicants from a mail box ,Automatically extract Job Applicants from a mail box +Automatically extract Job Applicants from a mail box ,Automatically extract Job Applicants from a mail box Automatically extract Leads from a mail box e.g.,استخراج الشراء تلقائيا من صندوق البريد على سبيل المثال Automatically updated via Stock Entry of type Manufacture/Repack,تحديثها تلقائيا عن طريق إدخال الأسهم الصنع نوع / أعد حزم Automotive,السيارات @@ -410,8 +410,8 @@ Buying Settings,إعدادات الشراء "Buying must be checked, if Applicable For is selected as {0}",يجب أن يتم التحقق الشراء، إذا تم تحديد مطبق للك {0} C-Form,نموذج C- C-Form Applicable,C-نموذج قابل للتطبيق -C-Form Invoice Detail, تفاصيل الفاتورة نموذج - س -C-Form No,رقم النموذج - س +C-Form Invoice Detail, تفاصيل الفاتورة نموذج - س +C-Form No,رقم النموذج - س C-Form records,سجلات النموذج - س CENVAT Capital Goods,CENVAT السلع الرأسمالية CENVAT Edu Cess,CENVAT ايدو سيس @@ -510,8 +510,8 @@ Clearance Date,إزالة التاريخ Clearance Date not mentioned,إزالة التاريخ لم يرد ذكرها Clearance date cannot be before check date in row {0},تاريخ التخليص لا يمكن أن يكون قبل تاريخ الاختيار في الصف {0} Click on 'Make Sales Invoice' button to create a new Sales Invoice.,انقر على 'جعل مبيعات الفاتورة "الزر لإنشاء فاتورة مبيعات جديدة. -Click on a link to get options to expand get options ,Click on a link to get options to expand get options -Client,عميل +Click on a link to get options to expand get options ,Click on a link to get options to expand get options +Client,عميل Close Balance Sheet and book Profit or Loss.,وثيقة الميزانية العمومية و كتاب الربح أو الخسارة . Closed,مغلق Closing (Cr),إغلاق (الكروم) @@ -840,13 +840,13 @@ Distributor,موزع Divorced,المطلقات Do Not Contact,عدم الاتصال Do not show any symbol like $ etc next to currencies.,لا تظهر أي رمز مثل $ الخ بجانب العملات. -Do really want to unstop production order: ,Do really want to unstop production order: -Do you really want to STOP ,Do you really want to STOP +Do really want to unstop production order: ,Do really want to unstop production order: +Do you really want to STOP ,Do you really want to STOP Do you really want to STOP this Material Request?,هل تريد حقا لوقف هذا طلب المواد ؟ Do you really want to Submit all Salary Slip for month {0} and year {1},هل تريد حقا لتقديم كل زلة الرواتب ل شهر {0} و السنة {1} -Do you really want to UNSTOP ,Do you really want to UNSTOP +Do you really want to UNSTOP ,Do you really want to UNSTOP Do you really want to UNSTOP this Material Request?,هل تريد حقا أن نزع السدادة هذا طلب المواد ؟ -Do you really want to stop production order: ,Do you really want to stop production order: +Do you really want to stop production order: ,Do you really want to stop production order: Doc Name,اسم الوثيقة Doc Type,نوع الوثيقة Document Description,وصف الوثيقة @@ -898,7 +898,7 @@ Electronics,إلكترونيات Email,البريد الإلكتروني Email Digest,البريد الإلكتروني دايجست Email Digest Settings,البريد الإلكتروني إعدادات دايجست -Email Digest: ,Email Digest: +Email Digest: ,Email Digest: Email Id,البريد الإلكتروني معرف "Email Id where a job applicant will email e.g. ""jobs@example.com""",معرف البريد الإلكتروني حيث طالب العمل سوف البريد الإلكتروني على سبيل المثال "jobs@example.com" Email Notifications,إشعارات البريد الإلكتروني @@ -958,7 +958,7 @@ Enter url parameter for receiver nos,أدخل عنوان URL لمعلمة NOS ا Entertainment & Leisure,الترفيه وترفيهية Entertainment Expenses,مصاريف الترفيه Entries,مقالات -Entries against ,Entries against +Entries against ,Entries against Entries are not allowed against this Fiscal Year if the year is closed.,لا يسمح مقالات ضد السنة المالية الحالية إذا تم إغلاق السنة. Equity,إنصاف Error: {0} > {1},الخطأ: {0} > {1} @@ -1573,7 +1573,7 @@ Maintenance Visit Purpose,صيانة زيارة الغرض Maintenance Visit {0} must be cancelled before cancelling this Sales Order,صيانة زيارة {0} يجب أن يتم إلغاء هذا الأمر قبل إلغاء المبيعات Maintenance start date can not be before delivery date for Serial No {0},صيانة تاريخ بداية لا يمكن أن يكون قبل تاريخ التسليم لل رقم المسلسل {0} Major/Optional Subjects,الرئيسية / اختياري الموضوعات -Make ,Make +Make ,Make Make Accounting Entry For Every Stock Movement,جعل الدخول المحاسبة للحصول على كل حركة الأسهم Make Bank Voucher,جعل قسيمة البنك Make Credit Note,جعل الائتمان ملاحظة @@ -1722,7 +1722,7 @@ Net Weight UOM,الوزن الصافي UOM Net Weight of each Item,الوزن الصافي لكل بند Net pay cannot be negative,صافي الأجور لا يمكن أن تكون سلبية Never,أبدا -New ,New +New ,New New Account,حساب جديد New Account Name,اسم الحساب الجديد New BOM,BOM جديدة @@ -2448,7 +2448,7 @@ Rounded Off,تقريبها Rounded Total,تقريب إجمالي Rounded Total (Company Currency),المشاركات تقريب (العملة الشركة) Row # ,الصف # -Row # {0}: ,Row # {0}: +Row # {0}: ,Row # {0}: Row #{0}: Ordered qty can not less than item's minimum order qty (defined in item master).,الصف # {0}: الكمية المطلوبة لا يمكن أن أقل من الحد الأدنى الكمية النظام القطعة (المحددة في البند الرئيسي). Row #{0}: Please specify Serial No for Item {1},الصف # {0}: يرجى تحديد رقم التسلسلي للتاريخ {1} Row {0}: Account does not match with \ Purchase Invoice Credit To account,الصف {0}: الحساب لا يتطابق مع \ شراء فاتورة الائتمان لحساب @@ -2750,7 +2750,7 @@ Stock Ageing,الأسهم شيخوخة Stock Analytics,الأسهم تحليلات Stock Assets,الموجودات الأسهم Stock Balance,الأسهم الرصيد -Stock Entries already created for Production Order ,Stock Entries already created for Production Order +Stock Entries already created for Production Order ,Stock Entries already created for Production Order Stock Entry,الأسهم الدخول Stock Entry Detail,الأسهم إدخال التفاصيل Stock Expenses,مصاريف الأسهم @@ -3300,24 +3300,24 @@ website page link,الموقع رابط الصفحة {0} budget for Account {1} against Cost Center {2} will exceed by {3},{0} ميزانية الحساب {1} ضد مركز التكلفة {2} سيتجاوز التي كتبها {3} {0} can not be negative,{0} لا يمكن أن تكون سلبية {0} created,{0} خلق -{0} does not belong to Company {1},{0} لا تنتمي إلى شركة {1} +{0} does not belong to Company {1},{0} {لا تنتمي إلى شركة {1 {0} entered twice in Item Tax,{0} دخلت مرتين في ضريبة المدينة {0} is an invalid email address in 'Notification Email Address',"{0} هو عنوان بريد إلكتروني غير صالح في ' عنوان البريد الإلكتروني إعلام """ {0} is mandatory,{0} إلزامي -{0} is mandatory for Item {1},{0} إلزامي القطعة ل {1} +{0} is mandatory for Item {1},{0} {إلزامي القطعة ل {1 {0} is mandatory. Maybe Currency Exchange record is not created for {1} to {2}.,{0} إلزامي. ربما لا يتم إنشاء سجل سعر صرف العملة ل{1} إلى {2}. {0} is not a stock Item,{0} ليس الأسهم الإغلاق {0} is not a valid Batch Number for Item {1},{0} ليس رقم الدفعة صالحة لل تفاصيل {1} -{0} is not a valid Leave Approver. Removing row #{1}.,{0} ليس صحيحا اترك الموافق. إزالة الصف # {1}. +{0} is not a valid Leave Approver. Removing row #{1}.,{0} {ليس صحيحا اترك الموافق. إزالة الصف # {1. {0} is not a valid email id,{0} ليس معرف بريد إلكتروني صحيح {0} is now the default Fiscal Year. Please refresh your browser for the change to take effect.,{0} الآن الافتراضي السنة المالية. يرجى تحديث المتصفح ل التغيير نافذ المفعول . {0} is required,{0} مطلوب {0} must be a Purchased or Sub-Contracted Item in row {1},{0} يجب أن يكون البند شراؤها أو التعاقد الفرعي في الصف {1} {0} must be reduced by {1} or you should increase overflow tolerance,{0} يجب تخفيض كتبها {1} أو يجب زيادة الفائض التسامح {0} must have role 'Leave Approver',{0} يجب أن يكون دور ' اترك الموافق ' -{0} valid serial nos for Item {1},{0} غ المسلسل صالحة لل تفاصيل {1} -{0} {1} against Bill {2} dated {3},{0} {1} ضد بيل {2} بتاريخ {3} -{0} {1} against Invoice {2},{0} {1} ضد الفاتورة {2} +{0} valid serial nos for Item {1},{0} {غ المسلسل صالحة لل تفاصيل {1 +{0} {1} against Bill {2} dated {3},{0} {1} {ضد بيل {2} بتاريخ {3 +{0} {1} against Invoice {2},{0} {1} {ضد الفاتورة {2 {0} {1} has already been submitted,{0} {1} وقد تم بالفعل قدمت {0} {1} has been modified. Please refresh.,{0} {1} تم تعديل . يرجى تحديث. {0} {1} is not submitted,{0} {1} لا تقدم diff --git a/erpnext/translations/el.csv b/erpnext/translations/el.csv index ba119ba0b6e..dc5ff751383 100644 --- a/erpnext/translations/el.csv +++ b/erpnext/translations/el.csv @@ -255,7 +255,7 @@ Approving Role cannot be same as role the rule is Applicable To,"Έγκριση Approving User,Έγκριση χρήστη Approving User cannot be same as user the rule is Applicable To,Την έγκριση του χρήστη δεν μπορεί να είναι ίδιο με το χρήστη ο κανόνας ισχύει για Are you sure you want to STOP ,Είσαστε σίγουροι πως θέλετε να σταματήσετε -Are you sure you want to UNSTOP ,Are you sure you want to UNSTOP +Are you sure you want to UNSTOP ,Are you sure you want to UNSTOP Arrear Amount,Καθυστερήσεις Ποσό "As Production Order can be made for this item, it must be a stock item.","Όπως μπορεί να γίνει Παραγωγής παραγγελίας για το συγκεκριμένο προϊόν , θα πρέπει να είναι ένα στοιχείο υλικού." As per Stock UOM,Όπως ανά Διαθέσιμο UOM @@ -284,7 +284,7 @@ Auto Accounting For Stock Settings,Auto Λογιστικά Για Ρυθμίσε Auto Material Request,Αυτόματη Αίτηση Υλικό Auto-raise Material Request if quantity goes below re-order level in a warehouse,Auto-raise Αίτηση Υλικό εάν η ποσότητα πέσει κάτω εκ νέου για το επίπεδο σε μια αποθήκη Automatically compose message on submission of transactions.,Αυτόματη συνθέτουν το μήνυμα για την υποβολή των συναλλαγών . -Automatically extract Job Applicants from a mail box ,Automatically extract Job Applicants from a mail box +Automatically extract Job Applicants from a mail box ,Automatically extract Job Applicants from a mail box Automatically extract Leads from a mail box e.g.,"Αυτόματη εξαγωγή οδηγεί από ένα κουτί αλληλογραφίας , π.χ." Automatically updated via Stock Entry of type Manufacture/Repack,Αυτόματη ενημέρωση μέσω είσοδο στα αποθέματα Κατασκευή Τύπος / Repack Automotive,Αυτοκίνητο @@ -511,7 +511,7 @@ Clearance Date,Ημερομηνία Εκκαθάριση Clearance Date not mentioned,Εκκαθάριση Ημερομηνία που δεν αναφέρονται Clearance date cannot be before check date in row {0},Ημερομηνία εκκαθάρισης δεν μπορεί να είναι πριν από την ημερομηνία άφιξης στη γραμμή {0} Click on 'Make Sales Invoice' button to create a new Sales Invoice.,Κάντε κλικ στο «Κάνε Πωλήσεις Τιμολόγιο» για να δημιουργηθεί μια νέα τιμολογίου πώλησης. -Click on a link to get options to expand get options ,Click on a link to get options to expand get options +Click on a link to get options to expand get options ,Click on a link to get options to expand get options Client,Πελάτης Close Balance Sheet and book Profit or Loss.,Κλείσιμο Ισολογισμού και των Αποτελεσμάτων βιβλίο ή απώλεια . Closed,Κλειστό @@ -841,13 +841,13 @@ Distributor,Διανομέας Divorced,Διαζευγμένος Do Not Contact,Μην Επικοινωνία Do not show any symbol like $ etc next to currencies.,Να μην εμφανίζεται κανένα σύμβολο όπως $ κλπ δίπλα σε νομίσματα. -Do really want to unstop production order: ,Do really want to unstop production order: -Do you really want to STOP ,Do you really want to STOP +Do really want to unstop production order: ,Do really want to unstop production order: +Do you really want to STOP ,Do you really want to STOP Do you really want to STOP this Material Request?,Θέλετε πραγματικά να σταματήσει αυτό το υλικό την Αίτηση Συμμετοχής; Do you really want to Submit all Salary Slip for month {0} and year {1},Θέλετε πραγματικά να υποβληθούν όλα τα Slip Μισθός για το μήνα {0} και {1 χρόνο } -Do you really want to UNSTOP ,Do you really want to UNSTOP +Do you really want to UNSTOP ,Do you really want to UNSTOP Do you really want to UNSTOP this Material Request?,Θέλετε πραγματικά να ξεβουλώνω αυτό Υλικό Αίτηση Συμμετοχής; -Do you really want to stop production order: ,Do you really want to stop production order: +Do you really want to stop production order: ,Do you really want to stop production order: Doc Name,Doc Name Doc Type,Doc Τύπος Document Description,Περιγραφή εγγράφου @@ -899,7 +899,7 @@ Electronics,ηλεκτρονική Email,Email Email Digest,Email Digest Email Digest Settings,Email Digest Ρυθμίσεις -Email Digest: ,Email Digest: +Email Digest: ,Email Digest: Email Id,Id Email "Email Id where a job applicant will email e.g. ""jobs@example.com""","Email Id, όπου ένας υποψήφιος θα e-mail π.χ. "jobs@example.com"" Email Notifications,Ειδοποιήσεις μέσω ηλεκτρονικού ταχυδρομείου @@ -959,7 +959,7 @@ Enter url parameter for receiver nos,Εισάγετε παράμετρο url γ Entertainment & Leisure,Διασκέδαση & Leisure Entertainment Expenses,Έξοδα Ψυχαγωγία Entries,Καταχωρήσεις -Entries against ,Entries against +Entries against ,Entries against Entries are not allowed against this Fiscal Year if the year is closed.,"Οι συμμετοχές δεν επιτρέπεται κατά το τρέχον οικονομικό έτος, εάν το έτος είναι κλειστή." Equity,δικαιοσύνη Error: {0} > {1},Σφάλμα : {0} > {1} @@ -1574,7 +1574,7 @@ Maintenance Visit Purpose,Σκοπός Συντήρηση Επίσκεψη Maintenance Visit {0} must be cancelled before cancelling this Sales Order,Συντήρηση Επίσκεψη {0} πρέπει να ακυρωθεί πριν από την ακύρωση αυτής της παραγγελίας πώλησης Maintenance start date can not be before delivery date for Serial No {0},Ημερομηνία έναρξης συντήρησης δεν μπορεί να είναι πριν από την ημερομηνία παράδοσης Αύξων αριθμός {0} Major/Optional Subjects,Σημαντικές / προαιρετικά μαθήματα -Make ,Make +Make ,Make Make Accounting Entry For Every Stock Movement,Κάντε Λογιστική καταχώρηση για κάθε Κίνημα Χρηματιστήριο Make Bank Voucher,Κάντε Voucher Bank Make Credit Note,Κάντε Πιστωτικό Σημείωμα @@ -1723,7 +1723,7 @@ Net Weight UOM,Καθαρό Βάρος UOM Net Weight of each Item,Καθαρό βάρος κάθε είδους Net pay cannot be negative,Καθαρή αμοιβή δεν μπορεί να είναι αρνητική Never,Ποτέ -New ,New +New ,New New Account,Νέος λογαριασμός New Account Name,Νέο Όνομα λογαριασμού New BOM,Νέα BOM @@ -2449,7 +2449,7 @@ Rounded Off,στρογγυλοποιηθεί Rounded Total,Στρογγυλεμένες Σύνολο Rounded Total (Company Currency),Στρογγυλεμένες Σύνολο (νόμισμα της Εταιρείας) Row # ,Row # -Row # {0}: ,Row # {0}: +Row # {0}: ,Row # {0}: Row #{0}: Ordered qty can not less than item's minimum order qty (defined in item master).,Σειρά # {0}: Διέταξε ποσότητα δεν μπορεί να μικρότερη από την ελάχιστη ποσότητα σειρά στοιχείου (όπως ορίζεται στο σημείο master). Row #{0}: Please specify Serial No for Item {1},Σειρά # {0}: Παρακαλείστε να προσδιορίσετε Αύξων αριθμός για τη θέση {1} Row {0}: Account does not match with \ Purchase Invoice Credit To account,Σειρά {0}: Ο λογαριασμός δεν ταιριάζει με \ τιμολογίου αγοράς πίστωση του λογαριασμού @@ -3317,7 +3317,7 @@ website page link,Ιστοσελίδα link της σελίδας {0} must be reduced by {1} or you should increase overflow tolerance,{0} πρέπει να μειωθεί κατά {1} ή θα πρέπει να αυξήσει την ανοχή υπερχείλισης {0} must have role 'Leave Approver',{0} πρέπει να έχει ρόλο « Αφήστε Έγκρισης » {0} valid serial nos for Item {1},{0} έγκυρο σειριακό nos για τη θέση {1} -{0} {1} against Bill {2} dated {3},{0} {1} εναντίον Bill {2} { 3 με ημερομηνία } +{0} {1} against Bill {2} dated {3},{0} {1} εναντίον Bill {2} {3} με ημερομηνία {0} {1} against Invoice {2},{0} {1} κατά Τιμολόγιο {2} {0} {1} has already been submitted,{0} {1} έχει ήδη υποβληθεί {0} {1} has been modified. Please refresh.,{0} {1} έχει τροποποιηθεί . Παρακαλώ ανανεώσετε . diff --git a/erpnext/translations/es.csv b/erpnext/translations/es.csv index d6add66959f..f3a0ceec091 100644 --- a/erpnext/translations/es.csv +++ b/erpnext/translations/es.csv @@ -3322,7 +3322,7 @@ website page link,el vínculo web {0} must be reduced by {1} or you should increase overflow tolerance,{0} debe reducirse en {1} o se debe aumentar la tolerancia de desbordamiento {0} must have role 'Leave Approver',{0} debe tener rol ' Dejar aprobador ' {0} valid serial nos for Item {1},{0} nn serie válidos para el elemento {1} -{0} {1} against Bill {2} dated {3},{0} {1} { 2 contra Bill } {3} de fecha +{0} {1} against Bill {2} dated {3},{0} {1} {2} contra Bill {3} de fecha {0} {1} against Invoice {2},{0} {1} contra Factura {2} {0} {1} has already been submitted,{0} {1} ya ha sido presentado {0} {1} has been modified. Please refresh.,{0} {1} ha sido modificado. Por favor regenere . diff --git a/erpnext/translations/fr.csv b/erpnext/translations/fr.csv index 1d0484f0c72..9480f0c38bc 100644 --- a/erpnext/translations/fr.csv +++ b/erpnext/translations/fr.csv @@ -3318,7 +3318,7 @@ website page link,Lien vers page web {0} must be reduced by {1} or you should increase overflow tolerance,{0} doit être réduite par {1} ou vous devez augmenter la tolérance de dépassement {0} must have role 'Leave Approver',Nouveau Stock UDM est nécessaire {0} valid serial nos for Item {1},BOM {0} pour objet {1} à la ligne {2} est inactif ou non soumis -{0} {1} against Bill {2} dated {3},S'il vous plaît entrer le titre ! +{0} {1} against Bill {2} dated {3},{0} {1} contre le projet de loi en date du {2} {3} {0} {1} against Invoice {2},investissements {0} {1} has already been submitted,"S'il vous plaît entrer » est sous-traitée "" comme Oui ou Non" {0} {1} has been modified. Please refresh.,Point ou Entrepôt à la ligne {0} ne correspond pas à la Demande de Matériel From f87a622ef013e7fb6a78ae24626c8cf1e68989bc Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 15 Dec 2014 23:14:35 +0530 Subject: [PATCH 25/47] [minor] use frappe.attach_print() in salary slip and recurring document --- erpnext/controllers/recurring_document.py | 5 +---- erpnext/hr/doctype/salary_slip/salary_slip.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/erpnext/controllers/recurring_document.py b/erpnext/controllers/recurring_document.py index fa7f275309a..1ec415ce074 100644 --- a/erpnext/controllers/recurring_document.py +++ b/erpnext/controllers/recurring_document.py @@ -124,10 +124,7 @@ def send_notification(new_rv): frappe.sendmail(new_rv.notification_email_address, subject= _("New {0}: #{1}").format(new_rv.doctype, new_rv.name), message = _("Please find attached {0} #{1}").format(new_rv.doctype, new_rv.name), - attachments = [{ - "fname": new_rv.name + ".pdf", - "fcontent": frappe.get_print_format(new_rv.doctype, new_rv.name, as_pdf=True) - }]) + attachments = [frappe.attach_print(new_rv.doctype, new_rv.name, file_name=new_rv.name)]) def notify_errors(doc, doctype, party, owner): from frappe.utils.user import get_system_managers diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index f30fe02fa93..f87a122ca2f 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -191,9 +191,6 @@ class SalarySlip(TransactionBase): if receiver: subj = 'Salary Slip - ' + cstr(self.month) +'/'+cstr(self.fiscal_year) sendmail([receiver], subject=subj, msg = _("Please see attachment"), - attachments=[{ - "fname": self.name + ".pdf", - "fcontent": frappe.get_print_format(self.doctype, self.name, as_pdf = True) - }]) + attachments=[frappe.attach_print(self.doctype, self.name, file_name=self.name)]) else: msgprint(_("Company Email ID not found, hence mail not sent")) From 0f2137be18d7a416c334eb6559f7fdfb52adb137 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 16 Dec 2014 10:37:40 +0530 Subject: [PATCH 26/47] no copy property for customer's po no --- erpnext/selling/doctype/sales_order/sales_order.json | 4 ++-- erpnext/stock/doctype/delivery_note/delivery_note.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 6065ad5ad3b..50647030fe6 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -175,7 +175,7 @@ "fieldtype": "Data", "hidden": 0, "label": "PO No", - "no_copy": 1, + "no_copy": 0, "oldfieldname": "po_no", "oldfieldtype": "Data", "permlevel": 0, @@ -1021,7 +1021,7 @@ "idx": 1, "is_submittable": 1, "issingle": 0, - "modified": "2014-12-12 12:35:09.652211", + "modified": "2014-12-16 10:36:47.295144", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index 2eeba506772..ec50b95fff3 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -180,7 +180,7 @@ "fieldtype": "Data", "hidden": 0, "label": "Customer's Purchase Order No", - "no_copy": 0, + "no_copy": 1, "oldfieldname": "po_no", "oldfieldtype": "Data", "permlevel": 0, @@ -1013,7 +1013,7 @@ "idx": 1, "in_create": 0, "is_submittable": 1, - "modified": "2014-12-12 12:36:59.262500", + "modified": "2014-12-16 10:37:08.934881", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", From 7eedebc970bb68d649ce7052038fbb34411d44d8 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 16 Dec 2014 11:56:21 +0530 Subject: [PATCH 27/47] Fecth contact details on change of contact in purchase transactions --- erpnext/buying/doctype/purchase_common/purchase_common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index e21ff740a7b..3681081c955 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -71,7 +71,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ }, contact_person: function() { - this.supplier_address(); + erpnext.utils.get_contact_details(this.frm); }, buying_price_list: function() { From e4c659386a8ad8c687acc65db25e4ed861ab167e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 16 Dec 2014 15:16:40 +0530 Subject: [PATCH 28/47] packing list index --- erpnext/stock/doctype/packed_item/packed_item.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py index 9263907da12..4ce940cbc03 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.py +++ b/erpnext/stock/doctype/packed_item/packed_item.py @@ -27,7 +27,7 @@ def get_bin_qty(item, warehouse): where item_code = %s and warehouse = %s""", (item, warehouse), as_dict = 1) return det and det[0] or '' -def update_packing_list_item(obj, packing_item_code, qty, warehouse, line, packing_list_idx): +def update_packing_list_item(obj, packing_item_code, qty, warehouse, line): bin = get_bin_qty(packing_item_code, warehouse) item = get_packing_item_details(packing_item_code) @@ -54,9 +54,7 @@ def update_packing_list_item(obj, packing_item_code, qty, warehouse, line, packi pi.warehouse = warehouse if not pi.batch_no: pi.batch_no = cstr(line.get("batch_no")) - pi.idx = packing_list_idx - packing_list_idx += 1 def make_packing_list(obj, item_table_fieldname): @@ -64,13 +62,11 @@ def make_packing_list(obj, item_table_fieldname): if obj.get("_action") and obj._action == "update_after_submit": return - packing_list_idx = 0 parent_items = [] for d in obj.get(item_table_fieldname): if frappe.db.get_value("Sales BOM", {"new_item_code": d.item_code}): for i in get_sales_bom_items(d.item_code): - update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty), - d.warehouse, d, packing_list_idx) + update_packing_list_item(obj, i['item_code'], flt(i['qty'])*flt(d.qty), d.warehouse, d) if [d.item_code, d.name] not in parent_items: parent_items.append([d.item_code, d.name]) From 13553c2bf03468d57464387e4fc1321b3cbb2455 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Tue, 16 Dec 2014 16:17:06 +0600 Subject: [PATCH 29/47] bumped to version 4.14.0 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 485017227f7..2908f6aeab9 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.13.1' +__version__ = '4.14.0' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index e299406e6c9..0688b4cc9ff 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.13.1" +app_version = "4.14.0" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 544873503bf..8c9712e8ab6 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.13.1" +version = "4.14.0" with open("requirements.txt", "r") as f: install_requires = f.readlines() From 49a2729663ba5aa634decf712b586e69c0f010c1 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 17 Dec 2014 11:21:32 +0530 Subject: [PATCH 30/47] Reapply price list if pricing rule reset as blank --- erpnext/public/js/transaction.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js index 3a124850199..ae4699efd8a 100644 --- a/erpnext/public/js/transaction.js +++ b/erpnext/public/js/transaction.js @@ -402,20 +402,26 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ }, _set_values_for_item_list: function(children) { + var me = this; $.each(children, function(i, d) { + var existing_pricing_rule = frappe.model.get_value(d.doctype, d.name, "pricing_rule"); $.each(d, function(k, v) { if (["doctype", "name"].indexOf(k)===-1) { frappe.model.set_value(d.doctype, d.name, k, v); } }); + // if pricing rule set as blank from an existing value, apply price_list + if(existing_pricing_rule && !d.pricing_rule) { + me.apply_price_list(frappe.get_doc(d.doctype, d.name)); + } }); }, - apply_price_list: function() { + apply_price_list: function(item) { var me = this; return this.frm.call({ method: "erpnext.stock.get_item_details.apply_price_list", - args: { args: this._get_args() }, + args: { args: this._get_args(item) }, callback: function(r) { if (!r.exc) { me.in_apply_price_list = true; From 387e1e21cbe9f6379ec5836a2fcc821215d285ba Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Thu, 18 Dec 2014 11:36:23 +0530 Subject: [PATCH 31/47] add reload_doc in a few patches --- erpnext/patches/v4_1/fix_jv_remarks.py | 1 + erpnext/patches/v4_2/recalculate_bom_costs.py | 1 + 2 files changed, 2 insertions(+) diff --git a/erpnext/patches/v4_1/fix_jv_remarks.py b/erpnext/patches/v4_1/fix_jv_remarks.py index 3b2f3422312..99797e10f3c 100644 --- a/erpnext/patches/v4_1/fix_jv_remarks.py +++ b/erpnext/patches/v4_1/fix_jv_remarks.py @@ -6,6 +6,7 @@ import frappe def execute(): reference_date = guess_reference_date() + frappe.reload_doc('accounts', 'doctype', 'journal_voucher_detail') for name in frappe.db.sql_list("""select name from `tabJournal Voucher` where date(creation)>=%s""", reference_date): jv = frappe.get_doc("Journal Voucher", name) diff --git a/erpnext/patches/v4_2/recalculate_bom_costs.py b/erpnext/patches/v4_2/recalculate_bom_costs.py index c05fd037093..37f04131b03 100644 --- a/erpnext/patches/v4_2/recalculate_bom_costs.py +++ b/erpnext/patches/v4_2/recalculate_bom_costs.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import frappe def execute(): + frappe.reload_doc('manufacturing', 'doctype', 'bom_operation') for d in frappe.db.sql("""select bom.name from `tabBOM` bom where bom.docstatus < 2 and exists(select bom_op.name from `tabBOM Operation` bom_op where bom.name = bom_op.parent and bom_op.fixed_cycle_cost IS NOT NULL)""", as_dict=1): From ca2c297f72566e8f7174dcab6ff8310e26b37085 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 18 Dec 2014 17:31:21 +0530 Subject: [PATCH 32/47] [fix] In Setup Wizard, load languages from languages.txt --- .../setup/page/setup_wizard/setup_wizard.js | 21 +++++++++++++++---- .../setup/page/setup_wizard/setup_wizard.py | 4 +++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.js b/erpnext/setup/page/setup_wizard/setup_wizard.js index 939eae648e0..3252e8acd6e 100644 --- a/erpnext/setup/page/setup_wizard/setup_wizard.js +++ b/erpnext/setup/page/setup_wizard/setup_wizard.js @@ -61,14 +61,27 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { fields: [ { "fieldname": "language", "label": __("Language"), "fieldtype": "Select", - options: ["english", "العربية", "deutsch", "ελληνικά", "español", "français", "हिंदी", "hrvatski", - "italiano", "nederlands", "polski", "português brasileiro", "português", "српски", "தமிழ்", - "ไทย", "中国(简体)", "中國(繁體)"], - reqd:1, "default": "english" + reqd:1 }, ], help: __("Welcome to ERPNext. Please select your language to begin the Setup Wizard."), onload: function(slide) { + var me = this; + + if (!this.language_list) { + frappe.call({ + method: "erpnext.setup.page.setup_wizard.setup_wizard.load_languages", + callback: function(r) { + me.language_list = r.message; + slide.get_input("language") + .add_options(r.message) + .val("english"); + } + }) + } else { + slide.get_input("language").add_options(this.language_list); + } + slide.get_input("language").on("change", function() { var lang = $(this).val() || "english"; frappe._messages = {}; diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.py b/erpnext/setup/page/setup_wizard/setup_wizard.py index c5e3f4339ef..6e3c7186258 100644 --- a/erpnext/setup/page/setup_wizard/setup_wizard.py +++ b/erpnext/setup/page/setup_wizard/setup_wizard.py @@ -434,4 +434,6 @@ def load_messages(language): send_translations(m) return lang - +@frappe.whitelist() +def load_languages(): + return sorted(get_lang_dict().keys()) From cb11f27558636bbae4e65b5d801886a37a99dab7 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 19 Dec 2014 10:51:41 +0530 Subject: [PATCH 33/47] Customer should not copied from lead to opoortunity --- erpnext/selling/doctype/opportunity/opportunity.js | 2 -- erpnext/selling/doctype/opportunity/opportunity.json | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/opportunity/opportunity.js b/erpnext/selling/doctype/opportunity/opportunity.js index af31d395153..59acc10be49 100644 --- a/erpnext/selling/doctype/opportunity/opportunity.js +++ b/erpnext/selling/doctype/opportunity/opportunity.js @@ -35,8 +35,6 @@ erpnext.selling.Opportunity = frappe.ui.form.Controller.extend({ }); } - if(this.frm.doc.customer && !this.frm.doc.customer_name) cur_frm.cscript.customer(this.frm.doc); - this.setup_queries(); }, diff --git a/erpnext/selling/doctype/opportunity/opportunity.json b/erpnext/selling/doctype/opportunity/opportunity.json index 17291ad13f5..92defc2acf4 100644 --- a/erpnext/selling/doctype/opportunity/opportunity.json +++ b/erpnext/selling/doctype/opportunity/opportunity.json @@ -47,6 +47,7 @@ "in_filter": 1, "in_list_view": 1, "label": "Customer", + "no_copy": 1, "oldfieldname": "customer", "oldfieldtype": "Link", "options": "Customer", @@ -416,7 +417,7 @@ "icon": "icon-info-sign", "idx": 1, "is_submittable": 1, - "modified": "2014-12-01 08:46:35.331148", + "modified": "2014-12-19 10:49:20.695720", "modified_by": "Administrator", "module": "Selling", "name": "Opportunity", From 5d1543f241be7bf3edecce4e3f1fcedb2d60989c Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Fri, 19 Dec 2014 18:43:55 +0600 Subject: [PATCH 34/47] bumped to version 4.15.0 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 2908f6aeab9..3ea0d2f6ef6 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.14.0' +__version__ = '4.15.0' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 0688b4cc9ff..2902ef834f4 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.14.0" +app_version = "4.15.0" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 8c9712e8ab6..1a20cfdb730 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.14.0" +version = "4.15.0" with open("requirements.txt", "r") as f: install_requires = f.readlines() From cfe3c54ca0c3becdc4888dd429f76c1bedde6d4d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 22 Dec 2014 10:42:48 +0530 Subject: [PATCH 35/47] Dont reset pricing if ignore pricing rule --- erpnext/public/js/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js index ae4699efd8a..5a56a6dc533 100644 --- a/erpnext/public/js/transaction.js +++ b/erpnext/public/js/transaction.js @@ -411,7 +411,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ } }); // if pricing rule set as blank from an existing value, apply price_list - if(existing_pricing_rule && !d.pricing_rule) { + if(!me.frm.doc.ignore_pricing_rule && existing_pricing_rule && !d.pricing_rule) { me.apply_price_list(frappe.get_doc(d.doctype, d.name)); } }); From ff56566506fe75af0dace2689e1a597066116c05 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Mon, 22 Dec 2014 11:47:45 +0600 Subject: [PATCH 36/47] bumped to version 4.15.1 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 3ea0d2f6ef6..38f52309297 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.15.0' +__version__ = '4.15.1' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 2902ef834f4..076dad6cd45 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.15.0" +app_version = "4.15.1" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 1a20cfdb730..731141e14a0 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.15.0" +version = "4.15.1" with open("requirements.txt", "r") as f: install_requires = f.readlines() From a04489a72b33b5b0d5489f55a9614f3dae07716f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 22 Dec 2014 14:58:36 +0530 Subject: [PATCH 37/47] minor fix no-copy --- erpnext/stock/doctype/delivery_note/delivery_note.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index ec50b95fff3..98e774804f9 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -180,7 +180,7 @@ "fieldtype": "Data", "hidden": 0, "label": "Customer's Purchase Order No", - "no_copy": 1, + "no_copy": 0, "oldfieldname": "po_no", "oldfieldtype": "Data", "permlevel": 0, @@ -1013,7 +1013,7 @@ "idx": 1, "in_create": 0, "is_submittable": 1, - "modified": "2014-12-16 10:37:08.934881", + "modified": "2014-12-22 14:58:19.575566", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", From da4e3fb3662ec36916fbf3e3bb1bd61609dfe028 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 23 Dec 2014 10:58:01 +0530 Subject: [PATCH 38/47] fixed negative batch wty message --- .../stock/doctype/stock_ledger_entry/stock_ledger_entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index 7fdd440f2eb..6202e9451a9 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -39,8 +39,8 @@ class StockLedgerEntry(Document): (self.warehouse, self.item_code, self.batch_no))[0][0]) if batch_bal_after_transaction < 0: - frappe.throw(_("Negative balance in Batch {0} for Item {1} at Warehouse {2} on {3} {4}").format(\ - batch_bal_after_transaction - self.actual_qty, self.item_code, self.warehouse, + frappe.throw(_("Negative balance {0} in Batch {1} for Item {2} at Warehouse {3} on {4} {5}") + .format(batch_bal_after_transaction - self.actual_qty, self.batch_no, self.item_code, self.warehouse, formatdate(self.posting_date), self.posting_time)) def validate_mandatory(self): From f64d11da3c16c5d3ff08b99786a30af4c45093a4 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Tue, 23 Dec 2014 19:41:08 +0600 Subject: [PATCH 39/47] bumped to version 4.15.2 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 38f52309297..85c4e14d1e5 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.15.1' +__version__ = '4.15.2' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 076dad6cd45..52e001c7fa5 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.15.1" +app_version = "4.15.2" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 731141e14a0..64e7b4deb70 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.15.1" +version = "4.15.2" with open("requirements.txt", "r") as f: install_requires = f.readlines() From c3270d7504968b94fef3f7267d759077ab8dece2 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 26 Dec 2014 10:58:39 +0530 Subject: [PATCH 40/47] exchange_rate no_copy fix --- .../supplier_quotation.json | 1072 ++++++++--------- 1 file changed, 536 insertions(+), 536 deletions(-) diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json index 9f3f2fc9779..74781a7b9a8 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json @@ -1,668 +1,668 @@ { - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2013-05-21 16:16:45", - "docstatus": 0, - "doctype": "DocType", - "document_type": "Transaction", + "allow_import": 1, + "autoname": "naming_series:", + "creation": "2013-05-21 16:16:45", + "docstatus": 0, + "doctype": "DocType", + "document_type": "Transaction", "fields": [ { - "fieldname": "supplier_section", - "fieldtype": "Section Break", - "label": "Supplier", - "options": "icon-user", + "fieldname": "supplier_section", + "fieldtype": "Section Break", + "label": "Supplier", + "options": "icon-user", "permlevel": 0 - }, + }, { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "SQTN-", - "permlevel": 0, - "print_hide": 1, + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "SQTN-", + "permlevel": 0, + "print_hide": 1, "reqd": 1 - }, + }, { - "description": "Supplier (vendor) name as entered in supplier master", - "fieldname": "supplier", - "fieldtype": "Link", - "in_filter": 1, - "label": "Supplier", - "oldfieldname": "supplier", - "oldfieldtype": "Link", - "options": "Supplier", - "permlevel": 0, - "print_hide": 1, - "reqd": 1, + "description": "Supplier (vendor) name as entered in supplier master", + "fieldname": "supplier", + "fieldtype": "Link", + "in_filter": 1, + "label": "Supplier", + "oldfieldname": "supplier", + "oldfieldtype": "Link", + "options": "Supplier", + "permlevel": 0, + "print_hide": 1, + "reqd": 1, "search_index": 1 - }, + }, { - "fieldname": "supplier_name", - "fieldtype": "Data", - "hidden": 0, - "in_list_view": 1, - "label": "Name", - "permlevel": 0, + "fieldname": "supplier_name", + "fieldtype": "Data", + "hidden": 0, + "in_list_view": 1, + "label": "Name", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "address_display", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Address", - "permlevel": 0, + "fieldname": "address_display", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Address", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "contact_display", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Contact", - "permlevel": 0, + "fieldname": "contact_display", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Contact", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "contact_mobile", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Mobile No", - "permlevel": 0, + "fieldname": "contact_mobile", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Mobile No", + "permlevel": 0, "read_only": 1 - }, + }, { - "fieldname": "contact_email", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Contact Email", - "permlevel": 0, - "print_hide": 1, + "fieldname": "contact_email", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Contact Email", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, - "print_hide": 0, - "print_width": "50%", + "fieldname": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, + "print_hide": 0, + "print_width": "50%", "width": "50%" - }, + }, { - "fieldname": "transaction_date", - "fieldtype": "Date", - "in_filter": 1, - "label": "Date", - "oldfieldname": "transaction_date", - "oldfieldtype": "Date", - "permlevel": 0, - "reqd": 1, + "fieldname": "transaction_date", + "fieldtype": "Date", + "in_filter": 1, + "label": "Date", + "oldfieldname": "transaction_date", + "oldfieldtype": "Date", + "permlevel": 0, + "reqd": 1, "search_index": 1 - }, + }, { - "fieldname": "amended_from", - "fieldtype": "Link", - "hidden": 1, - "ignore_user_permissions": 1, - "label": "Amended From", - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Data", - "options": "Supplier Quotation", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, + "fieldname": "amended_from", + "fieldtype": "Link", + "hidden": 1, + "ignore_user_permissions": 1, + "label": "Amended From", + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Data", + "options": "Supplier Quotation", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, "report_hide": 0 - }, + }, { - "description": "Select the relevant company name if you have multiple companies", - "fieldname": "company", - "fieldtype": "Link", - "in_filter": 1, - "label": "Company", - "no_copy": 0, - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "permlevel": 0, - "print_hide": 1, - "reqd": 1, + "description": "Select the relevant company name if you have multiple companies", + "fieldname": "company", + "fieldtype": "Link", + "in_filter": 1, + "label": "Company", + "no_copy": 0, + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "permlevel": 0, + "print_hide": 1, + "reqd": 1, "search_index": 1 - }, + }, { - "fieldname": "currency_price_list", - "fieldtype": "Section Break", - "label": "Currency and Price List", - "options": "icon-tag", + "fieldname": "currency_price_list", + "fieldtype": "Section Break", + "label": "Currency and Price List", + "options": "icon-tag", "permlevel": 0 - }, + }, { - "fieldname": "currency", - "fieldtype": "Link", - "label": "Currency", - "no_copy": 0, - "oldfieldname": "currency", - "oldfieldtype": "Select", - "options": "Currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "currency", + "fieldtype": "Link", + "label": "Currency", + "no_copy": 0, + "oldfieldname": "currency", + "oldfieldtype": "Select", + "options": "Currency", + "permlevel": 0, + "print_hide": 1, "reqd": 1 - }, + }, { - "description": "Rate at which supplier's currency is converted to company's base currency", - "fieldname": "conversion_rate", - "fieldtype": "Float", - "hidden": 0, - "label": "Exchange Rate", - "no_copy": 1, - "oldfieldname": "conversion_rate", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 1, + "description": "Rate at which supplier's currency is converted to company's base currency", + "fieldname": "conversion_rate", + "fieldtype": "Float", + "hidden": 0, + "label": "Exchange Rate", + "no_copy": 0, + "oldfieldname": "conversion_rate", + "oldfieldtype": "Currency", + "permlevel": 0, + "print_hide": 1, "reqd": 1 - }, + }, { - "fieldname": "cb_price_list", - "fieldtype": "Column Break", - "permlevel": 0, - "print_width": "50%", + "fieldname": "cb_price_list", + "fieldtype": "Column Break", + "permlevel": 0, + "print_width": "50%", "width": "50%" - }, + }, { - "fieldname": "buying_price_list", - "fieldtype": "Link", - "label": "Price List", - "options": "Price List", - "permlevel": 0, + "fieldname": "buying_price_list", + "fieldtype": "Link", + "label": "Price List", + "options": "Price List", + "permlevel": 0, "print_hide": 1 - }, + }, { - "depends_on": "buying_price_list", - "fieldname": "price_list_currency", - "fieldtype": "Link", - "label": "Price List Currency", - "options": "Currency", - "permlevel": 0, - "print_hide": 1, + "depends_on": "buying_price_list", + "fieldname": "price_list_currency", + "fieldtype": "Link", + "label": "Price List Currency", + "options": "Currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "depends_on": "buying_price_list", - "fieldname": "plc_conversion_rate", - "fieldtype": "Float", - "label": "Price List Exchange Rate", - "permlevel": 0, + "depends_on": "buying_price_list", + "fieldname": "plc_conversion_rate", + "fieldtype": "Float", + "label": "Price List Exchange Rate", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "ignore_pricing_rule", - "fieldtype": "Check", - "label": "Ignore Pricing Rule", - "no_copy": 1, - "permlevel": 1, + "fieldname": "ignore_pricing_rule", + "fieldtype": "Check", + "label": "Ignore Pricing Rule", + "no_copy": 1, + "permlevel": 1, "print_hide": 1 - }, + }, { - "fieldname": "items", - "fieldtype": "Section Break", - "label": "Items", - "oldfieldtype": "Section Break", - "options": "icon-shopping-cart", + "fieldname": "items", + "fieldtype": "Section Break", + "label": "Items", + "oldfieldtype": "Section Break", + "options": "icon-shopping-cart", "permlevel": 0 - }, + }, { - "allow_on_submit": 1, - "fieldname": "quotation_items", - "fieldtype": "Table", - "label": "Quotation Items", - "no_copy": 0, - "oldfieldname": "po_details", - "oldfieldtype": "Table", - "options": "Supplier Quotation Item", + "allow_on_submit": 1, + "fieldname": "quotation_items", + "fieldtype": "Table", + "label": "Quotation Items", + "no_copy": 0, + "oldfieldname": "po_details", + "oldfieldtype": "Table", + "options": "Supplier Quotation Item", "permlevel": 0 - }, + }, { - "fieldname": "section_break_22", - "fieldtype": "Section Break", + "fieldname": "section_break_22", + "fieldtype": "Section Break", "permlevel": 0 - }, + }, { - "fieldname": "net_total", - "fieldtype": "Currency", - "label": "Net Total (Company Currency)", - "no_copy": 1, - "oldfieldname": "net_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, + "fieldname": "net_total", + "fieldtype": "Currency", + "label": "Net Total (Company Currency)", + "no_copy": 1, + "oldfieldname": "net_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, "reqd": 0 - }, + }, { - "fieldname": "column_break_24", - "fieldtype": "Column Break", + "fieldname": "column_break_24", + "fieldtype": "Column Break", "permlevel": 0 - }, + }, { - "fieldname": "net_total_import", - "fieldtype": "Currency", - "label": "Net Total", - "no_copy": 0, - "oldfieldname": "net_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, + "fieldname": "net_total_import", + "fieldtype": "Currency", + "label": "Net Total", + "no_copy": 0, + "oldfieldname": "net_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, "read_only": 1 - }, + }, { - "fieldname": "taxes", - "fieldtype": "Section Break", - "label": "Taxes and Charges", - "oldfieldtype": "Section Break", - "options": "icon-money", + "fieldname": "taxes", + "fieldtype": "Section Break", + "label": "Taxes and Charges", + "oldfieldtype": "Section Break", + "options": "icon-money", "permlevel": 0 - }, + }, { - "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.", - "fieldname": "taxes_and_charges", - "fieldtype": "Link", - "label": "Taxes and Charges", - "no_copy": 1, - "oldfieldname": "purchase_other_charges", - "oldfieldtype": "Link", - "options": "Purchase Taxes and Charges Master", - "permlevel": 0, + "description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.", + "fieldname": "taxes_and_charges", + "fieldtype": "Link", + "label": "Taxes and Charges", + "no_copy": 1, + "oldfieldname": "purchase_other_charges", + "oldfieldtype": "Link", + "options": "Purchase Taxes and Charges Master", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "other_charges", - "fieldtype": "Table", - "label": "Purchase Taxes and Charges", - "no_copy": 0, - "oldfieldname": "purchase_tax_details", - "oldfieldtype": "Table", - "options": "Purchase Taxes and Charges", + "fieldname": "other_charges", + "fieldtype": "Table", + "label": "Purchase Taxes and Charges", + "no_copy": 0, + "oldfieldname": "purchase_tax_details", + "oldfieldtype": "Table", + "options": "Purchase Taxes and Charges", "permlevel": 0 - }, + }, { - "fieldname": "other_charges_calculation", - "fieldtype": "HTML", - "label": "Taxes and Charges Calculation", - "no_copy": 1, - "oldfieldtype": "HTML", - "permlevel": 0, + "fieldname": "other_charges_calculation", + "fieldtype": "HTML", + "label": "Taxes and Charges Calculation", + "no_copy": 1, + "oldfieldtype": "HTML", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "totals", - "fieldtype": "Section Break", - "label": "Totals", - "oldfieldtype": "Section Break", - "options": "icon-money", + "fieldname": "totals", + "fieldtype": "Section Break", + "label": "Totals", + "oldfieldtype": "Section Break", + "options": "icon-money", "permlevel": 0 - }, + }, { - "fieldname": "other_charges_added", - "fieldtype": "Currency", - "label": "Taxes and Charges Added (Company Currency)", - "no_copy": 0, - "oldfieldname": "other_charges_added", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "other_charges_added", + "fieldtype": "Currency", + "label": "Taxes and Charges Added (Company Currency)", + "no_copy": 0, + "oldfieldname": "other_charges_added", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "other_charges_deducted", - "fieldtype": "Currency", - "label": "Taxes and Charges Deducted (Company Currency)", - "no_copy": 0, - "oldfieldname": "other_charges_deducted", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "other_charges_deducted", + "fieldtype": "Currency", + "label": "Taxes and Charges Deducted (Company Currency)", + "no_copy": 0, + "oldfieldname": "other_charges_deducted", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "total_tax", - "fieldtype": "Currency", - "label": "Total Tax (Company Currency)", - "no_copy": 1, - "oldfieldname": "total_tax", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "total_tax", + "fieldtype": "Currency", + "label": "Total Tax (Company Currency)", + "no_copy": 1, + "oldfieldname": "total_tax", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "grand_total", - "fieldtype": "Currency", - "label": "Grand Total (Company Currency)", - "no_copy": 1, - "oldfieldname": "grand_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "grand_total", + "fieldtype": "Currency", + "label": "Grand Total (Company Currency)", + "no_copy": 1, + "oldfieldname": "grand_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total (Company Currency)", - "oldfieldname": "rounded_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 1, + "fieldname": "rounded_total", + "fieldtype": "Currency", + "label": "Rounded Total (Company Currency)", + "oldfieldname": "rounded_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "description": "In Words will be visible once you save the Purchase Order.", - "fieldname": "in_words", - "fieldtype": "Data", - "label": "In Words (Company Currency)", - "oldfieldname": "in_words", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 1, + "description": "In Words will be visible once you save the Purchase Order.", + "fieldname": "in_words", + "fieldtype": "Data", + "label": "In Words (Company Currency)", + "oldfieldname": "in_words", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 1, "read_only": 1 - }, + }, { - "fieldname": "column_break4", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "permlevel": 0, + "fieldname": "column_break4", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "permlevel": 0, "print_hide": 0 - }, + }, { - "fieldname": "other_charges_added_import", - "fieldtype": "Currency", - "label": "Taxes and Charges Added", - "no_copy": 0, - "oldfieldname": "other_charges_added_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, + "fieldname": "other_charges_added_import", + "fieldtype": "Currency", + "label": "Taxes and Charges Added", + "no_copy": 0, + "oldfieldname": "other_charges_added_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, "report_hide": 0 - }, + }, { - "fieldname": "other_charges_deducted_import", - "fieldtype": "Currency", - "label": "Taxes and Charges Deducted", - "no_copy": 0, - "oldfieldname": "other_charges_deducted_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, + "fieldname": "other_charges_deducted_import", + "fieldtype": "Currency", + "label": "Taxes and Charges Deducted", + "no_copy": 0, + "oldfieldname": "other_charges_deducted_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, "report_hide": 0 - }, + }, { - "fieldname": "grand_total_import", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Grand Total", - "no_copy": 0, - "oldfieldname": "grand_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "permlevel": 0, - "print_hide": 0, - "read_only": 1, + "fieldname": "grand_total_import", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Grand Total", + "no_copy": 0, + "oldfieldname": "grand_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "permlevel": 0, + "print_hide": 0, + "read_only": 1, "report_hide": 0 - }, + }, { - "fieldname": "in_words_import", - "fieldtype": "Data", - "label": "In Words", - "oldfieldname": "in_words_import", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, + "fieldname": "in_words_import", + "fieldtype": "Data", + "label": "In Words", + "oldfieldname": "in_words_import", + "oldfieldtype": "Data", + "permlevel": 0, + "print_hide": 0, "read_only": 1 - }, + }, { - "fieldname": "fold", - "fieldtype": "Fold", + "fieldname": "fold", + "fieldtype": "Fold", "permlevel": 0 - }, + }, { - "fieldname": "terms_section_break", - "fieldtype": "Section Break", - "label": "Terms and Conditions", - "oldfieldtype": "Section Break", - "options": "icon-legal", + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "label": "Terms and Conditions", + "oldfieldtype": "Section Break", + "options": "icon-legal", "permlevel": 0 - }, + }, { - "allow_on_submit": 1, - "fieldname": "letter_head", - "fieldtype": "Link", - "label": "Letter Head", - "oldfieldname": "letter_head", - "oldfieldtype": "Select", - "options": "Letter Head", - "permlevel": 0, + "allow_on_submit": 1, + "fieldname": "letter_head", + "fieldtype": "Link", + "label": "Letter Head", + "oldfieldname": "letter_head", + "oldfieldtype": "Select", + "options": "Letter Head", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "tc_name", - "fieldtype": "Link", - "label": "Terms", - "oldfieldname": "tc_name", - "oldfieldtype": "Link", - "options": "Terms and Conditions", - "permlevel": 0, + "fieldname": "tc_name", + "fieldtype": "Link", + "label": "Terms", + "oldfieldname": "tc_name", + "oldfieldtype": "Link", + "options": "Terms and Conditions", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "get_terms", - "fieldtype": "Button", - "label": "Get Terms and Conditions", - "oldfieldtype": "Button", + "fieldname": "get_terms", + "fieldtype": "Button", + "label": "Get Terms and Conditions", + "oldfieldtype": "Button", "permlevel": 0 - }, + }, { - "fieldname": "terms", - "fieldtype": "Text Editor", - "label": "Terms and Conditions", - "oldfieldname": "terms", - "oldfieldtype": "Text Editor", + "fieldname": "terms", + "fieldtype": "Text Editor", + "label": "Terms and Conditions", + "oldfieldname": "terms", + "oldfieldtype": "Text Editor", "permlevel": 0 - }, + }, { - "depends_on": "supplier", - "fieldname": "contact_section", - "fieldtype": "Section Break", - "label": "Contact Info", - "options": "icon-bullhorn", + "depends_on": "supplier", + "fieldname": "contact_section", + "fieldtype": "Section Break", + "label": "Contact Info", + "options": "icon-bullhorn", "permlevel": 0 - }, + }, { - "fieldname": "supplier_address", - "fieldtype": "Link", - "in_filter": 1, - "label": "Supplier Address", - "options": "Address", - "permlevel": 0, + "fieldname": "supplier_address", + "fieldtype": "Link", + "in_filter": 1, + "label": "Supplier Address", + "options": "Address", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "contact_person", - "fieldtype": "Link", - "in_filter": 1, - "label": "Contact Person", - "options": "Contact", - "permlevel": 0, + "fieldname": "contact_person", + "fieldtype": "Link", + "in_filter": 1, + "label": "Contact Person", + "options": "Contact", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "more_info", - "fieldtype": "Section Break", - "label": "More Info", - "oldfieldtype": "Section Break", - "options": "icon-file-text", + "fieldname": "more_info", + "fieldtype": "Section Break", + "label": "More Info", + "oldfieldtype": "Section Break", + "options": "icon-file-text", "permlevel": 0 - }, + }, { - "fieldname": "status", - "fieldtype": "Select", - "in_filter": 1, - "label": "Status", - "no_copy": 1, - "oldfieldname": "status", - "oldfieldtype": "Select", - "options": "\nDraft\nSubmitted\nStopped\nCancelled", - "permlevel": 0, - "print_hide": 1, - "read_only": 1, - "reqd": 1, + "fieldname": "status", + "fieldtype": "Select", + "in_filter": 1, + "label": "Status", + "no_copy": 1, + "oldfieldname": "status", + "oldfieldtype": "Select", + "options": "\nDraft\nSubmitted\nStopped\nCancelled", + "permlevel": 0, + "print_hide": 1, + "read_only": 1, + "reqd": 1, "search_index": 1 - }, + }, { - "default": "No", - "fieldname": "is_subcontracted", - "fieldtype": "Select", - "label": "Is Subcontracted", - "options": "\nYes\nNo", - "permlevel": 0, + "default": "No", + "fieldname": "is_subcontracted", + "fieldtype": "Select", + "label": "Is Subcontracted", + "options": "\nYes\nNo", + "permlevel": 0, "print_hide": 1 - }, + }, { - "fieldname": "column_break_57", - "fieldtype": "Column Break", + "fieldname": "column_break_57", + "fieldtype": "Column Break", "permlevel": 0 - }, + }, { - "fieldname": "fiscal_year", - "fieldtype": "Link", - "in_filter": 1, - "label": "Fiscal Year", - "no_copy": 0, - "oldfieldname": "fiscal_year", - "oldfieldtype": "Select", - "options": "Fiscal Year", - "permlevel": 0, - "print_hide": 1, - "reqd": 1, + "fieldname": "fiscal_year", + "fieldtype": "Link", + "in_filter": 1, + "label": "Fiscal Year", + "no_copy": 0, + "oldfieldname": "fiscal_year", + "oldfieldtype": "Select", + "options": "Fiscal Year", + "permlevel": 0, + "print_hide": 1, + "reqd": 1, "search_index": 1 - }, + }, { - "allow_on_submit": 1, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "label": "Print Heading", - "no_copy": 1, - "oldfieldname": "select_print_heading", - "oldfieldtype": "Link", - "options": "Print Heading", - "permlevel": 0, - "print_hide": 1, + "allow_on_submit": 1, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "label": "Print Heading", + "no_copy": 1, + "oldfieldname": "select_print_heading", + "oldfieldtype": "Link", + "options": "Print Heading", + "permlevel": 0, + "print_hide": 1, "report_hide": 1 } - ], - "icon": "icon-shopping-cart", - "idx": 1, - "is_submittable": 1, - "modified": "2014-09-09 05:35:35.369734", - "modified_by": "Administrator", - "module": "Buying", - "name": "Supplier Quotation", - "owner": "Administrator", + ], + "icon": "icon-shopping-cart", + "idx": 1, + "is_submittable": 1, + "modified": "2014-12-26 05:35:35.369734", + "modified_by": "Administrator", + "module": "Buying", + "name": "Supplier Quotation", + "owner": "Administrator", "permissions": [ { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Manufacturing Manager", - "submit": 1, + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Manufacturing Manager", + "submit": 1, "write": 1 - }, + }, { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Purchase Manager", - "submit": 1, + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Purchase Manager", + "submit": 1, "write": 1 - }, + }, { - "amend": 1, - "apply_user_permissions": 1, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Purchase User", - "submit": 0, + "amend": 1, + "apply_user_permissions": 1, + "cancel": 0, + "create": 1, + "delete": 0, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Purchase User", + "submit": 0, "write": 1 - }, + }, { - "amend": 0, - "apply_user_permissions": 1, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Material User", - "submit": 0, + "amend": 0, + "apply_user_permissions": 1, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Material User", + "submit": 0, "write": 0 - }, + }, { - "amend": 0, - "apply_user_permissions": 1, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Supplier", - "submit": 0, + "amend": 0, + "apply_user_permissions": 1, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Supplier", + "submit": 0, "write": 0 - }, + }, { - "permlevel": 1, - "read": 1, - "role": "Purchase Manager", + "permlevel": 1, + "read": 1, + "role": "Purchase Manager", "write": 1 } - ], - "read_only_onload": 1, - "search_fields": "status, transaction_date, supplier,grand_total", - "sort_field": "modified", + ], + "read_only_onload": 1, + "search_fields": "status, transaction_date, supplier,grand_total", + "sort_field": "modified", "sort_order": "DESC" -} \ No newline at end of file +} From ecc3f312b9dc3a3297db6d9b8b04d5efa3671ee8 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Sun, 28 Dec 2014 17:29:08 +0600 Subject: [PATCH 41/47] bumped to version 4.15.3 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 85c4e14d1e5..418d94e7b0e 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.15.2' +__version__ = '4.15.3' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 52e001c7fa5..6b3f1e91705 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.15.2" +app_version = "4.15.3" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index 64e7b4deb70..aaa37737f97 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.15.2" +version = "4.15.3" with open("requirements.txt", "r") as f: install_requires = f.readlines() From 7d8fa8089a9a60536ab9616cb387fcd69abb038b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 30 Dec 2014 15:35:45 +0530 Subject: [PATCH 42/47] always calculate taxes and totals onchange of exchange rate --- erpnext/public/js/transaction.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js index 5a56a6dc533..acb841b8a0c 100644 --- a/erpnext/public/js/transaction.js +++ b/erpnext/public/js/transaction.js @@ -403,10 +403,14 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ _set_values_for_item_list: function(children) { var me = this; + var price_list_rate_changed = false; $.each(children, function(i, d) { var existing_pricing_rule = frappe.model.get_value(d.doctype, d.name, "pricing_rule"); $.each(d, function(k, v) { if (["doctype", "name"].indexOf(k)===-1) { + if(k=="price_list_rate") { + if(flt(v) != flt(d.price_list_rate)) price_list_rate_changed = true; + } frappe.model.set_value(d.doctype, d.name, k, v); } }); @@ -414,6 +418,8 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ if(!me.frm.doc.ignore_pricing_rule && existing_pricing_rule && !d.pricing_rule) { me.apply_price_list(frappe.get_doc(d.doctype, d.name)); } + + if(!price_list_rate_changed) me.calculate_taxes_and_totals(); }); }, From 54c31b498b4c716ac26cc4fcdc01a15a15cc8dff Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 30 Dec 2014 16:33:07 +0530 Subject: [PATCH 43/47] Fixes in Stock Analytics --- erpnext/public/js/stock_analytics.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/public/js/stock_analytics.js b/erpnext/public/js/stock_analytics.js index 091836f95e3..57b69cbb540 100644 --- a/erpnext/public/js/stock_analytics.js +++ b/erpnext/public/js/stock_analytics.js @@ -108,6 +108,7 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({ // otherwise, only reset values $.each(this.data, function(i, d) { me.reset_item_values(d); + d["closing_qty_value"] = 0; }); } From 40431cbf8936530f5e88862c1e7c4bb24bcfbb7a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 30 Dec 2014 17:53:16 +0530 Subject: [PATCH 44/47] focus on barcode field after adding a row --- erpnext/accounts/doctype/sales_invoice/pos.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/pos.js b/erpnext/accounts/doctype/sales_invoice/pos.js index d9ef6d85626..e7cbcb761ee 100644 --- a/erpnext/accounts/doctype/sales_invoice/pos.js +++ b/erpnext/accounts/doctype/sales_invoice/pos.js @@ -492,7 +492,7 @@ erpnext.POS = Class.extend({ }); me.refresh_delete_btn(); - if(me.frm.doc[this.party]) { + if(me.frm.doc[this.party.toLowerCase()]) { this.barcode.$input.focus(); } else { this.party_field.$input.focus(); From a74468b35378eb01074295469fb1091d60c6d374 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 30 Dec 2014 18:33:52 +0530 Subject: [PATCH 45/47] set missing cost center using default --- erpnext/controllers/accounts_controller.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 49845f68683..f6d47dd420b 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -119,6 +119,10 @@ class AccountsController(TransactionBase): item.get(fieldname) is None and value is not None: item.set(fieldname, value) + if fieldname == "cost_center" and item.meta.get_field("cost_center") \ + and not item.get("cost_center") and value is not None: + item.set(fieldname, value) + if ret.get("pricing_rule"): for field in ["base_price_list_rate", "price_list_rate", "discount_percentage", "base_rate", "rate"]: From 5604f987f2ad7c79b06b4e8b1fd3407922f43b5e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 31 Dec 2014 12:37:11 +0530 Subject: [PATCH 46/47] item validation in bom --- erpnext/manufacturing/doctype/bom/bom.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 199ade94c42..bab1b43b60a 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -57,6 +57,9 @@ class BOM(Document): last_purchase_rate, is_manufactured_item from `tabItem` where name=%s""", item_code, as_dict = 1) + if not item: + frappe.throw(_("Item: {0} does not exist in the system").format(item_code)) + return item def validate_rm_item(self, item): From b094ee45d7e55efa77139643c084283db064f434 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Wed, 31 Dec 2014 13:11:14 +0600 Subject: [PATCH 47/47] bumped to version 4.15.4 --- erpnext/__version__.py | 2 +- erpnext/hooks.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/__version__.py b/erpnext/__version__.py index 418d94e7b0e..349cc44bd0a 100644 --- a/erpnext/__version__.py +++ b/erpnext/__version__.py @@ -1 +1 @@ -__version__ = '4.15.3' +__version__ = '4.15.4' diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 6b3f1e91705..f033d687be0 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Web Notes Technologies Pvt. Ltd. and Contributors" app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations" app_icon = "icon-th" app_color = "#e74c3c" -app_version = "4.15.3" +app_version = "4.15.4" error_report_email = "support@erpnext.com" diff --git a/setup.py b/setup.py index aaa37737f97..24e0155468a 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import os -version = "4.15.3" +version = "4.15.4" with open("requirements.txt", "r") as f: install_requires = f.readlines()