Merge branch 'develop' into iff-invoicing
This commit is contained in:
commit
fe57ed629e
@ -1619,22 +1619,23 @@ def update_multi_mode_option(doc, pos_profile):
|
|||||||
|
|
||||||
for pos_payment_method in pos_profile.get('payments'):
|
for pos_payment_method in pos_profile.get('payments'):
|
||||||
pos_payment_method = pos_payment_method.as_dict()
|
pos_payment_method = pos_payment_method.as_dict()
|
||||||
|
|
||||||
payment_mode = get_mode_of_payment_info(pos_payment_method.mode_of_payment, doc.company)
|
payment_mode = get_mode_of_payment_info(pos_payment_method.mode_of_payment, doc.company)
|
||||||
payment_mode[0].default = pos_payment_method.default
|
if payment_mode:
|
||||||
append_payment(payment_mode[0])
|
payment_mode[0].default = pos_payment_method.default
|
||||||
|
append_payment(payment_mode[0])
|
||||||
|
|
||||||
def get_all_mode_of_payments(doc):
|
def get_all_mode_of_payments(doc):
|
||||||
return frappe.db.sql("""
|
return frappe.db.sql("""
|
||||||
select mpa.default_account, mpa.parent, mp.type as type
|
select mpa.default_account, mpa.parent, mp.type as type
|
||||||
from `tabMode of Payment Account` mpa,`tabMode of Payment` mp
|
from `tabMode of Payment Account` mpa,`tabMode of Payment` mp
|
||||||
where mpa.parent = mp.name and mpa.company = %(company)s and mp.enabled = 1""",
|
where mpa.parent = mp.name and mpa.company = %(company)s and mp.enabled = 1""",
|
||||||
{'company': doc.company}, as_dict=1)
|
{'company': doc.company}, as_dict=1)
|
||||||
|
|
||||||
def get_mode_of_payment_info(mode_of_payment, company):
|
def get_mode_of_payment_info(mode_of_payment, company):
|
||||||
return frappe.db.sql("""
|
return frappe.db.sql("""
|
||||||
select mpa.default_account, mpa.parent, mp.type as type
|
select mpa.default_account, mpa.parent, mp.type as type
|
||||||
from `tabMode of Payment Account` mpa,`tabMode of Payment` mp
|
from `tabMode of Payment Account` mpa,`tabMode of Payment` mp
|
||||||
where mpa.parent = mp.name and mpa.company = %s and mp.enabled = 1 and mp.name = %s""",
|
where mpa.parent = mp.name and mpa.company = %s and mp.enabled = 1 and mp.name = %s""",
|
||||||
(company, mode_of_payment), as_dict=1)
|
(company, mode_of_payment), as_dict=1)
|
||||||
|
|
||||||
|
@ -5,20 +5,23 @@ cur_frm.add_fetch('employee','employee_name','employee_name');
|
|||||||
|
|
||||||
frappe.ui.form.on("Leave Allocation", {
|
frappe.ui.form.on("Leave Allocation", {
|
||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
|
// Ignore cancellation of doctype on cancel all.
|
||||||
|
frm.ignore_doctypes_on_cancel_all = ["Leave Ledger Entry"];
|
||||||
|
|
||||||
if(!frm.doc.from_date) frm.set_value("from_date", frappe.datetime.get_today());
|
if(!frm.doc.from_date) frm.set_value("from_date", frappe.datetime.get_today());
|
||||||
|
|
||||||
frm.set_query("employee", function() {
|
frm.set_query("employee", function() {
|
||||||
return {
|
return {
|
||||||
query: "erpnext.controllers.queries.employee_query"
|
query: "erpnext.controllers.queries.employee_query"
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
frm.set_query("leave_type", function() {
|
frm.set_query("leave_type", function() {
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
is_lwp: 0
|
is_lwp: 0
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
|
@ -19,6 +19,10 @@ frappe.ui.form.on("Leave Application", {
|
|||||||
frm.set_query("employee", erpnext.queries.employee);
|
frm.set_query("employee", erpnext.queries.employee);
|
||||||
},
|
},
|
||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
|
|
||||||
|
// Ignore cancellation of doctype on cancel all.
|
||||||
|
frm.ignore_doctypes_on_cancel_all = ["Leave Ledger Entry"];
|
||||||
|
|
||||||
if (!frm.doc.posting_date) {
|
if (!frm.doc.posting_date) {
|
||||||
frm.set_value("posting_date", frappe.datetime.get_today());
|
frm.set_value("posting_date", frappe.datetime.get_today());
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Leave Encashment', {
|
frappe.ui.form.on('Leave Encashment', {
|
||||||
|
onload: function(frm) {
|
||||||
|
// Ignore cancellation of doctype on cancel all.
|
||||||
|
frm.ignore_doctypes_on_cancel_all = ["Leave Ledger Entry"];
|
||||||
|
},
|
||||||
setup: function(frm) {
|
setup: function(frm) {
|
||||||
frm.set_query("leave_type", function() {
|
frm.set_query("leave_type", function() {
|
||||||
return {
|
return {
|
||||||
@ -33,7 +37,7 @@ frappe.ui.form.on('Leave Encashment', {
|
|||||||
doc: frm.doc,
|
doc: frm.doc,
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
frm.refresh_fields();
|
frm.refresh_fields();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,33 @@
|
|||||||
<p class="hero-subtitle">{{ greeting_subtitle }}</p>
|
<p class="hero-subtitle">{{ greeting_subtitle }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="search-container">
|
||||||
|
<div class="website-search" id="search-container">
|
||||||
|
<div class="dropdown">
|
||||||
|
<div class="search-icon">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
class="feather feather-search">
|
||||||
|
<circle cx="11" cy="11" r="8"></circle>
|
||||||
|
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<input type="search" class="form-control" placeholder="Search the docs (Press ? to focus)" />
|
||||||
|
<div class="overflow-hidden shadow dropdown-menu w-100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button class="navbar-toggler" type="button"
|
||||||
|
data-toggle="collapse"
|
||||||
|
data-target="#navbarSupportedContent"
|
||||||
|
aria-controls="navbarSupportedContent"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -54,5 +81,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% endblock %}
|
{%- block script -%}
|
||||||
|
<script>
|
||||||
|
frappe.ready(() => {
|
||||||
|
frappe.setup_search('#search-container', 'kb');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{%- endblock -%}
|
||||||
|
|
||||||
|
{%- block style -%}
|
||||||
|
<style>
|
||||||
|
.search-container {
|
||||||
|
margin-top: 1.2rem;
|
||||||
|
max-width: 500px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{%- endblock -%}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user