Correct refund dialog

This commit is contained in:
Hillel Coren 2020-12-01 21:01:44 +02:00
parent 89f37c15fc
commit e6532e3192
1 changed files with 2 additions and 1 deletions

View File

@ -338,6 +338,7 @@ void handlePaymentAction(
});
break;
case EntityAction.refund:
final navigator = Navigator.of(context);
viewEntity(context: context, entity: payment);
WidgetsBinding.instance.addPostFrameCallback((duration) {
if (payment.invoicePaymentables.length == 1) {
@ -345,7 +346,7 @@ void handlePaymentAction(
b..invoices.add(PaymentableEntity(invoiceId: payment.invoiceId)));
}
store.dispatch(ViewRefundPayment(
navigator: Navigator.of(context),
navigator: navigator,
payment: payment.rebuild((b) =>
b..sendEmail = company.settings.clientManualPaymentNotification),
));