BZ6058: uncertain price can't be unchecked
authorPaul Poulain <paul.poulain@biblibre.com>
Tue, 5 Apr 2011 12:05:57 +0000 (14:05 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 6 Apr 2011 03:26:12 +0000 (15:26 +1200)
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
C4/Acquisition.pm
acqui/addorder.pl

index 7474502..2a3f9c4 100644 (file)
@@ -961,6 +961,10 @@ sub ModOrder {
 
     my $dbh = C4::Context->dbh;
     my @params;
+
+    # update uncertainprice to an integer, just in case (under FF, checked boxes have the value "ON" by default)
+    $orderinfo->{uncertainprice}=1 if $orderinfo->{uncertainprice};
+
 #    delete($orderinfo->{'branchcode'});
     # the hash contains a lot of entries not in aqorders, so get the columns ...
     my $sth = $dbh->prepare("SELECT * FROM aqorders LIMIT 1;");
index 35d3507..44623ec 100755 (executable)
@@ -152,6 +152,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
 # get CGI parameters
 my $orderinfo                                  = $input->Vars;
 $orderinfo->{'list_price'}    ||=  0;
+$orderinfo->{'uncertainprice'} ||= 0;
 #my $ordernumber        = $input->param('ordernumber');
 #my $basketno      = $input->param('basketno');
 #my $booksellerid  = $input->param('booksellerid');