Merge remote-tracking branch 'Upstream/develop' into develop-62
This commit is contained in:
commit
ae6f547ba5
@ -23,7 +23,7 @@ php:
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: 7.0
|
||||
@ -130,6 +130,8 @@ script:
|
||||
- php upgrade.php 3.7.0 3.8.0 ignoredbversion > upgrade370380.log
|
||||
# - cat upgrade370380.log
|
||||
- php upgrade2.php 3.7.0 3.8.0 ignoredbversion > upgrade370380-2.log
|
||||
- php upgrade.php 3.8.0 3.9.0 ignoredbversion > upgrade380390.log
|
||||
- php upgrade2.php 3.8.0 3.9.0 ignoredbversion > upgrade380390-2.log
|
||||
# - cat upgrade370380-2.log
|
||||
- cd ../..
|
||||
- date
|
||||
|
||||
@ -6,9 +6,11 @@
|
||||
"homepage": "http://www.dolibarr.org",
|
||||
"license": "GPL-3.0+",
|
||||
"support": {
|
||||
"issues": "https://doliforge.org/projects/dolibarr",
|
||||
"issues": "https://github.com/Dolibarr/dolibarr/issues",
|
||||
"forum": "http://www.dolibarr.org/forum",
|
||||
"wiki": "http://wiki.dolibarr.org"
|
||||
"wiki": "http://wiki.dolibarr.org",
|
||||
"irc": "irc://chat.freenode.net/dolibarr",
|
||||
"source": "https://github.com/Dolibarr/dolibarr"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0",
|
||||
|
||||
2
composer.lock
generated
2
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "32e1fa78cc95c32b154a38e07706874c",
|
||||
"hash": "2ab34d0ff69b48500c20621330c1bfd7",
|
||||
"packages": [
|
||||
{
|
||||
"name": "ccampbell/chromephp",
|
||||
|
||||
@ -69,8 +69,9 @@ if ($db->type != 'mysql' && $db->type != 'mysqli')
|
||||
}
|
||||
|
||||
// Show parameters
|
||||
print 'Tablename='.$argv[1]."\n";
|
||||
print "Current dir is ".getcwd()."\n";
|
||||
print 'Tablename: '.$argv[1]."\n";
|
||||
print "Current dir: ".getcwd()."\n";
|
||||
print "Database name: ".$db->database_name."\n";
|
||||
|
||||
|
||||
// Define array with list of properties
|
||||
@ -304,10 +305,9 @@ foreach($property as $key => $prop)
|
||||
}
|
||||
else
|
||||
{
|
||||
$varprop.=' \'.(! isset($this->'.$prop['field'].')?\'NULL\':"\'".';
|
||||
$varprop.='\'.(! isset($this->'.$prop['field'].')?\'NULL\':"\'".';
|
||||
$varprop.="\$this->".$prop['field']."";
|
||||
$varprop.='.\').';
|
||||
|
||||
$varprop.='"\'")';
|
||||
}
|
||||
|
||||
if ($i < (count($property)-$no_output_field)) $varprop.=".','";
|
||||
|
||||
@ -193,7 +193,7 @@ class modMyModule extends DolibarrModules
|
||||
// Add here entries to declare new menus
|
||||
//
|
||||
// Example to declare a new Top Menu entry and its Left menu entry:
|
||||
// $this->menu[$r]=array( 'fk_menu'=>0, // Put 0 if this is a top menu
|
||||
// $this->menu[$r]=array( 'fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
// 'type'=>'top', // This is a Top menu entry
|
||||
// 'titre'=>'MyModule top menu',
|
||||
// 'mainmenu'=>'mymodule',
|
||||
@ -208,7 +208,7 @@ class modMyModule extends DolibarrModules
|
||||
// $r++;
|
||||
//
|
||||
// Example to declare a Left Menu entry into an existing Top menu entry:
|
||||
// $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=xxx', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
// $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=xxx', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
// 'type'=>'left', // This is a Left menu entry
|
||||
// 'titre'=>'MyModule left menu',
|
||||
// 'mainmenu'=>'xxx',
|
||||
|
||||
@ -38,11 +38,6 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
|
||||
*/
|
||||
class Skeleton_Class extends CommonObject
|
||||
{
|
||||
/**
|
||||
* @var DoliDb Database handler
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
* @deprecated
|
||||
|
||||
@ -43,7 +43,7 @@ if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@includ
|
||||
if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only
|
||||
if (! $res) die("Include of main fails");
|
||||
// Change this following line to use the correct relative path from htdocs
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/formcompany.class.php');
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
||||
dol_include_once('/module/class/skeleton_class.class.php');
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
@ -62,7 +62,7 @@ if ($user->societe_id > 0)
|
||||
//accessforbidden();
|
||||
}
|
||||
|
||||
if (empty($action) && empty($id) && empty($ref)) $action='create';
|
||||
if (empty($action) && empty($id) && empty($ref)) $action='list';
|
||||
|
||||
// Load object if id or ref is provided as parameter
|
||||
$object=new Skeleton_Class($db);
|
||||
@ -225,7 +225,7 @@ jQuery(document).ready(function() {
|
||||
|
||||
|
||||
// Part to show a list
|
||||
if ($action == 'list' || empty($id))
|
||||
if ($action == 'list' || (empty($id) && $action != 'create'))
|
||||
{
|
||||
$sql = "SELECT";
|
||||
$sql.= " t.rowid,";
|
||||
@ -243,7 +243,7 @@ if ($action == 'list' || empty($id))
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
$sql.= " ORDER BY field1 ASC";
|
||||
$sql.=$db->order($sortfield, $sortorder);
|
||||
|
||||
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -329,7 +329,7 @@ if ($action == 'list' || empty($id))
|
||||
// Part to create
|
||||
if ($action == 'create')
|
||||
{
|
||||
print_fiche_titre($langs->trans("NewResidence"));
|
||||
print_fiche_titre($langs->trans("NewSkeleton"));
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
@ -106,7 +106,7 @@ llxHeader('', $langs->trans("ListAccounts"));
|
||||
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||
|
||||
$sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.pcg_subtype, aa.account_number, aa.account_parent , aa.label, aa.active ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accountingaccount as aa, " . MAIN_DB_PREFIX . "accounting_system as asy";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa, " . MAIN_DB_PREFIX . "accounting_system as asy";
|
||||
$sql .= " WHERE aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = " . $pcgver;
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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
|
||||
@ -43,8 +43,12 @@ if (!$user->admin)
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
|
||||
// Other parameters ACCOUNTING_EXPORT_*
|
||||
$list = array (
|
||||
// Parameters ACCOUNTING_EXPORT_*
|
||||
$main_option = array (
|
||||
'ACCOUNTING_EXPORT_PREFIX_SPEC'
|
||||
);
|
||||
|
||||
$model_option = array (
|
||||
'ACCOUNTING_EXPORT_SEPARATORCSV',
|
||||
'ACCOUNTING_EXPORT_DATE',
|
||||
'ACCOUNTING_EXPORT_PIECE',
|
||||
@ -60,10 +64,18 @@ $list = array (
|
||||
if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
$format = GETPOST('format', 'alpha');
|
||||
$modelcsv = GETPOST('modelcsv', 'int');
|
||||
|
||||
if (! empty($format)) {
|
||||
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', $format, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
} else {
|
||||
$error ++;
|
||||
}
|
||||
|
||||
if (! empty($modelcsv)) {
|
||||
|
||||
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
@ -71,7 +83,15 @@ if ($action == 'update') {
|
||||
$error ++;
|
||||
}
|
||||
|
||||
foreach ( $list as $constname ) {
|
||||
foreach ($main_option as $constname) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($model_option as $constname) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
@ -106,9 +126,67 @@ print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
dol_fiche_head($head, 'export', $langs->trans("Configuration"), 0, 'cron');
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
$var = true;
|
||||
|
||||
/*
|
||||
* Main Options
|
||||
*/
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">' . $langs->trans('MainOptions') . '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . '>';
|
||||
print '<td width="50%">' . $langs->trans("Selectformat") . '</td>';
|
||||
if (! $conf->use_javascript_ajax)
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("NotAvailableWhenAjaxDisabled");
|
||||
print "</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td>';
|
||||
$listformat=array(
|
||||
'csv'=>$langs->trans("csv"),
|
||||
'txt'=>$langs->trans("txt")
|
||||
);
|
||||
print $form->selectarray("format",$listformat,$conf->global->ACCOUNTING_EXPORT_FORMAT,0);
|
||||
|
||||
print '</td>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
$num = count($main_option);
|
||||
if ($num)
|
||||
{
|
||||
foreach ($main_option as $key) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td width="50%">' . $label . '</td>';
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="text" size="20" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
/*
|
||||
* Export model
|
||||
*/
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">' . $langs->trans("Modelcsv") . '</td>';
|
||||
print '</tr>';
|
||||
@ -143,8 +221,8 @@ print "<br>\n";
|
||||
* Parameters
|
||||
*/
|
||||
|
||||
$num = count($list);
|
||||
if ($num)
|
||||
$num2 = count($model_option);
|
||||
if ($num2)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -152,7 +230,7 @@ if ($num)
|
||||
print "</tr>\n";
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1) print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
|
||||
|
||||
foreach ( $list as $key ) {
|
||||
foreach ($model_option as $key) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
||||
@ -124,7 +124,7 @@ if ($result) {
|
||||
print '<input type="hidden" name="action" value="import">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>' . $langs->trans("accountingaccount") . '</td>';
|
||||
print '<tr class="liste_titre"><td>' . $langs->trans("AccountAccouting") . '</td>';
|
||||
print '<td>' . $langs->trans("label") . '</td>';
|
||||
print '<td>' . $langs->trans("Accountparent") . '</td>';
|
||||
print '<td>' . $langs->trans("Pcgtype") . '</td>';
|
||||
|
||||
@ -212,11 +212,11 @@ $pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||
IF ($accounting_product_mode == 'ACCOUNTANCY_BUY' ? ' checked' : '') {
|
||||
$sql .= " p.accountancy_code_buy ='' OR p.accountancy_code_buy IS NULL";
|
||||
$sql .= " OR (p.accountancy_code_buy IS NOT NULL AND p.accountancy_code_buy != '' AND p.accountancy_code_buy NOT IN
|
||||
(SELECT aa.account_number FROM " . MAIN_DB_PREFIX . "accountingaccount as aa , " . MAIN_DB_PREFIX . "accounting_system as asy WHERE fk_pcg_version = asy.pcg_version AND asy.rowid = " . $pcgver . "))";
|
||||
(SELECT aa.account_number FROM " . MAIN_DB_PREFIX . "accounting_account as aa , " . MAIN_DB_PREFIX . "accounting_system as asy WHERE fk_pcg_version = asy.pcg_version AND asy.rowid = " . $pcgver . "))";
|
||||
} else {
|
||||
$sql .= " p.accountancy_code_sell ='' OR p.accountancy_code_sell IS NULL ";
|
||||
$sql .= " OR (p.accountancy_code_sell IS NOT NULL AND p.accountancy_code_sell != '' AND p.accountancy_code_sell NOT IN
|
||||
(SELECT aa.account_number FROM " . MAIN_DB_PREFIX . "accountingaccount as aa , " . MAIN_DB_PREFIX . "accounting_system as asy WHERE fk_pcg_version = asy.pcg_version AND asy.rowid = " . $pcgver . "))";
|
||||
(SELECT aa.account_number FROM " . MAIN_DB_PREFIX . "accounting_account as aa , " . MAIN_DB_PREFIX . "accounting_system as asy WHERE fk_pcg_version = asy.pcg_version AND asy.rowid = " . $pcgver . "))";
|
||||
}
|
||||
|
||||
$sql .= ")";
|
||||
|
||||
@ -72,7 +72,7 @@ class AccountingAccount extends CommonObject
|
||||
|
||||
if ($rowid || $account_number) {
|
||||
$sql = "SELECT rowid, datec, tms, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, fk_user_author, fk_user_modif, active";
|
||||
$sql.= " FROM " . MAIN_DB_PREFIX . "accountingaccount WHERE";
|
||||
$sql.= " FROM " . MAIN_DB_PREFIX . "accounting_account WHERE";
|
||||
if ($rowid) {
|
||||
$sql .= " rowid = '" . $rowid . "'";
|
||||
} elseif ($account_number) {
|
||||
@ -114,7 +114,7 @@ class AccountingAccount extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert line in accountingaccount
|
||||
* Insert line in accounting_account
|
||||
*
|
||||
* @param User $user Use making action
|
||||
* @param int $notrigger Disable triggers
|
||||
@ -148,7 +148,7 @@ class AccountingAccount extends CommonObject
|
||||
// Put here code to add control on parameters values
|
||||
|
||||
// Insert request
|
||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accountingaccount(";
|
||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_account(";
|
||||
|
||||
$sql .= "datec";
|
||||
$sql .= ", entity";
|
||||
@ -186,7 +186,7 @@ class AccountingAccount extends CommonObject
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . "accountingaccount");
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . "accounting_account");
|
||||
|
||||
// if (! $notrigger) {
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
@ -225,7 +225,7 @@ class AccountingAccount extends CommonObject
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accountingaccount ";
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
|
||||
$sql .= " SET fk_pcg_version = " . ($this->fk_pcg_version ? "'" . $this->db->escape($this->fk_pcg_version) . "'" : "null");
|
||||
$sql .= " , pcg_type = " . ($this->pcg_type ? "'" . $this->db->escape($this->pcg_type) . "'" : "null");
|
||||
$sql .= " , pcg_subtype = " . ($this->pcg_subtype ? "'" . $this->db->escape($this->pcg_subtype) . "'" : "null");
|
||||
@ -313,7 +313,7 @@ class AccountingAccount extends CommonObject
|
||||
// }
|
||||
|
||||
if (! $error) {
|
||||
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "accountingaccount";
|
||||
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "accounting_account";
|
||||
$sql .= " WHERE rowid=" . $this->id;
|
||||
|
||||
dol_syslog(get_class($this) . "::delete sql=" . $sql);
|
||||
@ -375,7 +375,7 @@ class AccountingAccount extends CommonObject
|
||||
function info($id)
|
||||
{
|
||||
$sql = 'SELECT a.rowid, a.datec, a.fk_user_author, a.fk_user_modif, a.tms';
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'accountingaccount as a';
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as a';
|
||||
$sql .= ' WHERE a.rowid = ' . $id;
|
||||
|
||||
dol_syslog(get_class($this) . '::info sql=' . $sql);
|
||||
@ -417,7 +417,7 @@ class AccountingAccount extends CommonObject
|
||||
if ($result > 0) {
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accountingaccount ";
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
|
||||
$sql .= "SET active = '0'";
|
||||
$sql .= " WHERE rowid = ".$this->db->escape($id);
|
||||
|
||||
@ -447,7 +447,7 @@ class AccountingAccount extends CommonObject
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accountingaccount ";
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
|
||||
$sql .= "SET active = '1'";
|
||||
$sql .= " WHERE rowid = ".$this->db->escape($id);
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@ class FormVentilation extends Form
|
||||
* @param array $event Event options
|
||||
* @param int $select_in $selectid value is a aa.rowid (0 default) or aa.account_number (1)
|
||||
* @param int $select_out set value returned by select 0=rowid (default), 1=account_number
|
||||
* @param int $aabase set accountingaccount base class to display empty=all or from 1 to 8 will display only account beginning by
|
||||
* @param int $aabase set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by
|
||||
*
|
||||
* @return string String with HTML select
|
||||
*/
|
||||
@ -105,7 +105,7 @@ class FormVentilation extends Form
|
||||
$out = '';
|
||||
|
||||
$sql = "SELECT DISTINCT aa.account_number, aa.label, aa.rowid, aa.fk_pcg_version";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accountingaccount as aa";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql .= " AND aa.active = 1";
|
||||
@ -132,7 +132,7 @@ class FormVentilation extends Form
|
||||
if ($select_in == 1 ) $select_value_in = $obj->account_number;
|
||||
if ($select_out == 0 ) $select_value_out = $obj->rowid;
|
||||
if ($select_out == 1 ) $select_value_out = $obj->account_number;
|
||||
// Remember guy's we store in database llx_facturedet the rowid of accountingaccount and not the account_number
|
||||
// Remember guy's we store in database llx_facturedet the rowid of accounting_account and not the account_number
|
||||
// Because same account_number can be share between different accounting_system and do have the same meaning
|
||||
if (($selectid != '') && $selectid == $select_value_in) {
|
||||
// $out .= '<option value="' . $obj->account_number . '" selected>' . $label . '</option>';
|
||||
@ -171,7 +171,7 @@ class FormVentilation extends Form
|
||||
$out = '';
|
||||
|
||||
$sql = "SELECT DISTINCT pcg_type ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accountingaccount as aa";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql .= " ORDER BY pcg_type";
|
||||
@ -227,7 +227,7 @@ class FormVentilation extends Form
|
||||
$out = '';
|
||||
|
||||
$sql = "SELECT DISTINCT pcg_subtype ";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accountingaccount as aa";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql .= " ORDER BY pcg_subtype";
|
||||
|
||||
@ -85,7 +85,7 @@ if (! empty($id)) {
|
||||
$sql .= " l.fk_code_ventilation, aa.account_number, aa.label";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as l";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON l.fk_code_ventilation = aa.rowid";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = l.fk_facture";
|
||||
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
|
||||
|
||||
|
||||
@ -65,12 +65,12 @@ if ($action == 'validatehistory') {
|
||||
if ($db->type == 'pgsql') {
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
|
||||
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accountingaccount as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
|
||||
$sql1 .= " AND fd.fk_code_ventilation = 0";
|
||||
} else {
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accountingaccount as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
|
||||
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
|
||||
@ -154,7 +154,7 @@ $sql .= " ROUND(SUM(IF(MONTH(f.datef)=12,fd.total_ht,0)),2) AS 'Decembre',";
|
||||
$sql .= " ROUND(SUM(fd.total_ht),2) as 'Total'";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||
|
||||
|
||||
@ -154,7 +154,7 @@ print '<script type="text/javascript">
|
||||
$sql = "SELECT l.rowid , f.facnumber, f.rowid as facid, l.fk_product, l.description, l.total_ht, l.qty, l.tva_tx, l.fk_code_ventilation, aa.label, aa.account_number,";
|
||||
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
|
||||
$sql .= " , " . MAIN_DB_PREFIX . "accountingaccount as aa";
|
||||
$sql .= " , " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " , " . MAIN_DB_PREFIX . "facturedet as l";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
$sql .= " WHERE f.rowid = l.fk_facture AND f.fk_statut >= 1 AND l.fk_code_ventilation <> 0 ";
|
||||
|
||||
@ -72,7 +72,7 @@ if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
|
||||
$offset = $limit * $page;
|
||||
|
||||
if (! $sortfield)
|
||||
$sortfield = "f.datef, f.facnumber, l.rowid";
|
||||
$sortfield = "f.facnumber";
|
||||
|
||||
if (! $sortorder) {
|
||||
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO > 0) {
|
||||
@ -136,12 +136,13 @@ if ($action == 'ventil' && !empty($btn_ventil)) {
|
||||
print '<div><font color="red">' . count($mesCasesCochees) . ' ' . $langs->trans("SelectedLines") . '</font></div>';
|
||||
$mesCodesVentilChoisis = $codeventil;
|
||||
$cpt = 0;
|
||||
|
||||
foreach ( $mesCasesCochees as $maLigneCochee ) {
|
||||
$maLigneCourante = explode("_", $maLigneCochee);
|
||||
$monId = $maLigneCourante[0];
|
||||
$monNumLigne = $maLigneCourante[1];
|
||||
$monCompte = $mesCodesVentilChoisis[$monNumLigne];
|
||||
|
||||
|
||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
||||
$sql .= " SET fk_code_ventilation = " . $monCompte;
|
||||
$sql .= " WHERE rowid = " . $monId;
|
||||
@ -172,7 +173,7 @@ $sql .= " , l.product_type as type_l, l.tva_tx as tva_tx_line";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_sell = aa.account_number";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
|
||||
$sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation <= 0";
|
||||
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_sell ='')";
|
||||
@ -216,10 +217,7 @@ if ($result) {
|
||||
|
||||
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines);
|
||||
print '<br><b>' . $langs->trans("DescVentilTodoCustomer") . '</b></br>';
|
||||
print_liste_field_titre($langs->trans("Date"), $_SERVER["PHP_SELF"], "f.datef", "", $param, '', $sortfield, $sortorder);
|
||||
print ' ';
|
||||
print_liste_field_titre($langs->trans("RowId"), $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
||||
print '<input type="hidden" name="action" value="ventil">';
|
||||
|
||||
@ -231,7 +229,7 @@ if ($result) {
|
||||
print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"],"l.total_ht","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("AccountAccounting"), '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre($langs->trans("AccountAccountingSuggest"), '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre($langs->trans("IntoAccount"), '', '', '', '', 'align="center"');
|
||||
print_liste_field_titre('');
|
||||
print_liste_field_titre($langs->trans("Ventilate") . '<br><label id="select-all">' . $langs->trans('All') . '</label>/<label id="unselect-all">' . $langs->trans('None') . '</label>', '', '', '', '', 'align="center"');
|
||||
@ -322,7 +320,7 @@ if ($result) {
|
||||
if ($objp->code_sell_l == $objp->code_sell_p) {
|
||||
print $objp->code_sell_l;
|
||||
} else {
|
||||
print 'lines=' . $objp->code_sell_l . '<br />product=' . $objp->code_sell_p;
|
||||
print $langs->trans("Purchase") . ' = ' . $objp->code_sell_l . '<br />' . $langs->trans("Sell") . ' = ' . $objp->code_sell_p;
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* GNU General Public License fr more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@ -25,7 +25,7 @@
|
||||
/**
|
||||
* \file htdocs/accountancy/journal/bankjournal.php
|
||||
* \ingroup Accounting Expert
|
||||
* \brief Page with sells journal
|
||||
* \brief Page with bank journal
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@ -66,6 +66,8 @@ $date_endday = GETPOST('date_endday');
|
||||
$date_endyear = GETPOST('date_endyear');
|
||||
$action = GETPOST('action');
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
@ -421,10 +423,9 @@ if ($action == 'writeBookKeeping')
|
||||
if ($action == 'export_csv')
|
||||
{
|
||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
$bank_journal = $conf->global->ACCOUNTING_BANK_JOURNAL;
|
||||
$journal = $conf->global->ACCOUNTING_BANK_JOURNAL;
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
header('Content-Disposition: attachment;filename=journal_banque.csv');
|
||||
include DOL_DOCUMENT_ROOT.'/accountancy/tpl/export_journal.tpl.php';
|
||||
|
||||
$companystatic = new Client($db);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
@ -52,6 +52,8 @@ $date_endmonth = GETPOST('date_endmonth');
|
||||
$date_endday = GETPOST('date_endday');
|
||||
$date_endyear = GETPOST('date_endyear');
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
@ -91,7 +93,7 @@ $sql .= " s.code_compta_fournisseur, p.accountancy_code_buy , ct.accountancy_cod
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = fd.fk_product";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = fd.fk_facture_fourn";
|
||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
|
||||
$sql .= " WHERE f.fk_statut > 0 ";
|
||||
@ -156,7 +158,6 @@ if ($result) {
|
||||
|
||||
// Bookkeeping Write
|
||||
if ($action == 'writebookkeeping') {
|
||||
$now = dol_now();
|
||||
|
||||
foreach ( $tabfac as $key => $val ) {
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
@ -246,15 +247,10 @@ $companystatic = new Fournisseur($db);
|
||||
if ($action == 'export_csv')
|
||||
{
|
||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
$purchase_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
if ($conf->global->EXPORT_PREFIX_SPEC)
|
||||
$filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_achats.csv";
|
||||
else
|
||||
$filename="journal_achats.csv";
|
||||
header('Content-Disposition: attachment;filename='.$filename);
|
||||
|
||||
$journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/accountancy/tpl/export_journal.tpl.php';
|
||||
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) // Model Cegid Expert Export
|
||||
{
|
||||
$sep = ";";
|
||||
|
||||
@ -54,6 +54,8 @@ $date_endmonth = GETPOST('date_endmonth');
|
||||
$date_endday = GETPOST('date_endday');
|
||||
$date_endyear = GETPOST('date_endyear');
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
@ -93,7 +95,7 @@ $sql .= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell, aa.rowid as fk
|
||||
$sql .= " fd.situation_percent,ct.accountancy_code_sell as account_tva";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = fd.fk_product";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
|
||||
@ -191,7 +193,6 @@ if ($result) {
|
||||
// Bookkeeping Write
|
||||
if ($action == 'writebookkeeping')
|
||||
{
|
||||
$now = dol_now();
|
||||
|
||||
foreach ($tabfac as $key => $val)
|
||||
{
|
||||
@ -275,14 +276,9 @@ if ($action == 'writebookkeeping')
|
||||
if ($action == 'export_csv')
|
||||
{
|
||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
$sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
|
||||
$journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
if ($conf->global->EXPORT_PREFIX_SPEC)
|
||||
$filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_ventes.csv";
|
||||
else
|
||||
$filename="journal_ventes.csv";
|
||||
header('Content-Disposition: attachment;filename='.$filename);
|
||||
include DOL_DOCUMENT_ROOT.'/accountancy/tpl/export_journal.tpl.php';
|
||||
|
||||
$companystatic = new Client($db);
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ if (! empty($id)) {
|
||||
$sql .= ", aa.account_number, aa.label";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as l";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON l.fk_code_ventilation = aa.rowid";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn ";
|
||||
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
|
||||
|
||||
|
||||
@ -63,12 +63,12 @@ if ($action == 'validatehistory') {
|
||||
if ($db->type == 'pgsql') {
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
|
||||
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
|
||||
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accountingaccount as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number";
|
||||
$sql1 .= " AND fd.fk_code_ventilation = 0";
|
||||
} else {
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accountingaccount as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
|
||||
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number";
|
||||
@ -138,7 +138,7 @@ $sql .= " ROUND(SUM(IF(MONTH(ff.datef)=12,ffd.total_ht,0)),2) AS 'Decembre',";
|
||||
$sql .= " ROUND(SUM(ffd.total_ht),2) as 'Total'";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON aa.rowid = ffd.fk_code_ventilation";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation";
|
||||
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||
$sql .= " AND ff.fk_statut > 0 ";
|
||||
|
||||
@ -156,7 +156,7 @@ print '<script type="text/javascript">
|
||||
$sql = "SELECT f.ref as facnumber, f.rowid as facid, l.fk_product, l.description, l.total_ht , l.qty, l.rowid, l.tva_tx, aa.label, aa.account_number, ";
|
||||
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
|
||||
$sql .= " , " . MAIN_DB_PREFIX . "accountingaccount as aa";
|
||||
$sql .= " , " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " , " . MAIN_DB_PREFIX . "facture_fourn_det as l";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
$sql .= " WHERE f.rowid = l.fk_facture_fourn and f.fk_statut >= 1 AND l.fk_code_ventilation <> 0 ";
|
||||
|
||||
@ -179,7 +179,7 @@ $sql .= " , l.product_type as type_l";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_buy = aa.account_number";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
|
||||
$sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation <= 0";
|
||||
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_buy ='')";
|
||||
|
||||
28
htdocs/accountancy/tpl/export_journal.tpl.php
Normal file
28
htdocs/accountancy/tpl/export_journal.tpl.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC;
|
||||
$format = $conf->global->ACCOUNTING_EXPORT_FORMAT;
|
||||
|
||||
$date_export = dol_print_date($now, '%Y%m%d%H%M%S');
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
if ($prefix)
|
||||
$filename = $prefix . "_" . "journal_" . $journal . $date_export . "." . $format;
|
||||
else
|
||||
$filename = "journal_" . $journal . $date_export . "." . $format;
|
||||
header('Content-Disposition: attachment;filename='.$filename);
|
||||
0
htdocs/accountancy/tpl/index.html
Normal file
0
htdocs/accountancy/tpl/index.html
Normal file
@ -621,7 +621,9 @@ if ($rowid > 0)
|
||||
if ($object->datefin)
|
||||
{
|
||||
print dol_print_date($object->datefin,'day');
|
||||
if ($object->datefin < ($now - $conf->adherent->cotisation->warning_delay) && $object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||
if ($object->hasDelay()) {
|
||||
print " ".img_warning($langs->trans("Late"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1741,7 +1741,7 @@ class Adherent extends CommonObject
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
$sql = "SELECT a.rowid, a.datefin";
|
||||
$sql = "SELECT a.rowid, a.datefin, a.statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
|
||||
$sql.= " WHERE a.statut = 1";
|
||||
$sql.= " AND a.entity IN (".getEntity('adherent', 1).")";
|
||||
@ -1758,11 +1758,16 @@ class Adherent extends CommonObject
|
||||
$response->url=DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&statut=1';
|
||||
$response->img=img_object($langs->trans("Members"),"user");
|
||||
|
||||
$adherentstatic = new Adherent($this->db);
|
||||
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$response->nbtodo++;
|
||||
|
||||
if ($this->db->jdate($obj->datefin) < ($now - $conf->adherent->cotisation->warning_delay)) {
|
||||
$adherentstatic->datefin = $this->db->jdate($obj->datefin);
|
||||
$adherentstatic->statut = $obj->statut;
|
||||
|
||||
if ($adherentstatic->hasDelay()) {
|
||||
$response->nbtodolate++;
|
||||
}
|
||||
}
|
||||
@ -1974,4 +1979,18 @@ class Adherent extends CommonObject
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
public function hasDelay()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
//Only valid members
|
||||
if ($this->statut <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
return $this->datefin < ($now - $conf->adherent->cotisation->warning_delay);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -271,6 +271,8 @@ if ($resql)
|
||||
$memberstatic->ref=$objp->rowid;
|
||||
$memberstatic->lastname=$objp->lastname;
|
||||
$memberstatic->firstname=$objp->firstname;
|
||||
$memberstatic->statut=$objp->statut;
|
||||
$memberstatic->datefin= $datefin;
|
||||
|
||||
if (! empty($objp->fk_soc)) {
|
||||
$memberstatic->socid = $objp->fk_soc;
|
||||
@ -325,7 +327,9 @@ if ($resql)
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print dol_print_date($datefin,'day');
|
||||
if ($datefin < ($now - $conf->adherent->cotisation->warning_delay) && $objp->statut > 0) print " ".img_warning($langs->trans("SubscriptionLate"));
|
||||
if ($memberstatic->hasDelay()) {
|
||||
print " ".img_warning($langs->trans("SubscriptionLate"));
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -28,6 +29,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
|
||||
|
||||
$langs->load("errors");
|
||||
$langs->load("admin");
|
||||
@ -76,28 +78,7 @@ llxHeader('',$langs->trans("Setup"),$help_url);
|
||||
|
||||
|
||||
// Search modules dirs
|
||||
$modulesdir = array();
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
{
|
||||
$modulesdir[$dirroot . '/core/modules/'] = $dirroot . '/core/modules/';
|
||||
|
||||
$handle=@opendir($dirroot);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
{
|
||||
if (is_dir($dirroot . '/' . $file . '/core/modules/'))
|
||||
{
|
||||
$modulesdir[$dirroot . '/' . $file . '/core/modules/'] = $dirroot . '/' . $file . '/core/modules/';
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
//var_dump($modulesdir);
|
||||
$modulesdir = dolGetModulesDirs();
|
||||
|
||||
|
||||
$filename = array();
|
||||
|
||||
@ -225,7 +225,11 @@ foreach ($syslogModules as $moduleName)
|
||||
print '<td align="left">';
|
||||
if ($module->getInfo())
|
||||
{
|
||||
print $form->textwithpicto('', $module->getInfo());
|
||||
print $form->textwithpicto('', $module->getInfo(), 1, 'help');
|
||||
}
|
||||
if ($module->getWarning())
|
||||
{
|
||||
print $form->textwithpicto('', $module->getWarning(), 1, 'warning');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -882,7 +882,7 @@ class ActionComm extends CommonObject
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$now = dol_now();
|
||||
$agenda_static = new ActionComm($this->db);
|
||||
|
||||
$response = new WorkboardResponse();
|
||||
$response->warning_delay = $conf->actions->warning_delay/60/60/24;
|
||||
@ -895,7 +895,9 @@ class ActionComm extends CommonObject
|
||||
{
|
||||
$response->nbtodo++;
|
||||
|
||||
if (isset($obj->dp) && $this->db->jdate($obj->dp) < ($now - $conf->actions->warning_delay)) {
|
||||
$agenda_static->datep = $this->db->jdate($obj->dp);
|
||||
|
||||
if ($agenda_static->hasDelay()) {
|
||||
$response->nbtodolate++;
|
||||
}
|
||||
}
|
||||
@ -1361,5 +1363,19 @@ class ActionComm extends CommonObject
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the action delayed?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasDelay()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
return $this->datep && ($this->datep < ($now - $conf->actions->warning_delay));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1053,49 +1053,6 @@ if (empty($reshook))
|
||||
exit();
|
||||
}
|
||||
|
||||
// Generation doc (depuis lien ou depuis cartouche doc)
|
||||
else if ($action == 'builddoc' && $user->rights->propal->creer) {
|
||||
if (GETPOST('model')) {
|
||||
$object->setDocModel($user, GETPOST('model'));
|
||||
}
|
||||
if (GETPOST('fk_bank')) { // this field may come from an external module
|
||||
$object->fk_bank = GETPOST('fk_bank');
|
||||
} else {
|
||||
$object->fk_bank = $object->fk_account;
|
||||
}
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
$result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result <= 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
|
||||
// Remove file in doc form
|
||||
else if ($action == 'remove_file' && $user->rights->propal->creer) {
|
||||
if ($object->id > 0) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
|
||||
$langs->load("other");
|
||||
$upload_dir = $conf->propal->dir_output;
|
||||
$file = $upload_dir . '/' . GETPOST('file');
|
||||
$ret = dol_delete_file($file, 0, 0, 0, $object);
|
||||
if ($ret)
|
||||
setEventMessage($langs->trans("FileWasRemoved", GETPOST('file')));
|
||||
else
|
||||
setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Set project
|
||||
else if ($action == 'classin' && $user->rights->propal->creer) {
|
||||
$object->setProject($_POST['projectid']);
|
||||
@ -1211,6 +1168,12 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Actions to build doc
|
||||
$upload_dir = $conf->propal->dir_output;
|
||||
$permissioncreate=$user->rights->propal->creer;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2846,7 +2846,7 @@ class Commande extends CommonOrder
|
||||
|
||||
$clause = " WHERE";
|
||||
|
||||
$sql = "SELECT c.rowid, c.date_creation as datec, c.date_livraison as delivery_date, c.fk_statut";
|
||||
$sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.date_livraison as delivery_date, c.fk_statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id)
|
||||
{
|
||||
@ -2862,21 +2862,22 @@ class Commande extends CommonOrder
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$now=dol_now();
|
||||
|
||||
$response = new WorkboardResponse();
|
||||
$response->warning_delay=$conf->commande->client->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("OrdersToProcess");
|
||||
$response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3';
|
||||
$response->img=img_object($langs->trans("Orders"),"order");
|
||||
|
||||
$generic_commande = new Commande($this->db);
|
||||
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$response->nbtodo++;
|
||||
$response->nbtodo++;
|
||||
|
||||
$date_to_test = empty($obj->delivery_date) ? $obj->datec : $obj->delivery_date;
|
||||
$generic_commande->statut = $obj->fk_statut;
|
||||
$generic_commande->date_livraison = $obj->delivery_date;
|
||||
|
||||
if ($obj->fk_statut != 3 && $this->db->jdate($date_to_test) < ($now - $conf->commande->client->warning_delay)) {
|
||||
if ($generic_commande->hasDelay()) {
|
||||
$response->nbtodolate++;
|
||||
}
|
||||
}
|
||||
@ -3341,6 +3342,24 @@ class Commande extends CommonOrder
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the customer order delayed?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasDelay()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (!($this->statut > Commande::STATUS_DRAFT) && ($this->statut < Commande::STATUS_CLOSED)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
return max($this->date_commande, $this->date_livraison) < ($now - $conf->commande->client->warning_delay);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -357,9 +357,11 @@ if ($resql)
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td class="nowrap">';
|
||||
|
||||
$generic_commande->id=$objp->rowid;
|
||||
$generic_commande->ref=$objp->ref;
|
||||
$generic_commande->statut = $objp->fk_statut;
|
||||
$generic_commande->date_commande = $db->jdate($objp->date_commande);
|
||||
$generic_commande->date_livraison = $db->jdate($objp->date_delivery);
|
||||
$generic_commande->ref_client = $objp->ref_client;
|
||||
$generic_commande->total_ht = $objp->total_ht;
|
||||
$generic_commande->total_tva = $objp->total_tva;
|
||||
@ -444,8 +446,9 @@ if ($resql)
|
||||
|
||||
// warning late icon
|
||||
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && max($db->jdate($objp->date_commande),$db->jdate($objp->date_delivery)) < ($now - $conf->commande->client->warning_delay))
|
||||
print img_picto($langs->trans("Late"),"warning");
|
||||
if ($generic_commande->hasDelay()) {
|
||||
print img_picto($langs->trans("Late"), "warning");
|
||||
}
|
||||
if(!empty($objp->note_private))
|
||||
{
|
||||
print ' <span class="note">';
|
||||
|
||||
@ -640,6 +640,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
|
||||
$generic_commande->id=$objp->rowid;
|
||||
$generic_commande->ref=$objp->ref;
|
||||
$generic_commande->statut = $objp->fk_statut;
|
||||
$generic_commande->date_commande = $db->jdate($objp->date_commande);
|
||||
$generic_commande->date_livraison = $db->jdate($objp->date_livraison);
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
@ -647,7 +650,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
||||
print '</td>';
|
||||
|
||||
print '<td width="20" class="nobordernopadding nowrap">';
|
||||
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning");
|
||||
if ($generic_commande->hasDelay()) {
|
||||
print img_picto($langs->trans("Late"),"warning");
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
|
||||
@ -1088,8 +1088,8 @@ class Account extends CommonObject
|
||||
{
|
||||
$country_code=$this->getCountryCode();
|
||||
|
||||
if (in_array($country_code,array('CH','DE','FR','ES','GA','IT'))) return 1; // France, Spain, Gabon
|
||||
if (in_array($country_code,array('AU','BE','CA','DK','GR','GB','ID','IE','IR','KR','NL','NZ','UK','US'))) return 2; // Australia, Great Britain...
|
||||
if (in_array($country_code,array('CH','FR','ES','GA','IT'))) return 1; // France, Spain, Gabon, ...
|
||||
if (in_array($country_code,array('AU','BE','CA','DE','DK','GR','GB','ID','IE','IR','KR','NL','NZ','UK','US'))) return 2; // Australia, England...
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1148,6 +1148,10 @@ class AccountLine extends CommonObject
|
||||
var $ref;
|
||||
var $datec;
|
||||
var $dateo;
|
||||
|
||||
/**
|
||||
* Value date
|
||||
*/
|
||||
var $datev;
|
||||
var $amount;
|
||||
var $label;
|
||||
|
||||
232
htdocs/compta/bank/document.php
Normal file
232
htdocs/compta/bank/document.php
Normal file
@ -0,0 +1,232 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/bank/document.php
|
||||
* \ingroup banque
|
||||
* \brief Page de gestion des documents attaches a un compte bancaire
|
||||
*/
|
||||
require('../../main.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT . "/core/lib/bank.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT . "/core/lib/files.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT . "/core/lib/images.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT . "/core/class/html.formfile.class.php");
|
||||
require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
|
||||
|
||||
$langs->load("banks");
|
||||
|
||||
|
||||
$langs->load('companies');
|
||||
$langs->load('other');
|
||||
|
||||
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int'));
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
|
||||
$mesg = '';
|
||||
if (isset($_SESSION['DolMessage'])) {
|
||||
$mesg = $_SESSION['DolMessage'];
|
||||
unset($_SESSION['DolMessage']);
|
||||
}
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id) {
|
||||
$action = '';
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
if ($user->societe_id)
|
||||
$socid = $user->societe_id;
|
||||
$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '',
|
||||
$fieldtype);
|
||||
|
||||
// Get parameters
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$page = GETPOST("page", 'int');
|
||||
if ($page == -1) {
|
||||
$page = 0;
|
||||
}
|
||||
$offset = $conf->liste_limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (!$sortorder)
|
||||
$sortorder = "ASC";
|
||||
if (!$sortfield)
|
||||
$sortfield = "name";
|
||||
|
||||
$object = new Account($db);
|
||||
if ($id)
|
||||
$object->fetch($id);
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Envoi fichier
|
||||
if ($_POST["sendit"] && !empty($conf->global->MAIN_UPLOAD_DOC)) {
|
||||
if ($object->fetch($id)) {
|
||||
|
||||
$upload_dir = $conf->bank->dir_output . "/" . $object->ref;
|
||||
|
||||
if (dol_mkdir($upload_dir) >= 0) {
|
||||
$resupload = dol_move_uploaded_file($_FILES['userfile']['tmp_name'],
|
||||
$upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),
|
||||
0, 0, $_FILES['userfile']['error']);
|
||||
if (is_numeric($resupload) && $resupload > 0) {
|
||||
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name'])
|
||||
== 1) {
|
||||
// Create small thumbs for image (Ratio is near 16/9)
|
||||
// Used on logon for example
|
||||
$imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'],
|
||||
$maxwidthsmall, $maxheightsmall, '_small', $quality,
|
||||
"thumbs");
|
||||
// Create mini thumbs for image (Ratio is near 16/9)
|
||||
// Used on menu or for setup page for example
|
||||
$imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'],
|
||||
$maxwidthmini, $maxheightmini, '_mini', $quality,
|
||||
"thumbs");
|
||||
}
|
||||
$mesg = '<div class="ok">' . $langs->trans("FileTransferComplete") . '</div>';
|
||||
}
|
||||
else {
|
||||
$langs->load("errors");
|
||||
if ($resupload < 0) { // Unknown error
|
||||
$mesg = '<div class="error">' . $langs->trans("ErrorFileNotUploaded") . '</div>';
|
||||
}
|
||||
else if (preg_match('/ErrorFileIsInfectedWithAVirus/',
|
||||
$resupload)) { // Files infected by a virus
|
||||
$mesg = '<div class="error">' . $langs->trans("ErrorFileIsInfectedWithAVirus") . '</div>';
|
||||
}
|
||||
else { // Known error
|
||||
$mesg = '<div class="error">' . $langs->trans($resupload) . '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Delete
|
||||
else if ($action == 'confirm_deletefile' && $confirm == 'yes') {
|
||||
if ($object->fetch($id)) {
|
||||
|
||||
$upload_dir = $conf->bank->dir_output;
|
||||
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||
|
||||
$ret = dol_delete_file($file, 0, 0, 0, $object);
|
||||
if ($ret) {
|
||||
setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
||||
} else {
|
||||
setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
||||
}
|
||||
|
||||
Header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
if ($object->fetch($id, $ref)) {
|
||||
|
||||
$upload_dir = $conf->bank->dir_output . '/' . $object->ref;
|
||||
|
||||
// Onglets
|
||||
$head = bank_prepare_head($object);
|
||||
dol_fiche_head($head, 'document', $langs->trans("FinancialAccount"), 0,
|
||||
'account');
|
||||
|
||||
|
||||
// Construit liste des fichiers
|
||||
$filearray = dol_dir_list($upload_dir, "files", 0, '', '\.meta$',
|
||||
$sortfield,
|
||||
(strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC), 1);
|
||||
$totalsize = 0;
|
||||
foreach ($filearray as $key => $file) {
|
||||
$totalsize+=$file['size'];
|
||||
}
|
||||
|
||||
|
||||
print '<table class="border"width="100%">';
|
||||
|
||||
// Ref
|
||||
// Ref
|
||||
print '<tr><td valign="top" width="25%">' . $langs->trans("Ref") . '</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($object, 'ref', '', 1, 'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td valign="top">' . $langs->trans("Label") . '</td>';
|
||||
print '<td colspan="3">' . $object->label . '</td></tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td valign="top">' . $langs->trans("Status") . '</td>';
|
||||
print '<td colspan="3">' . $object->getLibStatut(4) . '</td></tr>';
|
||||
print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>';
|
||||
print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>';
|
||||
print "</table>\n";
|
||||
print "</div>\n";
|
||||
|
||||
dol_htmloutput_mesg($mesg, $mesgs);
|
||||
|
||||
/*
|
||||
* Confirmation suppression fichier
|
||||
*/
|
||||
if ($action == 'delete') {
|
||||
$ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]),
|
||||
$langs->trans('DeleteFile'),
|
||||
$langs->trans('ConfirmDeleteFile'), 'confirm_deletefile',
|
||||
'', 0, 1);
|
||||
if ($ret == 'html')
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
// Affiche formulaire upload
|
||||
$formfile = new FormFile($db);
|
||||
$formfile->form_attach_new_file(DOL_URL_ROOT . '/compta/bank/document.php?id=' . $object->id,
|
||||
'', 0, 0, $user->rights->banque, 50, $object);
|
||||
|
||||
|
||||
// List of document
|
||||
$param = '&id=' . $object->id;
|
||||
$formfile->list_of_documents($filearray, $object, 'bank', $param);
|
||||
}
|
||||
else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Header('Location: index.php');
|
||||
}
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
@ -3223,8 +3223,9 @@ else if ($id > 0 || ! empty($ref))
|
||||
$form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm');
|
||||
} else {
|
||||
print dol_print_date($object->date_lim_reglement, 'daytext');
|
||||
if ($object->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $object->paye && $object->statut == 1 && ! isset($object->am))
|
||||
if ($object->hasDelay()) {
|
||||
print img_warning($langs->trans('Late'));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
print ' ';
|
||||
|
||||
@ -3246,11 +3246,15 @@ class Facture extends CommonInvoice
|
||||
$response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1';
|
||||
$response->img=img_object($langs->trans("Bills"),"bill");
|
||||
|
||||
$generic_facture = new Facture($this->db);
|
||||
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$generic_facture->date_lim_reglement = $this->db->jdate($obj->datefin);
|
||||
|
||||
$response->nbtodo++;
|
||||
|
||||
if ($this->db->jdate($obj->datefin) < ($now - $conf->facture->client->warning_delay)) {
|
||||
if ($generic_facture->hasDelay()) {
|
||||
$response->nbtodolate++;
|
||||
}
|
||||
}
|
||||
@ -3707,6 +3711,25 @@ class Facture extends CommonInvoice
|
||||
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the customer invoice delayed?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasDelay()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
//Paid invoices have status STATUS_CLOSED
|
||||
if (!$this->statut != Facture::STATUS_VALIDATED) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->date_lim_reglement < ($now - $conf->facture->client->warning_delay);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -379,6 +379,8 @@ if ($resql)
|
||||
$facturestatic->id=$objp->facid;
|
||||
$facturestatic->ref=$objp->facnumber;
|
||||
$facturestatic->type=$objp->type;
|
||||
$facturestatic->statut = $objp->fk_statut;
|
||||
$facturestatic->date_lim_reglement = $db->jdate($objp->datelimite);
|
||||
$notetoshow=dol_string_nohtmltag(($user->societe_id>0?$objp->note_public:$objp->note),1);
|
||||
$paiement = $facturestatic->getSommePaiement();
|
||||
|
||||
@ -418,7 +420,7 @@ if ($resql)
|
||||
|
||||
// Date limit
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($datelimit,'day');
|
||||
if ($datelimit < ($now - $conf->facture->client->warning_delay) && ! $objp->paye && $objp->fk_statut == 1 && ! $paiement)
|
||||
if ($facturestatic->hasDelay())
|
||||
{
|
||||
print img_warning($langs->trans('Late'));
|
||||
}
|
||||
|
||||
@ -734,6 +734,8 @@ if ($resql)
|
||||
$facturestatic->id=$objp->facid;
|
||||
$facturestatic->ref=$objp->facnumber;
|
||||
$facturestatic->type=$objp->type;
|
||||
$facturestatic->statut=$objp->fk_statut;
|
||||
$facturestatic->date_lim_reglement= $db->jdate($objp->datelimite);
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
|
||||
@ -744,7 +746,9 @@ if ($resql)
|
||||
|
||||
// Warning picto
|
||||
print '<td width="20" class="nobordernopadding nowrap">';
|
||||
if ($date_limit < ($now - $conf->facture->client->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late"));
|
||||
if ($facturestatic->hasDelay()) {
|
||||
print img_warning($langs->trans("Late"));
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// PDF Picto
|
||||
|
||||
@ -356,7 +356,9 @@ if ($object->id > 0)
|
||||
else
|
||||
{
|
||||
print dol_print_date($object->date_lim_reglement,'daytext');
|
||||
if ($object->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $object->paye && $object->statut == Facture::STATUS_VALIDATED && ! isset($object->am)) print img_warning($langs->trans('Late'));
|
||||
if ($object->hasDelay()) {
|
||||
print img_warning($langs->trans('Late'));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -359,11 +359,15 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
$facturestatic->total_ht=$obj->total_ht;
|
||||
$facturestatic->total_tva=$obj->total_tva;
|
||||
$facturestatic->total_ttc=$obj->total_ttc;
|
||||
$facturestatic->statut = $obj->fk_statut;
|
||||
$facturestatic->date_lim_reglement = $db->jdate($obj->datelimite);
|
||||
$facturestatic->type=$obj->type;
|
||||
print $facturestatic->getNomUrl(1,'');
|
||||
print '</td>';
|
||||
print '<td width="20" class="nobordernopadding nowrap">';
|
||||
if ($obj->fk_statut == 1 && ! $obj->paye && $db->jdate($obj->datelimite) < ($now - $conf->facture->client->warning_delay)) print img_warning($langs->trans("Late"));
|
||||
if ($facturestatic->hasDelay()) {
|
||||
print img_warning($langs->trans("Late"));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->facnumber);
|
||||
@ -801,10 +805,14 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
$facturestatic->total_tva=$obj->total_tva;
|
||||
$facturestatic->total_ttc=$obj->total_ttc;
|
||||
$facturestatic->type=$obj->type;
|
||||
$facturestatic->statut = $obj->fk_statut;
|
||||
$facturestatic->date_lim_reglement = $db->jdate($obj->datelimite);
|
||||
print $facturestatic->getNomUrl(1,'');
|
||||
print '</td>';
|
||||
print '<td width="20" class="nobordernopadding nowrap">';
|
||||
if ($db->jdate($obj->datelimite) < ($now - $conf->facture->client->warning_delay)) print img_warning($langs->trans("Late"));
|
||||
if ($facturestatic->hasDelay()) {
|
||||
print img_warning($langs->trans("Late"));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->facnumber);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -44,6 +44,13 @@ class RemiseCheque extends CommonObject
|
||||
var $errno;
|
||||
|
||||
public $statut;
|
||||
public $amount;
|
||||
public $date_bordereau;
|
||||
public $account_id;
|
||||
public $account_label;
|
||||
public $author_id;
|
||||
public $nbcheque;
|
||||
public $number;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -819,7 +826,6 @@ class RemiseCheque extends CommonObject
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$this->date_bordereau = $date;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
||||
@ -646,7 +646,7 @@ else
|
||||
print '<td colspan="2"><label for="birthday_alert">'.$langs->trans("Alert").'</label>: ';
|
||||
if ($object->birthday_alert)
|
||||
{
|
||||
print '<input type="checkbox" name="birthday_alert" id="birthday_aler" checked></td>';
|
||||
print '<input type="checkbox" name="birthday_alert" id="birthday_alert" checked></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
108
htdocs/core/actions_builddoc.inc.php
Normal file
108
htdocs/core/actions_builddoc.inc.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/actions_builddoc.inc.php
|
||||
* \brief Code for actions on building or deleting documents
|
||||
*/
|
||||
|
||||
|
||||
// $action must be defined
|
||||
// $id must be defined
|
||||
// $object must be defined and must have a method generateDocument.
|
||||
// $permissioncreate must be defined
|
||||
// $upload_dir must be defined (example $conf->projet->dir_output . "/";)
|
||||
// $hidedetails, $hidedesc and $hideref may have been set or not.
|
||||
|
||||
|
||||
// Build doc
|
||||
if ($action == 'builddoc' && $permissioncreate)
|
||||
{
|
||||
if (is_numeric(GETPOST('model')))
|
||||
{
|
||||
$error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Model"));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Reload to get all modified line records and be ready for hooks
|
||||
$ret = $object->fetch($id);
|
||||
$ret = $object->fetch_thirdparty();
|
||||
/*if (empty($object->id) || ! $object->id > 0)
|
||||
{
|
||||
dol_print_error('Object must have been loaded by a fetch');
|
||||
exit;
|
||||
}*/
|
||||
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
|
||||
// Special case for invoices
|
||||
if (property_exists($object, 'fk_bank'))
|
||||
{
|
||||
if (GETPOST('fk_bank')) { // this field may come from an external module
|
||||
$object->fk_bank = GETPOST('fk_bank');
|
||||
} else {
|
||||
$object->fk_bank = $object->fk_account;
|
||||
}
|
||||
}
|
||||
|
||||
$outputlangs = $langs;
|
||||
$newlang='';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id');
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($object->client->default_lang)) $newlang=$object->client->default_lang; // for proposal, order, invoice, ...
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($object->default_lang)) $newlang=$object->default_lang; // for thirdparty
|
||||
if (! empty($newlang))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
|
||||
// To be sure vars is defined
|
||||
if (empty($hidedetails)) $hidedetails=0;
|
||||
if (empty($hidedesc)) $hidedesc=0;
|
||||
if (empty($hideref)) $hideref=0;
|
||||
|
||||
$result= $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result <= 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Delete file in doc form
|
||||
if ($action == 'remove_file' && $permissioncreate)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
if (empty($object->id) || ! $object->id > 0)
|
||||
{
|
||||
// Reload to get all modified line records and be ready for hooks
|
||||
$ret = $object->fetch($id);
|
||||
$ret = $object->fetch_thirdparty();
|
||||
}
|
||||
|
||||
$langs->load("other");
|
||||
$filetodelete=GETPOST('file','alpha');
|
||||
$file = $upload_dir . '/' . $filetodelete;
|
||||
$ret=dol_delete_file($file,0,0,0,$object);
|
||||
if ($ret) setEventMessage($langs->trans("FileWasRemoved", $filetodelete));
|
||||
else setEventMessage($langs->trans("ErrorFailToDeleteFile", $filetodelete), 'errors');
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
// $action must be defined
|
||||
// $object must be defined
|
||||
// $permissiondellink must be defined
|
||||
// $uploaddir (example $conf->projet->dir_output . "/";)
|
||||
|
||||
$dellinkid = GETPOST('dellinkid','int');
|
||||
|
||||
@ -34,3 +35,5 @@ if ($action == 'dellink' && ! empty($permissiondellink) && ! GETPOST('cancel') &
|
||||
$result=$object->deleteObjectLinked(0, '', 0, '', $dellinkid);
|
||||
if ($result < 0) setEventMessages($object->error,$object->errors,'errors');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -108,12 +108,18 @@ class box_factures extends ModeleBoxes
|
||||
$facturestatic->total_ht = $objp->total_ht;
|
||||
$facturestatic->total_tva = $objp->total_tva;
|
||||
$facturestatic->total_ttc = $objp->total_ttc;
|
||||
$facturestatic->statut = $objp->fk_statut;
|
||||
$facturestatic->date_lim_reglement = $db->jdate($objp->datelimite);
|
||||
|
||||
$societestatic->id = $objp->socid;
|
||||
$societestatic->name = $objp->name;
|
||||
$societestatic->code_client = $objp->code_client;
|
||||
|
||||
|
||||
$late = '';
|
||||
if ($objp->paye == 0 && ($objp->fk_statut != 2 && $objp->fk_statut != 3) && $datelimite < ($now - $conf->facture->client->warning_delay)) { $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day')));}
|
||||
if ($facturestatic->hasDelay()) {
|
||||
$late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day')));
|
||||
}
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
|
||||
@ -93,7 +93,6 @@ class box_factures_fourn extends ModeleBoxes
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$now=dol_now();
|
||||
|
||||
$line = 0;
|
||||
$l_due_date = $langs->trans('Late').' ('.$langs->trans('DateEcheance').': %s)';
|
||||
@ -108,6 +107,8 @@ class box_factures_fourn extends ModeleBoxes
|
||||
$facturestatic->total_ht = $objp->total_ht;
|
||||
$facturestatic->total_tva = $objp->total_tva;
|
||||
$facturestatic->total_ttc = $objp->total_ttc;
|
||||
$facturestatic->date_echeance = $datelimite;
|
||||
$facturestatic->statut = $objp->fk_statut;
|
||||
$thirdpartytmp->id = $objp->socid;
|
||||
$thirdpartytmp->name = $objp->name;
|
||||
$thirdpartytmp->fournisseur = 1;
|
||||
@ -115,7 +116,10 @@ class box_factures_fourn extends ModeleBoxes
|
||||
$thirdpartytmp->logo = $objp->logo;
|
||||
|
||||
$late = '';
|
||||
if ($objp->paye == 0 && $datelimite && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date, dol_print_date($datelimite,'day')));
|
||||
|
||||
if ($facturestatic->hasDelay()) {
|
||||
$late=img_warning(sprintf($l_due_date, dol_print_date($datelimite,'day')));
|
||||
}
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
|
||||
@ -86,11 +86,12 @@ class box_factures_fourn_imp extends ModeleBoxes
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$now=dol_now();
|
||||
|
||||
$line = 0;
|
||||
$l_due_date = $langs->trans('Late').' ('.$langs->trans('DateEcheance').': %s)';
|
||||
|
||||
$facturestatic = new FactureFournisseur($db);
|
||||
|
||||
while ($line < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
@ -99,9 +100,13 @@ class box_factures_fourn_imp extends ModeleBoxes
|
||||
$thirdpartytmp->name = $objp->name;
|
||||
$thirdpartytmp->code_client = $objp->code_client;
|
||||
$thirdpartytmp->logo = $objp->logo;
|
||||
$facturestatic->date_echeance = $datelimite;
|
||||
$facturestatic->statut = $objp->fk_statut;
|
||||
|
||||
$late='';
|
||||
if ($datelimite && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day')));
|
||||
if ($facturestatic->hasDelay()) {
|
||||
$late=img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day')));
|
||||
}
|
||||
|
||||
$tooltip = $langs->trans('SupplierInvoice') . ': ' . ($objp->ref?$objp->ref:$objp->facid) . '<br>' . $langs->trans('RefSupplier') . ': ' . $objp->ref_supplier;
|
||||
$this->info_box_contents[$line][] = array(
|
||||
|
||||
@ -108,6 +108,8 @@ class box_factures_imp extends ModeleBoxes
|
||||
$facturestatic->total_ht = $objp->total_ht;
|
||||
$facturestatic->total_tva = $objp->total_tva;
|
||||
$facturestatic->total_ttc = $objp->total_ttc;
|
||||
$facturestatic->statut = $objp->fk_statut;
|
||||
$facturestatic->date_lim_reglement = $db->jdate($objp->datelimite);
|
||||
$societestatic->id = $objp->socid;
|
||||
$societestatic->name = $objp->name;
|
||||
$societestatic->client = 1;
|
||||
@ -115,7 +117,9 @@ class box_factures_imp extends ModeleBoxes
|
||||
$societestatic->logo = $objp->logo;
|
||||
|
||||
$late='';
|
||||
if ($datelimite < ($now - $conf->facture->client->warning_delay)) $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day')));
|
||||
if ($facturestatic->hasDelay()) {
|
||||
$late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day')));
|
||||
}
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="left"',
|
||||
|
||||
@ -53,6 +53,11 @@ abstract class CommonObject
|
||||
*/
|
||||
public $error;
|
||||
|
||||
/**
|
||||
* @var string[] Array of error strings
|
||||
*/
|
||||
public $errors=array();
|
||||
|
||||
/**
|
||||
* @var string Key value used to track if data is coming from import wizard
|
||||
*/
|
||||
@ -82,11 +87,6 @@ abstract class CommonObject
|
||||
|
||||
// Following vars are used by some objects only. We keep this property here in CommonObject to be able to provide common method using them.
|
||||
|
||||
/**
|
||||
* @var string[] Array of error strings
|
||||
*/
|
||||
public $errors=array();
|
||||
|
||||
/**
|
||||
* @var string[] Can be used to pass information when only object is provided to method
|
||||
*/
|
||||
@ -3432,7 +3432,6 @@ abstract class CommonObject
|
||||
require_once $file;
|
||||
|
||||
$obj = new $classname($this->db);
|
||||
//$obj->message = $message;
|
||||
|
||||
// If generator is ODT, we must have srctemplatepath defined, if not we set it.
|
||||
if ($obj->type == 'odt' && empty($srctemplatepath))
|
||||
|
||||
@ -346,6 +346,9 @@ class Conf
|
||||
// Module contrat
|
||||
$this->contrat->dir_output=$rootfordata."/contracts";
|
||||
$this->contrat->dir_temp =$rootfordata."/contracts/temp";
|
||||
// Module bank
|
||||
$this->bank->dir_output=$rootfordata."/bank";
|
||||
$this->bank->dir_temp =$rootfordata."/bank/temp";
|
||||
|
||||
|
||||
// Set some default values
|
||||
|
||||
@ -364,7 +364,8 @@ class Form
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a text and picto with tooltip on text or picto
|
||||
* Show a text and picto with tooltip on text or picto.
|
||||
* Can be called by an instancied $form->textwithtooltip or by a static call Form::textwithtooltip
|
||||
*
|
||||
* @param string $text Text to show
|
||||
* @param string $htmltext HTML content of tooltip. Must be HTML/UTF8 encoded.
|
||||
|
||||
@ -234,7 +234,8 @@ class Translate
|
||||
if ($usecachekey)
|
||||
{
|
||||
//dol_syslog('Translate::Load we will cache result into usecachekey '.$usecachekey);
|
||||
|
||||
//global $aaa; $aaa+=1;
|
||||
//print $aaa." ".$usecachekey."\n";
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/memory.lib.php';
|
||||
$tmparray=dol_getcache($usecachekey);
|
||||
if (is_array($tmparray) && count($tmparray))
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
|
||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -23,6 +24,7 @@
|
||||
* \brief Library of admin functions
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
|
||||
|
||||
/**
|
||||
* Renvoi une version en chaine depuis une version en tableau
|
||||
@ -676,29 +678,7 @@ function activateModule($value,$withdeps=1)
|
||||
$ret='';
|
||||
$modName = $value;
|
||||
$modFile = $modName . ".class.php";
|
||||
|
||||
// Loop on each directory to fill $modulesdir
|
||||
$modulesdir = array();
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
{
|
||||
$modulesdir[] = $dirroot."/core/modules/";
|
||||
|
||||
$handle=@opendir(dol_osencode($dirroot));
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
{
|
||||
if (is_dir($dirroot . '/' . $file . '/core/modules/'))
|
||||
{
|
||||
$modulesdir[] = $dirroot . '/' . $file . '/core/modules/';
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
$modulesdir = dolGetModulesDirs();
|
||||
|
||||
// Loop on each directory
|
||||
$found=false;
|
||||
@ -795,29 +775,7 @@ function unActivateModule($value, $requiredby=1)
|
||||
$ret='';
|
||||
$modName = $value;
|
||||
$modFile = $modName . ".class.php";
|
||||
|
||||
// Loop on each directory to fill $modulesdir
|
||||
$modulesdir = array();
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
{
|
||||
$modulesdir[] = $dirroot."/core/modules/";
|
||||
|
||||
$handle=@opendir(dol_osencode($dirroot));
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
{
|
||||
if (is_dir($dirroot . '/' . $file . '/core/modules/'))
|
||||
{
|
||||
$modulesdir[] = $dirroot . '/' . $file . '/core/modules/';
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
$modulesdir = dolGetModulesDirs();
|
||||
|
||||
// Loop on each directory
|
||||
$found=false;
|
||||
@ -853,7 +811,7 @@ function unActivateModule($value, $requiredby=1)
|
||||
$countrb=count($objMod->requiredby);
|
||||
for ($i = 0; $i < $countrb; $i++)
|
||||
{
|
||||
var_dump($objMod->requiredby[$i]);
|
||||
//var_dump($objMod->requiredby[$i]);
|
||||
unActivateModule($objMod->requiredby[$i]);
|
||||
}
|
||||
}
|
||||
@ -884,36 +842,10 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql
|
||||
global $db, $modules, $conf, $langs;
|
||||
|
||||
// Search modules
|
||||
$filename = array();
|
||||
$modules = array();
|
||||
$orders = array();
|
||||
$categ = array();
|
||||
$dirmod = array();
|
||||
$modulesdir = array();
|
||||
$modulesdir = dolGetModulesDirs();
|
||||
$i = 0; // is a sequencer of modules found
|
||||
$j = 0; // j is module number. Automatically affected if module number not defined.
|
||||
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
{
|
||||
$modulesdir[$dirroot . '/core/modules/'] = $dirroot . '/core/modules/';
|
||||
|
||||
$handle=@opendir($dirroot);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
{
|
||||
if (is_dir($dirroot . '/' . $file . '/core/modules/'))
|
||||
{
|
||||
$modulesdir[$dirroot . '/' . $file . '/core/modules/'] = $dirroot . '/' . $file . '/core/modules/';
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||
@ -963,14 +895,6 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql
|
||||
}
|
||||
}
|
||||
|
||||
$modules[$i] = $objMod;
|
||||
$filename[$i]= $modName;
|
||||
$orders[$i] = $objMod->family."_".$j; // Tri par famille puis numero module
|
||||
//print "x".$modName." ".$orders[$i]."\n<br>";
|
||||
if (isset($categ[$objMod->special])) $categ[$objMod->special]++; // Array of all different modules categories
|
||||
else $categ[$objMod->special]=1;
|
||||
$dirmod[$i] = $dirroot;
|
||||
|
||||
// Complete arrays
|
||||
//&$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond
|
||||
if (empty($objMod->dictionaries) && ! empty($objMod->dictionnaries)) $objMod->dictionaries=$objMod->dictionnaries; // For backward compatibility
|
||||
|
||||
@ -72,6 +72,11 @@ function bank_prepare_head(Account $object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . "/compta/bank/document.php?account=" . $object->id;
|
||||
$head[$h][1] = $langs->trans("Documents");
|
||||
$head[$h][2] = 'document';
|
||||
$h++;
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
|
||||
@ -2766,7 +2766,7 @@ function print_fiche_titre($title, $mesg='', $picto='title_generic.png', $pictoi
|
||||
* @param int $id To force an id on html objects
|
||||
* @return string
|
||||
*/
|
||||
function load_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath=0, $id=0)
|
||||
function load_fiche_titre($titre, $mesg='', $picto='title_generic.png', $pictoisfullpath=0, $id=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
*
|
||||
* 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
|
||||
@ -104,7 +105,9 @@ function dolGetModulesDirs($subdir='')
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
{
|
||||
// Default core/modules dir
|
||||
$modulesdir[$dirroot . '/core/modules'.$subdir.'/'] = $dirroot . '/core/modules'.$subdir.'/';
|
||||
if ($type === 'main') {
|
||||
$modulesdir[$dirroot . '/core/modules' . $subdir . '/'] = $dirroot . '/core/modules' . $subdir . '/';
|
||||
}
|
||||
|
||||
// Scan dir from external modules
|
||||
$handle=@opendir($dirroot);
|
||||
|
||||
@ -47,14 +47,19 @@ function dol_setcache($memoryid,$data)
|
||||
// Using a memcached server
|
||||
if (! empty($conf->memcached->enabled) && class_exists('Memcached'))
|
||||
{
|
||||
$memoryid=session_name().'_'.$memoryid;
|
||||
$m=new Memcached();
|
||||
$tmparray=explode(':',$conf->global->MEMCACHED_SERVER);
|
||||
$result=$m->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211);
|
||||
//$m->setOption(Memcached::OPT_COMPRESSION, false);
|
||||
//print "Add memoryid=".$memoryid;
|
||||
$m->add($memoryid,$data); // This fails if key already exists
|
||||
$rescode=$m->getResultCode();
|
||||
global $dolmemcache;
|
||||
if (empty($dolmemcache) || ! is_object($dolmemcache))
|
||||
{
|
||||
$dolmemcache=new Memcached();
|
||||
$tmparray=explode(':',$conf->global->MEMCACHED_SERVER);
|
||||
$result=$dolmemcache->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211);
|
||||
if (! $result) return -1;
|
||||
}
|
||||
|
||||
$memoryid=session_name().'_'.$memoryid;
|
||||
//$dolmemcache->setOption(Memcached::OPT_COMPRESSION, false);
|
||||
$dolmemcache->add($memoryid,$data); // This fails if key already exists
|
||||
$rescode=$dolmemcache->getResultCode();
|
||||
if ($rescode == 0)
|
||||
{
|
||||
return count($data);
|
||||
@ -66,12 +71,18 @@ function dol_setcache($memoryid,$data)
|
||||
}
|
||||
else if (! empty($conf->memcached->enabled) && class_exists('Memcache'))
|
||||
{
|
||||
$memoryid=session_name().'_'.$memoryid;
|
||||
$m=new Memcache();
|
||||
$tmparray=explode(':',$conf->global->MEMCACHED_SERVER);
|
||||
$result=$m->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211);
|
||||
//$m->setOption(Memcached::OPT_COMPRESSION, false);
|
||||
$result=$m->add($memoryid,$data); // This fails if key already exists
|
||||
global $dolmemcache;
|
||||
if (empty($dolmemcache) || ! is_object($dolmemcache))
|
||||
{
|
||||
$dolmemcache=new Memcache();
|
||||
$tmparray=explode(':',$conf->global->MEMCACHED_SERVER);
|
||||
$result=$dolmemcache->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211);
|
||||
if (! $result) return -1;
|
||||
}
|
||||
|
||||
$memoryid=session_name().'_'.$memoryid;
|
||||
//$dolmemcache->setOption(Memcached::OPT_COMPRESSION, false);
|
||||
$result=$dolmemcache->add($memoryid,$data); // This fails if key already exists
|
||||
if ($result)
|
||||
{
|
||||
return count($data);
|
||||
@ -103,10 +114,16 @@ function dol_getcache($memoryid)
|
||||
// Using a memcached server
|
||||
if (! empty($conf->memcached->enabled) && class_exists('Memcached'))
|
||||
{
|
||||
global $m;
|
||||
if (empty($m) || ! is_object($m))
|
||||
{
|
||||
$m=new Memcached();
|
||||
$tmparray=explode(':',$conf->global->MEMCACHED_SERVER);
|
||||
$result=$m->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211);
|
||||
if (! $result) return -1;
|
||||
}
|
||||
|
||||
$memoryid=session_name().'_'.$memoryid;
|
||||
$m=new Memcached();
|
||||
$tmparray=explode(':',$conf->global->MEMCACHED_SERVER);
|
||||
$result=$m->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211);
|
||||
//$m->setOption(Memcached::OPT_COMPRESSION, false);
|
||||
//print "Get memoryid=".$memoryid;
|
||||
$data=$m->get($memoryid);
|
||||
@ -124,10 +141,16 @@ function dol_getcache($memoryid)
|
||||
}
|
||||
else if (! empty($conf->memcached->enabled) && class_exists('Memcache'))
|
||||
{
|
||||
$memoryid=session_name().'_'.$memoryid;
|
||||
$m=new Memcache();
|
||||
$tmparray=explode(':',$conf->global->MEMCACHED_SERVER);
|
||||
$result=$m->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211);
|
||||
global $m;
|
||||
if (empty($m) || ! is_object($m))
|
||||
{
|
||||
$m=new Memcache();
|
||||
$tmparray=explode(':',$conf->global->MEMCACHED_SERVER);
|
||||
$result=$m->addServer($tmparray[0], $tmparray[1]?$tmparray[1]:11211);
|
||||
if (! $result) return -1;
|
||||
}
|
||||
|
||||
$memoryid=session_name().'_'.$memoryid;
|
||||
//$m->setOption(Memcached::OPT_COMPRESSION, false);
|
||||
$data=$m->get($memoryid);
|
||||
//print "memoryid=".$memoryid." - rescode=".$rescode." - data=".count($data)."\n<br>";
|
||||
|
||||
@ -734,7 +734,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
if (! empty($conf->ficheinter->enabled))
|
||||
{
|
||||
$langs->load("interventions");
|
||||
$newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter', 200);
|
||||
$newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter', 200);
|
||||
$newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->rights->ficheinter->creer, '', '', '', 201);
|
||||
$newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->rights->ficheinter->lire, '', '', '', 202);
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator
|
||||
* @param string $modele Force le modele a utiliser ('' to not force)
|
||||
* @param Translate $outputlangs Object lang a utiliser pour traduction
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* TODO
|
||||
* TODO Use commonDocGenerator
|
||||
*/
|
||||
function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
|
||||
{
|
||||
@ -103,7 +103,6 @@ function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
|
||||
require_once $dir.$file;
|
||||
|
||||
$obj = new $classname($db);
|
||||
$obj->message = $message;
|
||||
|
||||
// We save charset_output to restore it because write_file can change it if needed for
|
||||
// output format that does not support UTF8.
|
||||
|
||||
@ -155,8 +155,8 @@ abstract class ModeleNumRefFactures
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hideref Hide ref
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @deprecated Use the new function generateDocument of Facture class
|
||||
* @see Facture::generateDocument()
|
||||
* @deprecated Use the new function generateDocument of Facture class
|
||||
* @see Facture::generateDocument()
|
||||
*/
|
||||
function facture_pdf_create(DoliDB $db, Facture $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||
{
|
||||
|
||||
@ -196,6 +196,11 @@ class modAccounting extends DolibarrModules
|
||||
"chaine",
|
||||
"ER"
|
||||
);
|
||||
$this->const[23] = array(
|
||||
"ACCOUNTING_EXPORT_FORMAT",
|
||||
"chaine",
|
||||
"csv"
|
||||
);
|
||||
|
||||
// Tabs
|
||||
$this->tabs = array();
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Adherent
|
||||
* Class to describe and enable module Adherent
|
||||
*/
|
||||
class modAdherent extends DolibarrModules
|
||||
{
|
||||
@ -64,33 +64,136 @@ class modAdherent extends DolibarrModules
|
||||
//-------------
|
||||
$this->config_page_url = array("adherent.php@adherents");
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
//------------
|
||||
$this->depends = array();
|
||||
$this->requiredby = array('modMailmanSpip');
|
||||
$this->langfiles = array("members","companies");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
//-----------
|
||||
$this->const = array();
|
||||
$this->const[2] = array("MAIN_SEARCHFORM_ADHERENT","yesno","1","Show form for quick member search");
|
||||
$this->const[3] = array("ADHERENT_MAIL_RESIL","texte","Votre adhésion vient d'être résiliée.\r\nNous espérons vous revoir très bientôt","Mail de résiliation");
|
||||
$this->const[4] = array("ADHERENT_MAIL_VALID","texte","Votre adhésion vient d'être validée. \r\nVoici le rappel de vos coordonnées (toute information erronée entrainera la non validation de votre inscription) :\r\n\r\n%INFOS%\r\n\r\n","Mail de validation");
|
||||
$this->const[5] = array("ADHERENT_MAIL_VALID_SUBJECT","chaine","Votre adhésion a été validée","Sujet du mail de validation");
|
||||
$this->const[6] = array("ADHERENT_MAIL_RESIL_SUBJECT","chaine","Résiliation de votre adhésion","Sujet du mail de résiliation");
|
||||
$this->const[21] = array("ADHERENT_MAIL_FROM","chaine","","From des mails");
|
||||
$this->const[22] = array("ADHERENT_MAIL_COTIS","texte","Bonjour %FIRSTNAME%,\r\nCet email confirme que votre cotisation a été reçue\r\net enregistrée","Mail de validation de cotisation");
|
||||
$this->const[23] = array("ADHERENT_MAIL_COTIS_SUBJECT","chaine","Reçu de votre cotisation","Sujet du mail de validation de cotisation");
|
||||
$this->const[25] = array("ADHERENT_CARD_HEADER_TEXT","chaine","%YEAR%","Texte imprimé sur le haut de la carte adhérent");
|
||||
$this->const[26] = array("ADHERENT_CARD_FOOTER_TEXT","chaine","%COMPANY%","Texte imprimé sur le bas de la carte adhérent");
|
||||
$this->const[27] = array("ADHERENT_CARD_TEXT","texte","%FULLNAME%\r\nID: %ID%\r\n%EMAIL%\r\n%ADDRESS%\r\n%ZIP% %TOWN%\r\n%COUNTRY%","Text to print on member cards");
|
||||
$this->const[28] = array("ADHERENT_MAILMAN_ADMINPW","chaine","","Mot de passe Admin des liste mailman");
|
||||
$this->const[31] = array("ADHERENT_BANK_USE_AUTO","yesno","","Insertion automatique des cotisations dans le compte banquaire");
|
||||
$this->const[32] = array("ADHERENT_BANK_ACCOUNT","chaine","","ID du Compte banquaire utilise");
|
||||
$this->const[33] = array("ADHERENT_BANK_CATEGORIE","chaine","","ID de la catégorie banquaire des cotisations");
|
||||
$this->const[34] = array("ADHERENT_ETIQUETTE_TYPE","chaine","L7163","Type of address sheets");
|
||||
$this->const[35] = array("ADHERENT_ETIQUETTE_TEXT",'texte',"%FULLNAME%\n%ADDRESS%\n%ZIP% %TOWN%\n%COUNTRY%","Text to print on member address sheets");
|
||||
|
||||
$r=0;
|
||||
|
||||
$this->const[$r][0] = "MAIN_SEARCHFORM_ADHERENT";
|
||||
$this->const[$r][1] = "yesno";
|
||||
$this->const[$r][2] = "1";
|
||||
$this->const[$r][3] = "Show form for quick member search";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_MAIL_RESIL";
|
||||
$this->const[$r][1] = "texte";
|
||||
$this->const[$r][2] = "Votre adhésion vient d'être résiliée.\r\nNous espérons vous revoir très bientôt";
|
||||
$this->const[$r][3] = "Mail de résiliation";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_MAIL_VALID";
|
||||
$this->const[$r][1] = "texte";
|
||||
$this->const[$r][2] = "Votre adhésion vient d'être validée. \r\nVoici le rappel de vos coordonnées (toute information erronée entrainera la non validation de votre inscription) :\r\n\r\n%INFOS%\r\n\r\n";
|
||||
$this->const[$r][3] = "Mail de validation";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_MAIL_VALID_SUBJECT";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "Votre adhésion a été validée";
|
||||
$this->const[$r][3] = "Sujet du mail de validation";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_MAIL_RESIL_SUBJECT";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "Résiliation de votre adhésion";
|
||||
$this->const[$r][3] = "Sujet du mail de résiliation";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_MAIL_FROM";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "";
|
||||
$this->const[$r][3] = "From des mails";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_MAIL_COTIS";
|
||||
$this->const[$r][1] = "texte";
|
||||
$this->const[$r][2] = "Bonjour %FIRSTNAME%,\r\nCet email confirme que votre cotisation a été reçue\r\net enregistrée";
|
||||
$this->const[$r][3] = "Mail de validation de cotisation";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_MAIL_COTIS_SUBJECT";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "Reçu de votre cotisation";
|
||||
$this->const[$r][3] = "Sujet du mail de validation de cotisation";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_CARD_HEADER_TEXT";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "%YEAR%";
|
||||
$this->const[$r][3] = "Texte imprimé sur le haut de la carte adhérent";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_CARD_FOOTER_TEXT";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "%COMPANY%";
|
||||
$this->const[$r][3] = "Texte imprimé sur le bas de la carte adhérent";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_CARD_TEXT";
|
||||
$this->const[$r][1] = "texte";
|
||||
$this->const[$r][2] = "%FULLNAME%\r\nID: %ID%\r\n%EMAIL%\r\n%ADDRESS%\r\n%ZIP% %TOWN%\r\n%COUNTRY%";
|
||||
$this->const[$r][3] = "Text to print on member cards";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_MAILMAN_ADMINPW";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "";
|
||||
$this->const[$r][3] = "Mot de passe Admin des liste mailman";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_BANK_USE_AUTO";
|
||||
$this->const[$r][1] = "yesno";
|
||||
$this->const[$r][2] = "";
|
||||
$this->const[$r][3] = "Insertion automatique des cotisations dans le compte banquaire";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_BANK_ACCOUNT";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "";
|
||||
$this->const[$r][3] = "ID du Compte banquaire utilise";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_BANK_CATEGORIE";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "";
|
||||
$this->const[$r][3] = "ID de la catégorie banquaire des cotisations";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_ETIQUETTE_TYPE";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "L7163";
|
||||
$this->const[$r][3] = "Type of address sheets";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "ADHERENT_ETIQUETTE_TEXT";
|
||||
$this->const[$r][1] = "texte";
|
||||
$this->const[$r][2] = "%FULLNAME%\n%ADDRESS%\n%ZIP% %TOWN%\n%COUNTRY%";
|
||||
$this->const[$r][3] = "Text to print on member address sheets";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
// Boxes
|
||||
//-------
|
||||
$this->boxes = array(0=>array('file'=>'box_members.php','enabledbydefaulton'=>'Home'));
|
||||
|
||||
@ -72,7 +72,7 @@ class modAgenda extends DolibarrModules
|
||||
$this->requiredby = array();
|
||||
$this->langfiles = array("companies");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
//-----------
|
||||
$this->const = array();
|
||||
$this->const[15] = array("MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL","chaine","1");
|
||||
|
||||
@ -31,7 +31,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module AskPriceSupllier
|
||||
* Class to describe and enable module AskPriceSupllier
|
||||
*/
|
||||
class modAskPriceSupplier extends DolibarrModules
|
||||
{
|
||||
|
||||
@ -31,7 +31,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Banque
|
||||
* Class to describe and enable module Banque
|
||||
*/
|
||||
class modBanque extends DolibarrModules
|
||||
{
|
||||
@ -76,7 +76,7 @@ class modBanque extends DolibarrModules
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
// Boxes
|
||||
$this->boxes = array(0=>array('file'=>'box_comptes.php','enabledbydefaulton'=>'Home'));
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -56,7 +56,7 @@ class modBarcode extends DolibarrModules
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array("/barcode/temp");
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->depends = array(); // May be used for product or service or third party module
|
||||
$this->requiredby = array();
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Bookmark
|
||||
* Class to describe and enable module Bookmark
|
||||
*/
|
||||
class modBookmark extends DolibarrModules
|
||||
{
|
||||
@ -66,10 +66,10 @@ class modBookmark extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array('bookmark.php@bookmarks');
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
// Boxes
|
||||
$this->boxes = array(0=>array('file'=>'box_bookmarks.php','enabledbydefaulton'=>'Home'));
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -70,7 +70,7 @@ class modCashDesk extends DolibarrModules
|
||||
$this->need_dolibarr_version = array(2,4); // Minimum version of Dolibarr required by module
|
||||
$this->langfiles = array("cashdesk");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boxes
|
||||
|
||||
@ -28,7 +28,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Categorie
|
||||
* Class to describe and enable module Categorie
|
||||
*/
|
||||
class modCategorie extends DolibarrModules
|
||||
{
|
||||
@ -66,7 +66,7 @@ class modCategorie extends DolibarrModules
|
||||
$this->config_page_url = array('categorie.php@categories');
|
||||
$this->langfiles = array("products","companies","categories");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r=0;
|
||||
$this->const[$r][0] = "CATEGORIE_RECURSIV_ADD";
|
||||
|
||||
@ -28,7 +28,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module de Click to Dial
|
||||
* Class to describe and enable module Click to Dial
|
||||
*/
|
||||
class modClickToDial extends DolibarrModules
|
||||
{
|
||||
|
||||
@ -73,7 +73,7 @@ class modCommande extends DolibarrModules
|
||||
$this->conflictwith = array();
|
||||
$this->langfiles = array('orders', 'bills', 'companies','products', 'deliveries');
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r=0;
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Comptabilite
|
||||
* Class to describe and enable module Comptabilite
|
||||
*/
|
||||
class modComptabilite extends DolibarrModules
|
||||
{
|
||||
@ -62,13 +62,13 @@ class modComptabilite extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("compta.php");
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->depends = array("modFacture","modBanque");
|
||||
$this->requiredby = array();
|
||||
$this->conflictwith = array("modAccounting");
|
||||
$this->langfiles = array("compta");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
@ -78,7 +78,7 @@ class modComptabilite extends DolibarrModules
|
||||
"/comptabilite/bordereau"
|
||||
);
|
||||
|
||||
// Boites
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -29,7 +29,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Contrat
|
||||
* Class to describe and enable module Contrat
|
||||
*/
|
||||
class modContrat extends DolibarrModules
|
||||
{
|
||||
@ -61,14 +61,14 @@ class modContrat extends DolibarrModules
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array("/contract/temp");
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->depends = array("modSociete");
|
||||
$this->requiredby = array();
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("contract.php");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$this->const[0][0] = "CONTRACT_ADDON";
|
||||
$this->const[0][1] = "chaine";
|
||||
|
||||
@ -73,7 +73,7 @@ class modCron extends DolibarrModules
|
||||
$this->conflictwith = array(); // List of modules id this module is in conflict with
|
||||
$this->langfiles = array("cron");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
//-----------
|
||||
$this->const = array(
|
||||
0=>array(
|
||||
|
||||
@ -27,7 +27,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Deplacement
|
||||
* Class to describe and enable module Deplacement
|
||||
*/
|
||||
class modDeplacement extends DolibarrModules
|
||||
{
|
||||
|
||||
@ -29,7 +29,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Document
|
||||
* Class to describe and enable module Document
|
||||
*/
|
||||
class modDocumentGeneration extends DolibarrModules
|
||||
{
|
||||
@ -67,11 +67,11 @@ class modDocumentGeneration extends DolibarrModules
|
||||
$this->conflictwith = array();
|
||||
$this->langfiles = array("orders","bills","companies","mails");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -66,7 +66,7 @@ class modDynamicPrices extends DolibarrModules
|
||||
$this->requiredby = array();
|
||||
$this->langfiles = array("other");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
//-----------
|
||||
$this->const = array();
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Expedition
|
||||
* Class to describe and enable module Expedition
|
||||
*/
|
||||
class modExpedition extends DolibarrModules
|
||||
{
|
||||
@ -73,13 +73,13 @@ class modExpedition extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("confexped.php");
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->depends = array("modCommande");
|
||||
$this->requiredby = array();
|
||||
$this->conflictwith = array();
|
||||
$this->langfiles = array('deliveries','sendings');
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r=0;
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module export
|
||||
* Class to describe and enable module export
|
||||
*/
|
||||
class modExport extends DolibarrModules
|
||||
{
|
||||
@ -58,13 +58,13 @@ class modExport extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array();
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->phpmin = array(4,2,0);
|
||||
$this->phpmax = array();
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boxes
|
||||
|
||||
@ -28,7 +28,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module externalrss
|
||||
* Class to describe and enable module externalrss
|
||||
*/
|
||||
class modExternalRss extends DolibarrModules
|
||||
{
|
||||
@ -60,13 +60,13 @@ class modExternalRss extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("external_rss.php");
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->phpmin = array(4,2,0);
|
||||
$this->phpmax = array();
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boxes
|
||||
|
||||
@ -71,7 +71,7 @@ class modFacture extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("facture.php");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r=0;
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Fckeditor
|
||||
* Class to describe and enable module Fckeditor
|
||||
*/
|
||||
|
||||
class modFckeditor extends DolibarrModules
|
||||
@ -61,12 +61,12 @@ class modFckeditor extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("fckeditor.php");
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->disabled = (in_array(constant('JS_CKEDITOR'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages)
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$this->const[0] = array("FCKEDITOR_ENABLE_SOCIETE","yesno","1","WYSIWIG for description and note (except products/services)");
|
||||
$this->const[1] = array("FCKEDITOR_ENABLE_PRODUCTDESC","yesno","1","WYSIWIG for products/services description and note");
|
||||
@ -75,7 +75,7 @@ class modFckeditor extends DolibarrModules
|
||||
$this->const[4] = array("FCKEDITOR_ENABLE_USERSIGN","yesno","1","WYSIWIG for user signature");
|
||||
$this->const[5] = array("FCKEDITOR_ENABLE_MAIL","yesno","1","WYSIWIG for products details lines for all entities");
|
||||
|
||||
// Boites
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -32,7 +32,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Ficheinter
|
||||
* Class to describe and enable module Ficheinter
|
||||
*/
|
||||
class modFicheinter extends DolibarrModules
|
||||
{
|
||||
@ -73,7 +73,7 @@ class modFicheinter extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("fichinter.php");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r=0;
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* 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
|
||||
@ -20,17 +20,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup fournisseur Module suppliers
|
||||
* \brief Module pour gerer des societes et contacts de type fournisseurs
|
||||
* \defgroup fournisseur suppliers Module
|
||||
* \brief Module to manage companies and contacts of supplier type
|
||||
* \file htdocs/core/modules/modFournisseur.class.php
|
||||
* \ingroup fournisseur
|
||||
* \brief Fichier de description et activation du module Fournisseur
|
||||
* \brief Description and activation file for module Fournisseur
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Fournisseur
|
||||
* Description and activation class for module Fournisseur
|
||||
*/
|
||||
class modFournisseur extends DolibarrModules
|
||||
{
|
||||
@ -67,7 +67,7 @@ class modFournisseur extends DolibarrModules
|
||||
"/fournisseur/facture/temp"
|
||||
);
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->depends = array("modSociete");
|
||||
$this->requiredby = array();
|
||||
$this->langfiles = array('bills', 'companies', 'suppliers', 'orders');
|
||||
@ -75,7 +75,7 @@ class modFournisseur extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("supplier_order.php");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r=0;
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Import
|
||||
* Class to describe and enable module Import
|
||||
*/
|
||||
class modGeoIPMaxmind extends DolibarrModules
|
||||
{
|
||||
@ -66,7 +66,7 @@ class modGeoIPMaxmind extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("geoipmaxmind.php");
|
||||
|
||||
// D<EFBFBD>pendances
|
||||
// Dependencies
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->phpmin = array(4,2,0);
|
||||
@ -74,7 +74,7 @@ class modGeoIPMaxmind extends DolibarrModules
|
||||
$this->need_dolibarr_version = array(2,7,-1); // Minimum version of Dolibarr required by module
|
||||
$this->need_javascript_ajax = 1;
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boxes
|
||||
|
||||
@ -28,7 +28,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Import
|
||||
* Class to describe and enable module Import
|
||||
*/
|
||||
class modImport extends DolibarrModules
|
||||
{
|
||||
@ -59,7 +59,7 @@ class modImport extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array();
|
||||
|
||||
// D<EFBFBD>pendances
|
||||
// Dependencies
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->phpmin = array(4,3,0); // Need auto_detect_line_endings php option to solve MAC pbs.
|
||||
@ -67,7 +67,7 @@ class modImport extends DolibarrModules
|
||||
$this->need_dolibarr_version = array(2,7,-1); // Minimum version of Dolibarr required by module
|
||||
$this->need_javascript_ajax = 1;
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boxes
|
||||
|
||||
@ -28,7 +28,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Label
|
||||
* Class to describe and enable module Label
|
||||
*/
|
||||
class modLabel extends DolibarrModules
|
||||
{
|
||||
|
||||
@ -28,7 +28,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Ldap
|
||||
* Class to describe and enable module Ldap
|
||||
*/
|
||||
class modLdap extends DolibarrModules
|
||||
{
|
||||
@ -83,7 +83,7 @@ class modLdap extends DolibarrModules
|
||||
13=>array('LDAP_FIELD_MOBILE','chaine','mobile','',0),
|
||||
);
|
||||
|
||||
// Boites
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -63,7 +63,7 @@ class modLoan extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array('loan.php');
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->conflictwith = array();
|
||||
|
||||
@ -29,7 +29,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Mailing
|
||||
* Class to describe and enable module Mailing
|
||||
*/
|
||||
class modMailing extends DolibarrModules
|
||||
{
|
||||
@ -56,7 +56,7 @@ class modMailing extends DolibarrModules
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array("/mailing/temp");
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->langfiles = array("mails");
|
||||
@ -64,10 +64,10 @@ class modMailing extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("mailing.php");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -28,7 +28,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module de Click to Dial
|
||||
* Class to describe and enable module Click to Dial
|
||||
*/
|
||||
class modMailmanSpip extends DolibarrModules
|
||||
{
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Mailing
|
||||
* Class to describe and enable module Mailing
|
||||
*/
|
||||
class modNotification extends DolibarrModules
|
||||
{
|
||||
@ -53,7 +53,7 @@ class modNotification extends DolibarrModules
|
||||
// Data directories to create when module is enabled.
|
||||
$this->dirs = array();
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->langfiles = array("mails");
|
||||
@ -61,10 +61,10 @@ class modNotification extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("notification.php");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -30,7 +30,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Prelevement
|
||||
* Class to describe and enable module Prelevement
|
||||
*/
|
||||
class modPrelevement extends DolibarrModules
|
||||
{
|
||||
@ -70,10 +70,10 @@ class modPrelevement extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("prelevement.php");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -66,7 +66,7 @@ class modPrinting extends DolibarrModules
|
||||
// Config pages
|
||||
$this->config_page_url = array("printing.php@printing");
|
||||
|
||||
// Dependances
|
||||
// Dependencies
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->phpmin = array(5,1); // Minimum version of PHP required by module
|
||||
@ -74,7 +74,7 @@ class modPrinting extends DolibarrModules
|
||||
$this->conflictwith = array();
|
||||
$this->langfiles = array("printing");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boxes
|
||||
|
||||
@ -32,7 +32,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Projet
|
||||
* Class to describe and enable module Projet
|
||||
*/
|
||||
class modProjet extends DolibarrModules
|
||||
{
|
||||
|
||||
@ -31,7 +31,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe de description et activation du module Propale
|
||||
* Class to describe and enable module Propale
|
||||
*/
|
||||
class modPropale extends DolibarrModules
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user