diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 706bec87..626b7c7f 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1751,4 +1751,5 @@ const Map localizedValues = { "covidTestTodo": {"en": "Covid-19 Test", "ar": "فحص كورونا"}, "ancillaryOrdersPaymentConfirm": {"en": "Are you sure you want to make payment for selected orders?", "ar": "هل أنت متأكد أنك تريد سداد قيمة الطلبات المختارة؟"}, "successRegister": {"en": "Your account has been created.", "ar": "لقد تم إنشاء حسابك."}, + "ancillaryOrderPaymentSuccess": {"en": "Your payment has been successfully made. Your invoice no. is: ", "ar": "تم الدفع الخاص بك بنجاح. فاتورتك لا. يكون: "}, }; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index f2bc4091..4798b533 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -369,8 +370,10 @@ class _AnicllaryOrdersState extends State with SingleTic }), Utils.tableColumnValue('${value[i].procedureName}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), Utils.tableColumnValue('${value[i].patientShare.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), - Utils.tableColumnValue('${value[i].patientTaxAmount.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), - Utils.tableColumnValue('${value[i].patientShareWithTax.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${value[i].patientTaxAmount.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', + isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${value[i].patientShareWithTax.toString() + " " + TranslationBase.of(context).sar.toUpperCase()}', + isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), ]), ); } @@ -500,8 +503,8 @@ class _AnicllaryOrdersState extends State with SingleTic DoctorsListService service = new DoctorsListService(); service.autoGenerateAncillaryOrdersInvoice(widget.orderNo, widget.projectID, widget.appoNo, selectedProcListAPI, AppGlobal.context).then((res) { - print(res); GifLoaderDialogUtils.hideDialog(AppGlobal.context); + showAlertDialog(res['AncillaryOrderInvoiceList'][0]['InvoiceNo']); }).catchError((err) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); AppToast.showErrorToast(message: err); @@ -509,6 +512,17 @@ class _AnicllaryOrdersState extends State with SingleTic }); } + showAlertDialog(dynamic invoiceNo) { + AlertDialogBox( + context: context, + confirmMessage: TranslationBase.of(context).ancillaryOrderPaymentSuccess + invoiceNo.toString(), + okText: TranslationBase.of(context).ok, + okFunction: () { + AlertDialogBox.closeAlertDialog(context); + Navigator.of(context).pop(); + }).showAlertDialog(context); + } + bool checkIfProcedureSelected(AncillaryOrderProcDetailsList ancillaryOrderProcDetailsList) { if (selectedProcList.length > 0) { if (selectedProcList.contains(ancillaryOrderProcDetailsList)) { diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index a367df0d..3d84a86c 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2827,6 +2827,8 @@ class TranslationBase { String get ancillaryOrdersPaymentConfirm => localizedValues["ancillaryOrdersPaymentConfirm"][locale.languageCode]; String get covidTestTodo => localizedValues["covidTestTodo"][locale.languageCode]; String get successRegister => localizedValues["successRegister"][locale.languageCode]; + String get ancillaryOrderPaymentSuccess => localizedValues["ancillaryOrderPaymentSuccess"][locale.languageCode]; + } class TranslationBaseDelegate extends LocalizationsDelegate {