|
|
|
|
@ -13,7 +13,12 @@ abstract class HabibWalletRepo {
|
|
|
|
|
Future<Either<Failure, GenericApiModel<List<HospitalsModel>>>> getProjectList();
|
|
|
|
|
|
|
|
|
|
Future<Either<Failure, GenericApiModel<dynamic>>> HISCreateAdvancePayment(
|
|
|
|
|
{required String paymentMethodName, required num paidAmount, required String paymentReference, required String patientID, required int projectID, required String depositorName});
|
|
|
|
|
{required String paymentMethodName,
|
|
|
|
|
required num paidAmount,
|
|
|
|
|
required String paymentReference,
|
|
|
|
|
required String patientID,
|
|
|
|
|
required int projectID,
|
|
|
|
|
required String depositorName});
|
|
|
|
|
|
|
|
|
|
Future<Either<Failure, GenericApiModel<dynamic>>> addAdvanceNumberRequest({required String advanceNumber, required String paymentReference});
|
|
|
|
|
|
|
|
|
|
@ -52,7 +57,10 @@ class HabibWalletRepoImp implements HabibWalletRepo {
|
|
|
|
|
// throw Exception("lab list is empty");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
final List<PatientAdvanceBalanceResponseModel> balanceAmountList = list.map((item) => PatientAdvanceBalanceResponseModel.fromJson(item as Map<String, dynamic>)).toList().cast<PatientAdvanceBalanceResponseModel>();
|
|
|
|
|
final List<PatientAdvanceBalanceResponseModel> balanceAmountList = list
|
|
|
|
|
.map((item) => PatientAdvanceBalanceResponseModel.fromJson(item as Map<String, dynamic>))
|
|
|
|
|
.toList()
|
|
|
|
|
.cast<PatientAdvanceBalanceResponseModel>();
|
|
|
|
|
|
|
|
|
|
for (var element in balanceAmountList) {
|
|
|
|
|
element.totalAmount = response['TotalAdvanceBalanceAmount'];
|
|
|
|
|
@ -117,7 +125,12 @@ class HabibWalletRepoImp implements HabibWalletRepo {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Future<Either<Failure, GenericApiModel>> HISCreateAdvancePayment(
|
|
|
|
|
{required String paymentMethodName, required num paidAmount, required String paymentReference, required String patientID, required int projectID, required String depositorName}) async {
|
|
|
|
|
{required String paymentMethodName,
|
|
|
|
|
required num paidAmount,
|
|
|
|
|
required String paymentReference,
|
|
|
|
|
required String patientID,
|
|
|
|
|
required int projectID,
|
|
|
|
|
required String depositorName}) async {
|
|
|
|
|
Map<String, dynamic> request = {
|
|
|
|
|
"CustName": depositorName,
|
|
|
|
|
"CustID": patientID,
|
|
|
|
|
@ -319,7 +332,7 @@ class HabibWalletRepoImp implements HabibWalletRepo {
|
|
|
|
|
GenericApiModel<dynamic>? apiResponse;
|
|
|
|
|
Failure? failure;
|
|
|
|
|
await apiClient.post(
|
|
|
|
|
CHECK_IF_PATIENT_ADMITTED,
|
|
|
|
|
ApiConsts.checkIfPatientAdmitted,
|
|
|
|
|
body: requestBody,
|
|
|
|
|
onFailure: (error, statusCode, {messageStatus, failureType}) {
|
|
|
|
|
failure = failureType;
|
|
|
|
|
|