コード例 #1
0
ファイル: test_tax_system.py プロジェクト: DemOneEh/shoop
 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
ファイル: test_tax_system.py プロジェクト: teserak/shoop
 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
ファイル: test_tax_system.py プロジェクト: charn/shoop
 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