Merge branch 'develop' into stock-dashboard-font-weight
This commit is contained in:
commit
0aef0fd764
@ -52,8 +52,8 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
|
||||
|
||||
row = {
|
||||
'item_code': d.item_code,
|
||||
'item_name': item_record.item_name,
|
||||
'item_group': item_record.item_group,
|
||||
'item_name': item_record.item_name if item_record else d.item_name,
|
||||
'item_group': item_record.item_group if item_record else d.item_group,
|
||||
'description': d.description,
|
||||
'invoice': d.parent,
|
||||
'posting_date': d.posting_date,
|
||||
@ -383,6 +383,7 @@ def get_items(filters, additional_query_columns):
|
||||
`tabSales Invoice`.project, `tabSales Invoice`.customer, `tabSales Invoice`.remarks,
|
||||
`tabSales Invoice`.territory, `tabSales Invoice`.company, `tabSales Invoice`.base_net_total,
|
||||
`tabSales Invoice Item`.item_code, `tabSales Invoice Item`.description,
|
||||
`tabSales Invoice Item`.`item_name`, `tabSales Invoice Item`.`item_group`,
|
||||
`tabSales Invoice Item`.sales_order, `tabSales Invoice Item`.delivery_note,
|
||||
`tabSales Invoice Item`.income_account, `tabSales Invoice Item`.cost_center,
|
||||
`tabSales Invoice Item`.stock_qty, `tabSales Invoice Item`.stock_uom,
|
||||
|
@ -139,6 +139,7 @@ def create_inpatient(patient):
|
||||
inpatient_record.phone = patient_obj.phone
|
||||
inpatient_record.inpatient = "Scheduled"
|
||||
inpatient_record.scheduled_date = today()
|
||||
inpatient_record.company = "_Test Company"
|
||||
return inpatient_record
|
||||
|
||||
|
||||
|
@ -16,11 +16,13 @@ class TestEmployee(unittest.TestCase):
|
||||
employee = frappe.get_doc("Employee", frappe.db.sql_list("select name from tabEmployee limit 1")[0])
|
||||
employee.date_of_birth = "1992" + frappe.utils.nowdate()[4:]
|
||||
employee.company_email = "test@example.com"
|
||||
employee.company = "_Test Company"
|
||||
employee.save()
|
||||
|
||||
from erpnext.hr.doctype.employee.employee import get_employees_who_are_born_today, send_birthday_reminders
|
||||
|
||||
self.assertTrue(employee.name in [e.name for e in get_employees_who_are_born_today()])
|
||||
employees_born_today = get_employees_who_are_born_today()
|
||||
self.assertTrue(employees_born_today.get("_Test Company"))
|
||||
|
||||
frappe.db.sql("delete from `tabEmail Queue`")
|
||||
|
||||
|
@ -386,7 +386,8 @@ def get_items(filters=None, search=None):
|
||||
r.description = r.web_long_description or r.description
|
||||
r.image = r.website_image or r.image
|
||||
product_info = get_product_info_for_website(r.item_code, skip_quotation_creation=True).get('product_info')
|
||||
r.formatted_price = product_info['price'].get('formatted_price') if product_info['price'] else None
|
||||
if product_info:
|
||||
r.formatted_price = product_info['price'].get('formatted_price') if product_info['price'] else None
|
||||
|
||||
return results
|
||||
|
||||
|
@ -288,7 +288,7 @@ def make_sales_invoice(source_name, item_code=None, customer=None):
|
||||
def make_salary_slip(source_name, target_doc=None):
|
||||
target = frappe.new_doc("Salary Slip")
|
||||
set_missing_values(source_name, target)
|
||||
target.run_method("get_emp_and_leave_details")
|
||||
target.run_method("get_emp_and_working_day_details")
|
||||
|
||||
return target
|
||||
|
||||
|
@ -303,7 +303,7 @@ def validate_mandatory_fields(invoice):
|
||||
_('GSTIN is mandatory to fetch company GSTIN details. Please enter GSTIN in selected company address.'),
|
||||
title=_('Missing Fields')
|
||||
)
|
||||
if not frappe.db.get_value('Address', invoice.customer_address, 'gstin'):
|
||||
if invoice.gst_category != 'Overseas' and not frappe.db.get_value('Address', invoice.customer_address, 'gstin'):
|
||||
frappe.throw(
|
||||
_('GSTIN is mandatory to fetch customer GSTIN details. Please enter GSTIN in selected customer address.'),
|
||||
title=_('Missing Fields')
|
||||
|
@ -73,7 +73,8 @@ class ProductQuery:
|
||||
|
||||
for item in result:
|
||||
product_info = get_product_info_for_website(item.item_code, skip_quotation_creation=True).get('product_info')
|
||||
item.formatted_price = product_info['price'].get('formatted_price') if product_info['price'] else None
|
||||
if product_info:
|
||||
item.formatted_price = product_info['price'].get('formatted_price') if product_info['price'] else None
|
||||
|
||||
return result
|
||||
|
||||
|
@ -62,6 +62,9 @@
|
||||
<div class="col-8">
|
||||
{% if doc.items %}
|
||||
<div class="place-order-container">
|
||||
<a class="btn btn-primary-light mr-2" href="/all-products">
|
||||
{{ _("Continue Shopping") }}
|
||||
</a>
|
||||
{% if cart_settings.enable_checkout %}
|
||||
<button class="btn btn-primary btn-place-order" type="button">
|
||||
{{ _("Place Order") }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user