Renamed the is_credit_card_paid() utility to is_payable(), and implemented it in the accounting application.

This commit is contained in:
2020-08-07 00:58:33 +08:00
parent 75cc6b2d00
commit eac77c725a
6 changed files with 47 additions and 23 deletions

View File

@ -21,6 +21,7 @@
from dirtyfields import DirtyFieldsMixin
from django.conf import settings
from django.db import models
from django.db.models import Sum, Case, When, F, Q
from django.urls import reverse
from mia_core.utils import get_multi_lingual_attr, set_multi_lingual_attr
@ -322,8 +323,9 @@ class Record(DirtyFieldsMixin, models.Model):
self.balance = None
self._is_balanced = None
self._has_order_hole = None
self._is_credit_card_paid = None
self._is_payable = None
self._is_existing_equipment = None
self.is_payable = False
def __str__(self):
"""Returns the string representation of this accounting
@ -382,17 +384,6 @@ class Record(DirtyFieldsMixin, models.Model):
def has_order_hole(self, value):
self._has_order_hole = value
@property
def is_credit_card_paid(self):
# TODO: To be done
if self._is_credit_card_paid is None:
self._is_credit_card_paid = True
return self._is_credit_card_paid
@is_credit_card_paid.setter
def is_credit_card_paid(self, value):
self._is_credit_card_paid = value
@property
def is_existing_equipment(self):
# TODO: To be done