Giving Sources Widget ===================== The Giving Sources widget displays a pie chart showing the sources of giving to one or more funds. Segments within the pie chart indicate what amount of the giving comes from mobile, one-time gifts, recurring gifts, and other. Typically "other" will equate to all gifts not made online, but if your church includes online giving from other sources, those gifts *may* also be included in the "other" segment. .. admonition:: Online Bundles The widget identifies online giving by the type bundle it is in. By default, online giving is placed in a bundle of type Online. This is true for online giving transactions done through TouchPoint and also for imported online giving such as Pushpay or Txt2Give. If your church moves these contribution entries to bundles of a different type, the script *as is* will no longer recognize these contributions as Online. You will need to modify the script to account for the other bundle type(s) that contains online contributions. The widget utilizes an HTML file, SQL script and Python script as shown below. Since the tasks list is the same for all users, Caching should be set to **all users**. Customizing the Giving Sources Widget ------------------------------------- For most churches, all the necessary customization can be done by modifying the settings in the opening lines of the Python script. On line 2, enter the desired fund (or comma-separated list of funds) within the single quotes. On line 3, enter the fund name or the designation for the list of funds you entered in line 2. By default, the past 30 days of giving will be analyzed. To change this, modify the number of days on line 4. If you want the pie chart to show year-to-date giving rather than the past certain number of days, comment out line 11 and remove the comment designator from the beginning of line 12. The finished result for the two lines should look as shown below: .. code-block:: python :lineno-start: 11 # Base.MinDate = MaxDate.AddDays(-Days).ToString("d") Base.MinDate = DateTime(MaxDate.Year, 1, 1).ToString("d") # YTD With the above change, you may also wish to change the chart label by modifying line 17 of the HTML file. Currently the label is **Giving past {{days}} days**. You can change it to **Giving YTD**. If you need to include other batch types in the Online group, add them (comma-separated) to the list of batch types on lines 46 and 52. For example, `SearchParameters.BundleTypes = ['Online','SecureGive']`. Video ----- Below is a short video demonstrating some of the features of this widget. .. raw:: html | HTML Code --------- Below is the HTML code for the Giving Sources widget. As supplied by TouchPoint, the file name is **WidgetGivingSourcesHTML**. .. literalinclude:: Files/WidgetGivingSources.html :linenos: SQL Script ---------- Below is the SQL script for the Giving Sources widget. As supplied by TouchPoint, the file name is **WidgetGivingSourcesSQL**. .. literalinclude:: Files/WidgetGivingSources.sql :linenos: Python Script ------------- Below is the Python script for the Giving Sources widget. As supplied by TouchPoint, the file name is **WidgetGivingSourcesPython**. .. literalinclude:: Files/WidgetGivingSources.py :linenos: | | +--------------------+------------------+ | **Latest Update** | **11/16/2023** | +--------------------+------------------+ Update instructions for adding batch type.