Previously, if the tax rate for a particular seller was '0.000' it
couldn't be edited. Now, the tax information always is shown if there
is a default system one, or one for that seller.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
=cut
use strict;
+use warnings;
use C4::Auth;
use C4::Acquisition;
use C4::Contract;
debug => 1,
}
);
-my $GST = $booksellers[0]->{'gstrate'} || C4::Context->preference("gist");
+my $seller_gstrate = $booksellers[0]->{'gstrate'};
+# A perl-ism: '0'==false, '0.000'==true, but 0=='0.000' - this accounts for that
+undef $seller_gstrate if ($seller_gstrate == 0);
+my $GST = $seller_gstrate || C4::Context->preference("gist");
$GST *= 100;
my @contracts = GetContracts($id);
push @loop_invoicecurrency, { currency => "<option value=\"$currencies[$i]->{'currency'}\">$currencies[$i]->{'currency'}</option>"};
}
}
- my $GST = $booksellers[0]->{'gstrate'} || C4::Context->preference("gist");
- $GST *= 100;
$template->param(
id => $id,
name => $booksellers[0]->{'name'},