28if (!defined(
'NOSESSION')) {
29 define(
'NOSESSION',
'1');
32$sapi_type = php_sapi_name();
33$script_file = basename(__FILE__);
37if (substr($sapi_type, 0, 3) ==
'cgi') {
38 echo
"Error: You are using PHP for CGI. To execute ".$script_file.
" from command line, you must use PHP for CLI mode.\n";
42require_once $path.
"../../htdocs/master.inc.php";
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/functionscli.lib.php';
44require_once DOL_DOCUMENT_ROOT.
"/compta/prelevement/class/bonprelevement.class.php";
45require_once DOL_DOCUMENT_ROOT.
"/compta/facture/class/facture.class.php";
46require_once DOL_DOCUMENT_ROOT.
"/societe/class/societe.class.php";
47require_once DOL_DOCUMENT_ROOT.
"/compta/paiement/class/paiement.class.php";
54$version = constant(
'DOL_VERSION');
57$hookmanager->initHooks(array(
'cli'));
65print
"***** ".$script_file.
" (".$version.
") pid=".dol_getmypid().
" *****\n";
66dol_syslog($script_file.
" launched with arg ".implode(
',', $argv));
76if (!isset($argv[1])) {
77 print
"This script check invoices with a withdrawal request and\n";
78 print
"then create payment and build a withdraw file.\n";
79 print
"Usage: ".$script_file.
" simu|real\n";
Class to manage withdrawal receipts.
Class to manage Dolibarr users.
dol_now($mode='gmt')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.