Hi,
can someone help me. price doesn't show in payment.png although it is set as auto-fill in space2.png also how to make total auto calculate i.e. total = price - discount or total = price + adj
Many thanks
Robert
new to appgini v5.51
-
- Posts: 5
- Joined: 2016-10-28 17:25
new to appgini v5.51
- Attachments
-
- space2.png (144.36 KiB) Viewed 7152 times
-
- payment.png (71 KiB) Viewed 7152 times
Re: new to appgini v5.51
Autofill disable automatically the fields. Internally field is not filled in database with the value, but with the PK of the parent table, for this reason you can't change it. Maybe this is not what you want.
/Giuseppe
Professional Outsourcing Services
Professional Outsourcing Services
-
- Posts: 5
- Joined: 2016-10-28 17:25
Re: new to appgini v5.51
Hi Dev
Thanks for message. I have bought the video tutorial on Udemy and I have been able to do the calculation.
Now I would like that when I update the date field in my payment table, it also update the date field in the customers table. The reason I would like to filter the date in the customer table as there would be only one date whereas the payment table may have more than one.
Anybody who can help me.
Best regards
Robert
Thanks for message. I have bought the video tutorial on Udemy and I have been able to do the calculation.
Now I would like that when I update the date field in my payment table, it also update the date field in the customers table. The reason I would like to filter the date in the customer table as there would be only one date whereas the payment table may have more than one.
Anybody who can help me.
Best regards
Robert
-
- AppGini Super Hero
- Posts: 336
- Joined: 2015-12-23 16:52
Re: new to appgini v5.51
The Udemy course shows how to do this. Lessons 27-29
-
- Posts: 5
- Joined: 2016-10-28 17:25
Re: new to appgini v5.51
The code below is from the payments.php file.
function payments_after_insert($data, $memberInfo, &$args){
$customer_id = $data['customer_id'];
sql("update customers set sed='{$data['sub_end_date']} where customer_id='{$customer_id}''", $eo);
return TRUE;
}
I have also updated the customers table field to customer_id in the AppGini application and checked it in phpMyAdmin too.
However, it is still updating for ALL customers.
Does anyone have a clue?
Thanking you in advance : )
function payments_after_insert($data, $memberInfo, &$args){
$customer_id = $data['customer_id'];
sql("update customers set sed='{$data['sub_end_date']} where customer_id='{$customer_id}''", $eo);
return TRUE;
}
I have also updated the customers table field to customer_id in the AppGini application and checked it in phpMyAdmin too.
However, it is still updating for ALL customers.
Does anyone have a clue?
Thanking you in advance : )
Re: new to appgini v5.51
didn't Readed all the thread, but, probably, because, if this is a copy paste, you are not closing the string on _end_date']}.. but in customer_id}''
should be
set sed='{$data['sub_end_date']}' where customer_id='{$customer_id}'
should be
set sed='{$data['sub_end_date']}' where customer_id='{$customer_id}'
/Giuseppe
Professional Outsourcing Services
Professional Outsourcing Services
-
- Posts: 5
- Joined: 2016-10-28 17:25
Re: new to appgini v5.51
Thanks DevGiu
I now see the missing ' at the end of '{$data['sub_end_date']}' however it is still not working. I guess it could instead be as below
$customer_id = $data['SelectedID'];
sql("update customers set sed='{$data['sub_end_date']}' where customer_id='{$customer_id}'", $eo);
Again it is not working.
Any idea why?
I now see the missing ' at the end of '{$data['sub_end_date']}' however it is still not working. I guess it could instead be as below
$customer_id = $data['SelectedID'];
sql("update customers set sed='{$data['sub_end_date']}' where customer_id='{$customer_id}'", $eo);
Again it is not working.
Any idea why?
Re: new to appgini v5.51
This might be a little obvious but from what I can see in your original image of your Appgini app, your 'customers' table doesn't contain a field named 'sed'?
Have you updated your database to include 'sed' as a field in the 'customers' table? If not, this sql statement will never work: sql("update customers set sed='{$data['sub_end_date']}' where....
If you are copy/pasting from another application somewhere, you will have to ensure that your table/field names correspond to your own database.
Have you updated your database to include 'sed' as a field in the 'customers' table? If not, this sql statement will never work: sql("update customers set sed='{$data['sub_end_date']}' where....
If you are copy/pasting from another application somewhere, you will have to ensure that your table/field names correspond to your own database.
-
- Posts: 5
- Joined: 2016-10-28 17:25
Re: new to appgini v5.51
Thanks peebee
I did update the database to include 'sed' as a field in the 'customers' table.
I have received several emails from the AppGini Help Desk but so far I have not yet received the solution.
I did update the database to include 'sed' as a field in the 'customers' table.
I have received several emails from the AppGini Help Desk but so far I have not yet received the solution.