From 34ccb132dc04a0dd6d402fbccefedf8ab3034d0a Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Tue, 17 Aug 2021 11:41:01 +0300 Subject: [PATCH] fixed issues --- lib/config/localized_values.dart | 1 + .../service/ancillary_orders_service.dart | 158 ------------------ .../ancillary_order_proc_model.dart | 38 ++--- .../ancillaryOrdersDetails.dart | 62 ++++++- .../ancillary-orders/ordersPayment.dart | 20 +++ lib/uitl/translations_delegate_base.dart | 1 + 6 files changed, 96 insertions(+), 184 deletions(-) create mode 100644 lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index e45af168..e23a27bf 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1178,6 +1178,7 @@ const Map localizedValues = { }, "offerAndPackages": {"en": "Offers And Packages", "ar": "العروض والباقات"}, "InvoiceNo": {"en": "Invoice No", "ar": "رقم الفاتورة"}, + "InvoiceDate": {"en": "Invoice Date", "ar": "تاريخ الفاتورة"}, "SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"}, "GeneralResult": {"en": "General Result", "ar": "نتيجة عامة"}, "show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"}, diff --git a/lib/core/service/ancillary_orders_service.dart b/lib/core/service/ancillary_orders_service.dart index da7fc753..8d9d3b31 100644 --- a/lib/core/service/ancillary_orders_service.dart +++ b/lib/core/service/ancillary_orders_service.dart @@ -38,165 +38,7 @@ class AncillaryOrdersService extends BaseService { hasError = false; await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS, onSuccess: (dynamic response, int statusCode) { -// _ancillaryProcLists.clear(); _ancillaryProcLists = []; -// response['AncillaryOrderProcList'] = [ -// { -// "AncillaryOrderProcList": [ -// { -// "ApprovalLineItemNo": 0, -// "ApprovalNo": 0, -// "ApprovalStatus": "", -// "ApprovalStatusID": 0, -// "CompanyShare": 501.3, -// "CompanyShareWithTax": 576.5, -// "CompanyTaxAmount": 75.19, -// "DiscountAmount": 55.7, -// "DiscountCategory": 1, -// "DiscountType": "P", -// "DiscountTypeValue": 10, -// "IsApprovalCreated": false, -// "IsApprovalRequired": false, -// "IsCovered": false, -// "OrderDate": "/Date(1601758800000+0300)/", -// "OrderLineItemNo": 1, -// "OrderNo": 2020000001, -// "PartnerID": 0, -// "PartnerShare": 0, -// "PartnerShareType": "P", -// "PatientShare": 0, -// "PatientShareWithTax": 0, -// "PatientTaxAmount": 0, -// "ProcPrice": 557, -// "ProcedureCategoryID": 2, -// "ProcedureCategoryName": "LABORATORY", -// "ProcedureID": "02013001", -// "ProcedureName": "11-DESOXYCORTISOL (COMPOUND S) - S.O", -// "TaxAmount": 75.19, -// "TaxPct": 15 -// }, -// { -// "ApprovalLineItemNo": 0, -// "ApprovalNo": 0, -// "ApprovalStatus": "", -// "ApprovalStatusID": 0, -// "CompanyShare": 90, -// "CompanyShareWithTax": 103.5, -// "CompanyTaxAmount": 13.5, -// "DiscountAmount": 10, -// "DiscountCategory": 1, -// "DiscountType": "P", -// "DiscountTypeValue": 10, -// "IsApprovalCreated": false, -// "IsApprovalRequired": true, -// "IsCovered": false, -// "OrderDate": "/Date(1601758800000+0300)/", -// "OrderLineItemNo": 4, -// "OrderNo": 2020000001, -// "PartnerID": 0, -// "PartnerShare": 0, -// "PartnerShareType": "P", -// "PatientShare": 0, -// "PatientShareWithTax": 0, -// "PatientTaxAmount": 0, -// "ProcPrice": 100, -// "ProcedureCategoryID": 2, -// "ProcedureCategoryName": "LABORATORY", -// "ProcedureID": "02014011", -// "ProcedureName": "CBC (COMPLETE BLOOD COUNT PROFILE)", -// "TaxAmount": 13.5, -// "TaxPct": 15 -// }, -// { -// "ApprovalLineItemNo": 0, -// "ApprovalNo": 0, -// "ApprovalStatus": "", -// "ApprovalStatusID": 0, -// "CompanyShare": 347.76, -// "CompanyShareWithTax": 399.92, -// "CompanyTaxAmount": 52.16, -// "DiscountAmount": 38.64, -// "DiscountCategory": 1, -// "DiscountType": "P", -// "DiscountTypeValue": 10, -// "IsApprovalCreated": false, -// "IsApprovalRequired": false, -// "IsCovered": false, -// "OrderDate": "/Date(1601758800000+0300)/", -// "OrderLineItemNo": 3, -// "OrderNo": 2020000001, -// "PartnerID": 0, -// "PartnerShare": 0, -// "PartnerShareType": "P", -// "PatientShare": 0, -// "PatientShareWithTax": 0, -// "PatientTaxAmount": 0, -// "ProcPrice": 386.4, -// "ProcedureCategoryID": 2, -// "ProcedureCategoryName": "LABORATORY", -// "ProcedureID": "02019302", -// "ProcedureName": "21-HYDROXYLASE ABS - S.O", -// "TaxAmount": 52.16, -// "TaxPct": 15 -// }, -// { -// "ApprovalLineItemNo": 0, -// "ApprovalNo": 0, -// "ApprovalStatus": "", -// "ApprovalStatusID": 0, -// "CompanyShare": 1323, -// "CompanyShareWithTax": 1521.45, -// "CompanyTaxAmount": 198.45, -// "DiscountAmount": 147, -// "DiscountCategory": 1, -// "DiscountType": "P", -// "DiscountTypeValue": 10, -// "IsApprovalCreated": false, -// "IsApprovalRequired": true, -// "IsCovered": false, -// "OrderDate": "/Date(1601758800000+0300)/", -// "OrderLineItemNo": 5, -// "OrderNo": 2020000001, -// "PartnerID": 0, -// "PartnerShare": 0, -// "PartnerShareType": "P", -// "PatientShare": 0, -// "PatientShareWithTax": 0, -// "PatientTaxAmount": 0, -// "ProcPrice": 1470, -// "ProcedureCategoryID": 3, -// "ProcedureCategoryName": "RADIOLOGY", -// "ProcedureID": "03033065", -// "ProcedureName": "CT SCAN - ABDOMEN (WITH CONTRAST)", -// "TaxAmount": 198.45, -// "TaxPct": 15 -// } -// ], -// "AppointmentDate": "/Date(1601499600000+0300)/", -// "AppointmentNo": 2016053756, -// "ClinicID": 1, -// "ClinicName": "INTERNAL MEDICINE CLINIC", -// "CompanyID": 0, -// "CompanyName": "Blood Donation Investigation", -// "DoctorID": 1485, -// "DoctorName": "ANAS ABDULLAH", -// "ErrCode": null, -// "GroupID": 2, -// "InsurancePolicyNo": "45976500", -// "Message": "Success", -// "PatientCardID": "232332323", -// "PatientID": 3072055, -// "PatientName": "MAYA KHALED SADDIQ", -// "PatientType": 1, -// "PolicyID": 2, -// "PolicyName": "Test", -// "ProjectID": 15, -// "SetupID": "010266", -// "StatusCode": 1, -// "SubCategoryID": 2, -// "SubPolicyNo": "234234" -// } -// ]; response['AncillaryOrderProcList'].forEach((item) { ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item)); diff --git a/lib/models/anicllary-orders/ancillary_order_proc_model.dart b/lib/models/anicllary-orders/ancillary_order_proc_model.dart index 1b557f21..5524f58a 100644 --- a/lib/models/anicllary-orders/ancillary_order_proc_model.dart +++ b/lib/models/anicllary-orders/ancillary_order_proc_model.dart @@ -117,36 +117,36 @@ class AncillaryOrdersListProcListModel { } class AncillaryOrderProcDetailsList { - int approvalLineItemNo; - int approvalNo; + dynamic approvalLineItemNo; + dynamic approvalNo; String approvalStatus; - int approvalStatusID; - int companyShare; - int companyShareWithTax; - int companyTaxAmount; - int discountAmount; - int discountCategory; + dynamic approvalStatusID; + dynamic companyShare; + dynamic companyShareWithTax; + dynamic companyTaxAmount; + dynamic discountAmount; + dynamic discountCategory; String discountType; - int discountTypeValue; + dynamic discountTypeValue; bool isApprovalCreated; bool isApprovalRequired; bool isCovered; String orderDate; - int orderLineItemNo; - int orderNo; - int partnerID; - int partnerShare; + dynamic orderLineItemNo; + dynamic orderNo; + dynamic partnerID; + dynamic partnerShare; String partnerShareType; - int patientShare; - double patientShareWithTax; - double patientTaxAmount; - int procPrice; - int procedureCategoryID; + dynamic patientShare; + dynamic patientShareWithTax; + dynamic patientTaxAmount; + dynamic procPrice; + dynamic procedureCategoryID; String procedureCategoryName; String procedureID; String procedureName; dynamic taxAmount; - int taxPct; + dynamic taxPct; AncillaryOrderProcDetailsList( {this.approvalLineItemNo, diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index 535ecb38..6f3ef552 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -8,6 +8,8 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart'; class AnicllaryOrdersDetails extends StatefulWidget { final dynamic appoNo; @@ -66,7 +68,12 @@ class _AnicllaryOrdersState extends State children: [ Button( label: TranslationBase.of(context).payNow, - onTap: () {}, + backgroundColor: Colors.red[800], + onTap: () { + Navigator.push(context, + FadePage(page: OrdersPayment(), + ),); + }, ) ], ) @@ -128,7 +135,8 @@ class _AnicllaryOrdersState extends State children: [ Texts( TranslationBase.of(context).invoiceNo, - fontWeight: FontWeight.bold, +// fontWeight: FontWeight.bold, + color: Colors.red[500], ), Texts(" : "), Texts( @@ -139,8 +147,9 @@ class _AnicllaryOrdersState extends State Row( children: [ Texts( - TranslationBase.of(context).date, - fontWeight: FontWeight.bold, + TranslationBase.of(context).invoiceDate, +// fontWeight: FontWeight.bold, + color: Colors.red[500], ), Texts(" : "), Texts( @@ -154,8 +163,9 @@ class _AnicllaryOrdersState extends State Row( children: [ Texts( - TranslationBase.of(context).date, - fontWeight: FontWeight.bold, + TranslationBase.of(context).doctorName, +// fontWeight: FontWeight.bold, + color: Colors.red[500], ), Texts(" : "), Texts( @@ -208,7 +218,43 @@ class _AnicllaryOrdersState extends State Divider( color: Colors.red[800], thickness: 3, - ) + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Row( + children: [ + + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + + children: [ + Texts( + TranslationBase.of(context).price, + color: Colors.grey[500], + fontSize: 14, + ), + SizedBox(width: 15), + Texts( + TranslationBase.of(context).vat, + color: Colors.grey[500], + fontSize: 14, + ), + SizedBox(width: 15), + Texts( + TranslationBase.of(context).total, + color: Colors.grey[500], + fontSize: 14, + ), + ] ), + ], + ), + Divider( + color: Colors.black26, + ), + ], )); } @@ -279,4 +325,6 @@ class _AnicllaryOrdersState extends State }).toList(), ); } + + } diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart new file mode 100644 index 00000000..fee4ff40 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart @@ -0,0 +1,20 @@ +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; + +class OrdersPayment extends StatefulWidget { + @override + _OrdersPaymentState createState() => _OrdersPaymentState(); +} + +class _OrdersPaymentState extends State { + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 795e9228..0655ce25 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1061,6 +1061,7 @@ class TranslationBase { localizedValues['offerAndPackages'][locale.languageCode]; String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode]; + String get invoiceDate => localizedValues['InvoiceNo'][locale.languageCode]; String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; String get generalResult =>