Get transactions totals.
348355
public function getTransactionTotals()
    {
        $request = $this->paystackHttpClient->get(
            Resource::GET_TRANSACTION_TOTALS
        );

        return $this->processResourceRequestResponse($request);
    }
554900
def get_total_paid(self) -> Decimal:
        
        query = (
            self.get_splits_query()
        )
        splits = query.all()

        total = Decimal(0)
        for split in splits:
            total += split.value

        return total
841327
def tally(self, chain):
        """"""
        self.db._rows[chain][self.name] = self._getfunc()
877468
def calculate_totals( self, children, local_children=None ):
        """"""
        for field,local_field in (('recursive','calls'),('cumulative','local')):
            values = []
            for child in children:
                if isinstance( child, PStatGroup ) or not self.LOCAL_ONLY:
                    values.append( getattr( child, field, 0 ) )
                elif isinstance( child, PStatRow ) and self.LOCAL_ONLY:
                    values.append( getattr( child, local_field, 0 ) )
            value = sum( values )
            setattr( self, field, value )
        if self.recursive:
            self.cumulativePer = self.cumulative/float(self.recursive)
        else:
            self.recursive = 0
        if local_children:
            for field in ('local','calls'):
                value = sum([ getattr( child, field, 0 ) for child in children] )
                setattr( self, field, value )
            if self.calls:
                self.localPer = self.local / self.calls
        else:
            self.local = 0
            self.calls = 0
            self.localPer = 0
1353883
def get_transactions(self, date_from: datetime, date_to: datetime) -> List[Transaction]:
        
        assert isinstance(date_from, datetime)
        assert isinstance(date_to, datetime)

        # fix up the parameters as we need datetime
        dt_from = Datum()
        dt_from.from_datetime(date_from)
        dt_from.start_of_day()
        dt_to = Datum()
        dt_to.from_datetime(date_to)
        dt_to.end_of_day()

        query = (
            self.book.session.query(Transaction)
            .join(Split)
            .filter(Split.account_guid == self.account.guid)
            .filter(Transaction.post_date >= dt_from.date, Transaction.post_date <= dt_to.date)
            .order_by(Transaction.post_date)
        )
        return query.all()
807595
def get_totals_by_payee(self, account, start_date=None, end_date=None):
        
        qs = Transaction.objects.filter(account=account, parent__isnull=True)
        qs = qs.values('payee').annotate(models.Sum('value_gross'))
        qs = qs.order_by('payee__name')
        return qs
256417
def get_transactions(self, account_id, **params):
        """"""
        response = self._get('v2', 'accounts', account_id, 'transactions', params=params)
        return self._make_api_object(response, Transaction)
458640
public Integer getTransactionsCount(final QueryParams params) {
        FluentCaseInsensitiveStringsMap map = doHEAD(Transactions.TRANSACTIONS_RESOURCE, params);
        return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
    }
118501
def total_vat(self):
        """"""
        q = Vat.objects.filter(receipt=self).aggregate(total=Sum('amount'))
        return q['total'] or 0
869452
def GetTransactionResults(self):
        
        if self.References is None:
            return None

        results = []
        realresults = []
        for ref_output in self.References.values():
            results.append(TransactionResult(ref_output.AssetId, ref_output.Value))

        for output in self.outputs:
            results.append(TransactionResult(output.AssetId, output.Value * Fixed8(-1)))

        for key, group in groupby(results, lambda x: x.AssetId):
            sum = Fixed8(0)
            for item in group:
                sum = sum + item.Amount

            if sum != Fixed8.Zero():
                realresults.append(TransactionResult(key, sum))

        return realresults
791766
protected function getAvailableTotals()
    {
        return array(
            Meta::InvoiceAmountInc => $this->source['details']['BT']->order_total,
            Meta::InvoiceVatAmount => $this->source['details']['BT']->order_billTaxAmount,
        );
    }
266235
def transaction_stop(self):
        """"""
        if self.transaction_count > 0:
            logger.debug("{}. Stop transaction".format(self.transaction_count))
            if self.transaction_count == 1:
                self._transaction_stop()

            self.transaction_count -= 1

        return self.transaction_count
356791
def get_total_supply(self) -> int:
        
        func = InvokeFunction('totalSupply')
        response = self.__sdk.get_network().send_neo_vm_transaction_pre_exec(self.__hex_contract_address, None, func)
        try:
            total_supply = ContractDataParser.to_int(response['Result'])
        except SDKException:
            total_supply = 0
        return total_supply
1035026
def total_supply(self, block_identifier='latest'):
        
        return self.proxy.contract.functions.totalSupply().call(block_identifier=block_identifier)
237135
def get_count(self, prefix=''):
        """"""
        return sum([self.counters[key]
                    for key in self.messages if key.startswith(prefix)])
438017
def filter_spent_outputs(self, outputs):
        
        links = [o.to_dict() for o in outputs]
        txs = list(query.get_spending_transactions(self.connection, links))
        spends = {TransactionLink.from_dict(input_['fulfills'])
                  for tx in txs
                  for input_ in tx['inputs']}
        return [ff for ff in outputs if ff not in spends]
1161482
public function getTotal()
  {
    $rawQuery = "SELECT count(*) as total FROM orders";

    // Perform the raw query.
    $rawResults = DB::select( DB::raw($rawQuery) );

    // Return the total.
    return $rawResults[0]->total;
  }