web2008 Posted February 27, 2021 Share Posted February 27, 2021 Does anyone know if it is possible to show the customer's Credit Balance in a report directly, without setting it up as a formula? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 28, 2021 Share Posted February 28, 2021 15 hours ago, web2008 said: Does anyone know if it is possible to show the customer's Credit Balance in a report directly, without setting it up as a formula? the Clients report can show the credit balance in its output by default without the need for additional coding. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted February 28, 2021 Author Share Posted February 28, 2021 Great, but what code do I need to use? For example, $creditbalance ? I simply can not find it! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 28, 2021 Share Posted February 28, 2021 3 minutes ago, web2008 said: Great, but what code do I need to use? For example, $creditbalance ? I simply can not find it! you shouldn't need any code - just tick the "credit" checkbox.... it's really credit balance. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted February 28, 2021 Author Share Posted February 28, 2021 OK, but I'm making a custom report and then I may have to use a formula as first thought? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 1, 2021 Share Posted March 1, 2021 15 hours ago, web2008 said: OK, but I'm making a custom report and then I may have to use a formula as first thought? aah you never mentioned wanting to use it in your own report... even so, there is no formula needed - you would just need to retrieve the 'credit' value from the tblclients database table. that's why the above report works as it's just querying the tblclients table and then offering various fields to display and filter by. 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 1, 2021 Share Posted March 1, 2021 If you have a $client object in the report, which you likely should have, then you can get the credit via $client-.credit . If you need like a total of all credits for all clients, then $TotalCredits += $client->credit should do - presuming you're looping through clients. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.