Browse Source

Actually trigger the import of payments once the admin confirms

Alexandre Aubin 6 years ago
parent
commit
ff3dffe3e0
1 changed files with 3 additions and 3 deletions
  1. 3 3
      coin/billing/admin.py

+ 3 - 3
coin/billing/admin.py

@@ -18,7 +18,7 @@ import autocomplete_light
 from functools import update_wrapper
 
 from .forms import WizardImportPaymentCSV
-from .import_payments_from_csv import process
+from .import_payments_from_csv import process, add_new_payments
 
 class InvoiceDetailInlineForm(forms.ModelForm):
     class Meta:
@@ -280,8 +280,8 @@ class PaymentAdmin(admin.ModelAdmin):
                         'new_payments': new_payments
                         })
                 else:
-                    import pdb; pdb.set_trace()
-                    # To be implemented
+                    add_new_payments(new_payments)
+                    return HttpResponseRedirect('../')
         else:
             form = WizardImportPaymentCSV()