Lines 1221-1227
subtest 'FieldsForCalculatingFundValues with a vendor NOT including tax in their
Link Here
|
1221 |
t::lib::Mocks::mock_preference('CalculateFundValuesIncludingTax', '1'); |
1221 |
t::lib::Mocks::mock_preference('CalculateFundValuesIncludingTax', '1'); |
1222 |
my ( $unitprice_field, $ecost_field ) = C4::Budgets->FieldsForCalculatingFundValues(); |
1222 |
my ( $unitprice_field, $ecost_field ) = C4::Budgets->FieldsForCalculatingFundValues(); |
1223 |
is ( $unitprice_field, 'unitprice_tax_included', "We expect this to be unitprice_tax_included" ); |
1223 |
is ( $unitprice_field, 'unitprice_tax_included', "We expect this to be unitprice_tax_included" ); |
1224 |
is ( $ecost_field, 'ecost_tax_included', "We expect this to be ecost_tax_included" ); |
1224 |
is ( $ecost_field, 'ecost_tax_included', "We expect this to be ecost_tax_included" ); |
1225 |
t::lib::Mocks::mock_preference('CalculateFundValuesIncludingTax', '0'); |
1225 |
t::lib::Mocks::mock_preference('CalculateFundValuesIncludingTax', '0'); |
1226 |
( $unitprice_field, $ecost_field ) = C4::Budgets->FieldsForCalculatingFundValues(); |
1226 |
( $unitprice_field, $ecost_field ) = C4::Budgets->FieldsForCalculatingFundValues(); |
1227 |
is ( $unitprice_field, 'unitprice_tax_excluded', "We expect this to be unitprice_tax_excluded" ); |
1227 |
is ( $unitprice_field, 'unitprice_tax_excluded', "We expect this to be unitprice_tax_excluded" ); |
Lines 1229-1235
subtest 'FieldsForCalculatingFundValues with a vendor NOT including tax in their
Link Here
|
1229 |
|
1229 |
|
1230 |
# Test GetBudgetOrdered() |
1230 |
# Test GetBudgetOrdered() |
1231 |
# ----------------------- |
1231 |
# ----------------------- |
1232 |
|
1232 |
|
1233 |
# Build an order |
1233 |
# Build an order |
1234 |
t::lib::Mocks::mock_preference('OrderPriceRounding','nearest_cent'); |
1234 |
t::lib::Mocks::mock_preference('OrderPriceRounding','nearest_cent'); |
1235 |
my $item_1 = $builder->build_sample_item; |
1235 |
my $item_1 = $builder->build_sample_item; |
Lines 1325-1331
subtest 'FieldsForCalculatingFundValues with a vendor that IS including tax in t
Link Here
|
1325 |
t::lib::Mocks::mock_preference('CalculateFundValuesIncludingTax', '1'); |
1325 |
t::lib::Mocks::mock_preference('CalculateFundValuesIncludingTax', '1'); |
1326 |
my ( $unitprice_field, $ecost_field ) = C4::Budgets->FieldsForCalculatingFundValues(); |
1326 |
my ( $unitprice_field, $ecost_field ) = C4::Budgets->FieldsForCalculatingFundValues(); |
1327 |
is ( $unitprice_field, 'unitprice_tax_included', "We expect this to be unitprice_tax_included" ); |
1327 |
is ( $unitprice_field, 'unitprice_tax_included', "We expect this to be unitprice_tax_included" ); |
1328 |
is ( $ecost_field, 'ecost_tax_included', "We expect this to be ecost_tax_included" ); |
1328 |
is ( $ecost_field, 'ecost_tax_included', "We expect this to be ecost_tax_included" ); |
1329 |
t::lib::Mocks::mock_preference('CalculateFundValuesIncludingTax', '0'); |
1329 |
t::lib::Mocks::mock_preference('CalculateFundValuesIncludingTax', '0'); |
1330 |
( $unitprice_field, $ecost_field ) = C4::Budgets->FieldsForCalculatingFundValues(); |
1330 |
( $unitprice_field, $ecost_field ) = C4::Budgets->FieldsForCalculatingFundValues(); |
1331 |
is ( $unitprice_field, 'unitprice_tax_excluded', "We expect this to be unitprice_tax_excluded" ); |
1331 |
is ( $unitprice_field, 'unitprice_tax_excluded', "We expect this to be unitprice_tax_excluded" ); |
1332 |
- |
|
|