docs: def save(self, *args, **kwargs):
          '''
          This custom save method ensures that a revenue item is not attributed to multiple categories.
          It also ensures that the series and event properties are always associated with any
          type of revenue of that series or event.
          '''
  
          # Set the received date if the payment was just marked received
          if not hasattr(self,'__received'):
              if self.received and not self.receivedDate:
                  self.receivedDate = timezone.now()
          else:
              if self.received and not self.receivedDate and not self.__receivedDate:
                  self.receivedDate = timezone.now()
  
          # Set the accrual date.  The method for series/events ensures that the accrualDate month
          # is the same as the reported month of the event/series by accruing to the start date of the first
          # occurrence in that month.
          if not self.accrualDate:
              if self.invoiceItem and self.invoiceItem.finalEventRegistration:
                  min_event_time = self.invoiceItem.finalEventRegistration.event.eventoccurrence_set.filter(**{'startTime__month':self.invoiceItem.finalEventRegistration.event.month}).first().startTime
                  self.accrualDate = min_event_time
              elif self.event:
                  self.accrualDate = self.event.eventoccurrence_set.order_by('startTime').filter(**{'startTime__month': self.event.month}).last().startTime
              elif self.invoiceItem:
                  self.accrualDate = self.invoiceItem.invoice.creationDate
              elif self.receivedDate:
                  self.accrualDate = self.receivedDate
              elif self.submissionDate:
                  self.accrualDate = self.submissionDate
              else:
                  self.submissionDate = timezone.now()
                  self.accrualDate = self.submissionDate
  
          # Now, set the registration property and check that this item is not attributed
          # to multiple categories.
          if self.invoiceItem and self.invoiceItem.finalEventRegistration:
              self.event = self.invoiceItem.finalEventRegistration.event
          elif self.invoiceItem and self.invoiceItem.temporaryEventRegistration:
              self.event = self.invoiceItem.temporaryEventRegistration.event
  
          # If no grossTotal is reported, use the net total.  If no net total is reported, use the grossTotal
          if self.grossTotal is None and self.total:
              self.grossTotal = self.total
          if self.total is None and self.grossTotal:
              self.total = self.grossTotal
  
          super(RevenueItem, self).save(*args, **kwargs)
          self.__received = self.received
          self.__receivedDate = self.receivedDate
  
          # If a file is attached, ensure that it is not public, and that it is saved in the 'Expense Receipts' folder
          if self.attachment:
              try:
                  self.attachment.folder = Folder.objects.get(name=_('Revenue Receipts'))
              except ObjectDoesNotExist:
                  pass
              self.attachment.is_public = False
              self.attachment.save()