From ab1c43dbee9683126a8bcbff8f0044f34aab4a3a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 16 May 2019 13:41:25 +0530 Subject: [PATCH 1/5] fix: To allow creation of sales invoice without customer --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 06e1e58008f..993ee5c6542 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1166,6 +1166,9 @@ class SalesInvoice(SellingController): self.set_missing_values(for_validate = True) def validate_inter_company_party(doctype, party, company, inter_company_reference): + if not party: + return + if doctype in ["Sales Invoice", "Sales Order"]: partytype, ref_partytype, internal = "Customer", "Supplier", "is_internal_customer" From b90fc7fc0d677c660f167db79c69647feda45f98 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 16 May 2019 13:42:11 +0530 Subject: [PATCH 2/5] fix: Get bank account on selection of payment mode in Loan --- erpnext/hr/doctype/loan/loan.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/erpnext/hr/doctype/loan/loan.js b/erpnext/hr/doctype/loan/loan.js index 7140bea2704..e1b41786f47 100644 --- a/erpnext/hr/doctype/loan/loan.js +++ b/erpnext/hr/doctype/loan/loan.js @@ -172,18 +172,20 @@ frappe.ui.form.on('Loan', { }, mode_of_payment: function (frm) { - frappe.call({ - method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account", - args: { - "mode_of_payment": frm.doc.mode_of_payment, - "company": frm.doc.company - }, - callback: function (r, rt) { - if (r.message) { - frm.set_value("payment_account", r.message.account); + if (frm.doc.mode_of_payment && frm.doc.company) { + frappe.call({ + method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account", + args: { + "mode_of_payment": frm.doc.mode_of_payment, + "company": frm.doc.company + }, + callback: function (r, rt) { + if (r.message) { + frm.set_value("payment_account", r.message.account); + } } - } - }); + }); + } }, loan_application: function (frm) { From 2a8c463079f6630194f9c1bd645228ef20a040c1 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 16 May 2019 13:42:55 +0530 Subject: [PATCH 3/5] fix: show tasks in project order by due date and status --- erpnext/projects/doctype/project/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index a66fac31c56..74e70a92766 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -65,7 +65,7 @@ class Project(Document): 'name': ("not in", self.deleted_task_list) }) - return frappe.get_all("Task", "*", filters, order_by="exp_start_date asc") + return frappe.get_all("Task", "*", filters, order_by="exp_start_date asc, status asc") def validate(self): self.validate_weights() From 8a976ba8abeed87d1b05b5062638792b1d812567 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 16 May 2019 16:38:13 +0530 Subject: [PATCH 4/5] feat: LMS is now compatible with Frappe Theme (#17600) * style: UI fixes for frappe_theme compatibility * chore: minor ui fixes --- .../js/education/lms/components/CardList.vue | 20 +++---- .../education/lms/components/CourseCard.vue | 2 +- .../education/lms/components/ProfileInfo.vue | 56 +++++++++---------- .../education/lms/components/ProgramCard.vue | 2 +- .../js/education/lms/components/Video.vue | 8 +-- .../js/education/lms/pages/ContentPage.vue | 5 +- .../js/education/lms/pages/CoursePage.vue | 4 +- .../public/js/education/lms/pages/Home.vue | 2 +- .../js/education/lms/pages/ListPage.vue | 4 +- .../js/education/lms/pages/ProfilePage.vue | 4 +- .../js/education/lms/pages/ProgramPage.vue | 2 +- 11 files changed, 52 insertions(+), 57 deletions(-) diff --git a/erpnext/public/js/education/lms/components/CardList.vue b/erpnext/public/js/education/lms/components/CardList.vue index 298627f757e..10f6af096c0 100644 --- a/erpnext/public/js/education/lms/components/CardList.vue +++ b/erpnext/public/js/education/lms/components/CardList.vue @@ -1,18 +1,18 @@ diff --git a/erpnext/public/js/education/lms/components/CourseCard.vue b/erpnext/public/js/education/lms/components/CourseCard.vue index dff896f6f9e..48a9f591c73 100644 --- a/erpnext/public/js/education/lms/components/CourseCard.vue +++ b/erpnext/public/js/education/lms/components/CourseCard.vue @@ -8,7 +8,7 @@
{{ course.course_name }}
- {{ course.course_intro }} + {{ course.course_intro.substring(0,120) }}
diff --git a/erpnext/public/js/education/lms/components/ProfileInfo.vue b/erpnext/public/js/education/lms/components/ProfileInfo.vue index 6f3e8f12664..5bad713997f 100644 --- a/erpnext/public/js/education/lms/components/ProfileInfo.vue +++ b/erpnext/public/js/education/lms/components/ProfileInfo.vue @@ -1,36 +1,34 @@ diff --git a/erpnext/public/js/education/lms/pages/CoursePage.vue b/erpnext/public/js/education/lms/pages/CoursePage.vue index 9aaf8a9858d..dc3d13052b0 100644 --- a/erpnext/public/js/education/lms/pages/CoursePage.vue +++ b/erpnext/public/js/education/lms/pages/CoursePage.vue @@ -1,9 +1,9 @@