Modelar cuadre de caja #10 #12

Merged
mono merged 17 commits from modelar_cuadre_de_caja_#10 into main 2024-07-27 13:42:05 -05:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 09f734f5cb - Show all commits

View File

@ -52,7 +52,7 @@ class TestBilling(TestCase):
reconciliation_jar.add_payments(jar_summary.payments)
with self.assertRaises(ValidationError):
reconciliation_jar.clean()
reconciliation_jar.manual_clean()
def test_validate_reconciliation_jar_with_cash_float(self):
cash_payment1, cash_payment2 = self._create_two_cash_payments()
@ -69,6 +69,7 @@ class TestBilling(TestCase):
reconciliation_jar.add_payments(jar_summary.payments)
reconciliation_jar.clean()
reconciliation_jar.save()
reconciliation_jar.manual_clean()
self.assertTrue(reconciliation_jar.is_valid)
def _create_two_cash_payments(self):

View File

@ -1,7 +1,7 @@
from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
#from django.template import loader
from django.template import loader
from django.core.exceptions import ValidationError
from .models import Sale, Product, ProductCategory, Payment
@ -95,9 +95,11 @@ def reconciliate_jar(request):
{'summary': summary, 'form': form}
)
def reconciliations(request):
return HttpResponse('<h1>Reconciliaciones</h1>')
def _categories_from_csv_string(categories_string, separator="&"):
categories = categories_string.split(separator)
clean_categories = [c.strip() for c in categories]