Bugzilla – Attachment 68712 Details for
Bug 18267
Update price and tax fields in EDI to reflect DB changes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18267 Add tests for all price methods
Bug-18267-Add-tests-for-all-price-methods.patch (text/plain), 1.93 KB, created by
Kyle M Hall (khall)
on 2017-10-27 13:53:10 UTC
(
hide
)
Description:
Bug 18267 Add tests for all price methods
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-10-27 13:53:10 UTC
Size:
1.93 KB
patch
obsolete
>From 03fc4f3173a9442c1aaf91431ad481565b2b4420 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Mon, 10 Jul 2017 16:27:59 +0100 >Subject: [PATCH] Bug 18267 Add tests for all price methods > >Add test for price_gross in addition to price_net in Invoices >Test price_info and price_info_inclusive in quotes >NB test is that price_info_inclusive returns undef which we >expect to be the normal condition > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/EdiInvoice.t | 6 +++++- > t/Edifact.t | 4 +++- > 2 files changed, 8 insertions(+), 2 deletions(-) > >diff --git a/t/EdiInvoice.t b/t/EdiInvoice.t >index 6ed0dbb..877ce5a 100755 >--- a/t/EdiInvoice.t >+++ b/t/EdiInvoice.t >@@ -3,7 +3,7 @@ use strict; > use warnings; > use FindBin qw( $Bin ); > >-use Test::More tests => 20; >+use Test::More tests => 21; > > BEGIN { use_ok('Koha::Edifact') } > >@@ -70,6 +70,10 @@ my $lineprice = $lines->[7]->price_net; > > is( $lineprice, 4.55, 'correct net line price returned' ); > >+my $lineprice = $lines->[7]->price_gross; >+ >+is( $lineprice, 7.99, 'correct gross line price returned' ); >+ > my $tax = $lines->[7]->tax; > > is( $tax, 0, 'correct tax amount returned' ); >diff --git a/t/Edifact.t b/t/Edifact.t >index cc20539..8c82b73 100755 >--- a/t/Edifact.t >+++ b/t/Edifact.t >@@ -3,7 +3,7 @@ use strict; > use warnings; > use FindBin qw( $Bin ); > >-use Test::More tests => 34; >+use Test::More tests => 36; > > BEGIN { use_ok('Koha::Edifact') } > >@@ -51,6 +51,8 @@ my $test_line = $lin->[-1]; > is( $test_line->line_item_number, 18, 'correct line number returned' ); > is( $test_line->item_number_id, '9780273761006', 'correct ean returned' ); > is( $test_line->quantity, 1, 'quantity returned' ); >+is( $test_line->price_info, 114.97, 'price returned' ); >+is( $test_line->price_info_inclusive, undef, 'discounted price undefined as expected' ); > > my $test_title = 'International business [electronic resource]'; > my $marcrec = $test_line->marc_record; >-- >2.10.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18267
:
61600
|
61601
|
61602
|
61605
|
61606
|
65244
|
65245
|
65246
|
65250
|
65251
|
65252
|
65253
|
65254
|
68536
|
68707
|
68708
|
68709
|
68710
|
68711
|
68712
|
68713
|
68714
|
113569
|
113597
|
113897