Changeset 40:5d592e2950a1 in stamper for stamper
- Timestamp:
- Aug 12, 2014, 11:33:10 PM (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stamper/stamper.py
r39 r40 237 237 return details, totals, total_customer 238 238 239 def timeline(self, stamp_filter=None):239 def timeline(self, customer=None, stamp_filter=None): 240 240 filter_from, filter_to = self.validate_filter(stamp_filter) 241 241 for stamp in self.stamps: 242 customer = stamp['customer']243 242 start = datetime.strptime(stamp['start'], DATETIME_FORMAT) 244 243 start_day = start.strftime('%Y-%m-%d') … … 251 250 # similar for the end date 252 251 continue 252 253 253 if not stamp['customer']: 254 print(stamp['start'] + ' start') 254 if customer is None: 255 print(stamp['start'] + ' start') 255 256 else: 257 if customer and customer != stamp['customer']: 258 continue 259 if customer: 260 print(stamp['start'] + ' start') 256 261 print(' '.join([stamp['end'], 257 262 stamp['customer'],
Note:
See TracChangeset
for help on using the changeset viewer.