use C4::Acquisition;
use C4::Budgets;
-use Koha::Acquisition::Bookseller;
+use Koha::Acquisition::Booksellers;
use Koha::Acquisition::Currencies;
use Koha::DateUtils;
use Koha::Misc::Files;
my $details = GetInvoiceDetails($invoiceid);
-my $bookseller = Koha::Acquisition::Bookseller->fetch({ id => $details->{booksellerid} });
+my $bookseller = Koha::Acquisition::Booksellers->find( $details->{booksellerid} );
my @orders_loop = ();
my $orders = $details->{'orders'};
my @foot_loop;
foreach my $order (@$orders) {
my $line = get_infos( $order, $bookseller);
- $line->{total_tax_excluded} = Koha::Number::Price->new( $line->{unitprice_tax_excluded} * $line->{quantity} )->format;
- $line->{total_tax_included} = Koha::Number::Price->new( $line->{unitprice_tax_included} * $line->{quantity} )->format;
+ $line->{total_tax_excluded} = $line->{unitprice_tax_excluded} * $line->{quantity};
+ $line->{total_tax_included} = $line->{unitprice_tax_included} * $line->{quantity};
+
+ $line->{tax_value} = $line->{tax_value_on_receiving};
+ $line->{tax_rate} = $line->{tax_rate_on_receiving};
$foot{$$line{tax_rate}}{tax_rate} = $$line{tax_rate};
$foot{$$line{tax_rate}}{tax_value} += $$line{tax_value};
total_tax_value => $total_tax_value,
total_tax_excluded_shipment => $total_tax_excluded + $details->{shipmentcost},
total_tax_included_shipment => $total_tax_included + $details->{shipmentcost},
- invoiceincgst => $bookseller->{invoiceincgst},
+ invoiceincgst => $bookseller->invoiceincgst,
currency => Koha::Acquisition::Currencies->get_active,
budgets_loop => \@budgets_loop,
);