|
|
|
@ -51,7 +51,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
|
|
|
|
myInvoicesViewModel.downloadInvoicePDF(
|
|
|
|
myInvoicesViewModel.downloadInvoicePDF(
|
|
|
|
setupId: widget.getInvoicesListResponseModel.setupId!,
|
|
|
|
setupId: widget.getInvoicesListResponseModel.setupId!,
|
|
|
|
invoiceNo: widget.getInvoicesListResponseModel.invoiceNo!,
|
|
|
|
invoiceNo: widget.getInvoicesListResponseModel.invoiceNo!,
|
|
|
|
projectID: widget.getInvoicesListResponseModel.projectID!,
|
|
|
|
projectID: widget.getInvoicesListResponseModel.projectId!,
|
|
|
|
onError: (err) {
|
|
|
|
onError: (err) {
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
@ -150,7 +150,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Image.network(
|
|
|
|
Image.network(
|
|
|
|
widget.getInvoiceDetailsResponseModel.doctorImageURL!,
|
|
|
|
widget.getInvoiceDetailsResponseModel.doctorImageURL ?? 'https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png',
|
|
|
|
width: 63.h,
|
|
|
|
width: 63.h,
|
|
|
|
height: 63.h,
|
|
|
|
height: 63.h,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
@ -162,10 +162,10 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
|
|
|
|
height: 40.h,
|
|
|
|
height: 40.h,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
shape: BoxShape.circle, // Makes the container circular
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
border: Border.all(
|
|
|
|
border: Border.all(
|
|
|
|
color: AppColors.scaffoldBgColor, // Color of the border
|
|
|
|
color: AppColors.scaffoldBgColor,
|
|
|
|
width: 1.5.w, // Width of the border
|
|
|
|
width: 1.5.w,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
@ -173,7 +173,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, applyThemeColor: false),
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, applyThemeColor: false),
|
|
|
|
SizedBox(height: 2.h),
|
|
|
|
SizedBox(height: 2.h),
|
|
|
|
"${widget.getInvoicesListResponseModel.decimalDoctorRate}".toText11(isBold: true, color: AppColors.textColor),
|
|
|
|
"${widget.getInvoicesListResponseModel.decimalDoctorRate ?? '0.0'}".toText11(isBold: true, color: AppColors.textColor),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
).circle(100),
|
|
|
|
).circle(100),
|
|
|
|
@ -185,7 +185,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
(getIt<AppState>().isArabic() ? widget.getInvoiceDetailsResponseModel.doctorName ?? LocaleKeys.doctor.tr(context: context) : widget.getInvoiceDetailsResponseModel.doctorName!).toText16(isBold: true),
|
|
|
|
(widget.getInvoiceDetailsResponseModel.doctorName ?? LocaleKeys.doctor.tr(context: context)).toText16(isBold: true),
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
Wrap(
|
|
|
|
Wrap(
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
@ -193,20 +193,24 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
|
|
|
|
runSpacing: 6.h,
|
|
|
|
runSpacing: 6.h,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppCustomChipWidget(
|
|
|
|
AppCustomChipWidget(
|
|
|
|
labelText: "${LocaleKeys.invoiceNo.tr(context: context)}: ${widget.getInvoiceDetailsResponseModel.invoiceNo!}",
|
|
|
|
labelText: "${LocaleKeys.invoiceNo.tr(context: context)}: ${widget.getInvoiceDetailsResponseModel.invoiceNo ?? '-'}",
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
|
|
|
|
isEnglishOnly: true,
|
|
|
|
isEnglishOnly: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
AppCustomChipWidget(
|
|
|
|
AppCustomChipWidget(
|
|
|
|
labelText: ((getIt<AppState>().isArabic() ? widget.getInvoiceDetailsResponseModel.clinicDescriptionN : widget.getInvoiceDetailsResponseModel.clinicDescription ?? "")!.length > 15
|
|
|
|
labelText: () {
|
|
|
|
? '${(getIt<AppState>().isArabic() ? widget.getInvoiceDetailsResponseModel.clinicDescriptionN : widget.getInvoiceDetailsResponseModel.clinicDescription ?? "")!.substring(0, 12)}...'
|
|
|
|
final clinicName = getIt<AppState>().isArabic()
|
|
|
|
: getIt<AppState>().isArabic() ? widget.getInvoiceDetailsResponseModel.clinicDescriptionN : widget.getInvoiceDetailsResponseModel.clinicDescription ?? ""),
|
|
|
|
? (widget.getInvoiceDetailsResponseModel.clinicDescriptionN ?? widget.getInvoiceDetailsResponseModel.clinicDescription ?? LocaleKeys.clinic.tr(context: context))
|
|
|
|
|
|
|
|
: (widget.getInvoiceDetailsResponseModel.clinicDescription ?? widget.getInvoiceDetailsResponseModel.clinicDescriptionN ?? LocaleKeys.clinic.tr(context: context));
|
|
|
|
|
|
|
|
return clinicName.length > 15 ? '${clinicName.substring(0, 12)}...' : clinicName;
|
|
|
|
|
|
|
|
}(),
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w),
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
AppCustomChipWidget(
|
|
|
|
AppCustomChipWidget(
|
|
|
|
labelText: widget.getInvoiceDetailsResponseModel.projectName!,
|
|
|
|
labelText: widget.getInvoiceDetailsResponseModel.projectName ?? LocaleKeys.hospital.tr(context: context),
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
if (widget.getInvoiceDetailsResponseModel.appointmentDate != null)
|
|
|
|
Directionality(
|
|
|
|
Directionality(
|
|
|
|
textDirection: ui.TextDirection.ltr,
|
|
|
|
textDirection: ui.TextDirection.ltr,
|
|
|
|
child: AppCustomChipWidget(
|
|
|
|
child: AppCustomChipWidget(
|
|
|
|
@ -241,22 +245,25 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
LocaleKeys.insurance.tr(context: context).toText16(isBold: true),
|
|
|
|
LocaleKeys.insurance.tr(context: context).toText16(isBold: true),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
(getIt<AppState>().isArabic() ? widget.getInvoiceDetailsResponseModel.groupNameN : widget.getInvoiceDetailsResponseModel.groupName)!.toText14(isBold: true),
|
|
|
|
(getIt<AppState>().isArabic()
|
|
|
|
|
|
|
|
? (widget.getInvoiceDetailsResponseModel.groupNameN ?? widget.getInvoiceDetailsResponseModel.groupName ?? LocaleKeys.insurance.tr(context: context))
|
|
|
|
|
|
|
|
: (widget.getInvoiceDetailsResponseModel.groupName ?? widget.getInvoiceDetailsResponseModel.groupNameN ?? LocaleKeys.insurance.tr(context: context))
|
|
|
|
|
|
|
|
).toText14(isBold: true),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(child: (widget.getInvoiceDetailsResponseModel.companyName ?? "").toText14(isBold: true)),
|
|
|
|
Expanded(child: (widget.getInvoiceDetailsResponseModel.companyName ?? "").toText14(isBold: true)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
Row(
|
|
|
|
// Row(
|
|
|
|
children: [
|
|
|
|
// children: [
|
|
|
|
AppCustomChipWidget(
|
|
|
|
// AppCustomChipWidget(
|
|
|
|
labelText: "Insurance ID: ${widget.getInvoiceDetailsResponseModel.insuranceID ?? "-"}",
|
|
|
|
// labelText: "Insurance ID: ${widget.getInvoiceDetailsResponseModel.insuranceID ?? "-"}",
|
|
|
|
labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
|
|
|
|
// labelPadding: EdgeInsetsDirectional.only(start: 6.w, end: 6.w),
|
|
|
|
isEnglishOnly: true,
|
|
|
|
// isEnglishOnly: true,
|
|
|
|
),
|
|
|
|
// ),
|
|
|
|
],
|
|
|
|
// ],
|
|
|
|
),
|
|
|
|
// ),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -299,8 +306,8 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(flex: 3, child: (consultation.procedureName ?? '-').toText12(isBold: true)),
|
|
|
|
Expanded(flex: 3, child: (consultation.procedureName ?? '-').toText12(isBold: true)),
|
|
|
|
Expanded(flex: 1, child: '${consultation.quantity ?? '-'}'.toText12(isBold: true, isCenter: true, isEnglishOnly: true)),
|
|
|
|
Expanded(flex: 1, child: '${consultation.quantity ?? '-'}'.toText12(isBold: true, isCenter: true, isEnglishOnly: true)),
|
|
|
|
Expanded(flex: 2, child: (NumberFormat.decimalPattern().format(consultation.price) ?? '-').toText12(isBold: true, isCenter: true, isEnglishOnly: true)),
|
|
|
|
Expanded(flex: 2, child: (NumberFormat.decimalPattern().format(consultation.totalPatientShare) ?? '-').toText12(isBold: true, isCenter: true, isEnglishOnly: true)),
|
|
|
|
Expanded(flex: 2, child: (NumberFormat.decimalPattern().format(consultation.total) ?? '-').toText12(isBold: true, isCenter: true, isEnglishOnly: true)),
|
|
|
|
Expanded(flex: 2, child: (NumberFormat.decimalPattern().format(consultation.totalPatientShare) ?? '-').toText12(isBold: true, isCenter: true, isEnglishOnly: true)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -335,7 +342,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
|
|
|
|
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
|
|
|
|
Utils.getPaymentAmountWithSymbol(
|
|
|
|
Utils.getPaymentAmountWithSymbol(
|
|
|
|
NumberFormat.decimalPattern().format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalShare).toString().toText16(isBold: true, isEnglishOnly: true), AppColors.blackColor, 13,
|
|
|
|
NumberFormat.decimalPattern().format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.patientShare).toString().toText16(isBold: true, isEnglishOnly: true), AppColors.blackColor, 13,
|
|
|
|
isSaudiCurrency: true),
|
|
|
|
isSaudiCurrency: true),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
@ -345,7 +352,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
|
|
|
|
LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
|
|
|
|
LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
|
|
|
|
Utils.getPaymentAmountWithSymbol(
|
|
|
|
Utils.getPaymentAmountWithSymbol(
|
|
|
|
NumberFormat.decimalPattern()
|
|
|
|
NumberFormat.decimalPattern()
|
|
|
|
.format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalVATAmount!)
|
|
|
|
.format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.patientVATAmount!)
|
|
|
|
.toString()
|
|
|
|
.toString()
|
|
|
|
.toText14(isBold: true, color: AppColors.greyTextColor, isEnglishOnly: true),
|
|
|
|
.toText14(isBold: true, color: AppColors.greyTextColor, isEnglishOnly: true),
|
|
|
|
AppColors.greyTextColor,
|
|
|
|
AppColors.greyTextColor,
|
|
|
|
@ -354,25 +361,25 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
Row(
|
|
|
|
// Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
// children: [
|
|
|
|
LocaleKeys.discount.tr(context: context).toText14(isBold: true),
|
|
|
|
// LocaleKeys.discount.tr(context: context).toText14(isBold: true),
|
|
|
|
Utils.getPaymentAmountWithSymbol(
|
|
|
|
// Utils.getPaymentAmountWithSymbol(
|
|
|
|
NumberFormat.decimalPattern()
|
|
|
|
// NumberFormat.decimalPattern()
|
|
|
|
.format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.discountAmount!)
|
|
|
|
// .format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.discountAmount!)
|
|
|
|
.toString()
|
|
|
|
// .toString()
|
|
|
|
.toText14(isBold: true, color: AppColors.primaryRedColor, isEnglishOnly: true),
|
|
|
|
// .toText14(isBold: true, color: AppColors.primaryRedColor, isEnglishOnly: true),
|
|
|
|
AppColors.primaryRedColor, 13,
|
|
|
|
// AppColors.primaryRedColor, 13,
|
|
|
|
isSaudiCurrency: true),
|
|
|
|
// isSaudiCurrency: true),
|
|
|
|
],
|
|
|
|
// ],
|
|
|
|
).paddingSymmetrical(24.h, 0.h),
|
|
|
|
// ).paddingSymmetrical(24.h, 0.h),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
LocaleKeys.paid.tr(context: context).toText14(isBold: true),
|
|
|
|
LocaleKeys.paid.tr(context: context).toText14(isBold: true),
|
|
|
|
Utils.getPaymentAmountWithSymbol(
|
|
|
|
Utils.getPaymentAmountWithSymbol(
|
|
|
|
NumberFormat.decimalPattern().format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.grandTotal!).toString().toText14(isBold: true, color: AppColors.textColor, isEnglishOnly: true),
|
|
|
|
NumberFormat.decimalPattern().format(widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalPatientShare!).toString().toText14(isBold: true, color: AppColors.textColor, isEnglishOnly: true),
|
|
|
|
AppColors.textColor,
|
|
|
|
AppColors.textColor,
|
|
|
|
13,
|
|
|
|
13,
|
|
|
|
isSaudiCurrency: true),
|
|
|
|
isSaudiCurrency: true),
|
|
|
|
|