Lines 57-62
if ( $op eq 'add_form' ) {
Link Here
|
57 |
my $rate = $input->param('rate'); |
57 |
my $rate = $input->param('rate'); |
58 |
my $active = $input->param('active'); |
58 |
my $active = $input->param('active'); |
59 |
my $p_sep_by_space = $input->param('p_sep_by_space'); |
59 |
my $p_sep_by_space = $input->param('p_sep_by_space'); |
|
|
60 |
my $p_cs_precedes = $input->param('p_cs_precedes') // 0; |
60 |
my $is_a_modif = $input->param('is_a_modif'); |
61 |
my $is_a_modif = $input->param('is_a_modif'); |
61 |
|
62 |
|
62 |
if ($is_a_modif) { |
63 |
if ($is_a_modif) { |
Lines 66-71
if ( $op eq 'add_form' ) {
Link Here
|
66 |
$currency->rate($rate); |
67 |
$currency->rate($rate); |
67 |
$currency->active($active); |
68 |
$currency->active($active); |
68 |
$currency->p_sep_by_space($p_sep_by_space); |
69 |
$currency->p_sep_by_space($p_sep_by_space); |
|
|
70 |
$currency->p_cs_precedes($p_cs_precedes); |
69 |
eval { $currency->store; }; |
71 |
eval { $currency->store; }; |
70 |
if ($@) { |
72 |
if ($@) { |
71 |
push @messages, { type => 'error', code => 'error_on_update' }; |
73 |
push @messages, { type => 'error', code => 'error_on_update' }; |
Lines 74-85
if ( $op eq 'add_form' ) {
Link Here
|
74 |
} |
76 |
} |
75 |
} else { |
77 |
} else { |
76 |
my $currency = Koha::Acquisition::Currency->new( |
78 |
my $currency = Koha::Acquisition::Currency->new( |
77 |
{ currency => $currency_code, |
79 |
{ |
78 |
symbol => $symbol, |
80 |
currency => $currency_code, |
79 |
isocode => $isocode, |
81 |
symbol => $symbol, |
80 |
rate => $rate, |
82 |
isocode => $isocode, |
81 |
active => $active, |
83 |
rate => $rate, |
|
|
84 |
active => $active, |
82 |
p_sep_by_space => $p_sep_by_space, |
85 |
p_sep_by_space => $p_sep_by_space, |
|
|
86 |
p_cs_precedes => $p_cs_precedes, |
83 |
} |
87 |
} |
84 |
); |
88 |
); |
85 |
eval { $currency->store; }; |
89 |
eval { $currency->store; }; |