added zwg support
This commit is contained in:
@@ -82,8 +82,8 @@ class ReceiptController extends ChangeNotifier {
|
||||
Map<String, dynamic> provider = await http.get(
|
||||
'/public/providers/client/$providerId',
|
||||
);
|
||||
transactionController.model.selectedProvider = hc.BillProvider.fromJson(
|
||||
provider,
|
||||
transactionController.updateSelectedProvider(
|
||||
hc.BillProvider.fromJson(provider),
|
||||
);
|
||||
|
||||
// update tran controller formdata with credit account, email, name, phone & providerLabel
|
||||
@@ -96,19 +96,20 @@ class ReceiptController extends ChangeNotifier {
|
||||
);
|
||||
|
||||
// fetch product and update tran controller formdata
|
||||
String providerUid =
|
||||
transactionController.model.selectedProvider?.uid ?? '';
|
||||
String productUid = transaction.productUid ?? '';
|
||||
String providerUid = transactionController.model.selectedProvider?.id ?? '';
|
||||
String productName = transaction.billProductName ?? '';
|
||||
|
||||
if (productUid.isNotEmpty) {
|
||||
if (productName.isNotEmpty) {
|
||||
Map<String, dynamic> product = await http.get(
|
||||
'/public/providers/$providerUid/products/$productUid',
|
||||
'/public/providers/$providerUid/products/$productName',
|
||||
);
|
||||
transactionController.model.selectedProduct = pc.BillProduct.fromJson(
|
||||
product,
|
||||
transactionController.updateSelectedProduct(
|
||||
pc.BillProduct.fromJson(product),
|
||||
);
|
||||
}
|
||||
|
||||
transactionController.updateCurrency(transaction.debitCurrency);
|
||||
|
||||
// update credit amount, notification phone number, payment processor
|
||||
transactionController.model.formData = transactionController.model.formData
|
||||
.copyWith(
|
||||
|
||||
Reference in New Issue
Block a user