def _SortItemizedDataListById_(self, a, b):
if a.Transaction_Number < b.Transaction_Number:
return -1
return int(a.Transaction_Number > b.Transaction_Number)
Isn't easyer to fo it using cmp build-in function??
def _SortItemizedDataListById_(self, a, b):
if a.Transaction_Number < b.Transaction_Number:
return -1
return int(a.Transaction_Number > b.Transaction_Number)
select distinct tc.COMPANY_ID, tc.NAME from
TAB_TACC_RECHNUNGEN tr,
tab_tacc_company tc
where tr.COMPANY_ID = tc.COMPANY_ID and
UPPER(tc.NAME) like UPPER('%scc%')
group by tc.COMPANY_ID, tc.NAME
order by tc.NAME
tab_tacc_technungen is needed because we need only companies with invoices - but why join and not exist? if isinstance(tour_id, list):
tour_id_str = str(tour_id).strip("[]")
tmpCompanyListStr = ""
for tmpCompany in cid:
tmpCompanyListStr += "%s, " %(tmpCompany)
tmpCompanyListStr = tmpCompanyListStr.rstrip(', ')
It is hard to say if author had knowlage about str.join but he was using str.rstrip.