@@ -, +, @@ - 1 syspref MarcFieldsToOrder - 1 ajax script acqui/ajax-getauthvaluedropbox.pl - 1 routine C4::Budgets::GetBudgetByCode - the gstrate value for your order is the gstrate value of the bookseller - discount = if filled : the discount value / 100 else: the discount value of the bookseller - if the bookseller includes tax( List item price includes tax: Yes ) if a discount exists: ecost = price rrp = ecost / ( 1 - discount ) else: # a discount does not exist ecost = price * ( 1 - discount ) rrp = price else # the bookseller does not include tax if a discount exists: ecost = price / ( 1 + gstrate ) rrp = ecost / ( 1 - discount ) else: # a discount does not exist rrp = price / ( 1 + gstrate ) ecost = rrp * ( 1 - discount ) - in all cases: listprice = rrp / currency rate unitprice = ecost total = ecost * quantity --- C4/Budgets.pm | 24 + acqui/addorderiso2709.pl | 166 ++++--- acqui/ajax-getauthvaluedropbox.pl | 73 ++++ installer/data/mysql/updatedatabase.pl | 12 + .../intranet-tmpl/prog/en/css/staff-global.css | 1 + koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 95 +--- .../prog/en/modules/acqui/addorderiso2709.tt | 460 ++++++++++++-------- .../en/modules/admin/preferences/acquisitions.pref | 4 + 8 files changed, 524 insertions(+), 311 deletions(-) create mode 100755 acqui/ajax-getauthvaluedropbox.pl --- a/C4/Budgets.pm +++ a/C4/Budgets.pm @@ -34,6 +34,7 @@ BEGIN { @EXPORT = qw( &GetBudget + &GetBudgetByCode &GetBudgets &GetBudgetHierarchy &AddBudget @@ -672,6 +673,29 @@ sub GetBudget { return $result; } +=head2 GetBudgetByCode + + my $budget = &GetBudgetByCode($budget_code); + +Retrieve all aqbudgets fields as a hashref for the budget that has +given budget_code + +=cut + +sub GetBudgetByCode { + my ( $budget_code ) = @_; + + my $dbh = C4::Context->dbh; + my $query = qq{ + SELECT * + FROM aqbudgets + WHERE budget_code = ? + }; + my $sth = $dbh->prepare( $query ); + $sth->execute( $budget_code ); + return $sth->fetchrow_hashref; +} + =head2 GetChildBudgetsSpent &GetChildBudgetsSpent($budget-id); --- a/acqui/addorderiso2709.pl +++ a/acqui/addorderiso2709.pl @@ -21,11 +21,11 @@ # with Koha; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -use strict; -use warnings; +use Modern::Perl; use CGI; use Carp; use Number::Format qw(:all); +use YAML qw/Load/; use C4::Context; use C4::Auth; @@ -56,7 +56,7 @@ my ($template, $loggedinuser, $cookie, $userflags) = get_template_and_user({ }); my $cgiparams = $input->Vars; -my $op = $cgiparams->{'op'}; +my $op = $cgiparams->{'op'} || ''; my $booksellerid = $input->param('booksellerid'); my $bookseller = GetBookSellerFromId($booksellerid); my $data; @@ -65,7 +65,6 @@ $template->param(scriptname => "/cgi-bin/koha/acqui/addorderiso2709.pl", booksellerid => $booksellerid, booksellername => $bookseller->{name}, ); -my $ordernumber; if ($cgiparams->{'import_batch_id'} && $op eq ""){ $op = "batch_details"; @@ -124,7 +123,7 @@ if ($op eq ""){ loop_currencies => \@loop_currency, ); import_biblios_list($template, $cgiparams->{'import_batch_id'}); - if ( C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber ) { + if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) { # prepare empty item form my $cell = PrepareItemrecordDisplay( '', '', '', 'ACQ' ); @@ -157,19 +156,37 @@ if ($op eq ""){ # retrieve the file you want to import my $import_batch_id = $cgiparams->{'import_batch_id'}; my $biblios = GetImportRecordsRange($import_batch_id); + my @import_record_id_selected = $input->param("import_record_id"); + my @quantities = $input->param('quantity'); + my @prices = $input->param('price'); + my @budgets_id = $input->param('budget_id'); + my @rrp = $input->param('rrp'); + my @discount = $input->param('discount'); + my @sort1 = $input->param('sort1'); + my @sort2 = $input->param('sort2'); + my $cur = GetCurrency(); for my $biblio (@$biblios){ - # 1st insert the biblio, or find it through matcher + # Check if this import_record_id was selected + next if not grep { $_ eq $$biblio{import_record_id} } @import_record_id_selected; my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} ); my $marcrecord = MARC::Record->new_from_usmarc($marcblob) || die "couldn't translate marc information"; my $match = GetImportRecordMatches( $biblio->{'import_record_id'}, 1 ); my $biblionumber=$#$match > -1?$match->[0]->{'biblionumber'}:0; + my $c_quantity = shift( @quantities ) || GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour') ) || 1; + my $c_budget_id = shift( @budgets_id ) || $input->param('all_budget_id') || $budget_id; + my $c_rrp = shift( @rrp ); # rrp include tax + my $c_discount = shift ( @discount); + $c_discount = $c_discount / 100 if $c_discount > 100; + my $c_sort1 = shift( @sort1 ) || $input->param('all_sort1') || ''; + my $c_sort2 = shift( @sort2 ) || $input->param('all_sort2') || ''; + # 1st insert the biblio, or find it through matcher unless ( $biblionumber ) { # add the biblio my $bibitemnum; # remove ISBN - - my ( $isbnfield, $isbnsubfield ) = GetMarcFromKohaField( 'biblioitems.isbn', '' ); + my ( $isbnfield, $isbnsubfield ) = GetMarcFromKohaField( 'biblioitems.isbn', '' ); if ( $marcrecord->field($isbnfield) ) { foreach my $field ( $marcrecord->field($isbnfield) ) { foreach my $subfield ( $field->subfield($isbnsubfield) ) { @@ -180,7 +197,6 @@ if ($op eq ""){ } } ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' ); - SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); # 2nd add authorities if applicable if (C4::Context->preference("BiblioAddsAuthorities")){ my $headings_linked =BiblioAutoLink($marcrecord, $cgiparams->{'frameworkcode'}); @@ -194,47 +210,53 @@ if ($op eq ""){ # get quantity in the MARC record (1 if none) my $quantity = GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour')) || 1; my %orderinfo = ( - "biblionumber", $biblionumber, "basketno", $cgiparams->{'basketno'}, - "quantity", $quantity, "branchcode", $branch, - "budget_id", $budget_id, "uncertainprice", 1, - "sort1", $cgiparams->{'sort1'},"sort2", $cgiparams->{'sort2'}, - "notes", $cgiparams->{'notes'}, "budget_id", $cgiparams->{'budget_id'}, - "currency",$cgiparams->{'currency'}, + biblionumber => $biblionumber, + basketno => $cgiparams->{'basketno'}, + quantity => $c_quantity, + branchcode => $patron->{branchcode}, + budget_id => $c_budget_id, + uncertainprice => 1, + sort1 => $c_sort1, + sort2 => $c_sort2, + notes => $cgiparams->{'all_notes'}, + currency => $cgiparams->{'all_currency'}, ); - - my $price = GetMarcPrice($marcrecord, C4::Context->preference('marcflavour')); - + # get the price if there is one. + my $price= shift( @prices ) || GetMarcPrice($marcrecord, C4::Context->preference('marcflavour')); if ($price){ - eval { - require C4::Acquisition; - import C4::Acquisition qw/GetBasket/; - }; - if ($@){ - croak $@; - } - eval { - require C4::Bookseller; - import C4::Bookseller qw/GetBookSellerFromId/; - }; - if ($@){ - croak $@; - } - my $basket = GetBasket( $orderinfo{basketno} ); - my $bookseller = GetBookSellerFromId( $basket->{booksellerid} ); + # in France, the cents separator is the , but sometimes, ppl use a . + # in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation + $price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR"; + $price = $num->unformat_number($price); $orderinfo{gstrate} = $bookseller->{gstrate}; - $orderinfo{rrp} = $price; - $orderinfo{ecost} = $orderinfo{rrp} * ( 1 - $bookseller->{discount} / 100 ); - $orderinfo{listprice} = $orderinfo{rrp}; + my $c = $c_discount ? $c_discount / 100 : $bookseller->{discount} / 100; + if ( $bookseller->{listincgst} ) { + if ( $c_discount ) { + $orderinfo{ecost} = $price; + $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c ); + } else { + $orderinfo{ecost} = $price * ( 1 - $c ); + $orderinfo{rrp} = $price; + } + } else { + if ( $c_discount ) { + $orderinfo{ecost} = $price / ( 1 + $orderinfo{gstrate} ); + $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c ); + } else { + $orderinfo{rrp} = $price / ( 1 + $orderinfo{gstrate} ); + $orderinfo{ecost} = $orderinfo{rrp} * ( 1 - $c ); + } + } + $orderinfo{listprice} = $orderinfo{rrp} / $cur->{rate}; $orderinfo{unitprice} = $orderinfo{ecost}; - $orderinfo{total} = $orderinfo{ecost}; + $orderinfo{total} = $orderinfo{ecost} * $c_quantity; } else { - $orderinfo{'listprice'} = 0; + $orderinfo{listprice} = 0; } # remove uncertainprice flag if we have found a price in the MARC record $orderinfo{uncertainprice} = 0 if $orderinfo{listprice}; - my $basketno; - ( $basketno, $ordernumber ) = NewOrder( \%orderinfo ); + my ( $basketno, $ordernumber ) = NewOrder( \%orderinfo ); # 4th, add items if applicable # parse the item sent by the form, and create an item just for the import_record_id we are dealing with @@ -254,12 +276,10 @@ if ($op eq ""){ push @{ $item->{indicator} }, $indicator[0]; my $xml = TransformHtmlToXml( \@tags, \@subfields, \@field_values, \@ind_tag, \@indicator ); my $record = MARC::Record::new_from_xml( $xml, 'UTF-8' ); - for (my $qtyloop=1;$qtyloop <=$quantity;$qtyloop++) { + for (my $qtyloop=1;$qtyloop <= $c_quantity;$qtyloop++) { my ( $biblionumber, $bibitemnum, $itemnumber ) = AddItemFromMarc( $record, $biblionumber ); NewOrderItem( $itemnumber, $ordernumber ); } - } else { - SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); } } # go to basket page @@ -276,8 +296,8 @@ my $budget = GetBudget($budget_id); # build budget list my $budget_loop = []; -$budgets = GetBudgetHierarchy; -foreach my $r ( @{$budgets} ) { +my $budgets_hierarchy = GetBudgetHierarchy; +foreach my $r ( @{$budgets_hierarchy} ) { next unless (CanUserUseBudget($borrower, $r, $userflags)); if ( !defined $r->{budget_amount} || $r->{budget_amount} == 0 ) { next; @@ -285,6 +305,8 @@ foreach my $r ( @{$budgets} ) { push @{$budget_loop}, { b_id => $r->{budget_id}, b_txt => $r->{budget_name}, + b_sort1_authcat => $r->{'sort1_authcat'}, + b_sort2_authcat => $r->{'sort2_authcat'}, b_sel => ( $r->{budget_id} == $budget_id ) ? 1 : 0, }; } @@ -296,7 +318,8 @@ if ($budget) { # its a mod .. $CGIsort1 = GetAuthvalueDropbox( $budget->{'sort1_authcat'}, $data->{'sort1'} ); } } elsif ( scalar(@$budgets) ) { - $CGIsort1 = GetAuthvalueDropbox( @$budgets[0]->{'sort1_authcat'}, '' ); +} elsif ( scalar(@$budgets_hierarchy) ) { + $CGIsort1 = GetAuthvalueDropbox( @$budgets_hierarchy[0]->{'sort1_authcat'}, '' ); } # if CGIsort is successfully fetched, the use it # else - failback to plain input-field @@ -311,8 +334,8 @@ if ($budget) { if ( defined $budget->{'sort2_authcat'} ) { $CGIsort2 = GetAuthvalueDropbox( $budget->{'sort2_authcat'}, $data->{'sort2'} ); } -} elsif ( scalar(@$budgets) ) { - $CGIsort2 = GetAuthvalueDropbox( @$budgets[0]->{sort2_authcat}, '' ); +} elsif ( scalar(@$budgets_hierarchy) ) { + $CGIsort2 = GetAuthvalueDropbox( @$budgets_hierarchy[0]->{sort2_authcat}, '' ); } if ($CGIsort2) { $template->param( CGIsort2 => $CGIsort2 ); @@ -378,9 +401,34 @@ sub import_biblios_list { record_sequence => $biblio->{'record_sequence'}, overlay_status => $biblio->{'overlay_status'}, match_biblionumber => $#$match > -1 ? $match->[0]->{'biblionumber'} : 0, - match_citation => $#$match > -1 ? $match->[0]->{'title'} . ' ' . $match->[0]->{'author'} : '', + match_citation => $#$match > -1 ? $match->[0]->{'title'} || '' . ' ' . $match->[0]->{'author'} || '': '', match_score => $#$match > -1 ? $match->[0]->{'score'} : 0, ); + my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} ); + my $marcrecord = MARC::Record->new_from_usmarc($marcblob) || die "couldn't translate marc information"; + my $infos = get_infos_syspref($marcrecord, ['price', 'quantity', 'budget_code', 'rrp', 'discount', 'sort1', 'sort2']); + my $price = $infos->{price}; + my $quantity = $infos->{quantity}; + my $budget_code = $infos->{budget_code}; + my $rrp = $infos->{rrp}; + my $discount = $infos->{discount}; + my $sort1 = $infos->{sort1}; + my $sort2 = $infos->{sort2}; + my $budget_id; + if($budget_code) { + my $biblio_budget = GetBudgetByCode($budget_code); + if($biblio_budget) { + $budget_id = $biblio_budget->{budget_id}; + } + } + $cellrecord{price} = $price || ''; + $cellrecord{quantity} = $quantity || ''; + $cellrecord{budget_id} = $budget_id || ''; + $cellrecord{rrp} = $rrp || ''; + $cellrecord{discount} = $discount || ''; + $cellrecord{sort1} = $sort1 || ''; + $cellrecord{sort2} = $sort2 || ''; + push @list, \%cellrecord; } my $num_biblios = $batch->{'num_biblios'}; @@ -440,3 +488,23 @@ sub add_matcher_list { } $template->param(available_matchers => \@matchers); } + +sub get_infos_syspref { + my ($record, $field_list) = @_; + my $syspref = C4::Context->preference('MarcFieldsToOrder'); + my $yaml = YAML::Load($syspref); + my $r; + for my $field_name ( @$field_list ) { + my @fields = split /\|/, $yaml->{$field_name}; + for my $field ( @fields ) { + my ( $f, $sf ) = split /\$/, $field; + next unless $f and $sf; + if ( my $v = $record->subfield( $f, $sf ) ) { + $r->{$field_name} = $v; + } + last if $yaml->{$field}; + } + } + return $r; +} + --- a/acqui/ajax-getauthvaluedropbox.pl +++ a/acqui/ajax-getauthvaluedropbox.pl @@ -0,0 +1,73 @@ +#!/usr/bin/perl + +# Copyright 2012 BibLibre +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +=head1 NAME + +ajax-getauthvaluedropbox.pl - returns an authorised values dropbox + +=head1 DESCRIPTION + +this script returns an authorised values dropbox + +=head1 CGI PARAMETERS + +=over 4 + +=item name + +The name of the dropbox. + +=item category + +The category of authorised values. + +=item default + +Default value for the dropbox. + +=back + +=cut + +use Modern::Perl; + +use CGI; +use C4::Budgets; +use C4::Charset; + +my $input = new CGI; +my $name = $input->param('name'); +my $category = $input->param('category'); +my $default = $input->param('default'); +$default = C4::Charset::NormalizeString($default); + +binmode STDOUT, ':encoding(UTF-8)'; +print $input->header(-type => 'text/plain', -charset => 'UTF-8'); +my $avs = GetAuthvalueDropbox($category, $default); +my $html = qq||; + +print $html; --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -7036,6 +7036,18 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } + + + + + +$DBversion = "3.13.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('MarcFieldsToOrder','','Set the mapping values for a new order line created from a marcrecord (staged file). In a YAML format.', NULL, 'textarea')"); + print "Upgrade to $DBversion done (Bug 7180: Added MarcFieldsToOrder syspref)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2582,3 +2582,4 @@ fieldset.rows table.mceListBox { -webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5); box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5); } + --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js @@ -679,84 +679,29 @@ function calcNewsuggTotal(){ return true; } - -// ---------------------------------------- -//USED BY NEWORDEREMPTY.PL -/* -function fetchSortDropbox(f) { - var budgetId=f.budget_id.value; - var handleSuccess = function(o){ - if(o.responseText !== undefined){ - sort_dropbox.innerHTML = o.responseText; - } - } - - var callback = { success:handleSuccess }; - var sUrl = '../acqui/fetch_sort_dropbox.pl?sort=1&budget_id='+budgetId - var sort_dropbox = document.getElementById('sort1'); - var request1 = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); - var rr = '00'; - -// FIXME: --------- twice , coz the 2 requests get mixed up otherwise - - var handleSuccess2 = function(o){ - if(o.responseText !== undefined){ - sort2_dropbox.innerHTML = o.responseText; - } - } - - var callback2 = { success:handleSuccess }; - var sUrl2 = '../acqui/fetch_sort_dropbox.pl?sort=2&budget_id='+budgetId; - var sort2_dropbox = document.getElementById('sort2'); - var request2 = YAHOO.util.Connect.asyncRequest('GET', sUrl2, callback2); - -} -*/ - - - -//USED BY NEWORDEREMPTY.PL -function fetchSortDropbox(f) { - var budgetId=f.budget_id.value; - -for (i=1;i<=2;i++) { - - var sort_zone = document.getElementById('sort'+i+'_zone'); - var url = '../acqui/fetch_sort_dropbox.pl?sort='+i+'&budget_id='+budgetId; - - var xmlhttp = null; - xmlhttp = new XMLHttpRequest(); - if ( typeof xmlhttp.overrideMimeType != 'undefined') { - xmlhttp.overrideMimeType('text/xml'); - } - - xmlhttp.open('GET', url, false); - xmlhttp.send(null); - - xmlhttp.onreadystatechange = function() { - if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - // stupid JS... - } else { - // wait for the call to complete - } - }; - // rc = eval ( xmlhttp.responseText ); - var retRootType = xmlhttp.responseXML.firstChild.nodeName; - var existingInputs = sort_zone.getElementsByTagName('input'); - if (existingInputs.length > 0 && retRootType == 'input') { - // when sort is already an input, do not override to preseve value +function getAuthValueDropbox( name, cat, destination, selected ) { + if (cat == null || cat == "") { + $(destination).replaceWith(' ' ); return; } - sort_zone.innerHTML = xmlhttp.responseText; -} + $.ajax({ + url: "/cgi-bin/koha/acqui/ajax-getauthvaluedropbox.pl", + data: { + name: name, + category: cat, + default: selected + }, + async: false, + success: function(data){ + if(data === "0"){ + $(destination).replaceWith(' ' ); + }else{ + $(destination).replaceWith(data); + } + } + }); } - - - - - - //USED BY NEWORDEREMPTY.PL function totalExceedsBudget(budgetId, total) { @@ -891,4 +836,4 @@ function hideAllColumns(){ $("#selections span").removeClass("selected"); $("#plan td:nth-child(2),#plan th:nth-child(2)").nextUntil("th:nth-child("+(allCols-1)+"),td:nth-child("+(allCols-1)+")").hide(); // hide all but the last two columns $("#hideall").attr("checked","checked").parent().addClass("selected"); -} +} --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -12,6 +12,7 @@ [% INCLUDE 'datatables-strings.inc' %] + @@ -38,204 +112,216 @@
[% IF ( batch_details ) %] -

Add orders from [% comments %] +

Add orders from [% comments %] ([% file_name %] staged on [% upload_timestamp %]) -

-
-
- - - - - - - [% FOREACH biblio_lis IN biblio_list %] - - - - - - [% IF ( biblio_lis.match_biblionumber ) %] - - - - [% END %] - [% END %] -
CitationMatch?Order
- [% biblio_lis.citation %] - - [% biblio_lis.overlay_status %]Add order
   Matches biblio [% biblio_lis.match_biblionumber %] (score = [% biblio_lis.match_score %]): [% biblio_lis.match_citation %]
-
-
- [% IF ( pages ) %] -
- Page - [% FOREACH page IN pages %] - [% IF ( page.current_page ) %] - [% page.page_number %] - [% ELSE %] - [% page.page_number %] - [% END %] - [% END %] - [% END %] - [% ELSE %] -
-

Choose the file to add to the basket

- - - - - - - - - - - - - [% FOREACH batch_lis IN batch_list %] - - - - - - - - - [% END %] - -
File nameCommentsStatusStaged# Bibs 
[% batch_lis.file_name %][% batch_lis.comments %][% batch_lis.import_status %][% batch_lis.staged_date | $KohaDates %] [% batch_lis.staged_hour %][% batch_lis.num_biblios %]Add orders
-
- [% END %] -
- [% IF ( import_batch_id ) %] -
-

Import All

-

Import all the lines in the basket with the following parameters:

-
- - - - - - - [% FOREACH loop_currencie IN loop_currencies %] - - [% END %] - - [% IF ( items ) %] -
- Item - [% IF ( NoACQframework ) %] -
No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used
- [% END %] - - [% FOREACH item IN items %] -
-
-
    [% FOREACH iteminformatio IN item.iteminformation %]
  1. -
    + +
    + Check All + Uncheck All + + + + + + - - [% iteminformatio.marc_value %] - - - - - -
  2. + [% FOREACH cur IN loop_currencies %] + [% END %] -
-
-
- [% END %] -
- [% END %] -
- Accounting details -
    -
  1. - - -
  2. -
  3. - [% IF ( close ) %] - Budget: - [% Budget_name %] - [% ELSE %] -
  4. - - -
  5. -
  6. - - + + + [% biblio.overlay_status %] + [% IF ( biblio.match_biblionumber ) %] + Matches biblio [% biblio.match_biblionumber %] (score = [% biblio.match_score %]): [% biblio.match_citation %] + [% END %] + + Quantity: + + + Price: + + + Discount: + + + [% IF ( close ) %] + Budget: + [% Budget_name %] [% ELSE %] - + + [% END %] + + + + + + + + + +
+ [% END %] +
+

Import All

+

Import all the lines in the basket with the following parameters:

+ + [% IF ( items ) %] +
+ Item + [% IF ( NoACQframework ) %] +
No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used
[% END %] - - - [% END %] - -
  • - - -
  • -
  • The 2 following fields are available for your own usage. They can be useful for statistical purposes
    - - - [% IF CGIsort1 %] - + + + + +
  • + [% END %] + +
    +
    + [% END %] + + [% END %] + +
    + Accounting details +
      +
    1. + + +
    2. +
    3. + [% IF ( close ) %] + Budget: + [% Budget_name %] [% ELSE %] - +
    4. + + +
    5. +
    6. + + +
    7. [% END %] - [% END %] - - [% ELSE %] - - [% END %] - - -
    8. - - - [% IF CGIsort2 %] - +
    9. +
    10. +
      The 2 following fields are available for your own usage. They can be useful for statistical purposes
      + + [% IF CGIsort1 %] + [% ELSE %] - + [% END %] - [% END %] - - [% ELSE %] - - [% END %] - -
    11. -
    12. - -
    13. -
    -
    -
    - Cancel -
    - - - [% END %] + +
  • + + + [% IF CGIsort2 %] + + [% ELSE %] + + [% END %] + +
  • + + +
    + Cancel +
    + + + + [% ELSE %] +
    +

    Choose the file to add to the basket

    + + + + + + + + + + + + + [% FOREACH batch_lis IN batch_list %] + + + + + + + + + [% END %] + +
    File nameCommentsStatusStaged# Bibs 
    [% batch_lis.file_name %][% batch_lis.comments %][% batch_lis.import_status %][% batch_lis.staged_date | $KohaDates %] [% batch_lis.staged_hour %][% batch_lis.num_biblios %]Add orders
    +
    + [% END %] + --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref @@ -42,6 +42,10 @@ Acquisitions: yes: Warn no: "Do not warn" - when the librarian tries to create an invoice with a duplicate number. + - + - Set the mapping values for a new order line created from a marcrecord (staged file). In a YAML format, so you have to finished with an empty line. + - pref: MarcFieldsToOrder + type: textarea Printing: - --