print or email , print should not be yes if in fact it has NOT been printed
When emailing a sales order it should NOT say it has also been printed when in fact it has not ,this has lead to missed notes actually been printed , this fault has gone on long enough now , it needs sorting
I suspect the bug is because to email a report you select the "send to email" from the "print options" (to Excel, data, to excel, etc). Thus to email it, it goes through the "Print" mechanism which sets the print flag before it gets to the email output option which then sets the email flag.
It should be setting a relevant flag mask (ie which flag to set) when the output method is selected (If email select set mask = email_flag else set mask = print_flag) so that when the report is actually output (generated) it uses (ORs) the mask to set the relevant flag (record_flag |= mask).
Or wait until the print/email option completes before setting the record flag: set mask=print_flag, if email chosen then set mask = email_flag; after the output completes use the mask to set the record flag (record_flag |= mask).
I suspect the bug is because to email a report you select the "send to email" from the "print options" (to Excel, data, to excel, etc). Thus to email it, it goes through the "Print" mechanism which sets the print flag before it gets to the email output option which then sets the email flag.
It should be setting a relevant flag mask (ie which flag to set) when the output method is selected (If email select set mask = email_flag else set mask = print_flag) so that when the report is actually output (generated) it uses (ORs) the mask to set the relevant flag (record_flag |= mask).
Or wait until the print/email option completes before setting the record flag: set mask=print_flag, if email chosen then set mask = email_flag; after the output completes use the mask to set the record flag (record_flag |= mask).