|
|
@ -87,7 +87,7 @@ class BookingEvent(models.Model): |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@api.onchange('questionnaire_id') |
|
|
|
def onchange_questionnaire(self): |
|
|
|
|
|
|
@ -130,7 +130,7 @@ class BookingEvent(models.Model): |
|
|
|
payment_mode=self._compute_payment_mode(reg) |
|
|
|
amount_paid=self._compute_amount_paid(reg) |
|
|
|
|
|
|
|
csv_lines=csv_lines+name+';'+role+';'+options+';'+booking_amount+';'+membership_amount+';'+invoice_options_amount+';'+amount_to_be_paid+';'+payment_status+';'+payment_mode+';'+amount_paid+'\n' |
|
|
|
csv_lines=csv_lines+name+';'+gender+';'+role+';'+options+';'+booking_amount+';'+membership_amount+';'+invoice_options_amount+';'+amount_to_be_paid+';'+payment_status+';'+payment_mode+';'+amount_paid+'\n' |
|
|
|
|
|
|
|
return str.encode(header_ligne+csv_lines,'utf-8') |
|
|
|
|
|
|
@ -217,10 +217,16 @@ class BookingEvent(models.Model): |
|
|
|
#si facture avec acompte: |
|
|
|
|
|
|
|
if rec.down_payment_invoice_id: |
|
|
|
|
|
|
|
for line in rec.down_payment_invoice_id.invoice_line_ids: |
|
|
|
if line.name==membership_product.name: |
|
|
|
booking_amount=rec.booking_amount+line.price_subtotal |
|
|
|
if line.name!=membership_product.name: |
|
|
|
booking_amount=line.price_subtotal |
|
|
|
break |
|
|
|
for line in rec.balance_invoice_id.invoice_line_ids: |
|
|
|
if line.name!=membership_product.name: |
|
|
|
booking_amount=booking_amount+line.price_subtotal |
|
|
|
break |
|
|
|
|
|
|
|
return str(booking_amount) |
|
|
|
|
|
|
|
def _compute_member_status(self,reg): |
|
|
|