Ejemplo n.º 1
0
    def test_add_debit_entry(self):
        till = Till(store=self.store, station=self.create_station())
        till.open_till()

        self.assertEqual(till.get_balance(), 0)
        till.add_debit_entry(10)
        self.assertEqual(till.get_balance(), -10)
Ejemplo n.º 2
0
    def test_add_debit_entry(self):
        till = Till(store=self.store, station=self.create_station())
        till.open_till()

        self.assertEqual(till.get_balance(), 0)
        till.add_debit_entry(10)
        self.assertEqual(till.get_balance(), -10)
Ejemplo n.º 3
0
    def test_add_entry_out_payment(self):
        till = Till(store=self.store, station=self.create_station())
        till.open_till()

        payment = self._create_outpayment()
        self.assertEqual(till.get_balance(), 0)
        till.add_entry(payment)
        self.assertEqual(till.get_balance(), -10)
Ejemplo n.º 4
0
    def test_add_entry_out_payment(self):
        till = Till(store=self.store, station=self.create_station())
        till.open_till()

        payment = self._create_outpayment()
        self.assertEqual(till.get_balance(), 0)
        till.add_entry(payment)
        self.assertEqual(till.get_balance(), -10)
Ejemplo n.º 5
0
    def testAddEntryInPayment(self):
        till = Till(store=self.store, station=self.create_station())
        till.open_till()

        payment = self._create_inpayment()
        self.assertEqual(till.get_balance(), 0)
        till.add_entry(payment)
        self.assertEqual(till.get_balance(), 10)
Ejemplo n.º 6
0
    def testAddEntryInPayment(self):
        till = Till(store=self.store,
                    station=self.create_station())
        till.open_till()

        payment = self._create_inpayment()
        self.assertEqual(till.get_balance(), 0)
        till.add_entry(payment)
        self.assertEqual(till.get_balance(), 10)
Ejemplo n.º 7
0
    def test_get_balance(self):
        till = Till(store=self.store, station=self.create_station())
        till.open_till()

        old = till.get_balance()
        till.add_credit_entry(currency(10), u"")
        self.assertEqual(till.get_balance(), old + 10)
        till.add_debit_entry(currency(5), u"")
        self.assertEqual(till.get_balance(), old + 5)
Ejemplo n.º 8
0
    def test_get_balance(self):
        till = Till(store=self.store, station=self.create_station())
        till.open_till()

        old = till.get_balance()
        till.add_credit_entry(currency(10), u"")
        self.assertEqual(till.get_balance(), old + 10)
        till.add_debit_entry(currency(5), u"")
        self.assertEqual(till.get_balance(), old + 5)
Ejemplo n.º 9
0
    def test_add_credit_entry(self):
        till = Till(store=self.store,
                    branch=self.current_branch,
                    station=self.create_station())
        till.open_till(self.current_user)

        self.assertEqual(till.get_balance(), 0)
        till.add_credit_entry(10)
        self.assertEqual(till.get_balance(), 10)
Ejemplo n.º 10
0
    def test_add_entry_in_payment(self):
        till = Till(store=self.store,
                    branch=self.current_branch,
                    station=self.create_station())
        till.open_till(self.current_user)

        payment = self._create_inpayment()
        self.assertEqual(till.get_balance(), 0)
        till.add_entry(payment)
        self.assertEqual(till.get_balance(), 10)