Search found 518 matches

by pböttcher
2019-08-01 06:37
Forum: Advanced Customizations > Hooks
Topic: Editable default value problem
Replies: 10
Views: 175

Re: Editable default value problem

Hi,

thanks. So everything looks good. The issue could be that the script (on change) gets called bevor the dropdown is created. Can you try to change it to

$j('input[name="etu_sigle"]').on('change', function(){
by pböttcher
2019-07-31 09:20
Forum: Advanced Customizations > Hooks
Topic: Editable default value problem
Replies: 10
Views: 175

Re: Editable default value problem

Hi,

is the dropdown a lookup or a selection of values?
Can you post a screenshot with the debugger showing the dropdown definitions?
by pböttcher
2019-07-30 21:54
Forum: Advanced Customizations > Hooks
Topic: Editable default value problem
Replies: 10
Views: 175

Re: Editable default value problem

Hi,

hmmm, strange,

can you add an alert(sigid;) after the
var sigid = $j('input[name="etu_sigle"]').val();
and verify if that is the correct id?

If that is the correct id, can you run

select nbrhres from sigle where id= with the id you retrieved.

What is the result you get?
by pböttcher
2019-07-30 20:57
Forum: Advanced Customizations > Hooks
Topic: Editable default value problem
Replies: 10
Views: 175

Re: Editable default value problem

Hi,

sorry for my misunderstanding. If you need to ID, try instead

$j('input[name="etu_sigle"]').val()
by pböttcher
2019-07-30 20:24
Forum: Advanced Customizations > Hooks
Topic: Hide/show fields in Detail View
Replies: 12
Views: 138

Re: Hide/show fields in Detail View

Hi,

can you post a screenshot of the debugger showing the other_marriages name pls.
by pböttcher
2019-07-30 20:19
Forum: Advanced Customizations > Hooks
Topic: Editable default value problem
Replies: 10
Views: 175

Re: Editable default value problem

Hi,

try instead of

var sigid = $j('#etu_sigle').val();

var sigid = $j('#s2id_etu_sigle-container .select2-chosen').text();
by pböttcher
2019-07-30 19:56
Forum: Advanced Customizations > Others
Topic: Conditional Hide/Unhide fields in detail view?
Replies: 5
Views: 3137

Re: Conditional Hide/Unhide fields in detail view?

Hi, you can add to you hooks/TABLENAME.php tablename_dv function. if(isset($_REQUEST['dvprint_x'])) return; ob_start(); ?> <script> $j(function(){ if ($j("#field2 option[value=texttocheckfor]:selected").length == 0){ $j("label[for='field3']").parent().hide(); } /* hide some stuff according to the al...
by pböttcher
2019-07-30 19:38
Forum: Advanced Customizations > Hooks
Topic: Hide/show fields in Detail View
Replies: 12
Views: 138

Re: Hide/show fields in Detail View

Additional to your question.

The

if(isset($_REQUEST['dvprint_x'])) return;

is just used if you try to print the page, as the logic does not necessarily apply. If it does for you, you can leave it out.
by pböttcher
2019-07-30 19:34
Forum: Advanced Customizations > Hooks
Topic: Calculation Hook for reducing balance automatically
Replies: 16
Views: 235

Re: Calculation Hook for reducing balance automatically

Thanks, can you try this: function Consumable_Tools_after_insert($data, $memberInfo, &$args){ $new_qty=sqlvalue("SELECT IFNULL(i.Stock_QTY,0)-{$data['Qty_Issued']} from Inventory i where i.InventoryID = {$data['Item']}"); sqlvalue("UPDATE Inventory i set i.Stock_QTY = {$new_qty} where i.InventoryID ...
by pböttcher
2019-07-30 18:41
Forum: Advanced Customizations > Hooks
Topic: Hide/show fields in Detail View
Replies: 12
Views: 138

Re: Hide/show fields in Detail View

Hi,

glad to see that it works half :-).

Sorry i forgot to mention that you need to change the marriage to name of your radio buttons. I guess it is Other_Marriages, but not sure.
You can check it through the development console and have a look at your radio buttons.
by pböttcher
2019-07-30 09:28
Forum: Advanced Customizations > Hooks
Topic: Hide/show fields in Detail View
Replies: 12
Views: 138

Re: Hide/show fields in Detail View

Just to add to my post, in the case statements you need of course to put your data instead of none, 1,2,3 reflecting your checkbox criteria.
by pböttcher
2019-07-30 09:13
Forum: Advanced Customizations > Hooks
Topic: Hide/show fields in Detail View
Replies: 12
Views: 138

Re: Hide/show fields in Detail View

Hi, you can try to put this in your Marriages.php Marriages_dv function : if(isset($_REQUEST['dvprint_x'])) return; ob_start(); ?> <script> $j(function(){ /* hide some stuff according to the already checked entry*/ if ($j("input#other_marriages2").is(":checked")) { $j("label[for='Marriage_2']").pare...
by pböttcher
2019-07-29 21:08
Forum: Advanced Customizations > Hooks
Topic: Calculation Hook for reducing balance automatically
Replies: 16
Views: 235

Re: Calculation Hook for reducing balance automatically

Hi, can you try $new_qty=sqlvalue("SELECT IFNULL(i.Stock_QTY-{$data['Qty_Issued']},0) from Inventory i where i.InventoryID = {$data['Stock_QTY']}"); sqlvalue("UPDATE Inventory i set i.Stock_QTY = {$new_qty} where i.InventoryID ={$data['Stock_QTY']}"); Are you having data in your inventory table?
by pböttcher
2019-07-29 17:44
Forum: Advanced Customizations > Hooks
Topic: Calculation Hook for reducing balance automatically
Replies: 16
Views: 235

Re: Calculation Hook for reducing balance automatically

Hi,

what is the link (lookup) from the Consumable_Tools to the Inventory? Is it the item?
by pböttcher
2019-07-29 16:04
Forum: Advanced Customizations > Hooks
Topic: Calculation Hook for reducing balance automatically
Replies: 16
Views: 235

Re: Calculation Hook for reducing balance automatically

Hi, put the code inside the function, like this. function Consumable_Tools_after_insert($data, $memberInfo, &$args){ $new_qty=sqlvalue("SELECT i.Stock_QTY-{$data['Qty_Issued']} from Inventory i where i.InventoryID = {$data['Stock_QTY']}"); sqlvalue("UPDATE Inventory i set i.Stock_QTY = {$new_qty} wh...
by pböttcher
2019-07-29 14:44
Forum: Advanced Customizations > Hooks
Topic: SUM OF COLUMN
Replies: 9
Views: 203

Re: SUM OF COLUMN

Hi, could it be that the values you try to retrieve from the table entrees ond/or sorties do not exist yet? If so, try the SQL with $total_entrees = sqlValue("SELECT IFNULL(total_tous_entree,0) FROM entrees WHERE matricule = '$id' "); $total_sorties = sqlValue("SELECT IFNULL(total_tous_sortie,0) FRO...
by pböttcher
2019-07-29 14:36
Forum: Advanced Customizations > Hooks
Topic: Calculation Hook for reducing balance automatically
Replies: 16
Views: 235

Re: Calculation Hook for reducing balance automatically

Hi,

can you post the complete function as you have it now. And a screenshot of the Consumable_Tools Stock_QTY defintion in AppGini
by pböttcher
2019-07-28 21:11
Forum: Advanced Customizations > Hooks
Topic: Calculation Hook for reducing balance automatically
Replies: 16
Views: 235

Re: Calculation Hook for reducing balance automatically

Hi, you can do this in the hooks/Consumable_Tools.php file. In the after_insert, after_update and bevor_delete function you need to add you calculation. so, eg. in the after_insert function you can try $new_qty=sqlvalue("SELECT i.Stock_QTY-{$data['Qty_Issued']} from Inventory i where i.id = {$data['...
by pböttcher
2019-07-28 21:01
Forum: Advanced Customizations > Hooks
Topic: Date calculation
Replies: 7
Views: 104

Re: Date calculation

Hi, assuming that duration as integer means days you want to add you could try $j(function(){ $j('#start_date-dd, #start_date-mm, #start_date').change(function(){ var start_date = $j('#start_date-mm').val()+"."+$j('#start_date-dd').val()+"."+$j('#start_date').val(); var duration = $j('#duration').va...
by pböttcher
2019-07-28 15:58
Forum: Advanced Customizations > Hooks
Topic: Date calculation
Replies: 7
Views: 104

Re: Date calculation

Hi,

sorry I still do not get what you try to do.
What is age, age_dt, dateOfStart? dateOfStar is a selectable date in your app?

Maybe you can explain more in detail what you try and also post a screenshot.
by pböttcher
2019-07-28 07:57
Forum: Advanced Customizations > Hooks
Topic: Date calculation
Replies: 7
Views: 104

Re: Date calculation

Hi,
is your question to increase the year count by the duration?
And where do you want to do the calculation, in the front-end (via JS), on the server side (via PHP) or on the DB side (via SQL)?
by pböttcher
2019-07-27 09:59
Forum: Advanced Customizations > Hooks
Topic: insert a text at the top of the detailed view of a table
Replies: 20
Views: 372

Re: insert a text at the top of the detailed view of a table

Hi,

you can use also just the detail view title to do this. Put you text in
detailview_appgini.JPG
detailview_appgini.JPG (13.94 KiB) Viewed 353 times
and get
detailview_result.JPG
detailview_result.JPG (48.95 KiB) Viewed 353 times
by pböttcher
2019-07-27 09:53
Forum: Advanced Customizations > Hooks
Topic: Magic file validation, but only for certain groups
Replies: 7
Views: 205

Re: Magic file validation, but only for certain groups

Hi, thanks for providing the code. You could add the code that you have in the u02_person-dv.js in the hooks/u02_person.php u02_person_dv function. function u02_person_dv($selectedID, $memberInfo, &$html, &$args){ if(isset($_REQUEST['dvprint_x'])) return; ob_start(); ?> <script> $j(function(){ $j('#...
by pböttcher
2019-07-23 15:05
Forum: Advanced Customizations > Hooks
Topic: SUM OF COLUMN
Replies: 9
Views: 203

Re: SUM OF COLUMN

Hi, can you explain a little more what you want to acheive? If I understand what this picture shall explain, you would either need to the income expense budget data from your database, by setting the values, whenever you add/modify/delete an entry in the income / expense table. Otherwise you may run...
by pböttcher
2019-07-23 14:00
Forum: Advanced Customizations > Hooks
Topic: Magic file validation, but only for certain groups
Replies: 7
Views: 205

Re: Magic file validation, but only for certain groups

Hi,

can you share a part of your script used in the .js file for generating the alert.