Hello
I have an app made with appgini for a non profit association. In this app, I have a table with "Crédit" and "Débit". I'd like to have a credit balance but just near the name of the table like in the picture. Can someone help me please ?
Credit balance
Re: Credit balance
Just to point you into the right direction:
Jan
- In TABLENAME.php edit the TABLENAME_dv hook function
- Calculate the balance by subtracting the sum of debit from the sum of credit. $balance = ... - ... (your calc here)
- Using PHP, create a span-tag "balance" for example: <span class="pull-right" id="balance"><?=$balance?></span>
- Create or edit javascript file TABLENAME-tv.js
- In $j(function(){ ... }) Move the $j('#balance') field to the page header using jquery's appendTo-method: $j('#balance').appendTo(yourNewTarget);
Jan
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
-
- Posts: 14
- Joined: 2014-12-05 18:34
Re: Credit balance
Thanks Jan ...
I'm going to try this !
I'm going to try this !