[ ] Detect do not bill record by testing the Do Not Bill != 0 | Do Not Bill Reason != “”
[ ] Set the status for these records to “canceled”.
[ ] Copy Do Not Bill Invoice # to Invoice number (use coalesce())
[ ] Set amount_due = 0
[ ] set qty_provided = 0
[ ] Preserve Do Not Bill Reason in the reason column in the tables invoice_line_item and invoice_line_item_communications.
[ ] Add values to the invoice_line_item_reasons object in the rcc.billing package. Add the distinct values in the Do Not Bill Reason column of Sandra's spreadsheets. Use the numeric prefix as the code. Use the entire string with the numeric code as the label.
[ ] replace filter(do_not_bill_reason == "27. PI no longer with UF") with filter(reason %in% c("27", "45")) to expand the banned owner criteria.
Vouchers
[ ] Detect voucher applications by searching the Deposit or JE # field for “voucher”.
[ ] Set reason = "seeking voucher" for these records.
[ ] Add code = "seeking_voucher", label = "seeking voucher" to the invoice_line_item_reasons object in the rcc.billing package.
Default reason value
[ ] For all normal payment, set reason = NA_character
Note: we might need to set the 3 new reason values in a single case_when() statement.
Update
update_invoice_line_items_with_invoicing_details.R
coalesce()
)reason
column in the tables invoice_line_item and invoice_line_item_communications.invoice_line_item_reasons
object in the rcc.billing package. Add the distinct values in the Do Not Bill Reason column of Sandra's spreadsheets. Use the numeric prefix as the code. Use the entire string with the numeric code as the label.filter(do_not_bill_reason == "27. PI no longer with UF")
withfilter(reason %in% c("27", "45"))
to expand the banned owner criteria.Vouchers
invoice_line_item_reasons
object in the rcc.billing package.Default
reason
valuereason = NA_character
Note: we might need to set the 3 new
reason
values in a singlecase_when()
statement.