Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates to 0.7.1 about fixed costs and comment column #62

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: CTUCosting
Type: Package
Title: Machinery for CTU costings
Version: 0.7.0
Version: 0.7.1
Authors@R:
c(
person(given = "Alan G.", family = "Haynes", role = "cre",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# CTUCosting 0.7.1 (2024-11-27)

* Added a comment column for admin about fixed costs for DB closure.

# CTUCosting 0.7.0 (2024-11-01)

* Discounts are no longer calculated based on the number of hours. Discounts are defined in REDCap.
Expand Down
4 changes: 3 additions & 1 deletion R/select.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
select_for_admin <- function(data){
Service <- wp <- wp_lab <- Hours <- Rate <- Cost <- NULL
data |>
select(Service, wp, wp_lab, Hours, Rate, Cost)
select(Service, wp, wp_lab, Hours, Rate, Cost) |>
mutate(comment = ifelse(wp == "045.3", "!!Fixed price, not hourly!!", ""))

}

#' select relevant workpackage variables for PDF
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-select.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ e7 <- expenses_prep(d$expenses, meta)

test_that("variables from select_for_admin", {
s <- select_for_admin(wp)
expect_equal(names(s), c("Service", "wp", "wp_lab", "Hours", "Rate", "Cost"))
expect_equal(names(s), c("Service", "wp", "wp_lab", "Hours", "Rate", "Cost","comment"))
})
test_that("variables from select_for_pdf", {
s <- select_for_pdf(wp)
Expand Down
Loading