code: def calculateTaxes(self):
          '''
          Updates the tax field to reflect the amount of taxes depending on
          the local rate as well as whether the buyer or seller pays sales tax.
          '''
  
          tax_rate = (getConstant('registration__salesTaxRate') or 0) / 100
  
          if tax_rate > 0:
              if self.buyerPaysSalesTax:
                  # If the buyer pays taxes, then taxes are just added as a fraction of the price
                  self.taxes = self.total * tax_rate
              else:
                  # If the seller pays sales taxes, then adjusted_total will be their net revenue,
                  # and under this calculation adjusted_total + taxes = the price charged
                  adjusted_total = self.total / (1 + tax_rate)
                  self.taxes = adjusted_total * tax_ratf calculateTaxes(self):
          '''
          Updates the tax field to reflect the amount of taxes depending on
          the local rate as well as whether the buyer or seller pays sales tax.
          '''
  
          tax_rate = (getConstant('registration__salesTaxRate') or 0) / 100
  
          if tax_rate > 0:
              if self.buyerPaysSalesTax:
                  # If the buyer pays taxes, then taxes are just added as a fraction of the price
                  self.taxes = self.total * tax_rate
              else:
                  # If the seller pays sales taxes, then adjusted_total will be their net revenue,
                  # and under this calculation adjusted_total + taxes = the price charged
                  adjusted_total = self.total / (1 + tax_rate)
                  self.taxes = adjusted_total * tax_rate
docs: Updates the tax field to reflect the amount of taxes depending on
          the local rate as well as whether the buyer or seller pays sales tax.