Qual: All script files must add a line into log when launched.

This commit is contained in:
Laurent Destailleur 2013-07-13 19:20:01 +02:00
parent 6db9b67e35
commit 7481aa121e
15 changed files with 18 additions and 6 deletions

View File

@ -60,6 +60,7 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
if (! isset($argv[3]) || ! $argv[3]) {
print "Usage: ".$script_file." bank_ref bank_receipt_number (csv|tsv|excel|excel2007) [lang=xx_XX]\n";

View File

@ -60,6 +60,7 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
$fname = DOL_DATA_ROOT.'/export-contacts.xls';

View File

@ -57,6 +57,7 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
print "Mails sending disabled (useless in batch mode)\n";
$conf->global->MAIN_DISABLE_ALL_MAILS=1; // On bloque les mails

View File

@ -66,6 +66,7 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
$now=dol_now('tzserver');
$duration_value=isset($argv[2])?$argv[2]:'none';
@ -130,7 +131,7 @@ if ($resql)
$outputlangs->load("bills");
$outputlangs->load("main");
$outputlangs->load("contracts");
if (dol_strlen($oldemail))
{
$message .= $langs->trans("Contract")." ".$obj->ref.": ".$langs->trans("Service")." ".$obj->label." (".price($obj->total_ttc,0,$outputlangs,0,0,-1,$conf->currency)."), ".$langs->trans("DateEndPlannedShort")." ".dol_print_date($db->jdate($obj->date_fin_validite),'day')."\n\n";

View File

@ -66,6 +66,7 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
$now=dol_now('tzserver');
$duration_value=isset($argv[2])?$argv[2]:'none';
@ -130,7 +131,7 @@ if ($resql)
$outputlangs->setDefaultLang(empty($obj->lang)?$langs->defaultlang:$obj->lang); // By default language of sale representative
$outputlangs->load("bills");
$outputlangs->load("main");
if (dol_strlen($obj->email))
{
$message .= $langs->trans("Contract")." ".$obj->ref.": ".$langs->trans("Service")." ".$obj->label." (".price($obj->total_ttc,0,$outputlangs,0,0,-1,$conf->currency).") ".$obj->nom.", ".$langs->trans("DateEndPlannedShort")." ".dol_print_date($db->jdate($obj->date_fin_validite),'day')."\n\n";

View File

@ -67,6 +67,7 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
$now=dol_now('tzserver');
$duration_value=isset($argv[3])?$argv[3]:'none';

View File

@ -66,6 +66,7 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
$now=dol_now('tzserver');
$duration_value=isset($argv[2])?$argv[2]:'none';

View File

@ -57,6 +57,7 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
// Check parameters
if (! isset($argv[1]))

View File

@ -52,6 +52,7 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
if (! isset($argv[1]) || ! $argv[1]) {
print "Usage: $script_file now\n";

View File

@ -57,6 +57,7 @@ $forcecommit=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
// List of fields to get from LDAP
$required_fields = array(

View File

@ -55,6 +55,7 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
/*
if (! $conf->global->LDAP_SYNCHRO_ACTIVE)

View File

@ -57,7 +57,7 @@ $forcecommit=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
// List of fields to get from LDAP
$required_fields = array(

View File

@ -55,6 +55,7 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
/*
if (! $conf->global->LDAP_SYNCHRO_ACTIVE)

View File

@ -55,6 +55,7 @@ $forcecommit=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
// List of fields to get from LDAP
$required_fields = array(

View File

@ -51,8 +51,9 @@ $error=0;
@set_time_limit(0);
print "***** ".$script_file." (".$version.") pid=".getmypid()." *****\n";
dol_syslog($script_file." launched with arg ".join(',',$argv));
$datetimeprev = time();
$datetimeprev = dol_now();
$month = strftime("%m", $datetimeprev);
$year = strftime("%Y", $datetimeprev);
@ -60,8 +61,6 @@ $year = strftime("%Y", $datetimeprev);
$user = new user($db);
$user->fetch($conf->global->PRELEVEMENT_USER);
print "***** ".$script_file." (".$version.") *****\n";
if (! isset($argv[1])) { // Check parameters
print "This script check invoices with a withdrawal request and\n";
print "then create payment and build a withdraw file.\n";