Link Here
|
52 |
use C4::Auth; |
52 |
use C4::Auth; |
53 |
use C4::Output; |
53 |
use C4::Output; |
54 |
use C4::Acquisition qw/GetBasket NewBasket GetContracts ModBasketHeader/; |
54 |
use C4::Acquisition qw/GetBasket NewBasket GetContracts ModBasketHeader/; |
55 |
use C4::Bookseller qw/GetBookSellerFromId/; |
55 |
use C4::Bookseller qw/GetBookSellerFromId GetBookSeller/; |
56 |
|
56 |
|
57 |
|
57 |
|
58 |
my $input = new CGI; |
58 |
my $input = new CGI; |
Link Here
|
68 |
); |
68 |
); |
69 |
|
69 |
|
70 |
#parameters: |
70 |
#parameters: |
71 |
my $booksellerid; |
71 |
my $booksellerid = $input->param('booksellerid'); |
72 |
$booksellerid = $input->param('booksellerid'); |
|
|
73 |
my $basketno = $input->param('basketno'); |
72 |
my $basketno = $input->param('basketno'); |
74 |
my $basket; |
73 |
my $basket; |
75 |
my $op = $input ->param('op'); |
74 |
my $op = $input ->param('op'); |
Link Here
|
101 |
$template->param(contractloop => \@contractloop, |
100 |
$template->param(contractloop => \@contractloop, |
102 |
basketcontractnumber => $basket->{'contractnumber'}); |
101 |
basketcontractnumber => $basket->{'contractnumber'}); |
103 |
} |
102 |
} |
|
|
103 |
my @booksellers = GetBookSeller(); |
104 |
$template->param( add_form => 1, |
104 |
$template->param( add_form => 1, |
105 |
basketname => $basket->{'basketname'}, |
105 |
basketname => $basket->{'basketname'}, |
106 |
basketnote => $basket->{'note'}, |
106 |
basketnote => $basket->{'note'}, |
107 |
basketbooksellernote => $basket->{'booksellernote'}, |
107 |
basketbooksellernote => $basket->{'booksellernote'}, |
108 |
booksellername => $bookseller->{'name'}, |
108 |
booksellername => $bookseller->{'name'}, |
109 |
booksellerid => $booksellerid, |
109 |
booksellerid => $booksellerid, |
110 |
basketno => $basketno |
110 |
basketno => $basketno, |
|
|
111 |
booksellers => \@booksellers, |
111 |
); |
112 |
); |
112 |
#End Edit |
113 |
#End Edit |
113 |
} elsif ( $op eq 'add_validate' ) { |
114 |
} elsif ( $op eq 'add_validate' ) { |
Link Here
|
115 |
my $basketno; |
116 |
my $basketno; |
116 |
if ( $is_an_edit ) { |
117 |
if ( $is_an_edit ) { |
117 |
$basketno = $input->param('basketno'); |
118 |
$basketno = $input->param('basketno'); |
118 |
ModBasketHeader($input->param('basketno'),$input->param('basketname'),$input->param('basketnote'),$input->param('basketbooksellernote'),$input->param('basketcontractnumber')); |
119 |
ModBasketHeader( $input->param('basketno'), $input->param('basketname'), $input->param('basketnote'), $input->param('basketbooksellernote'), $input->param('basketcontractnumber') || undef, $input->param('basketbooksellerid') ); |
119 |
} else { #New basket |
120 |
} else { #New basket |
120 |
$basketno = NewBasket($booksellerid, $loggedinuser, $input->param('basketname'), $input->param('basketnote'), $input->param('basketbooksellernote'), $input->param('basketcontractnumber')); |
121 |
$basketno = NewBasket($booksellerid, $loggedinuser, $input->param('basketname'), $input->param('basketnote'), $input->param('basketbooksellernote'), $input->param('basketcontractnumber')); |
121 |
} |
122 |
} |