Lines 123-129
use strict;
Link Here
|
123 |
use warnings; |
123 |
use warnings; |
124 |
use CGI; |
124 |
use CGI; |
125 |
use C4::Auth; # get_template_and_user |
125 |
use C4::Auth; # get_template_and_user |
126 |
use C4::Acquisition; # NewOrder DelOrder ModOrder |
126 |
use C4::Acquisition; # NewOrder ModOrder |
127 |
use C4::Suggestions; # ModStatus |
127 |
use C4::Suggestions; # ModStatus |
128 |
use C4::Biblio; # AddBiblio TransformKohaToMarc |
128 |
use C4::Biblio; # AddBiblio TransformKohaToMarc |
129 |
use C4::Items; |
129 |
use C4::Items; |
Lines 153-196
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
153 |
my $orderinfo = $input->Vars; |
153 |
my $orderinfo = $input->Vars; |
154 |
$orderinfo->{'list_price'} ||= 0; |
154 |
$orderinfo->{'list_price'} ||= 0; |
155 |
$orderinfo->{'uncertainprice'} ||= 0; |
155 |
$orderinfo->{'uncertainprice'} ||= 0; |
156 |
#my $ordernumber = $input->param('ordernumber'); |
|
|
157 |
#my $basketno = $input->param('basketno'); |
158 |
#my $booksellerid = $input->param('booksellerid'); |
159 |
#my $existing = $input->param('existing'); # existing biblio, (not basket or order) |
160 |
#my $title = $input->param('title'); |
161 |
#my $author = $input->param('author'); |
162 |
#my $publicationyear= $input->param('publicationyear'); |
163 |
#my $isbn = $input->param('ISBN'); |
164 |
#my $itemtype = $input->param('format'); |
165 |
#my $quantity = $input->param('quantity'); # FIXME: else ERROR! |
166 |
#my $branch = $input->param('branch'); |
167 |
#my $series = $input->param('series'); |
168 |
#my $notes = $input->param('notes'); |
169 |
#my $budget_id = $input->param('budget_id'); |
170 |
#my $sort1 = $input->param('sort1'); |
171 |
#my $sort2 = $input->param('sort2'); |
172 |
#my $rrp = $input->param('rrp'); |
173 |
#my $ecost = $input->param('ecost'); |
174 |
#my $gst = $input->param('GST'); |
175 |
#my $budget = $input->param('budget'); |
176 |
#my $cost = $input->param('cost'); |
177 |
#my $sub = $input->param('sub'); |
178 |
#my $purchaseorder = $input->param('purchaseordernumber'); |
179 |
#my $invoice = $input->param('invoice'); |
180 |
#my $publishercode = $input->param('publishercode'); |
181 |
#my $suggestionid = $input->param('suggestionid'); |
182 |
#my $biblionumber = $input->param('biblionumber'); |
183 |
#my $uncertainprice = $input->param('uncertainprice'); |
184 |
#my $import_batch_id= $input->param('import_batch_id'); |
185 |
# |
186 |
#my $createbibitem = $input->param('createbibitem'); |
187 |
# |
188 |
my $user = $input->remote_user; |
189 |
# create, modify or delete biblio |
156 |
# create, modify or delete biblio |
190 |
# create if $quantity>=0 and $existing='no' |
157 |
# create if $quantity>0 and $existing='no' |
191 |
# modify if $quantity>=0 and $existing='yes' |
158 |
# modify if $quantity>0 and $existing='yes' |
192 |
# delete if $quantity has been set to 0 by the librarian |
|
|
193 |
# delete biblio if delbiblio has been set to 1 by the librarian |
194 |
my $bibitemnum; |
159 |
my $bibitemnum; |
195 |
if ( $orderinfo->{quantity} ne '0' ) { |
160 |
if ( $orderinfo->{quantity} ne '0' ) { |
196 |
#TODO:check to see if biblio exists |
161 |
#TODO:check to see if biblio exists |
Lines 269-281
if ( $orderinfo->{quantity} ne '0' ) {
Link Here
|
269 |
|
234 |
|
270 |
} |
235 |
} |
271 |
|
236 |
|
272 |
else { # qty=0, delete the line |
|
|
273 |
my $biblionumber = $input->param('biblionumber'); |
274 |
DelOrder( $biblionumber, $$orderinfo{ordernumber} ); |
275 |
if ($orderinfo->{delbiblio} == 1){ |
276 |
DelBiblio($biblionumber); |
277 |
} |
278 |
} |
279 |
my $basketno=$$orderinfo{basketno}; |
237 |
my $basketno=$$orderinfo{basketno}; |
280 |
my $booksellerid=$$orderinfo{booksellerid}; |
238 |
my $booksellerid=$$orderinfo{booksellerid}; |
281 |
if (my $import_batch_id=$$orderinfo{import_batch_id}) { |
239 |
if (my $import_batch_id=$$orderinfo{import_batch_id}) { |