Updated messages in refund module

faiz_dev
FaizHashmi 1 week ago
parent 37e47a098b
commit bd96e26845

@ -1970,8 +1970,10 @@
"refundCannotBeProcessedPatientAdmitted": "لا يمكن معالجة الاسترداد أثناء إقامة المريض", "refundCannotBeProcessedPatientAdmitted": "لا يمكن معالجة الاسترداد أثناء إقامة المريض",
"cashRefundLimitExceeded": "لا يمكن معالجة المبالغ المستردة التي تزيد عن 5000 ريال سعودي نقداً. يرجى اختيار وجهة استرداد أخرى.", "cashRefundLimitExceeded": "لا يمكن معالجة المبالغ المستردة التي تزيد عن 5000 ريال سعودي نقداً. يرجى اختيار وجهة استرداد أخرى.",
"cashRefundInstructions": "قم بزيارة صراف مستشفى الحبيب الطبي أو الحبيب للرعاية الأولية لاستلام النقد. عند نافذة الصراف، سوف تتلقى رمز التحقق على رقم هاتفك المسجل بمجرد قيام الصراف بإنشاء معاملة الاسترداد. قدم الرمز للصراف للتحقق منه. سيتم صرف النقد فقط بعد التحقق الناجح.", "cashRefundInstructions": "قم بزيارة صراف مستشفى الحبيب الطبي أو الحبيب للرعاية الأولية لاستلام النقد. عند نافذة الصراف، سوف تتلقى رمز التحقق على رقم هاتفك المسجل بمجرد قيام الصراف بإنشاء معاملة الاسترداد. قدم الرمز للصراف للتحقق منه. سيتم صرف النقد فقط بعد التحقق الناجح.",
"cashRefundApprovalInstructions": "قم بزيارة صراف مستشفى الحبيب الطبي أو الحبيب للرعاية الأولية لاستلام النقد. عند نافذة الصراف، سوف تتلقى رمز التحقق على رقم هاتفك المسجل بمجرد قيام الصراف بإنشاء معاملة الاسترداد. قدم الرمز للصراف للتحقق منه. سيتم صرف النقد فقط بعد التحقق الناجح.", "cashRefundApprovalInstructions": "قم بزيارة صراف {hospital} لاستلام النقد. عند نافذة الصراف، سوف تتلقى رمز التحقق على رقم هاتفك المسجل بمجرد قيام الصراف بإنشاء معاملة الاسترداد. قدم الرمز للصراف للتحقق منه. سيتم صرف النقد فقط بعد التحقق الناجح.",
"packageRefundValidationMessage": "طلب استرداد الباقة الخاص بك يتطلب التحقق بسبب استخدام الباقة والفواتير الفرعية ذات الصلة. سنقوم بمراجعة ومعالجة الطلب ضمن اتفاقية مستوى الخدمة المعتمدة بعد تأكيد الأهلية.", "bankTransferRefundProcessingInstructions": "سيتم تنفيذ التحويل البنكي خلال 5 أيام عمل، وذلك بعد التحقق من الأهلية.",
"packageRefundValidationMessage": "طلب استرداد الباقة الخاص بك يتطلب التحقق بسبب استخدام الباقة والفواتير الفرعية ذات الصلة. سنقوم بمراجعة ومعالجة الطلب خلال 5 أيام عمل بعد تأكيد الأهلية.",
"inpatientRefundValidationMessage": "طلب استرداد فاتورة التنويم الخاصة بك يتطلب التحقق بسبب إجراءات التنويم المتعلقة بالإجراءات أو الأدوية. سنقوم بمراجعة ومعالجة الطلب خلال 5 أيام عمل بعد تأكيد الأهلية.",
"pharmacyRefundPhysicalVisitNotice": "تتطلب استردادات الصيدلية زيارة شخصية لتسليم الأدوية ومعالجة الاسترداد.", "pharmacyRefundPhysicalVisitNotice": "تتطلب استردادات الصيدلية زيارة شخصية لتسليم الأدوية ومعالجة الاسترداد.",
"parkingQR": "رمز الاستجابة السريعة لوقوف السيارات", "parkingQR": "رمز الاستجابة السريعة لوقوف السيارات",
"parkingQRDesc": "امسح رمز الاستجابة السريعة (QR Code) أدناه عند بوابة الخروج من موقف السيارات:", "parkingQRDesc": "امسح رمز الاستجابة السريعة (QR Code) أدناه عند بوابة الخروج من موقف السيارات:",

@ -1960,8 +1960,10 @@
"refundCannotBeProcessedPatientAdmitted": "Refund cannot be processed while the patient is admitted", "refundCannotBeProcessedPatientAdmitted": "Refund cannot be processed while the patient is admitted",
"cashRefundLimitExceeded": "Refunds over 5000 SAR cannot be processed as cash. Please select another refund destination.", "cashRefundLimitExceeded": "Refunds over 5000 SAR cannot be processed as cash. Please select another refund destination.",
"cashRefundInstructions": "Visit HMG Hospital or HMG Primary Care cashier to receive cash. At the cashier counter, you will receive an OTP on your registered mobile number once the cashier has created the refund transaction. Provide the OTP to the cashier for validation. Cash will be released only after successful validation.", "cashRefundInstructions": "Visit HMG Hospital or HMG Primary Care cashier to receive cash. At the cashier counter, you will receive an OTP on your registered mobile number once the cashier has created the refund transaction. Provide the OTP to the cashier for validation. Cash will be released only after successful validation.",
"cashRefundApprovalInstructions": "Visit HMG Hospital or HMG Primary Care cashier to receive cash. At the cashier counter, you will receive an OTP on your registered mobile number once the cashier has created the refund transaction. Provide the OTP to the cashier for validation. Cash will be released only after successful validation.", "cashRefundApprovalInstructions": "Visit {hospital} cashier to receive cash. At the cashier counter, you will receive an OTP on your registered mobile number once the cashier has created the refund transaction. Provide the OTP to the cashier for validation. Cash will be released only after successful validation.",
"packageRefundValidationMessage": "Your package refund request required validation because of package use and related child invoices. We will review the process the request within the approved SLA after confirming eligibility.", "bankTransferRefundProcessingInstructions": "The bank transfer will be processed within 5 working days, subject to eligibility.",
"packageRefundValidationMessage": "Your package refund request requires validation because of package use and related child invoices. We will review and process the request within 5 working days after confirming eligibility.",
"inpatientRefundValidationMessage": "Your Inpatient invoice refund request requires validation because of inpatient validations related procedure / medications. We will review and process the request within 5 working days after confirming eligibility.",
"pharmacyRefundPhysicalVisitNotice": "Pharmacy refunds require a physical visit to hand over medications and process the refund.", "pharmacyRefundPhysicalVisitNotice": "Pharmacy refunds require a physical visit to hand over medications and process the refund.",
"parkingQR": "Parking QR Code", "parkingQR": "Parking QR Code",
"parkingQRDesc": "Scan the below QR Code at the exit parking gate:", "parkingQRDesc": "Scan the below QR Code at the exit parking gate:",

@ -1,5 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'dart:developer';
import 'dart:io'; import 'dart:io';
import 'package:clarity_flutter/clarity_flutter.dart'; import 'package:clarity_flutter/clarity_flutter.dart';
@ -137,8 +138,7 @@ class ApiClientImp implements ApiClient {
} else {} } else {}
if (body.containsKey('isDentalAllowedBackend')) { if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] = body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend') ? body['isDentalAllowedBackend'] ?? IS_DENTAL_ALLOWED_BACKEND : IS_DENTAL_ALLOWED_BACKEND;
body.containsKey('isDentalAllowedBackend') ? body['isDentalAllowedBackend'] ?? IS_DENTAL_ALLOWED_BACKEND : IS_DENTAL_ALLOWED_BACKEND;
} }
if (!body.containsKey('IsPublicRequest')) { if (!body.containsKey('IsPublicRequest')) {
@ -209,11 +209,11 @@ class ApiClientImp implements ApiClient {
body['TokenID'] = "@dm!n"; body['TokenID'] = "@dm!n";
} }
// body['TokenID'] = "@dm!n"; body['TokenID'] = "@dm!n";
// body['PatientID'] = 6424682; // body['PatientID'] = 6424682;
// body['PatientID'] = 4772785; // body['PatientID'] = 4772785;
// body['PatientID'] = 4776766; // body['PatientID'] = 4776766;
// body['PatientID'] = 4776462; body['PatientID'] = 4776462;
// body['PatientID'] = 4776463; // body['PatientID'] = 4776463;
// body['PatientID'] = 4776359; // body['PatientID'] = 4776359;
// body['PatientID'] = 4776466; // body['PatientID'] = 4776466;
@ -266,7 +266,7 @@ class ApiClientImp implements ApiClient {
body: requestBody, body: requestBody,
headers: headers, headers: headers,
); );
// log("response: ${response.body.toString()}"); log("response: ${response.body.toString()}");
} on SocketException catch (e) { } on SocketException catch (e) {
final message = e.message.contains('Connection reset by peer') ? LocaleKeys.networkConnectionReset.tr() : LocaleKeys.networkErrorMessage.tr(); final message = e.message.contains('Connection reset by peer') ? LocaleKeys.networkConnectionReset.tr() : LocaleKeys.networkErrorMessage.tr();
onFailure(message, -1, failureType: ConnectivityFailure(message)); onFailure(message, -1, failureType: ConnectivityFailure(message));
@ -390,24 +390,19 @@ class ApiClientImp implements ApiClient {
onFailure( onFailure(
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode, statusCode,
failureType: failureType: UnAuthenticatedUserFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'] ?? "User is not Authenticated", url: url),
UnAuthenticatedUserFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'] ?? "User is not Authenticated", url: url),
); );
// logApiEndpointError(endPoint, "session logged out", statusCode); // logApiEndpointError(endPoint, "session logged out", statusCode);
} }
if (isAllowAny) { if (isAllowAny) {
onSuccess(parsed, statusCode, onSuccess(parsed, statusCode, messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
} else if (parsed['IsAuthenticated'] == null) { } else if (parsed['IsAuthenticated'] == null) {
if (parsed['isSMSSent'] == true) { if (parsed['isSMSSent'] == true) {
onSuccess(parsed, statusCode, onSuccess(parsed, statusCode, messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
} else if (parsed['MessageStatus'] == 1) { } else if (parsed['MessageStatus'] == 1) {
onSuccess(parsed, statusCode, onSuccess(parsed, statusCode, messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
} else if (parsed['Result'] == 'OK') { } else if (parsed['Result'] == 'OK') {
onSuccess(parsed, statusCode, onSuccess(parsed, statusCode, messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
} else { } else {
onFailure( onFailure(
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
@ -417,8 +412,7 @@ class ApiClientImp implements ApiClient {
logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
} }
} else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode, onSuccess(parsed, statusCode, messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
} }
// else if (parsed['IsAuthenticated'] == false) { // else if (parsed['IsAuthenticated'] == false) {
// onFailure( // onFailure(
@ -430,8 +424,7 @@ class ApiClientImp implements ApiClient {
// } // }
else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode, onSuccess(parsed, statusCode, messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
} else { } else {
if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null && parsed['ErrorMessage'] == null) { if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null && parsed['ErrorMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) { if (parsed['ErrorSearchMsg'] == null) {
@ -465,8 +458,7 @@ class ApiClientImp implements ApiClient {
} }
} else { } else {
if (parsed['SameClinicApptList'] != null) { if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode, onSuccess(parsed, statusCode, messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
messageStatus: parsed['MessageStatus'], errorMessage: parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']);
} else { } else {
if (parsed['message'] != null) { if (parsed['message'] != null) {
onFailure( onFailure(

@ -3,7 +3,7 @@ import 'package:flutter_amazonpaymentservices/environment_type.dart';
import 'package:hmg_patient_app_new/core/enums.dart'; import 'package:hmg_patient_app_new/core/enums.dart';
class ApiConsts { class ApiConsts {
static const maxSmallScreen = 660; static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat; static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
@ -873,8 +873,7 @@ var GET_CUSTOMER_INFO = "VerifyCustomer";
//Pharmacy //Pharmacy
var GET_PHARMACY_CATEGORISE = var GET_PHARMACY_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0';
'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0';
var GET_OFFERS_CATEGORISE = 'discountcategories'; var GET_OFFERS_CATEGORISE = 'discountcategories';
var GET_OFFERS_PRODUCTS = 'offerproducts/'; var GET_OFFERS_PRODUCTS = 'offerproducts/';
var GET_CATEGORISE_PARENT = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; var GET_CATEGORISE_PARENT = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=';

@ -1952,7 +1952,9 @@ abstract class LocaleKeys {
static const cashRefundLimitExceeded = 'cashRefundLimitExceeded'; static const cashRefundLimitExceeded = 'cashRefundLimitExceeded';
static const cashRefundInstructions = 'cashRefundInstructions'; static const cashRefundInstructions = 'cashRefundInstructions';
static const cashRefundApprovalInstructions = 'cashRefundApprovalInstructions'; static const cashRefundApprovalInstructions = 'cashRefundApprovalInstructions';
static const bankTransferRefundProcessingInstructions = 'bankTransferRefundProcessingInstructions';
static const packageRefundValidationMessage = 'packageRefundValidationMessage'; static const packageRefundValidationMessage = 'packageRefundValidationMessage';
static const inpatientRefundValidationMessage = 'inpatientRefundValidationMessage';
static const pharmacyRefundPhysicalVisitNotice = 'pharmacyRefundPhysicalVisitNotice'; static const pharmacyRefundPhysicalVisitNotice = 'pharmacyRefundPhysicalVisitNotice';
static const parkingQR = 'parkingQR'; static const parkingQR = 'parkingQR';
static const parkingQRDesc = 'parkingQRDesc'; static const parkingQRDesc = 'parkingQRDesc';

@ -231,8 +231,7 @@ class _RefundRequestCreatePageState extends State<RefundRequestCreatePage> {
), ),
), ),
), ),
if (_canSelectIndividualProcedures) if (_canSelectIndividualProcedures) Divider(color: AppColors.bottomNAVBorder, height: 1, thickness: 1).paddingSymmetrical(16.w, 0.w),
Divider(color: AppColors.bottomNAVBorder, height: 1, thickness: 1).paddingSymmetrical(16.w, 0.w),
...List.generate( ...List.generate(
vm.procedures.length, vm.procedures.length,
(index) => _buildProcedureCard(vm.procedures[index], index, vm.procedures.length), (index) => _buildProcedureCard(vm.procedures[index], index, vm.procedures.length),
@ -255,11 +254,35 @@ class _RefundRequestCreatePageState extends State<RefundRequestCreatePage> {
RefundTabType.invoices, RefundTabType.invoices,
RefundTabType.cash, RefundTabType.cash,
]; ];
final hospitalName = (widget.invoice.projectName ?? '').trim();
final isPackageInvoice = widget.invoice.isPackageInvoice == true;
final isInpatientInvoice = widget.invoice.isOutPatient == false;
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.selectRefundMethod.tr(context: context).toText20(isBold: true), LocaleKeys.selectRefundMethod.tr(context: context).toText20(isBold: true),
if (isPackageInvoice || isInpatientInvoice) ...[
SizedBox(height: 12.h),
Container(
padding: EdgeInsets.all(12.h),
decoration: BoxDecoration(
color: AppColors.warningColorYellow.withValues(alpha: 0.08),
borderRadius: BorderRadius.circular(12.r),
border: Border.all(color: AppColors.warningColorYellow.withValues(alpha: 0.35), width: 1),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.info_outline, color: AppColors.warningColorYellow, size: 18.h),
SizedBox(width: 10.w),
Expanded(
child: (isPackageInvoice ? LocaleKeys.packageRefundValidationMessage : LocaleKeys.inpatientRefundValidationMessage).tr(context: context).toText12(color: AppColors.textColor),
),
],
),
),
],
SizedBox(height: 24.h), SizedBox(height: 24.h),
Container( Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
@ -275,7 +298,9 @@ class _RefundRequestCreatePageState extends State<RefundRequestCreatePage> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
final type = paymentOptions[index]; final type = paymentOptions[index];
final isCashOption = type == RefundTabType.cash; final isCashOption = type == RefundTabType.cash;
final isBankTransferOption = type == RefundTabType.invoices;
final isCashSelected = vm.selectedPaymentMethod == RefundTabType.cash; final isCashSelected = vm.selectedPaymentMethod == RefundTabType.cash;
final isBankTransferSelected = vm.selectedPaymentMethod == RefundTabType.invoices;
return Column( return Column(
children: [ children: [
@ -302,7 +327,12 @@ class _RefundRequestCreatePageState extends State<RefundRequestCreatePage> {
), ),
SizedBox(width: 12.w), SizedBox(width: 12.w),
Expanded( Expanded(
child: LocaleKeys.cashRefundApprovalInstructions.tr(context: context).toText12( child: LocaleKeys.cashRefundApprovalInstructions.tr(
context: context,
namedArgs: {
'hospital': hospitalName.isNotEmpty ? hospitalName : 'HMG Hospital',
},
).toText12(
color: AppColors.greyInfoTextColor, color: AppColors.greyInfoTextColor,
), ),
), ),
@ -310,8 +340,29 @@ class _RefundRequestCreatePageState extends State<RefundRequestCreatePage> {
), ),
), ),
], ],
if (index != paymentOptions.length - 1) if (isBankTransferOption && isBankTransferSelected) ...[
Divider(color: AppColors.bottomNAVBorder, height: 1, thickness: 1).paddingSymmetrical(16.w, 0.w), Padding(
padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 16.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.buildSvgWithAssets(
icon: AppAssets.alertSquare,
height: 24.h,
width: 24.h,
iconColor: AppColors.textColor,
),
SizedBox(width: 12.w),
Expanded(
child: LocaleKeys.bankTransferRefundProcessingInstructions.tr(context: context).toText12(
color: AppColors.greyInfoTextColor,
),
),
],
),
),
],
if (index != paymentOptions.length - 1) Divider(color: AppColors.bottomNAVBorder, height: 1, thickness: 1).paddingSymmetrical(16.w, 0.w),
], ],
); );
}, },
@ -659,8 +710,7 @@ class _RefundRequestCreatePageState extends State<RefundRequestCreatePage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
LocaleKeys.refundReason.tr(context: context).toText12(color: AppColors.greyTextColor, isBold: true), LocaleKeys.refundReason.tr(context: context).toText12(color: AppColors.greyTextColor, isBold: true),
(procedure.refundReason ?? LocaleKeys.selectRefundReason.tr(context: context)) (procedure.refundReason ?? LocaleKeys.selectRefundReason.tr(context: context)).toText14(color: AppColors.textColor, isBold: true),
.toText14(color: AppColors.textColor, isBold: true),
], ],
), ),
), ),
@ -741,8 +791,7 @@ class _RefundRequestCreatePageState extends State<RefundRequestCreatePage> {
}, },
isDisabled: isStep2 isDisabled: isStep2
? (refundRequestViewModel.selectedPaymentMethod == null || ? (refundRequestViewModel.selectedPaymentMethod == null ||
(refundRequestViewModel.selectedPaymentMethod == RefundTabType.invoices && (refundRequestViewModel.selectedPaymentMethod == RefundTabType.invoices && (_ibanController.text.trim().isEmpty || _descriptionController.text.trim().isEmpty)) ||
(_ibanController.text.trim().isEmpty || _descriptionController.text.trim().isEmpty)) ||
(refundRequestViewModel.selectedPaymentMethod == RefundTabType.cash && refundRequestViewModel.isCashRefundAmountExceeded)) (refundRequestViewModel.selectedPaymentMethod == RefundTabType.cash && refundRequestViewModel.isCashRefundAmountExceeded))
: (refundRequestViewModel.selectedProcedures.isEmpty || : (refundRequestViewModel.selectedProcedures.isEmpty ||
// For Outpatient/ER: require refund reasons // For Outpatient/ER: require refund reasons
@ -855,6 +904,8 @@ class _RefundRequestCreatePageState extends State<RefundRequestCreatePage> {
// refundDestination: '1' = HMG Wallet, '2' = Bank Transfer, '3' = Cash // refundDestination: '1' = HMG Wallet, '2' = Bank Transfer, '3' = Cash
final isCashRefund = refundDestination == '3'; final isCashRefund = refundDestination == '3';
final isPackageInvoice = widget.invoice.isPackageInvoice == true; final isPackageInvoice = widget.invoice.isPackageInvoice == true;
final isInpatientInvoice = widget.invoice.isOutPatient == false;
final hospitalName = (widget.invoice.projectName ?? '').trim();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
@ -874,17 +925,26 @@ class _RefundRequestCreatePageState extends State<RefundRequestCreatePage> {
SizedBox(width: 6.w), SizedBox(width: 6.w),
refNo.toText18(isBold: true, color: AppColors.textColor, isEnglishOnly: true), refNo.toText18(isBold: true, color: AppColors.textColor, isEnglishOnly: true),
], ],
).paddingSymmetrical(24.w, 0), ),
], ],
if (isCashRefund || isPackageInvoice) ...[ if (isCashRefund || isPackageInvoice || isInpatientInvoice) ...[
if (isCashRefund) ...[ if (isCashRefund) ...[
SizedBox(height: 16.h), SizedBox(height: 16.h),
LocaleKeys.cashRefundApprovalInstructions.tr(context: context).toText14(color: AppColors.textColor), LocaleKeys.cashRefundApprovalInstructions.tr(
context: context,
namedArgs: {
'hospital': hospitalName.isNotEmpty ? hospitalName : 'HMG Hospital',
},
).toText14(color: AppColors.textColor),
], ],
if (isPackageInvoice) ...[ if (isPackageInvoice) ...[
SizedBox(height: 16.h), SizedBox(height: 16.h),
LocaleKeys.packageRefundValidationMessage.tr(context: context).toText14(color: AppColors.textColor), LocaleKeys.packageRefundValidationMessage.tr(context: context).toText14(color: AppColors.textColor),
], ],
if (!isPackageInvoice && isInpatientInvoice) ...[
SizedBox(height: 16.h),
LocaleKeys.inpatientRefundValidationMessage.tr(context: context).toText14(color: AppColors.textColor),
],
], ],
SizedBox(height: 24.h), SizedBox(height: 24.h),
Row( Row(

Loading…
Cancel
Save