3

\o                 @   s    d dl mZ G dd deZdS )    )pricesc               @   s"   e Zd ZdZdddZdd ZdS )OrderTotalCalculatorz;
    Calculator class for calculating the order total.
    Nc             C   s
   || _ d S )N)request)selfr    r   :/var/www/html/oscar2019/oscar/apps/checkout/calculators.py__init__	   s    zOrderTotalCalculator.__init__c             K   s<   |j |j }|jr&|jr&|j|j }nd }tj|j||dS )N)currencyexcl_taxincl_tax)total_excl_taxr
   is_tax_knowntotal_incl_taxr   r   Pricer	   )r   basketshipping_chargekwargsr
   r   r   r   r   	calculate   s    zOrderTotalCalculator.calculate)N)__name__
__module____qualname____doc__r   r   r   r   r   r   r      s   
r   N)
oscar.corer   objectr   r   r   r   r   <module>   s   