Ancillary Orders completed

merge-requests/587/head
haroon amjad 4 years ago
parent ea8d700d22
commit f8b3847d0a

@ -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": "تم الدفع الخاص بك بنجاح. فاتورتك لا. يكون: "},
};

@ -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<AnicllaryOrdersDetails> 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<AnicllaryOrdersDetails> 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<AnicllaryOrdersDetails> 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)) {

@ -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<TranslationBase> {

Loading…
Cancel
Save