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

(-)a/C4/Acquisition.pm (-11 / +5 lines)
Lines 233-239 sub GetBasketAsCSV { Link Here
233
    my $output; 
233
    my $output; 
234
234
235
    # TODO: Translate headers
235
    # TODO: Translate headers
236
    my @headers = qw(contractname ordernumber line entrydate isbn author title publishercode collectiontitle notes quantity rrp);
236
    my @headers = qw(contractname ordernumber entrydate isbn author title publishercode collectiontitle notes quantity rrp);
237
237
238
    $csv->combine(@headers);                                                                                                        
238
    $csv->combine(@headers);                                                                                                        
239
    $output = $csv->string() . "\n";	
239
    $output = $csv->string() . "\n";	
Lines 241-256 sub GetBasketAsCSV { Link Here
241
    my @rows;
241
    my @rows;
242
    foreach my $order (@orders) {
242
    foreach my $order (@orders) {
243
	my @cols;
243
	my @cols;
244
	my $bd = GetBiblioData($order->{'biblionumber'});
245
	push(@cols,
244
	push(@cols,
246
		$contract->{'contractname'},
245
		$contract->{'contractname'},
247
		$order->{'ordernumber'},
246
		$order->{'ordernumber'},
248
		$order->{'entrydate'}, 
247
		$order->{'entrydate'}, 
249
		$order->{'isbn'},
248
		$order->{'isbn'},
250
		$bd->{'author'},
249
		$order->{'author'},
251
		$bd->{'title'},
250
		$order->{'title'},
252
		$bd->{'publishercode'},
251
		$order->{'publishercode'},
253
		$bd->{'collectiontitle'},
252
		$order->{'collectiontitle'},
254
		$order->{'notes'},
253
		$order->{'notes'},
255
		$order->{'quantity'},
254
		$order->{'quantity'},
256
		$order->{'rrp'},
255
		$order->{'rrp'},
Lines 258-267 sub GetBasketAsCSV { Link Here
258
	push (@rows, \@cols);
257
	push (@rows, \@cols);
259
    }
258
    }
260
259
261
    # Sort by publishercode 
262
    # TODO: Sort by publishercode then by title
263
    @rows = sort { @$a[7] cmp @$b[7] } @rows;
264
265
    foreach my $row (@rows) {
260
    foreach my $row (@rows) {
266
	$csv->combine(@$row);                                                                                                                    
261
	$csv->combine(@$row);                                                                                                                    
267
	$output .= $csv->string() . "\n";    
262
	$output .= $csv->string() . "\n";    
268
- 

Return to bug 6613