Revision 0db1637f
Added by Benjamin Dauvergne almost 13 years ago
| calebasse/facturation/models.py | ||
|---|---|---|
|
'''Compute the next batch number for the given health center'''
|
||
|
global PREVIOUS_MAX_BATCH_NUMBERS
|
||
|
agg = self \
|
||
|
.filter(invoicing__service=invoicing.service) \
|
||
|
.filter(invoicing__seq_id__lt=invoicing.seq_id) \
|
||
|
.filter(
|
||
|
Q(patient_healthcenter=health_center,
|
||
Also available in: Unified diff
facturation: only consider invoicing for the same service when computing a batch number