Skip to content

Commit

Permalink
Merge pull request #62 from kjgilbert/main
Browse files Browse the repository at this point in the history
updates to 0.7.1 about fixed costs and comment column
  • Loading branch information
aghaynes authored Nov 27, 2024
2 parents 15b2933 + deec21d commit 6b63cff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
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

0 comments on commit 6b63cff

Please sign in to comment.