<commit_before>var util = require('util');

var Financial = exports.Financial = function (Client) {
	this.client = Client;

	return this;
};

// ---- FINANCIAL CHECK INVOICES --- 

/**
 * Get back account
 * @param  {Integer}   ageGroup Age Group number
 * @param  {String}   accountId Account ID
 * @param  {Integer}  division  Division ID
 * @param  {Function} callback  Callback
 */
Financial.prototype.agingPayablesListByAgeGroup = function(ageGroup, accountId, division, callback) {
	var params = {
		ageGroup: ageGroup,
		$select: accountId
	};

	if(typeof division === 'function') {
		callback = division;
		division = this.client.division;
	}

	this.client.sendRequest('/v1/' + division + '/read/financial/AgingPayablesListByAgeGroup', 'GET', params, null, callback);
};

/**
 * Get back account
 * @param  {String}   accountId Account ID
 * @param  {Integer}  division  Division ID
 * @param  {Function} callback  Callback
 */
Financial.prototype.agingPayablesList = function(accountId, division, callback) {
	var params = {
		$filter: 'AccountId eq guid\'' + accountId + '\''
	};

	if(typeof division === 'function') {
		callback = division;
		division = this.client.division;
	}

	this.client.sendRequest('/v1/' + division + '/read/financial/AgingPayablesList', 'GET', params, null, callback);
};

// --- /FINANCIAL CHECK INVOICES --- <commit_msg>Added a new functionality to get the receivables.<commit_after>var util = require('util');

var Financial = exports.Financial = function (Client) {
	this.client = Client;

	return this;
};

// ---- FINANCIAL CHECK INVOICES --- 

/**
 * Get aging receivables list. A list of journals that are not recieved yet.
 * @param  {String}   accountId Account ID
 * @param  {Integer}  division  Division ID
 * @param  {Function} callback  Callback
 */
Financial.prototype.agingReceivablesList = function(accountId, division, callback) {
	var params = {
		$filter: 'AccountId eq guid\'' + accountId + '\''
	};

	if(typeof division === 'function') {
		callback = division;
		division = this.client.division;
	}

	this.client.sendRequest('/v1/' + division + '/read/financial/AgingReceivablesList', 'GET', params, null, callback);
};

/**
 * Get aging payables list by age group. A list of journals that need to be payed yet.
 * @param  {Integer}   ageGroup Age Group number
 * @param  {String}   accountId Account ID
 * @param  {Integer}  division  Division ID
 * @param  {Function} callback  Callback
 */
Financial.prototype.agingPayablesListByAgeGroup = function(ageGroup, accountId, division, callback) {
	var params = {
		ageGroup: ageGroup,
		$select: accountId
	};

	if(typeof division === 'function') {
		callback = division;
		division = this.client.division;
	}

	this.client.sendRequest('/v1/' + division + '/read/financial/AgingPayablesListByAgeGroup', 'GET', params, null, callback);
};

/**
 * Get aging payables list. A list of journals that need to be payed yet.
 * @param  {String}   accountId Account ID
 * @param  {Integer}  division  Division ID
 * @param  {Function} callback  Callback
 */
Financial.prototype.agingPayablesList = function(accountId, division, callback) {
	var params = {
		$filter: 'AccountId eq guid\'' + accountId + '\''
	};

	if(typeof division === 'function') {
		callback = division;
		division = this.client.division;
	}

	this.client.sendRequest('/v1/' + division + '/read/financial/AgingPayablesList', 'GET', params, null, callback);
};

// --- /FINANCIAL CHECK INVOICES --- 
{'fraction_non_alphanumeric': 0.13968253968253969, 'fraction_numerical': 0.001443001443001443, 'mean_word_length': 3.8816901408450706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3917782', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1059, 'n_words': 300}