Merge branch 'develop' into opportunity-from-email
This commit is contained in:
commit
42fbdc09f8
@ -7,7 +7,7 @@ import frappe
|
|||||||
import unittest
|
import unittest
|
||||||
from frappe.utils import nowdate
|
from frappe.utils import nowdate
|
||||||
from frappe.utils.make_random import get_random
|
from frappe.utils.make_random import get_random
|
||||||
|
from erpnext.education.doctype.program.test_program import make_program_and_linked_courses
|
||||||
|
|
||||||
# test_records = frappe.get_test_records('Fees')
|
# test_records = frappe.get_test_records('Fees')
|
||||||
|
|
||||||
@ -15,6 +15,7 @@ class TestFees(unittest.TestCase):
|
|||||||
|
|
||||||
def test_fees(self):
|
def test_fees(self):
|
||||||
student = get_random("Student")
|
student = get_random("Student")
|
||||||
|
program = make_program_and_linked_courses("_Test Program 1", ["_Test Course 1", "_Test Course 2"])
|
||||||
fee = frappe.new_doc("Fees")
|
fee = frappe.new_doc("Fees")
|
||||||
fee.posting_date = nowdate()
|
fee.posting_date = nowdate()
|
||||||
fee.due_date = nowdate()
|
fee.due_date = nowdate()
|
||||||
@ -23,6 +24,7 @@ class TestFees(unittest.TestCase):
|
|||||||
fee.income_account = "Sales - _TC"
|
fee.income_account = "Sales - _TC"
|
||||||
fee.cost_center = "_Test Cost Center - _TC"
|
fee.cost_center = "_Test Cost Center - _TC"
|
||||||
fee.company = "_Test Company"
|
fee.company = "_Test Company"
|
||||||
|
fee.program = program.name
|
||||||
|
|
||||||
fee.extend("components", [
|
fee.extend("components", [
|
||||||
{
|
{
|
||||||
|
@ -134,7 +134,7 @@ let transfer_patient_dialog = function(frm) {
|
|||||||
{fieldtype: 'Link', label: 'Leave From', fieldname: 'leave_from', options: 'Healthcare Service Unit', reqd: 1, read_only:1},
|
{fieldtype: 'Link', label: 'Leave From', fieldname: 'leave_from', options: 'Healthcare Service Unit', reqd: 1, read_only:1},
|
||||||
{fieldtype: 'Link', label: 'Service Unit Type', fieldname: 'service_unit_type', options: 'Healthcare Service Unit Type'},
|
{fieldtype: 'Link', label: 'Service Unit Type', fieldname: 'service_unit_type', options: 'Healthcare Service Unit Type'},
|
||||||
{fieldtype: 'Link', label: 'Transfer To', fieldname: 'service_unit', options: 'Healthcare Service Unit', reqd: 1},
|
{fieldtype: 'Link', label: 'Transfer To', fieldname: 'service_unit', options: 'Healthcare Service Unit', reqd: 1},
|
||||||
{fieldtype: 'Datetime', label: 'Check In', fieldname: 'check_in', reqd: 1}
|
{fieldtype: 'Datetime', label: 'Check In', fieldname: 'check_in', reqd: 1, default: frappe.datetime.now_datetime()}
|
||||||
],
|
],
|
||||||
primary_action_label: __('Transfer'),
|
primary_action_label: __('Transfer'),
|
||||||
primary_action : function() {
|
primary_action : function() {
|
||||||
@ -147,7 +147,12 @@ let transfer_patient_dialog = function(frm) {
|
|||||||
if(dialog.get_value('service_unit')){
|
if(dialog.get_value('service_unit')){
|
||||||
service_unit = dialog.get_value('service_unit');
|
service_unit = dialog.get_value('service_unit');
|
||||||
}
|
}
|
||||||
if(!check_in){
|
if(check_in > frappe.datetime.now_datetime()){
|
||||||
|
frappe.msgprint({
|
||||||
|
title: __('Not Allowed'),
|
||||||
|
message: __('Check-in time cannot be greater than the current time'),
|
||||||
|
indicator: 'red'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
frappe.call({
|
frappe.call({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user