|
Lines 2-8
Link Here
|
| 2 |
|
2 |
|
| 3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
| 4 |
|
4 |
|
| 5 |
use Test::More tests => 72; |
5 |
use Test::More tests => 69; |
| 6 |
use C4::Context; |
6 |
use C4::Context; |
| 7 |
use Koha::DateUtils; |
7 |
use Koha::DateUtils; |
| 8 |
use DateTime::Duration; |
8 |
use DateTime::Duration; |
|
Lines 50-62
my $sample_supplier1 = {
Link Here
|
| 50 |
accountnumber => 'accountnumber1', |
50 |
accountnumber => 'accountnumber1', |
| 51 |
fax => 'fax1', |
51 |
fax => 'fax1', |
| 52 |
url => 'url1', |
52 |
url => 'url1', |
| 53 |
contact => 'contact1', |
|
|
| 54 |
contpos => 'contpos1', |
| 55 |
contphone => 'contphone1', |
| 56 |
contfax => 'contefax1', |
| 57 |
contaltphone => 'contaltphone1', |
| 58 |
contemail => 'contemail1', |
| 59 |
contnotes => 'contnotes1', |
| 60 |
active => 1, |
53 |
active => 1, |
| 61 |
gstreg => 1, |
54 |
gstreg => 1, |
| 62 |
listincgst => 1, |
55 |
listincgst => 1, |
|
Lines 77-89
my $sample_supplier2 = {
Link Here
|
| 77 |
accountnumber => 'accountnumber2', |
70 |
accountnumber => 'accountnumber2', |
| 78 |
fax => 'fax2', |
71 |
fax => 'fax2', |
| 79 |
url => 'url2', |
72 |
url => 'url2', |
| 80 |
contact => 'contact2', |
|
|
| 81 |
contpos => 'contpos2', |
| 82 |
contphone => 'contphone2', |
| 83 |
contfax => 'contefax2', |
| 84 |
contaltphone => 'contaltphone2', |
| 85 |
contemail => 'contemail2', |
| 86 |
contnotes => 'contnotes2', |
| 87 |
active => 1, |
73 |
active => 1, |
| 88 |
gstreg => 1, |
74 |
gstreg => 1, |
| 89 |
listincgst => 1, |
75 |
listincgst => 1, |
|
Lines 91-97
my $sample_supplier2 = {
Link Here
|
| 91 |
gstrate => '2.0000', |
77 |
gstrate => '2.0000', |
| 92 |
discount => '2.0000', |
78 |
discount => '2.0000', |
| 93 |
notes => 'notes2', |
79 |
notes => 'notes2', |
| 94 |
deliverytime => 2, |
80 |
deliverytime => 2 |
| 95 |
}; |
81 |
}; |
| 96 |
|
82 |
|
| 97 |
my $id_supplier1 = C4::Bookseller::AddBookseller($sample_supplier1); |
83 |
my $id_supplier1 = C4::Bookseller::AddBookseller($sample_supplier1); |
|
Lines 231-243
$sample_supplier2 = {
Link Here
|
| 231 |
accountnumber => 'accountnumber2 modified', |
217 |
accountnumber => 'accountnumber2 modified', |
| 232 |
fax => 'fax2 modified', |
218 |
fax => 'fax2 modified', |
| 233 |
url => 'url2 modified', |
219 |
url => 'url2 modified', |
| 234 |
contact => 'contact2 modified', |
|
|
| 235 |
contpos => 'contpos2 modified', |
| 236 |
contphone => 'contphone2 modified', |
| 237 |
contfax => 'contefax2 modified', |
| 238 |
contaltphone => 'contaltphone2 modified', |
| 239 |
contemail => 'contemail2 modified', |
| 240 |
contnotes => 'contnotes2 modified', |
| 241 |
active => 1, |
220 |
active => 1, |
| 242 |
gstreg => 1, |
221 |
gstreg => 1, |
| 243 |
listincgst => 1, |
222 |
listincgst => 1, |
|
Lines 278-290
my $sample_supplier3 = {
Link Here
|
| 278 |
accountnumber => 'accountnumber3', |
257 |
accountnumber => 'accountnumber3', |
| 279 |
fax => 'fax3', |
258 |
fax => 'fax3', |
| 280 |
url => 'url3', |
259 |
url => 'url3', |
| 281 |
contact => 'contact3', |
|
|
| 282 |
contpos => 'contpos3', |
| 283 |
contphone => 'contphone3', |
| 284 |
contfax => 'contefax3', |
| 285 |
contaltphone => 'contaltphone3', |
| 286 |
contemail => 'contemail3', |
| 287 |
contnotes => 'contnotes3', |
| 288 |
active => 1, |
260 |
active => 1, |
| 289 |
gstreg => 1, |
261 |
gstreg => 1, |
| 290 |
listincgst => 1, |
262 |
listincgst => 1, |
|
Lines 305-317
my $sample_supplier4 = {
Link Here
|
| 305 |
accountnumber => 'accountnumber4', |
277 |
accountnumber => 'accountnumber4', |
| 306 |
fax => 'fax4', |
278 |
fax => 'fax4', |
| 307 |
url => 'url4', |
279 |
url => 'url4', |
| 308 |
contact => 'contact4', |
|
|
| 309 |
contpos => 'contpos4', |
| 310 |
contphone => 'contphone4', |
| 311 |
contfax => 'contefax4', |
| 312 |
contaltphone => 'contaltphone4', |
| 313 |
contemail => 'contemail4', |
| 314 |
contnotes => 'contnotes4', |
| 315 |
active => 1, |
280 |
active => 1, |
| 316 |
gstreg => 1, |
281 |
gstreg => 1, |
| 317 |
listincgst => 1, |
282 |
listincgst => 1, |
|
Lines 677-683
my $booksellerid = C4::Bookseller::AddBookseller(
Link Here
|
| 677 |
] |
642 |
] |
| 678 |
); |
643 |
); |
| 679 |
|
644 |
|
| 680 |
my @booksellers = C4::Bookseller::GetBookSeller('my vendor'); |
645 |
@booksellers = C4::Bookseller::GetBookSeller('my vendor'); |
| 681 |
ok( |
646 |
ok( |
| 682 |
( grep { $_->{'id'} == $booksellerid } @booksellers ), |
647 |
( grep { $_->{'id'} == $booksellerid } @booksellers ), |
| 683 |
'GetBookSeller returns correct record when passed a name' |
648 |
'GetBookSeller returns correct record when passed a name' |
|
Lines 738-744
sub field_filter {
Link Here
|
| 738 |
'bookselleremail', 'booksellerfax', |
703 |
'bookselleremail', 'booksellerfax', |
| 739 |
'booksellerurl', 'othersupplier', |
704 |
'booksellerurl', 'othersupplier', |
| 740 |
'currency', 'invoiceprice', |
705 |
'currency', 'invoiceprice', |
| 741 |
'listprice' |
706 |
'listprice', 'contacts' |
| 742 |
) |
707 |
) |
| 743 |
{ |
708 |
{ |
| 744 |
|
709 |
|
| 745 |
- |
|
|