View | Details | Raw Unified | Return to bug 7294
Collapse All | Expand All

(-)a/C4/Acquisition.pm (-5 / +103 lines)
Lines 1305-1310 sub ModReceiveOrder { Link Here
1305
    $sth->finish();
1305
    $sth->finish();
1306
1306
1307
    my $new_ordernumber = $ordernumber;
1307
    my $new_ordernumber = $ordernumber;
1308
1309
    # If there are still items to be received
1308
    if ( $order->{quantity} > $quantrec ) {
1310
    if ( $order->{quantity} > $quantrec ) {
1309
        # Split order line in two parts: the first is the original order line
1311
        # Split order line in two parts: the first is the original order line
1310
        # without received items (the quantity is decreased),
1312
        # without received items (the quantity is decreased),
Lines 1336-1341 sub ModReceiveOrder { Link Here
1336
                ModItemOrder($itemnumber, $new_ordernumber);
1338
                ModItemOrder($itemnumber, $new_ordernumber);
1337
            }
1339
            }
1338
        }
1340
        }
1341
1342
        # create a new order for the remaining items, and set its bookfund.
1343
        foreach my $orderkey ( "linenumber", "allocation" ) {
1344
            delete($order->{'$orderkey'});
1345
        }
1346
        $order->{'quantity'} -= $quantrec;
1347
        $order->{'quantityreceived'} = 0;
1348
1349
        my ($newOrder, $newordernumber) = NewOrder($order);
1350
        # Change ordernumber in aqorders_items for items not received
1351
        my @orderitems = GetItemnumbersFromOrder( $order->{'ordernumber'} );
1352
        my $count = scalar @orderitems;
1353
1354
        for (my $i=0; $i<$count; $i++){
1355
            foreach (@$received_items){
1356
                splice (@orderitems, $i, 1) if ($orderitems[$i] == $_);
1357
            }
1358
        }
1359
        foreach (@orderitems) {
1360
            ModItemOrder($_, $newOrder);
1361
        }
1362
1363
        # Do we have to update order informations from the marc record?
1364
        my ($ordertag, $ordersubtag) = GetMarcFromKohaField('aqorders.ordernumber', 'ACQ');
1365
1366
        # Updating MARC order field if exists
1367
        if ($ordertag and $ordersubtag) {
1368
            $debug and warn "updating MARC";
1369
            # Getting record
1370
            my $record = GetMarcBiblio($biblionumber);
1371
            if ($record) {
1372
                $debug and warn "updating Record";
1373
                foreach ($record->field($ordertag)) {
1374
                    if ($_->subfield($ordersubtag) eq $ordernumber) {
1375
                        # Updating ordernumber
1376
                        $debug and warn "updating ordernumber $ordernumber => $newordernumber";
1377
                        $_->update($ordersubtag => $newordernumber); 
1378
1379
                        # Updating quantity
1380
                        my ($quantitytag, $quantitysubtag) = GetMarcFromKohaField('aqorders.quantity', 'ACQ');
1381
                        if ($quantitysubtag) {
1382
                            $debug and warn "updating quantity " . $order->{quantity};
1383
                            $_->update($quantitysubtag => $order->{quantity});
1384
                        }
1385
                    }
1386
                }
1387
1388
                # Applying changes
1389
                ModBiblio($record, $biblionumber, 'ACQ'); 
1390
            }
1391
        }
1392
1393
1339
    } else {
1394
    } else {
1340
        $sth=$dbh->prepare("update aqorders
1395
        $sth=$dbh->prepare("update aqorders
1341
                            set quantityreceived=?,datereceived=?,invoiceid=?,
1396
                            set quantityreceived=?,datereceived=?,invoiceid=?,
Lines 1343-1348 sub ModReceiveOrder { Link Here
1343
                            where biblionumber=? and ordernumber=?");
1398
                            where biblionumber=? and ordernumber=?");
1344
        $sth->execute($quantrec,$datereceived,$invoiceid,$cost,$rrp,$ecost,$biblionumber,$ordernumber);
1399
        $sth->execute($quantrec,$datereceived,$invoiceid,$cost,$rrp,$ecost,$biblionumber,$ordernumber);
1345
        $sth->finish;
1400
        $sth->finish;
1401
1402
        # Removing MARC order field if exists
1403
        DelMarcOrder($biblionumber, $ordernumber);
1346
    }
1404
    }
1347
    return ($datereceived, $new_ordernumber);
1405
    return ($datereceived, $new_ordernumber);
1348
}
1406
}
Lines 1562-1572 sub DelOrder { Link Here
1562
    my $sth = $dbh->prepare($query);
1620
    my $sth = $dbh->prepare($query);
1563
    $sth->execute( $bibnum, $ordernumber );
1621
    $sth->execute( $bibnum, $ordernumber );
1564
    $sth->finish;
1622
    $sth->finish;
1623
1624
    # Removing MARC order field if exists
1625
    DelMarcOrder($bibnum, $ordernumber);
1626
1565
    my @itemnumbers = GetItemnumbersFromOrder( $ordernumber );
1627
    my @itemnumbers = GetItemnumbersFromOrder( $ordernumber );
1566
    foreach my $itemnumber (@itemnumbers){
1628
    foreach my $itemnumber (@itemnumbers){
1567
    	C4::Items::DelItem( $dbh, $bibnum, $itemnumber );
1629
        C4::Items::DelItem( $dbh, $bibnum, $itemnumber );
1630
    }
1631
1632
}
1633
1634
=head3 DelMarcOrder
1635
1636
=over 4
1637
1638
&DelMarcOrder($biblionumber, $ordernumber);
1639
1640
Delete the order field from the MARC record. aqorders.ordernumber needs
1641
to be linked to a MARC field/subfield. The field is deleted if the value of
1642
the subfield containing the ordernumber matches the ordernumber given
1643
in parameter
1644
1645
=cut
1646
1647
sub DelMarcOrder {
1648
    my ($biblionumber, $ordernumber) = @_;
1649
1650
    # Do we have to remove order informations from the marc record?
1651
    my ($ordertag, $ordersubtag) = GetMarcFromKohaField('aqorders.ordernumber', 'ACQ');
1652
1653
    # Removing MARC order field if exists
1654
    if ($ordertag and $ordersubtag) {
1655
        # Getting record
1656
        my $record = GetMarcBiblio($biblionumber);
1657
        if ($record) {
1658
            # Looking for the right field
1659
            foreach ($record->field($ordertag)) {
1660
                if ($_->subfield($ordersubtag) eq $ordernumber) {
1661
                    $record->delete_field($_); 
1662
                }
1663
            }
1664
            # Applying changes
1665
            ModBiblio($record, $biblionumber, 'ACQ'); 
1666
        }
1568
    }
1667
    }
1569
    
1570
}
1668
}
1571
1669
1572
=head2 FUNCTIONS ABOUT PARCELS
1670
=head2 FUNCTIONS ABOUT PARCELS
Lines 1870-1876 sub GetLateOrders { Link Here
1870
1968
1871
Retreives some acquisition history information
1969
Retreives some acquisition history information
1872
1970
1873
params:  
1971
params:
1874
  title
1972
  title
1875
  author
1973
  author
1876
  name
1974
  name
Lines 1927-1933 sub GetHistory { Link Here
1927
        SELECT
2025
        SELECT
1928
            biblio.title,
2026
            biblio.title,
1929
            biblio.author,
2027
            biblio.author,
1930
	    biblioitems.isbn,
2028
            biblioitems.isbn,
1931
        biblioitems.ean,
2029
        biblioitems.ean,
1932
            aqorders.basketno,
2030
            aqorders.basketno,
1933
            aqbasket.basketname,
2031
            aqbasket.basketname,
Lines 1947-1953 sub GetHistory { Link Here
1947
        LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno
2045
        LEFT JOIN aqbasket ON aqorders.basketno=aqbasket.basketno
1948
        LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid=aqbasketgroups.id
2046
        LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid=aqbasketgroups.id
1949
        LEFT JOIN aqbooksellers ON aqbasket.booksellerid=aqbooksellers.id
2047
        LEFT JOIN aqbooksellers ON aqbasket.booksellerid=aqbooksellers.id
1950
	LEFT JOIN biblioitems ON biblioitems.biblionumber=aqorders.biblionumber
2048
        LEFT JOIN biblioitems ON biblioitems.biblionumber=aqorders.biblionumber
1951
        LEFT JOIN biblio ON biblio.biblionumber=aqorders.biblionumber
2049
        LEFT JOIN biblio ON biblio.biblionumber=aqorders.biblionumber
1952
    LEFT JOIN aqinvoices ON aqorders.invoiceid = aqinvoices.invoiceid";
2050
    LEFT JOIN aqinvoices ON aqorders.invoiceid = aqinvoices.invoiceid";
1953
2051
(-)a/acqui/addorder.pl (-36 / +111 lines)
Lines 122-131 if it is an order from an existing suggestion : the id of this suggestion. Link Here
122
use strict;
122
use strict;
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 DelOrder 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::Bookseller qw/GetBookSellerFromId/;
129
use C4::Items;
130
use C4::Items;
130
use C4::Output;
131
use C4::Output;
131
132
Lines 150-156 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
150
);
151
);
151
152
152
# get CGI parameters
153
# get CGI parameters
153
my $orderinfo					= $input->Vars;
154
my $orderinfoi = $input->Vars;
154
$orderinfo->{'list_price'}    ||=  0;
155
$orderinfo->{'list_price'}    ||=  0;
155
$orderinfo->{'uncertainprice'} ||= 0;
156
$orderinfo->{'uncertainprice'} ||= 0;
156
157
Lines 163-214 my $user = $input->remote_user; Link Here
163
# delete biblio if delbiblio has been set to 1 by the librarian
164
# delete biblio if delbiblio has been set to 1 by the librarian
164
my $bibitemnum;
165
my $bibitemnum;
165
if ( $orderinfo->{quantity} ne '0' ) {
166
if ( $orderinfo->{quantity} ne '0' ) {
167
168
    # Getting bookseller's name
169
    if ($orderinfo->{booksellerid}) {
170
        my $bookseller = GetBookSellerFromId($orderinfo->{booksellerid});
171
        $orderinfo->{supplierreference} = $bookseller->{name};
172
    }
173
174
    # Do we have to add order informations to the marc record?
175
    my ($ordertag, $ordersubtag) = GetMarcFromKohaField('aqorders.ordernumber', 'ACQ'); 
176
    my $record;
177
    my $existingbiblio; # Was the order made on an existing biblio?
178
    my $ordermodif;     # Is this an order modification?
179
166
    #TODO:check to see if biblio exists
180
    #TODO:check to see if biblio exists
167
    unless ( $$orderinfo{biblionumber} ) {
181
    unless ( $orderinfo->{biblionumber} ) {
168
        #if it doesnt create it
182
        #if it doesnt create it
169
        my $record = TransformKohaToMarc(
183
        my $tmprecord = TransformKohaToMarc(
170
            {
184
            {   "biblio.title"                => "$$orderinfo{title}",
171
                "biblio.title"                => "$$orderinfo{title}",
185
                "biblio.author"               => $$orderinfo{author}          ? $$orderinfo{author}          : "",
172
                "biblio.author"               => $$orderinfo{author}          ? $$orderinfo{author}        : "",
186
                "biblio.seriestitle"          => $$orderinfo{series}          ? $$orderinfo{series}          : "",
173
                "biblio.seriestitle"          => $$orderinfo{series}          ? $$orderinfo{series}        : "",
187
                "biblio.copyrightdate"        => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear} : "",
174
                "biblioitems.isbn"            => $$orderinfo{isbn}            ? $$orderinfo{isbn}          : "",
188
                "biblioitems.isbn"            => $$orderinfo{isbn}            ? $$orderinfo{isbn}            : "",
175
                "biblioitems.ean"             => $$orderinfo{ean}             ? $$orderinfo{ean}           : "",
189
                "biblioitems.ean"             => $$orderinfo{ean}             ? $$orderinfo{ean}             : "",
176
                "biblioitems.publishercode"   => $$orderinfo{publishercode}   ? $$orderinfo{publishercode} : "",
190
                "biblioitems.publishercode"   => $$orderinfo{publishercode}   ? $$orderinfo{publishercode}   : "",
177
                "biblioitems.publicationyear" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "",
191
                "biblioitems.publicationyear" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear} : "",
178
                "biblio.copyrightdate"        => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "",
192
                "biblioitems.itemtype"        => $$orderinfo{itemtype}        ? $$orderinfo{itemtype}        : "",
179
                "biblioitems.itemtype"        => $$orderinfo{itemtype} ? $$orderinfo{itemtype} : "",
193
                "biblioitems.editionstatement"=> $$orderinfo{editionstatement}? $$orderinfo{editionstatement}: "",
180
                "biblioitems.editionstatement"=> $$orderinfo{editionstatement} ? $$orderinfo{editionstatement} : "",
194
                "aqorders.branchcode"         => $$orderinfo{branchcode}      ? $$orderinfo{branchcode}      : "",
181
                "aqorders.branchcode"         => $$orderinfo{branchcode} ? $$orderinfo{branchcode} : "",
195
                "aqorders.quantity"           => $$orderinfo{quantity}        ? $$orderinfo{quantity}        : "",
182
                "aqorders.quantity"           => $$orderinfo{quantity} ? $$orderinfo{quantity} : "",
196
                "aqorders.listprice"          => $$orderinfo{listprice}       ? $$orderinfo{listprice}       : "",
183
                "aqorders.listprice"          => $$orderinfo{listprice} ? $$orderinfo{listprice} : "",
197
                "aqorders.uncertainprice"     => $$orderinfo{uncertainprice}  ? $$orderinfo{uncertainprice}  : "",
184
                "aqorders.uncertainprice"     => $$orderinfo{uncertainprice} ? $$orderinfo{uncertainprice} : "",
198
                "aqorders.rrp"                => $$orderinfo{rrp}             ? $$orderinfo{rrp}             : "",
185
                "aqorders.rrp"                => $$orderinfo{rrp} ? $$orderinfo{rrp} : "",
199
                "aqorders.ecost"              => $$orderinfo{ecost}           ? $$orderinfo{ecost}           : "",
186
                "aqorders.ecost"              => $$orderinfo{ecost} ? $$orderinfo{ecost} : "",
200
                "aqorders.discount"           => $$orderinfo{discount}        ? $$orderinfo{discount}        : "",
187
                "aqorders.discount"           => $$orderinfo{discount} ? $$orderinfo{discount} : "",
201
                "aqorders.notes"              => $$orderinfo{notes}           ? $$orderinfo{notes}           : "",
188
            });
202
                "aqorders.supplierreference"  => $$orderinfo{supplierreference}?$$orderinfo{supplierreference}:"",
203
                "aqorders.sort1"              => $$orderinfo{sort1}           ? $$orderinfo{sort1}           : "",
204
                "aqorders.sort2"              => $$orderinfo{sort2}           ? $$orderinfo{sort2}           : ""
205
            }
206
        );
189
207
190
        # create the record in catalogue, with framework ''
208
        # create the record in catalogue, with framework ''
191
        my ($biblionumber,$bibitemnum) = AddBiblio($record,'');
209
        my ( $biblionumber, $bibitemnum ) = AddBiblio( $tmprecord, '' );
210
192
        # change suggestion status if applicable
211
        # change suggestion status if applicable
193
        if ($$orderinfo{suggestionid}) {
212
        if ($$orderinfo{suggestionid}) {
194
            ModSuggestion( {suggestionid=>$$orderinfo{suggestionid}, STATUS=>'ORDERED', biblionumber=>$biblionumber} );
213
            ModSuggestion( {suggestionid=>$$orderinfo{suggestionid}, STATUS=>'ORDERED', biblionumber=>$biblionumber} );
195
        }
214
        }
196
		$orderinfo->{biblioitemnumber}=$bibitemnum;
215
        $orderinfo->{biblioitemnumber} = $bibitemnum;
197
		$orderinfo->{biblionumber}=$biblionumber;
216
        $orderinfo->{biblionumber}     = $biblionumber;
217
    } else {
218
        $existingbiblio = 1;
198
    }
219
    }
199
220
200
    $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '';
221
    $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '';
201
222
202
    # if we already have $ordernumber, then it's an ordermodif
223
    # Getting record
203
    if ($$orderinfo{ordernumber}) {
224
    $record = GetMarcBiblio($orderinfo->{biblionumber});
204
        ModOrder( $orderinfo);
225
205
    }
226
206
    else { # else, it's a new line
227
228
     # if we already have $ordernumber, then it's an ordermodif
229
    if ( $orderinfo->{ordernumber} ) {
230
        ModOrder($orderinfo);
231
        $ordermodif = 1;
232
233
    } else {    # else, it's a new line
207
        @$orderinfo{qw(basketno ordernumber )} = NewOrder($orderinfo);
234
        @$orderinfo{qw(basketno ordernumber )} = NewOrder($orderinfo);
235
236
        # We have to add the ordernumber in the designated subfield
237
        if ($ordertag && $record && !$ordermodif) {
238
239
            # If it's a new line, but we don't have any $ordertag field yet, 
240
            if (!$record->field($ordertag)) {
241
                # We add a new $ordertag field, with the ordernumber as subfield (other fields will be populated later)
242
                $record->insert_fields_ordered(new MARC::Field($ordertag, '', '', $ordersubtag => $orderinfo->{ordernumber})) if (!$record->field($ordertag));
243
            } else {
244
                # Else, it's a new line, and we already have a $ordertag field
245
                foreach ($record->field($ordertag)) {
246
                    # If there's a $ordertag field without ordernumber, we create it
247
                    if (!$_->subfield($ordersubtag)) {
248
                        $_->update($ordersubtag, $orderinfo->{ordernumber});
249
                    }
250
                }
251
            }
252
            ModBiblio($record, $orderinfo->{biblionumber}, 'ACQ');
253
        }
254
255
208
    }
256
    }
209
257
210
    # now, add items if applicable
258
    if ($record) {
211
    if (C4::Context->preference('AcqCreateItem') eq 'ordering') {
259
260
        # If we have to add order infos to the marc record
261
        if ($ordertag) {
262
263
            # If the order was made on an existing biblio and it is not a modification, we add the field 
264
            $record->insert_fields_ordered(new MARC::Field($ordertag, '', '', $ordersubtag => $$orderinfo{ordernumber})) if (!$ordermodif && $existingbiblio);
265
266
            foreach ($record->field($ordertag)) {
267
                # Looking for the matching one
268
                if ($_->subfield($ordersubtag) eq $orderinfo->{ordernumber}) {
269
270
                    # Replacing or creating subfields
271
                    my ($t, $st);
272
                    for my $tablefield (qw/branchcode quantity listprice uncertainprice rrp ecost notes supplierreference sort1 sort2/) {
273
                        ($t, $st) = GetMarcFromKohaField("aqorders.$tablefield", 'ACQ');
274
                        $_->update($st, $orderinfo->{$tablefield}) if ($orderinfo->{$tablefield} and $st);
275
                    }
276
                    ModBiblio($record, $orderinfo->{biblionumber}, 'ACQ');
277
                }
278
            }
279
280
        }
281
282
    }
283
284
285
      # now, add items if applicable
286
    if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) {
212
287
213
        my @tags         = $input->param('tag');
288
        my @tags         = $input->param('tag');
214
        my @subfields    = $input->param('subfield');
289
        my @subfields    = $input->param('subfield');
(-)a/admin/koha2marclinks.pl (-6 / +2 lines)
Lines 157-168 q|select tagfield,tagsubfield,liblibrarian,kohafield from marc_subfield_structur Link Here
157
    $template->param(
157
    $template->param(
158
        loop      => \@loop_data,
158
        loop      => \@loop_data,
159
        tablename => CGI::scrolling_list(
159
        tablename => CGI::scrolling_list(
160
            -name   => 'tablename',
160
            -name     => 'tablename',
161
            -values => [
161
            -values   => [ 'biblio', 'biblioitems', 'items', 'aqorders'],
162
                'biblio',
163
                'biblioitems',
164
                'items',
165
            ],
166
            -default  => $tablename,
162
            -default  => $tablename,
167
            -size     => 1,
163
            -size     => 1,
168
            -multiple => 0
164
            -multiple => 0
(-)a/admin/marc_subfields_structure.pl (+6 lines)
Lines 122-127 if ( $op eq 'add_form' ) { Link Here
122
    while ( ( my $field ) = $sth2->fetchrow_array ) {
122
    while ( ( my $field ) = $sth2->fetchrow_array ) {
123
        push @kohafields, "items." . $field;
123
        push @kohafields, "items." . $field;
124
    }
124
    }
125
    $sth2 = $dbh->prepare("SHOW COLUMNS from aqorders");
126
    $sth2->execute;
127
    while ( ( my $field ) = $sth2->fetchrow_array ) {
128
        push @kohafields, "aqorders." . $field;
129
    }
130
125
131
126
    # build authorised value list
132
    # build authorised value list
127
    $sth2->finish;
133
    $sth2->finish;
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 2805-2810 CREATE TABLE `aqorders` ( -- information related to the basket line items Link Here
2805
  `claims_count` int(11) default 0, -- count of claim letters generated
2805
  `claims_count` int(11) default 0, -- count of claim letters generated
2806
  `claimed_date` date default NULL, -- last date a claim was generated
2806
  `claimed_date` date default NULL, -- last date a claim was generated
2807
  parent_ordernumber int(11) default NULL, -- ordernumber of parent order line, or same as ordernumber if no parent
2807
  parent_ordernumber int(11) default NULL, -- ordernumber of parent order line, or same as ordernumber if no parent
2808
  `branchcode` varchar(10) default NULL,
2808
  PRIMARY KEY  (`ordernumber`),
2809
  PRIMARY KEY  (`ordernumber`),
2809
  KEY `basketno` (`basketno`),
2810
  KEY `basketno` (`basketno`),
2810
  KEY `biblionumber` (`biblionumber`),
2811
  KEY `biblionumber` (`biblionumber`),
(-)a/installer/data/mysql/updatedatabase.pl (+6 lines)
Lines 5806-5811 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5806
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowReturnToBranch', '$prefvalue', 'Where an item may be returned', 'anywhere|homebranch|holdingbranch|homeorholdingbranch', 'Choice');");
5806
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowReturnToBranch', '$prefvalue', 'Where an item may be returned', 'anywhere|homebranch|holdingbranch|homeorholdingbranch', 'Choice');");
5807
5807
5808
    print "Upgrade to $DBversion done: adding AllowReturnToBranch syspref (bug 6151)";
5808
    print "Upgrade to $DBversion done: adding AllowReturnToBranch syspref (bug 6151)";
5809
}
5810
5811
$DBversion = "3.09.00.XXX";
5812
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5813
    $dbh->do("ALTER TABLE `aqorders` ADD `branchcode` VARCHAR( 10 ) NULL");
5814
    print "Upgrade to $DBversion done (Adding branchcode in aqorders)\n";
5809
    SetVersion($DBversion);
5815
    SetVersion($DBversion);
5810
}
5816
}
5811
5817
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-1 / +22 lines)
Lines 331-336 $(document).ready(function() Link Here
331
        </ol>
331
        </ol>
332
    </fieldset>
332
    </fieldset>
333
333
334
    <!-- Acquisition details -->
335
    <fieldset class="rows">
336
        <legend>Acquisition details</legend>
337
	<ol>
338
	<li>
339
	    <label for="branchcode">Branch: </label>
340
	    <select name="branchcode" id="branchcode">
341
                    <option value=""></option>
342
                [% FOREACH branch_loo IN branchloop %]
343
                    [% IF (branch_loo.selected) %]
344
                        <option value="[% branch_loo.value %]" selected="selected">[% branch_loo.branchname %]</option>
345
                    [% ELSE %]
346
                        <option value="[% branch_loo.value %]">[% branch_loo.branchname %]</option>
347
                    [% END %]
348
                [% END %]
349
	    </select>
350
	</li>
351
	</ol>
352
    </fieldset>	
353
354
355
334
    [% IF ( suggestionid ) %]
356
    [% IF ( suggestionid ) %]
335
        <fieldset class="rows">
357
        <fieldset class="rows">
336
        <legend>Suggestion</legend>
358
        <legend>Suggestion</legend>
337
- 

Return to bug 7294