Trad
This commit is contained in:
parent
a66188563b
commit
a3fd04bb25
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/php
|
||||
<?PHP
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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";
|
||||
Loading…
Reference in New Issue
Block a user