paymentRequestID added in the request

merge-update-with-lab-changes
haroon amjad 2 years ago
parent ee5fb615db
commit 41cd55e02b

@ -42,8 +42,9 @@ class ResponseInpatientAdvanceInfo {
num requestedAmount;
String setupId;
int status;
int paymentRequestID;
ResponseInpatientAdvanceInfo({this.admissionNo, this.admissionReqNo, this.createdOn, this.patientId, this.projectId, this.requestedAmount, this.setupId, this.status});
ResponseInpatientAdvanceInfo({this.admissionNo, this.admissionReqNo, this.createdOn, this.patientId, this.projectId, this.requestedAmount, this.setupId, this.status, this.paymentRequestID});
ResponseInpatientAdvanceInfo.fromJson(Map<String, dynamic> json) {
admissionNo = json['admissionNo'];
@ -54,6 +55,7 @@ class ResponseInpatientAdvanceInfo {
requestedAmount = json['requestedAmount'];
setupId = json['setupId'];
status = json['status'];
paymentRequestID = json['PaymentRequestId'];
}
Map<String, dynamic> toJson() {
@ -66,6 +68,7 @@ class ResponseInpatientAdvanceInfo {
data['requestedAmount'] = this.requestedAmount;
data['setupId'] = this.setupId;
data['status'] = this.status;
data['PaymentRequestId'] = this.paymentRequestID;
return data;
}
}

@ -146,82 +146,84 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
),
mHeight(12),
// Expanded(child: Container()),
widget.isHasData ? Container(
decoration: cardRadius(12.0),
margin: EdgeInsets.zero,
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
TranslationBase.of(context).patientShareTotalToDo,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
letterSpacing: -0.64,
widget.isHasData
? Container(
decoration: cardRadius(12.0),
margin: EdgeInsets.zero,
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
TranslationBase.of(context).patientShareTotalToDo,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
letterSpacing: -0.64,
),
),
Text(
TranslationBase.of(context).sar + " ${widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo[0].requestedAmount}",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
letterSpacing: -0.64,
),
),
],
),
),
Text(
TranslationBase.of(context).sar + " ${widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo[0].requestedAmount}",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
letterSpacing: -0.64,
SizedBox(height: 12),
Text(
TranslationBase.of(context).YouCanPayByTheFollowingOptions,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
),
),
),
],
),
SizedBox(height: 12),
Text(
TranslationBase.of(context).YouCanPayByTheFollowingOptions,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
),
),
SizedBox(height: 12),
SizedBox(
width: MediaQuery.of(context).size.width * 0.75,
child: getPaymentMethods(),
),
SizedBox(height: 12),
DefaultButton(
TranslationBase.of(context).payNow.toUpperCase(),
() {
getInPatientPaymentLink(false);
},
// : null,
color: CustomColors.green,
disabledColor: CustomColors.grey2,
),
SizedBox(height: 12),
Text(
TranslationBase.of(context).copyLinkTxt,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
SizedBox(height: 12),
SizedBox(
width: MediaQuery.of(context).size.width * 0.75,
child: getPaymentMethods(),
),
SizedBox(height: 12),
DefaultButton(
TranslationBase.of(context).payNow.toUpperCase(),
() {
getInPatientPaymentLink(false);
},
// : null,
color: CustomColors.green,
disabledColor: CustomColors.grey2,
),
SizedBox(height: 12),
Text(
TranslationBase.of(context).copyLinkTxt,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
),
),
SizedBox(height: 12),
DefaultButton(
TranslationBase.of(context).copyLink.toUpperCase(),
() {
getInPatientPaymentLink(true);
},
svgIcon: "assets/images/new/copy.svg",
color: CustomColors.accentColor,
disabledColor: CustomColors.grey2,
),
],
),
),
SizedBox(height: 12),
DefaultButton(
TranslationBase.of(context).copyLink.toUpperCase(),
() {
getInPatientPaymentLink(true);
},
svgIcon: "assets/images/new/copy.svg",
color: CustomColors.accentColor,
disabledColor: CustomColors.grey2,
),
],
),
) : Container(),
)
: Container(),
],
),
);
@ -260,6 +262,7 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo[0].requestedAmount,
projectViewModel.user.patientIdentificationNo,
clinicID,
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo[0].paymentRequestID,
context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);

@ -107,7 +107,7 @@ class ClinicListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getInPatientPaymentLink(int projectID, int admissionNo, int orderID, String name, String email, num amount, String nationalID, int clinicID, context) async {
Future<Map> getInPatientPaymentLink(int projectID, int admissionNo, int orderID, String name, String email, num amount, String nationalID, int clinicID, int paymentRequestID, context) async {
Map<String, dynamic> request;
// request = {"ProjectID": projectID, "AdmissionReqNo": admissionReqNo, "AdmissionNo": admissionNo};
@ -125,6 +125,7 @@ class ClinicListService extends BaseService {
"SourceType": "1",
"NationalID": nationalID,
"ClinicID": clinicID,
"PaymentRequestId": paymentRequestID,
"createdBy": 102
};

Loading…
Cancel
Save