Skip to content

Instantly share code, notes, and snippets.

View aleksandar-olic's full-sized avatar

Aleksandar Olic aleksandar-olic

View GitHub Profile
@aleksandar-olic
aleksandar-olic / activecollab-bookmarklet-invoice-report-sum.md
Last active November 9, 2016 08:25
Active Collab bookmarklet to get a sum value of all the invoices in the Invoices Report

To get a sum value of all the invoices in the Invoices Report:

  1. Make a new bookmark and paste this code in the URL field (ie. bookmark this code as a page):

javascript:javascript:$('[ng-repeat="result in vm.filterResults"]').each(function(){ var total = 0; $(this).find('.col_balance_due').each(function(){ total += parseInt($(this).text().replace(',','').replace('.00','')); }); $(this).find('h2').text($(this).find('h2').text()+' ($'+total+')'); });

  1. Name it as you like (eg. AC-invoices-sum)

  2. Go to Active Collab and run the Invoice Report

@aleksandar-olic
aleksandar-olic / Getting Tokens for Cloud Instances.md
Last active December 26, 2019 12:06
Getting Tokens for Active Collab Cloud Instances

1. Send a POST request to "https://my.activecollab.com/api/v1/external/login" with "email" and "password" as parameters.

You should get the following response:

{
 accounts = ({
  class = FeatherApplicationInstance;
  "display_name" = "A51 (ID: 1)";
 name = 1;