View | Details | Raw Unified | Return to bug 35114
Collapse All | Expand All

(-)a/acqui/basket.pl (-3 / +3 lines)
Lines 343-349 if ( $op eq 'list' ) { Link Here
343
        $foot{$$line{tax_rate}}{tax_rate} = $$line{tax_rate};
343
        $foot{$$line{tax_rate}}{tax_rate} = $$line{tax_rate};
344
        $foot{$$line{tax_rate}}{tax_value} += get_rounded_price($$line{tax_value});
344
        $foot{$$line{tax_rate}}{tax_value} += get_rounded_price($$line{tax_value});
345
        $total_tax_value += $$line{tax_value};
345
        $total_tax_value += $$line{tax_value};
346
        $foot{$$line{tax_rate}}{quantity}  += get_rounded_price($$line{quantity});
346
        $foot{$$line{tax_rate}}{quantity}  += $$line{quantity};
347
        $total_quantity += $$line{quantity};
347
        $total_quantity += $$line{quantity};
348
        $foot{$$line{tax_rate}}{total_tax_excluded} += $$line{total_tax_excluded};
348
        $foot{$$line{tax_rate}}{total_tax_excluded} += $$line{total_tax_excluded};
349
        $total_tax_excluded += $$line{total_tax_excluded};
349
        $total_tax_excluded += $$line{total_tax_excluded};
Lines 458-465 sub get_order_infos { Link Here
458
    $line{unitprice_tax_excluded} += 0;
458
    $line{unitprice_tax_excluded} += 0;
459
    my $cost_tax_included = $line{unitprice_tax_included} || $line{ecost_tax_included};
459
    my $cost_tax_included = $line{unitprice_tax_included} || $line{ecost_tax_included};
460
    my $cost_tax_excluded = $line{unitprice_tax_excluded} || $line{ecost_tax_excluded};
460
    my $cost_tax_excluded = $line{unitprice_tax_excluded} || $line{ecost_tax_excluded};
461
    $line{total_tax_included} = get_rounded_price($cost_tax_included) * $line{quantity};
461
    $line{total_tax_included} = get_rounded_price($cost_tax_included * $line{quantity});
462
    $line{total_tax_excluded} = get_rounded_price($cost_tax_excluded) * $line{quantity};
462
    $line{total_tax_excluded} = get_rounded_price($cost_tax_excluded * $line{quantity});
463
    $line{tax_value} = $line{tax_value_on_ordering};
463
    $line{tax_value} = $line{tax_value_on_ordering};
464
    $line{tax_rate} = $line{tax_rate_on_ordering};
464
    $line{tax_rate} = $line{tax_rate_on_ordering};
465
465
(-)a/acqui/basketgroup.pl (-5 / +6 lines)
Lines 75-88 sub BasketTotal { Link Here
75
    my $total = 0;
75
    my $total = 0;
76
    my @orders = GetOrders($basketno);
76
    my @orders = GetOrders($basketno);
77
    for my $order (@orders){
77
    for my $order (@orders){
78
        # FIXME The following is wrong
78
        # FIXME The following is wrong <- still true ? remove if patch 35114 fixed it
79
        my $based_price_tax_included = $order->{unitprice_tax_included} || $order->{ecost_tax_included};
80
        my $based_price_tax_excluded = $order->{unitprice_tax_excluded} || $order->{ecost_tax_excluded};
79
        if ( $bookseller->listincgst ) {
81
        if ( $bookseller->listincgst ) {
80
            $total = $total + ( get_rounded_price($order->{ecost_tax_included}) * $order->{quantity} );
82
            $total = $total + ( $based_price_tax_included * $order->{quantity} );
81
        } else {
83
        } else {
82
            $total = $total + ( get_rounded_price($order->{ecost_tax_excluded}) * $order->{quantity} );
84
            $total = $total + ( $based_price_tax_excluded * $order->{quantity} );
83
        }
85
        }
84
    }
86
    }
85
    return $total;
87
    return get_rounded_price($total);
86
}
88
}
87
89
88
#displays all basketgroups and all closed baskets (in their respective groups)
90
#displays all basketgroups and all closed baskets (in their respective groups)
89
- 

Return to bug 35114