Hi,
Is there a way I could send a email for each of the records of a filtered browse screen ?
ex: sent an invoice to each person in the filtered browse
No not realy
What i wannt to do is have a filtered browse screen
here is my browse SQL
SELECT
tbl_facture.*,
tbl_membre.NC_membre,tbl_membre.CR_membre,
zzzzsys_user.sus_name
FROM
tbl_facture
join tbl_membre on tbl_facture.ID_mbfacture = tbl_membre.ID_membre
join zzzzsys_user on tbl_facture.ID_user = zzzzsys_user.sus_code
where
((AX_facture = '#nuBrowseTitle6_dropdown#' AND LOCATE('#', '#nuBrowseTitle6_dropdown#') <> 1 ) OR '#nuBrowseTitle6_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle6_dropdown#') = 1)
AND ((AE_facture = '#nuBrowseTitle2_dropdown#' AND LOCATE('#', '#nuBrowseTitle2_dropdown#') <> 1 ) OR '#nuBrowseTitle2_dropdown#' = '' OR LOCATE('#', '#nuBrowseTitle2_dropdown#') = 1)
this filters my results
I want to be able to generate a email for each entry than has not yet been sent.
EX: sending an invoice for each person.
I can do this one at a time but I whould like to do this all at once.
I don't know if i am clear on what i whant to do ???
Say you whant to sent all the invoices in the filtered sql (browse)
Goto first record generated by filtered sql
1:check to she if invoice has been sent (this is OK)
2:if it has not been sent +> run reportsave to generate pdf file
3: Send email to email address
4: goto the next recored
5: check to she if invoice has been sent
6:if it has not been sent +> run reportsave to generate pdf file
and so on looping through all records the the filtered browse sql returned
I am going to try to simplify what I want to achieve.
I manage a hunting club the requires members to pay a yearly fee
So each year I produce an invoice for each member …I would like to be able to send an email to each member with a pdf attachment of their invoice.
The report is ok I can send then individually so now I want to be able to send then all at once.
I would pass the `browse_sql` to a PHP procedure that iterates through all the records in a loop. For each record, it would call `nuRunReportSave()` and send an email.
A more elegant solution would probably be to handle everything entirely in PHP, without requiring each record to be visually opened. However, I'm not sure if that approach is feasible.
kev1n wrote: ↑Mon Dec 09, 2024 4:12 pm
I would pass the `browse_sql` to a PHP procedure that iterates through all the records in a loop. For each record, it would call `nuRunReportSave()` and send an email.
A more elegant solution would probably be to handle everything entirely in PHP, without requiring each record to be visually opened. However, I'm not sure if that approach is feasible.
yes this is what i want but how to i do it,since `nuRunReportSave()` is JS and it seems to run after the PHP ???