def __init__(self,owner=None):
     PropertiesObject.__init__(self,[ 'id', 'name', 'accountholder', 'accountnumber', 'allowincasso', 'owner' ])
     if owner:
         self.owner = owner
         self.id = owner.GetID()
         self.name = owner.GetName()
         sc = StructuredComment(owner.GetNotes())
         self.accountholder = sc.get_string('AccountHolder')
         self.accountnumber = sc.get_int('AccountNumber')
         self.allowincasso = sc.get_bool('AllowIncasso')
 def _fill_from_lots(self,items,lots):
     for lot in lots:
         invoice = lot.GetInvoiceFromLot()
         if invoice:
             sc = StructuredComment(invoice.GetNotes())
             owner = invoice.GetOwner()
             items.append(Transaction({
                 'description': self._get_txn_desc(invoice.GetPostedTxn()),
                 'amount': self.conv(lot.get_balance()),
                 'invoiceid': invoice.GetID(),
                 'owner': owner and Contact(owner),
                 'accountholder': sc.get_string('AccountHolder'),
                 'accountnumber': sc.get_int('AccountNumber'),
                 'allowincasso': sc.get_bool('AllowIncasso'),
             }))
         else:
             items.append(Transaction({
                 'amount': self.conv(lot.get_balance()),
                 'invoiceid': lot.get_title(),
             }))
     return items