From 09c3be075547cf99987dbafdc6ee7d55ef2ea16b Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Sat, 6 Jun 2026 02:54:00 +0530 Subject: [PATCH] Fix jQuery CSS error in complaint name input - Fix 'can't access property toUpperCase' error when rendering complaint table - Apply SNOMED styling conditionally only when complaint has concept_id - Use proper jQuery css() object notation instead of string --- app/Views/billing/opd_prescription_basic.php | 21 ++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/Views/billing/opd_prescription_basic.php b/app/Views/billing/opd_prescription_basic.php index b377baf..b81327b 100644 --- a/app/Views/billing/opd_prescription_basic.php +++ b/app/Views/billing/opd_prescription_basic.php @@ -4826,17 +4826,18 @@ $tr.append($('').text(idx + 1)); // Complaint name — editable input (SNOMED = blue, local = default) - var nameStyle = isSnomed ? 'color:#0d6efd;font-weight:600;' : ''; var titleText = item.concept_id ? 'SNOMED: ' + item.concept_id : ''; - $tr.append( - $('').append( - $('') - .val(item.term || '') - .attr('data-idx', idx) - .attr('title', titleText) - .css(nameStyle) - ) - ); + var $nameInput = $('') + .val(item.term || '') + .attr('data-idx', idx) + .attr('title', titleText); + + // Apply SNOMED styling if applicable + if (isSnomed) { + $nameInput.css({ color: '#0d6efd', fontWeight: '600' }); + } + + $tr.append($('').append($nameInput)); // Frequency input $tr.append(