Reuploading fixed qoutation

This commit is contained in:
Arseni
2026-01-20 19:05:41 +03:00
parent ae6c617136
commit d14e6d0f7a
35 changed files with 951 additions and 286 deletions

View File

@@ -2,7 +2,7 @@ import 'package:flutter/foundation.dart';
import 'package:pshared/models/payment/payment.dart';
import 'package:pshared/provider/organizations.dart';
import 'package:pshared/provider/payment/quotation.dart';
import 'package:pshared/provider/payment/quotation/quotation.dart';
import 'package:pshared/provider/resource.dart';
import 'package:pshared/service/payment/service.dart';
@@ -31,7 +31,7 @@ class PaymentProvider extends ChangeNotifier {
Future<Payment?> pay({String? idempotencyKey, Map<String, String>? metadata}) async {
if (!_organization.isOrganizationSet) throw StateError('Organization is not set');
if (!_quotation.isReady) throw StateError('Quotation is not ready');
if (!_quotation.hasLiveQuote) throw StateError('Quotation is not ready');
final quoteRef = _quotation.quotation?.quoteRef;
if (quoteRef == null || quoteRef.isEmpty) {
throw StateError('Quotation reference is not set');