diff --git a/scripts/invoices/factures-impayees-commerciaux.php b/scripts/invoices/email_unpayed_invoices_to_representatives.php similarity index 83% rename from scripts/invoices/factures-impayees-commerciaux.php rename to scripts/invoices/email_unpayed_invoices_to_representatives.php index 2ec69c2096b..93c91322d45 100644 --- a/scripts/invoices/factures-impayees-commerciaux.php +++ b/scripts/invoices/email_unpayed_invoices_to_representatives.php @@ -1,7 +1,7 @@ #!/usr/bin/php - * Copyright (C) 2005 Laurent Destailleur +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2005-2009 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ */ /** - * \file scripts/invoices/factures-impayees-commerciaux.php + * \file scripts/invoices/email_unpayed_invoices_to_representatives.php * \ingroup facture * \brief Script to send a mail to dolibarr users linked to companies with unpayed invoices * \version $Id$ @@ -33,7 +33,7 @@ if (substr($sapi_type, 0, 3) == 'cgi') { } // Recupere root dolibarr -$path=eregi_replace('factures-impayees-commerciaux.php','',$_SERVER["PHP_SELF"]); +$path=eregi_replace('email_unpayed_invoices_to_representatives.php','',$_SERVER["PHP_SELF"]); require($path."../../htdocs/master.inc.php"); @@ -60,7 +60,7 @@ if ( $db->query($sql) ) $oldemail = ''; $message = ''; $total = ''; - dol_syslog("factures-impayees-commerciaux: "); + dol_syslog("email_unpayed_invoices_to_representatives.php"); if ($num) { @@ -82,7 +82,7 @@ if ( $db->query($sql) ) $message .= "Facture ".$obj->facnumber." : ".price($obj->total_ttc)." : ".$obj->nom."\n"; $total += $obj->total_ttc; - dol_syslog("factures-impayees-commerciaux: ".$obj->email); + dol_syslog("email_unpayed_invoices_to_representatives.php: ".$obj->email); $i++; } @@ -100,7 +100,7 @@ if ( $db->query($sql) ) else { dol_print_error($db); - dol_syslog("factures-impayees-commerciaux: Error"); + dol_syslog("email_unpayed_invoices_to_representatives.php: Error"); } @@ -114,10 +114,10 @@ function envoi_mail($oldemail,$message,$total) $msgishtml = 0; print "Envoi mail pour $oldemail, total: $total\n"; - dol_syslog("factures-impayees-commerciaux: send mail to $oldemail"); + dol_syslog("email_unpayed_invoices_to_representatives.php: send mail to $oldemail"); $allmessage = "List of unpayed invoices\n"; - $allmessage .= "This list contains only invoices for third parties you are linked to as commercial.\n"; + $allmessage .= "This list contains only invoices for third parties you are linked to as a sales representative.\n"; $allmessage .= "\n"; $allmessage .= $message; $allmessage .= "\n";