/[papo]/papo/forms/clientReport.neb
ViewVC logotype

Diff of /papo/forms/clientReport.neb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by apronotti, Wed Nov 26 16:20:59 2003 UTC revision 1.7 by apronotti, Wed Nov 26 20:59:31 2003 UTC
# Line 47  Foundation, Inc., 59 Temple Place, Suite Line 47  Foundation, Inc., 59 Temple Place, Suite
47      clientReport = Report('ruff/clientReport.xml')      clientReport = Report('ruff/clientReport.xml')
48      clientReport.header(fecha=str(mx.DateTime.now().strftime('%Y-%m-%d')))      clientReport.header(fecha=str(mx.DateTime.now().strftime('%Y-%m-%d')))
49    
50      clientResultSet = clientDataSource.createRawResultSet('select e.name, e._table from _entity_data e, _alien_entity_data ae, _persona_data p, _client_data c where ae.entity = e._table and p.alien_entity = ae._table and c.persona = p._table and e._end_t is null and ae._end_t is null and p._end_t is null and p._end_t is null order by e.name')      clientResultSet = clientDataSource.createRawResultSet('select distinct euid.uid, e.name, e._table, tp.profile from _entity_data e, _alien_entity_data ae, _persona_data p, _client_data c, _entity_uid_data euid, _tax_profile_data tp, _persona_tax_profile_data ptp where ae.entity = e._table and p.alien_entity = ae._table and c.persona = p._table and euid.entity = e._table and ptp.persona = e._table and tp._table = ptp.tax_profile and euid.entity_uid_type = 1 and e._end_t is null and ae._end_t is null and p._end_t is null and p._end_t is null and euid._end_t is null and ptp._end_t is null and tp._end_t is null order by e.name')
51    
52      more = clientResultSet.firstRecord()      more = clientResultSet.firstRecord()
53      while more:      while more:
54          tmp_tax_profile = clientResultSet.current.getField('profile')
55          if tmp_tax_profile:
56            tmp_tax_profile = str(tmp_tax_profile)[0:25]
57          tmp_cuit = clientResultSet.current.getField('uid')
58          if tmp_cuit:
59            tmp_cuit = str(tmp_cuit)[0:13]
60          else:
61            tmp_cuit = ""
62        tmp_client = str(clientResultSet.current.getField('name'))[0:40]        tmp_client = str(clientResultSet.current.getField('name'))[0:40]
63        tmp_amont = str(client.debtCalc(str(clientResultSet.current.getField('_table')),genericDataSource))        tmp_amont = str(client.debtCalc(str(clientResultSet.current.getField('_table')),genericDataSource))
64        clientReport.add_dentry('client_item', **{'client':tmp_client, 'amount':tmp_amont})        clientReport.add_dentry('client_item', **{'client':tmp_client, 'amount':tmp_amont, 'cuit':tmp_cuit, 'tax_profile':tmp_tax_profile})
65        more = clientResultSet.nextRecord()        more = clientResultSet.nextRecord()
66            
67      callTrigger('endWaitingModeTrigger')      callTrigger('endWaitingModeTrigger')

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26