Class s.d.p.p.Payment(Domain):

Part of stoqlib.domain.payment.payment View In Hierarchy

The payment representation in Stoq.

Importante attributes:

Method _check_status Undocumented
Method _create Undocumented
Class Method delete Undocumented
Method bank Get a BankAccount instance
Method get_status_str Undocumented
Method get_days_late Undocumented
Method set_pending Set a STATUS_PREVIEW payment as STATUS_PENDING. This also means
Method set_not_paid Set a STATUS_PAID payment as STATUS_PENDING. This requires clearing
Method pay Pay the current payment set its status as STATUS_PAID
Method cancel Undocumented
Method get_payable_value Returns the calculated payment value with the daily penalty.
Method get_penalty Calculate the penalty in an absolute value
Method get_interest Calculate the interest in an absolute value
Method is_paid Check if the payment is paid.
Method is_pending Check if the payment is pending.
Method is_preview Check if the payment is in preview state
Method is_cancelled Check if the payment was cancelled.
Method get_paid_date_string Get a paid date string
Method get_open_date_string Get a open date string

Inherited from Domain:

Method __init__ Undocumented
Method user Undocumented
Class Method iselect Like select, but search on the adapter implementing the interface iface
Class Method iselectBy Like selectBy, but search on the adapter implementing the interface iface
Class Method iselectOne Like selectOne, but search on the adapter implementing the interface iface
Class Method iselectOneBy Like selectOneBy, but search on the adapter implementing the interface iface
Class Method iget Like get, but gets on the adapter implementing the interface iface

Inherited from AbstractModel (via Domain, BaseDomain):

Method __ne__ Undocumented
Method __eq__ Undocumented
Method _SO_setValue Undocumented
Method clone Get a persistent copy of an existent object. Remember that we can
Method get_connection Undocumented

Inherited from AdaptableORMObject (via Domain):

Class Method registerFacet Registers a facet for class cls.

Inherited from Adaptable (via Domain, AdaptableORMObject):

Class Method getFacetType Fetches a facet type associated with an interface, or raise
Class Method getFacetTypes Returns facet classes for this object
Method addFacet Adds a facet implementing iface for the current object
Method removeFacet Removes a facet from the current object
Method getFacets Gets a list of facets assoicated with the current object.
def _check_status(self, status, operation_name):
Undocumented
def _create(self, id, **kw):
Undocumented
@classmethod
def delete(cls, obj_id, connection):
Undocumented
@property
def bank(self):
Get a BankAccount instance
Returnsa BankAccount instance, if the payment method does not provide a bank account.
def get_status_str(self):
Undocumented
def get_days_late(self):
Undocumented
def set_pending(self):
Set a STATUS_PREVIEW payment as STATUS_PENDING. This also means that this is valid payment and its owner actually can charge it
def set_not_paid(self, change_entry):
Set a STATUS_PAID payment as STATUS_PENDING. This requires clearing paid_date and paid_value
Parameterschange_entryan PaymentChangeHistory object, that will hold the changes information
def pay(self, paid_date=None, paid_value=None):
Pay the current payment set its status as STATUS_PAID
def cancel(self):
Undocumented
def get_payable_value(self):
Returns the calculated payment value with the daily penalty. Note that the payment group daily_penalty must be between 0 and 100.
def get_penalty(self, date=None):
Calculate the penalty in an absolute value
Parametersdatedate of payment
Returnspenalty (type: currency )
def get_interest(self, date=None):
Calculate the interest in an absolute value
Parametersdatedate of payment
Returnsinterest (type: currency )
def is_paid(self):
Check if the payment is paid.
ReturnsTrue if the payment is paid, otherwise False
def is_pending(self):
Check if the payment is pending.
ReturnsTrue if the payment is pending, otherwise False
def is_preview(self):
Check if the payment is in preview state
ReturnsTrue if the payment is paid, otherwise False
def is_cancelled(self):
Check if the payment was cancelled.
ReturnsTrue if the payment was cancelled, otherwise False.
def get_paid_date_string(self):
Get a paid date string
Returnsthe paid date string or PAID DATE if the payment isn't paid
def get_open_date_string(self):
Get a open date string
Returnsthe open date string or empty string
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.