From 98652ce6463801c56d767a66381072f06ca8c842 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Fri, 18 Sep 2026 05:36:45 +0530 Subject: [PATCH] fix(medical-store): define walkinMobile and walkinUhid state when loading draft bills with phone number --- public/App/MedicalStore/index.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/public/App/MedicalStore/index.html b/public/App/MedicalStore/index.html index 1da8f3e..85852ae 100644 --- a/public/App/MedicalStore/index.html +++ b/public/App/MedicalStore/index.html @@ -1485,6 +1485,8 @@ function PosCounter({ store, notify, initialEditInvoice, onClearEditInvoice, act const [walkinAbhaId, setWalkinAbhaId] = useState(''); const [walkinAbhaAddress, setWalkinAbhaAddress] = useState(''); + const [walkinMobile, setWalkinMobile] = useState(''); + const [walkinUhid, setWalkinUhid] = useState(''); const [showFhirModal, setShowFhirModal] = useState(false); const [fhirBundleData, setFhirBundleData] = useState(null); const [isLoadingFhir, setIsLoadingFhir] = useState(false); @@ -2130,6 +2132,8 @@ function PosCounter({ store, notify, initialEditInvoice, onClearEditInvoice, act setPatientQuery(pt.full_name + ' (' + pt.uhid + ')'); setWalkinAbhaId(pt.abha_id || ''); setWalkinAbhaAddress(pt.abha_address || ''); + setWalkinMobile(pt.mobile || ''); + setWalkinUhid(pt.uhid || ''); if (pt.has_active_ipd && pt.active_ipd) { setPatientType('IPD'); @@ -2158,6 +2162,8 @@ function PosCounter({ store, notify, initialEditInvoice, onClearEditInvoice, act setDoctorRegNo(''); setWalkinAbhaId(''); setWalkinAbhaAddress(''); + setWalkinMobile(''); + setWalkinUhid(''); setPrintFormat('thermal'); }; @@ -2637,12 +2643,12 @@ function PosCounter({ store, notify, initialEditInvoice, onClearEditInvoice, act const payload = { store_id: store.store_id, patient_type: patientType, - uhid: selectedPatient ? selectedPatient.uhid : null, + uhid: selectedPatient ? selectedPatient.uhid : (walkinUhid || null), patient_id: selectedPatient ? selectedPatient.patient_id : null, opd_id: selectedPatient && selectedPatient.active_opd ? selectedPatient.active_opd.opd_id : null, ipd_id: selectedPatient && selectedPatient.active_ipd ? selectedPatient.active_ipd.ipd_id : null, patient_name: selectedPatient ? selectedPatient.full_name : (patientQuery || 'Walk-in Customer'), - patient_mobile: selectedPatient ? selectedPatient.mobile : '', + patient_mobile: selectedPatient ? selectedPatient.mobile : (walkinMobile || ''), patient_address: selectedPatient ? selectedPatient.address : '', abha_id: selectedPatient?.abha_id || walkinAbhaId || null, abha_address: selectedPatient?.abha_address || walkinAbhaAddress || null, @@ -3355,6 +3361,13 @@ function PosCounter({ store, notify, initialEditInvoice, onClearEditInvoice, act )} )} + {!selectedPatient && (walkinMobile || walkinUhid) && ( +
+ Customer: {patientQuery || 'Walk-in'} + {walkinMobile && Mobile: {walkinMobile}} + {walkinUhid && UHID: {walkinUhid}} +
+ )} {/* Medicine Search & Barcode Scanner Line */}