cssat / sprout-issues

An issue-only repository for the Sprout data collection platform
https://sproutservices.org
2 stars 1 forks source link

Providers Need a Way to Upload Expense Receipts #205

Open sarahyatsko opened 11 months ago

sarahyatsko commented 11 months ago

Is your feature request related to a problem? Please describe.

Currently providers have expenses such as:

When a provider invoices DCYF, these charges are entered in Sprout, and appear on the Sprout generated invoice. However, the provider then needs to scan and send the receipts for each item along with their invoice to DCYF.

In Aug 2024, we realized that DCYF area leads and fiscal team have requirements that were not initially captured as well as issues with Good To Go receipts that may take longer than 3 days to be received by visit supervisors. Specifically, this means that leads and fiscal need to receive and review all receipts for a given provider, for a given region, for a given month/billing cycle; clicking individually on a long list of visit reports with receipts attached to them was called out as being too much work. 4 new user stories are added below.

Describe the solution you'd like It would be helpful if, instead, providers could upload a scanned receipt in to Sprout and that receipt would then be attached to an invoice.

  1. As a visit supervisor or org admin, receipt uploads should NOT be required in order to submit or approve a visit report in order to accommodate scenarios when a receipt may not be available within expected 3 day timeframe reports should be submitted and approved in (for example Good To Go traffic camera tolls mailed to visit supervisors who don't have Good To Go passes). Note this does not change/ is separate from the business rule that receipts are required for reimbursement; the solution must allow social workers access to reports as per requirements and it means providers may be delayed in submitting invoices when waiting on receipts (something to address via comms and training).
  2. As a provider, I need to be able to download all receipts for a provider org for a given billing month, for a given region into either a single .pdf file or .zip file of separate receipt files. I also need to easily find which visit reports in my billing file may be missing receipts required for reimbursement so I can reject such reports and then have visit supervisors upload missing or late receipts, or remove their request for reimbursement if no receipt is available, before submitting monthly invoices.
  3. As an area lead, I need to be able to download all the receipts for a provider org for a given billing month, for a given region into either a single .pdf file or into a .zip file of separate receipt files so I can hand them over to our fiscal team. I could be directed to the control or location within Sprout where I can download all of a provider's receipts via a link embedded in the Sprout generated billing email.
  4. As a DCYF fiscal agent, I need to receive receipts for providers, by region, by billing month from the area leads as I do today. These receipts would be "bundled" into a single folder or a single file for my review and retention for audit purposes.

Prioritization Process

DCYF has identified this as an issue they would like explored

keithligon commented 9 months ago

Visit reports currently have 3 types of reimbursements, are receipts needed for others?

  1. namedReimbursements
  2. activityReimbursement
  3. otherTravelReimbursement

Several utilities exist in sprout that can be used:

Storage is two fold, the record of the upload is stored in the Attachments table. With the location being the bucket location in s3 and resourceId used to tie the upload back to a specific sprout resource. A new resource type will need to be introduced.

    Column    |           Type           | Nullable |  
--------------+--------------------------+----------+
 id           | integer                  | not null | 
 name         | character varying(255)   | not null |
 location     | character varying(255)   | not null |
 createdAt    | timestamp with time zone | not null |
 updatedAt    | timestamp with time zone | not null |
 deletedAt    | timestamp with time zone |          |
 size         | integer                  | not null | 
 resourceType | character varying(255)   | not null |
 resourceId   | integer                  | not null |

S3 Storage is controlled by the oliver-secure-storage app (src). Needs review.

Named, activity, and other travel reimbursements are all stored as json columns on the VisitReports table. These columns allow storage of multiple reimbursements. e.g:

 [{"reimburseeId":"13","reimbursementName":"Vehicle Cleaning"},
 {"reimburseeId":"2","reimbursementName":"Clean/Disinfect Visit Space"}]

New identifiers will need to be introduce to link each separate reimbursement to a specific attachment. Alternately, a new reimbursements table could be introduced that maps Attachments to VisitReports.

How does transmission to DCYF work with current billing processes and how will it impact automated billing?

keithligon commented 4 weeks ago

https://github.com/cssat/sprout/pull/194