added zwg support

This commit is contained in:
Prince
2026-06-17 14:42:46 +02:00
parent cc4b02f3c9
commit 64eaa38079
12 changed files with 324 additions and 247 deletions

View File

@@ -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(