Merge branch 'version-13-hotfix' into mergify/bp/version-13-hotfix/pr-27785
This commit is contained in:
@@ -390,6 +390,9 @@ class PaymentEntry(AccountsController):
|
||||
invoice_paid_amount_map[invoice_key]['discounted_amt'] = ref.total_amount * (term.discount / 100)
|
||||
|
||||
for key, allocated_amount in iteritems(invoice_payment_amount_map):
|
||||
if not invoice_paid_amount_map.get(key):
|
||||
frappe.throw(_('Payment term {0} not used in {1}').format(key[0], key[1]))
|
||||
|
||||
outstanding = flt(invoice_paid_amount_map.get(key, {}).get('outstanding'))
|
||||
discounted_amt = flt(invoice_paid_amount_map.get(key, {}).get('discounted_amt'))
|
||||
|
||||
|
||||
@@ -539,7 +539,7 @@ def get_time_in_timedelta(time):
|
||||
def set_first_response_time(communication, method):
|
||||
if communication.get('reference_doctype') == "Issue":
|
||||
issue = get_parent_doc(communication)
|
||||
if is_first_response(issue):
|
||||
if is_first_response(issue) and issue.service_level_agreement:
|
||||
first_response_time = calculate_first_response_time(issue, get_datetime(issue.first_responded_on))
|
||||
issue.db_set("first_response_time", first_response_time)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user