Beispiel #1
0
    def save(self):
        """
        Calcul du remaining en stock après une operation."""
        self.owner = Owner.get(Owner.islog == True)
        print("SAVE BEGIN")
        previous_remaining = int(
            self.last_refund().remaining if self.last_refund() else 0)
        if self.type_ == self.RB:
            self.remaining = previous_remaining - int(self.amount)
        if self.type_ == self.DT:
            self.remaining = previous_remaining + int(self.amount)

        super(Refund, self).save()

        if self.next_rpt():
            self.next_rpt().save()
Beispiel #2
0
    def save(self):
        """
        Calcul du remaining en stock après une operation."""
        self.owner = Owner.get(Owner.islog == True)
        print("SAVE BEGIN")
        previous_remaining = int(
            self.last_refund().remaining if self.last_refund() else 0)
        if self.type_ == self.RB:
            self.remaining = previous_remaining - int(self.amount)
        if self.type_ == self.DT:
            self.remaining = previous_remaining + int(self.amount)

        super(Refund, self).save()

        if self.next_rpt():
            self.next_rpt().save()
Beispiel #3
0
    def save(self):
        """
        Calcul du balance en stock après une operation."""
        self.owner = Owner.get(Owner.islog == True)
        print("SAVE BEGIN")
        previous_balance = int(self.last_balance_payment().balance if self.
                               last_balance_payment() else 0)
        if self.type_ == self.CREDIT:
            self.balance = previous_balance + int(self.credit)
            self.debit = 0
        if self.type_ == self.DEBIT:
            self.balance = previous_balance - int(self.debit)
            self.credit = 0

        super(Payment, self).save()

        if self.next_rpt():
            self.next_rpt().save()
Beispiel #4
0
    def save(self):
        """
        Calcul du balance en stock après une operation."""
        self.owner = Owner.get(Owner.islog == True)
        print("SAVE BEGIN")
        previous_balance = int(
            self.last_balance_payment().balance if self.last_balance_payment() else 0)
        if self.type_ == self.CREDIT:
            self.balance = previous_balance + int(self.credit)
            self.debit = 0
        if self.type_ == self.DEBIT:
            self.balance = previous_balance - int(self.debit)
            self.credit = 0

        super(Payment, self).save()

        if self.next_rpt():
            self.next_rpt().save()
Beispiel #5
0
 def save(self):
     self.owner = Owner.get(Owner.islog == True)
     super(Buy, self).save()
Beispiel #6
0
 def save(self):
     self.owner = Owner.get(Owner.islog == True)
     super(Invoice, self).save()
Beispiel #7
0
 def save(self):
     self.owner = Owner.get(Owner.islog == True)
     super(Buy, self).save()
Beispiel #8
0
 def save(self):
     self.owner = Owner.get(Owner.islog == True)
     super(Invoice, self).save()