Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get account balance details #191

Open
dopeck opened this issue Sep 20, 2023 · 1 comment
Open

Get account balance details #191

dopeck opened this issue Sep 20, 2023 · 1 comment

Comments

@dopeck
Copy link

dopeck commented Sep 20, 2023

try {
$query = new ReadByQuery();
$query->setObjectName('GLACCOUNTBALANCE');
$where = new EqualToString();
$where->setField('PERIOD');
$where->setValue('Month Ended February 2023');
$query->setQuery($where);
$query->setPageSize(1000);
$query->setFields(['*']);
$response = $client->execute($query);
$result = $response->getResult();
$getData = $result->getData();
echo "Page 1 success! Number of vendor records found: " . $result->getTotalCount() . ". Number remaining: " . $result->getNumRemaining() . PHP_EOL;
echo "
";
$i = 1;
// Get pages 2 through 4
while ($result->getNumRemaining() > 0 && $i <= 1000 && $getResultId = $result->getResultId()) {
$i++;
$more = new ReadMore();
$more->setResultId($getResultId);
$response = $client->execute($more);
$result = $response->getResult();
$getData = $result->getData();
echo "Page $i success! Records remaining: " . $result->getNumRemaining() . PHP_EOL;
echo "
";
}
echo "Successfully read $i pages" . PHP_EOL;
} catch (ResponseException $ex) {
echo 'Failed! ' . $ex->getMessage();
} catch (Exception $ex) {
echo get_class($ex) . ': ' . $ex->getMessage();
}

I am trying to get the account balances using the code above, but it is grouping the account balance details by the vendor. How do I get the account balance details without it being grouped by the vendor?

@dopeck
Copy link
Author

dopeck commented Oct 17, 2023

Is it possible to show all the individual account details without it being grouped by the vendor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant