1 # Copyright (C) 2010 Richard Lincoln
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, USA
17 from CIM14
.Element
import Element
19 class Cheque(Element
):
20 """The actual tender when it is a type of cheque.
23 def __init__(self
, kind
="other", micrNumber
='', date
='', chequeNumber
='', Tender
=None, bankAccountDetail
=None, *args
, **kw_args
):
24 """Initialises a new 'Cheque' instance.
26 @param kind: Kind of cheque. Values are: "other", "postalOrder", "bankOrder"
27 @param micrNumber: The magnetic ink character recognition number printed on the cheque.
28 @param date: Date when cheque becomes valid.
29 @param chequeNumber: Cheque reference number as printed on the cheque.
30 @param Tender: Payment tender the cheque is being used for.
31 @param bankAccountDetail: Details of the account holder and bank.
33 #: Kind of cheque. Values are: "other", "postalOrder", "bankOrder"
36 #: The magnetic ink character recognition number printed on the cheque.
37 self
.micrNumber
= micrNumber
39 #: Date when cheque becomes valid.
42 #: Cheque reference number as printed on the cheque.
43 self
.chequeNumber
= chequeNumber
48 self
.bankAccountDetail
= bankAccountDetail
50 super(Cheque
, self
).__init
__(*args
, **kw_args
)
52 _attrs
= ["kind", "micrNumber", "date", "chequeNumber"]
53 _attr_types
= {"kind": str, "micrNumber": str, "date": str, "chequeNumber": str}
54 _defaults
= {"kind": "other", "micrNumber": '', "date": '', "chequeNumber": ''}
55 _enums
= {"kind": "ChequeKind"}
56 _refs
= ["Tender", "bankAccountDetail"]
60 """Payment tender the cheque is being used for.
64 def setTender(self
, value
):
65 if self
._Tender
is not None:
66 self
._Tender
._Cheque
= None
69 if self
._Tender
is not None:
70 self
._Tender
.Cheque
= None
71 self
._Tender
._Cheque
= self
73 Tender
= property(getTender
, setTender
)
75 # Details of the account holder and bank.
76 bankAccountDetail
= None