Esempio n. 1
0
def _get_order_and_order_line(request):
    order = Order(
        shop=request.shop,
        currency=request.shop.currency,
        prices_include_tax=request.shop.prices_include_tax,
    )
    order.taxful_total_price = TaxfulPrice("100", request.shop.currency)
    order.taxless_total_price = TaxlessPrice("50", request.shop.currency)
    pi = _get_price_info(request.shop, Product(sku='6.0745'), quantity=2)
    return (order, OrderLine(
        order=order,
        base_unit_price=pi.base_unit_price,
        discount_amount=pi.discount_amount,
        quantity=pi.quantity,
    ))
Esempio n. 2
0
def _get_order_and_order_line(request):
    order = Order(
        shop=request.shop,
        currency=request.shop.currency,
        prices_include_tax=request.shop.prices_include_tax,
    )
    order.taxful_total_price = TaxfulPrice("100", request.shop.currency)
    order.taxless_total_price = TaxlessPrice("50", request.shop.currency)
    pi = _get_price_info(request.shop, Product(sku='6.0745'), quantity=2)
    return (order, OrderLine(
        order=order,
        base_unit_price=pi.base_unit_price,
        discount_amount=pi.discount_amount,
        quantity=pi.quantity,
    ))