Auto Close Online Bundles ========================= This script is intended to run daily and will close the Online bundle from the specified number of days ago. It will total the contributions in the bundle and enter that total in the Total Check field. Then, if all entries have been assigned to a donor, will close the bundle. .. important:: This script will close only the first found Online bundle for any given day. If you have multiple Online bundles created on the same day (e.g., because some have been created manually), you will need to close the others manually. Configure the Script -------------------- To set this up, complete the following steps: Step 1 Copy the python script below to a special content Python file. We recommend you name it AutoCloseOnlineBundles. Step 2 Add the following line to your MorningBatch file: .. code-block:: python model.CallScript("AutoCloseOnlineBundles") Step 3 Make sure that the setting **Run Morning Batch** is enabled. This setting is on the System tab of Settings, in the Administration section. Code for the AutoCloseOnlineBundles Script ------------------------------------------ .. literalinclude:: Files/AutoCloseOnlineBundles.py :linenos: Customize the Script -------------------- By default, the script is configured to close the Online bundle created two days ago. The bundles for today and yesterday will remain open. This is defined in line 3 as the variable `offset`. You can adjust this as desired, but the offset should never be set to 0 (zero)