Пример #1
0
 def get_taxed_price_for(self, context, item, price):
     taxes = []
     if context.postal_code == "92602":
         taxes = [
             # Based on data from TaxJar
             get_tax("CA", "California", rate="0.065"),
             get_tax("CA-OC", "Orange County", rate="0.01"),
             get_tax("CA-OC-IR", "Irvine", rate="0.00"),
             get_tax("CA-OC-IR-DS", "District tax", rate="0.005"),
         ]
     return stacked_value_added_taxes(price, taxes)
Пример #2
0
 def get_taxed_price(self, context, price, tax_class):
     taxes = []
     if context.postal_code == "92602":
         taxes = [
             # Based on data from TaxJar
             get_tax("CA", "California", rate="0.065"),
             get_tax("CA-OC", "Orange County", rate="0.01"),
             get_tax("CA-OC-IR", "Irvine", rate="0.00"),
             get_tax("CA-OC-IR-DS", "District tax", rate="0.005"),
         ]
     return stacked_value_added_taxes(price, taxes)
Пример #3
0
 def get_line_taxes(self, source_line):
     taxes = []
     if source_line.source.billing_address.postal_code == "92602":
         taxes = [
             # Based on data from TaxJar
             get_tax("CA", "California", rate="0.065"),
             get_tax("CA-OC", "Orange County", rate="0.01"),
             get_tax("CA-OC-IR", "Irvine", rate="0.00"),
             get_tax("CA-OC-IR-DS", "District tax", rate="0.005"),
         ]
     return stacked_value_added_taxes(source_line.total_price, taxes).taxes
Пример #4
0
 def get_line_taxes(self, source_line):
     taxes = []
     if source_line.source.billing_address.postal_code == "92602":
         taxes = [
             # Based on data from TaxJar
             get_tax("CA", "California", rate="0.065"),
             get_tax("CA-OC", "Orange County", rate="0.01"),
             get_tax("CA-OC-IR", "Irvine", rate="0.00"),
             get_tax("CA-OC-IR-DS", "District tax", rate="0.005"),
         ]
     return stacked_value_added_taxes(source_line.total_price, taxes).taxes