Skip to content

Instantly share code, notes, and snippets.

@j-schumann
j-schumann / gist:66f8529fc447146a88d5ccc995252b09
Created June 30, 2020 15:55
Cyclos test: retrieve balances & trasnfers for account
import org.cyclos.model.banking.accounts.AccountBalanceHistoryParams
import org.cyclos.model.banking.accounts.AccountHistoryQuery
import org.cyclos.model.banking.accounts.AccountVO
import org.cyclos.model.users.users.UserVO
import org.cyclos.model.utils.DatePeriodDTO
import org.cyclos.utils.DateTime
def begin = new DateTime(2020, 3, 1)
def end = new DateTime(2020, 5, 1)
def month = new DatePeriodDTO(begin: begin , end: end)
* new project > Groovy Project
* JRE: openjdk 8
* Modulepath > Add external JARs > all except groovy, batik-script, batik-bridge
* cyclos.properties in root folder, *.groovy in src/
* run Configuration:
* append arguments:
-script src/USG_DEFAULT.groovy
-init src/InitScript.groovy
-params src/USG.properties
@j-schumann
j-schumann / class-rtec-email.php
Last active September 13, 2017 11:44
registrations for the events calendar: support for overriding email template(s) in (parent/child) theme
// replace set_message_body() in inc/class-rtec-email.php with the following implementation
// checks if the current theme (or the parent theme) has a template rtec/email/header-generic.php etc.
// if yes the custom template is used, else the plugin's default
// notes: uses short array syntax (PHP 5.4+) and ternary operator ?: (PHP 5.3+), depending on the minimum
// required PHP version for registrations-for-the-events-calendar this should be adjusted as needed
protected function set_message_body( $args )
{
global $rtec_options;