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