Set default refund amount
This commit is contained in:
parent
e6532e3192
commit
80353ea11d
|
|
@ -373,18 +373,20 @@ abstract class PaymentEntity extends Object
|
|||
|
||||
if (!isDeleted) {
|
||||
if (userCompany.canEditEntity(this)) {
|
||||
if (includeEdit) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
if (!multiselect) {
|
||||
if (includeEdit) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
||||
if (applied < amount) {
|
||||
actions.add(EntityAction.apply);
|
||||
}
|
||||
if (applied < amount) {
|
||||
actions.add(EntityAction.apply);
|
||||
}
|
||||
|
||||
if (completedAmount > 0) {
|
||||
actions.add(EntityAction.refund);
|
||||
if (completedAmount > 0) {
|
||||
actions.add(EntityAction.refund);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (client != null && client.hasEmailAddress) {
|
||||
actions.add(EntityAction.emailPayment);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -342,8 +342,10 @@ void handlePaymentAction(
|
|||
viewEntity(context: context, entity: payment);
|
||||
WidgetsBinding.instance.addPostFrameCallback((duration) {
|
||||
if (payment.invoicePaymentables.length == 1) {
|
||||
payment = payment.rebuild((b) =>
|
||||
b..invoices.add(PaymentableEntity(invoiceId: payment.invoiceId)));
|
||||
payment = payment.rebuild((b) => b
|
||||
..invoices.add(PaymentableEntity(
|
||||
invoiceId: payment.invoiceId,
|
||||
amount: payment.completedAmount)));
|
||||
}
|
||||
store.dispatch(ViewRefundPayment(
|
||||
navigator: navigator,
|
||||
|
|
|
|||
Loading…
Reference in New Issue