Lines 169-196
sub printbasketgrouppdf{
Link Here
|
169 |
croak $@; |
169 |
croak $@; |
170 |
} |
170 |
} |
171 |
|
171 |
|
172 |
$ord->{rrp} = ConvertCurrency( $ord->{'currency'}, $ord->{rrp} ); |
172 |
$ord = C4::Acquisition::populate_order_with_prices({ order => $ord, booksellerid => $bookseller->{id}, ordering => 1 }); |
173 |
if ( $bookseller->{'listincgst'} ) { |
|
|
174 |
$ord->{rrpgsti} = sprintf( "%.2f", $ord->{rrp} ); |
175 |
$ord->{gstgsti} = sprintf( "%.2f", $ord->{gstrate} * 100 ); |
176 |
$ord->{rrpgste} = sprintf( "%.2f", $ord->{rrp} / ( 1 + ( $ord->{gstgsti} / 100 ) ) ); |
177 |
$ord->{gstgste} = sprintf( "%.2f", $ord->{gstgsti} / ( 1 + ( $ord->{gstgsti} / 100 ) ) ); |
178 |
$ord->{ecostgsti} = sprintf( "%.2f", $ord->{ecost} ); |
179 |
$ord->{ecostgste} = sprintf( "%.2f", $ord->{ecost} / ( 1 + ( $ord->{gstgsti} / 100 ) ) ); |
180 |
$ord->{gstvalue} = sprintf( "%.2f", ( $ord->{ecostgsti} - $ord->{ecostgste} ) * $ord->{quantity}); |
181 |
$ord->{totalgste} = sprintf( "%.2f", $ord->{quantity} * $ord->{ecostgste} ); |
182 |
$ord->{totalgsti} = sprintf( "%.2f", $ord->{quantity} * $ord->{ecostgsti} ); |
183 |
} else { |
184 |
$ord->{rrpgsti} = sprintf( "%.2f", $ord->{rrp} * ( 1 + ( $ord->{gstrate} ) ) ); |
185 |
$ord->{rrpgste} = sprintf( "%.2f", $ord->{rrp} ); |
186 |
$ord->{gstgsti} = sprintf( "%.2f", $ord->{gstrate} * 100 ); |
187 |
$ord->{gstgste} = sprintf( "%.2f", $ord->{gstrate} * 100 ); |
188 |
$ord->{ecostgsti} = sprintf( "%.2f", $ord->{ecost} * ( 1 + ( $ord->{gstrate} ) ) ); |
189 |
$ord->{ecostgste} = sprintf( "%.2f", $ord->{ecost} ); |
190 |
$ord->{gstvalue} = sprintf( "%.2f", ( $ord->{ecostgsti} - $ord->{ecostgste} ) * $ord->{quantity}); |
191 |
$ord->{totalgste} = sprintf( "%.2f", $ord->{quantity} * $ord->{ecostgste} ); |
192 |
$ord->{totalgsti} = sprintf( "%.2f", $ord->{quantity} * $ord->{ecostgsti} ); |
193 |
} |
194 |
my $bib = GetBiblioData($ord->{biblionumber}); |
173 |
my $bib = GetBiblioData($ord->{biblionumber}); |
195 |
my $itemtypes = GetItemTypes(); |
174 |
my $itemtypes = GetItemTypes(); |
196 |
|
175 |
|
Lines 212-228
sub printbasketgrouppdf{
Link Here
|
212 |
} |
191 |
} |
213 |
} |
192 |
} |
214 |
|
193 |
|
215 |
my $ba_order = { |
194 |
$ord->{itemtype} = $ord->{itemtype} and $bib->{itemtype} ? $itemtypes->{$bib->{itemtype}}->{description} : undef; |
216 |
isbn => ($ord->{isbn} ? $ord->{isbn} : undef), |
195 |
$ord->{en} = $en ? $en : undef; |
217 |
itemtype => ( $ord->{itemtype} and $bib->{itemtype} ? $itemtypes->{$bib->{itemtype}}->{description} : undef ), |
196 |
$ord->{edition} = $edition ? $edition : undef; |
218 |
en => ( $en ? $en : undef ), |
|
|
219 |
edition => ( $edition ? $edition : undef ), |
220 |
}; |
221 |
for my $key ( qw/ gstrate author title itemtype publishercode copyrightdate publicationyear discount quantity rrpgsti rrpgste gstgsti gstgste ecostgsti ecostgste gstvalue totalgste totalgsti order_vendornote / ) { |
222 |
$ba_order->{$key} = $ord->{$key}; |
223 |
} |
224 |
|
197 |
|
225 |
push(@ba_orders, $ba_order); |
198 |
push(@ba_orders, $ord); |
226 |
} |
199 |
} |
227 |
$orders{$basket->{basketno}} = \@ba_orders; |
200 |
$orders{$basket->{basketno}} = \@ba_orders; |
228 |
} |
201 |
} |
229 |
- |
|
|