Merge remote-tracking branch 'refs/remotes/Dolibarr/7.0' into 7.0_fix_insert_expedition_line
This commit is contained in:
commit
7262f89016
@ -4,11 +4,13 @@ English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 7.0.0 compared to 6.0.5 *****
|
||||
For users:
|
||||
NEW: Add a preview icon after files that can be previewed (pdf + images)
|
||||
NEW: When payment is registered, PDF of invoices are also regenerated so payments
|
||||
appears with no need to click on regenerate.
|
||||
NEW: #5711 Add shipment line deleting and editing for draft shipments.
|
||||
NEW: Accept substitution key __(ABC)__ replaced with value of translation of key ABC
|
||||
NEW: Accept substitution key __[ABC]__ replaced with value of const ABC
|
||||
NEW: Accountancy Add variant on sell account for intracommunity sales & export sales
|
||||
NEW: Accountancy Add fields for sale accounting account for intracommunity sales & export sales
|
||||
NEW: Add a button "Activate all services" on contracts
|
||||
NEW: Add a confirmation for all mass action 'delete'
|
||||
NEW: Add a group task line for tasks on same level on gantt diagram
|
||||
@ -573,7 +575,9 @@ Following changes may create regression for some external modules, but were nece
|
||||
exists, but if an external module need action on it, it must provides itself its trigger file.
|
||||
* Use $conf->global->MULTICOMPANY_TRANSVERSE_MODE instead $conf->multicompany->transverse_mode. So, if you set var
|
||||
$multicompany_transverse_mode to 1 into your conf file, you must remove this line and a new key into
|
||||
the Home - setup - other admin page.
|
||||
the Home - setup - other admin page.
|
||||
* If you use Multicompany transverse mode, it will be necessary to check the activation of the modules in the children
|
||||
entities and to review completely the rights of the groups and the users.
|
||||
* Use getEntity('xxx') instead getEntity('xxx', 1) and use getEntity('xxx', 0) instead getEntity('xxx')
|
||||
* Some other change were done in the way we read permission of a user when module multicompany is enabled. You can
|
||||
retreive the old behavior by adding constant MULTICOMPANY_BACKWARD_COMPATIBILITY to 1.
|
||||
|
||||
@ -34,17 +34,4 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
// Load conf file if it is already defined
|
||||
--- a/htdocs/support/inc.php
|
||||
+++ b/htdocs/support/inc.php
|
||||
@@ -69,8 +69,8 @@ $conffiletoshowshort = "conf.php";
|
||||
$conffile = "../conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
// For debian/redhat like systems
|
||||
-//$conffile = "/etc/dolibarr/conf.php";
|
||||
-//$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
// Load conf file if it is already defined
|
||||
|
||||
@ -10,12 +10,23 @@ export DH_OPTIONS=-v
|
||||
%:
|
||||
dh $@
|
||||
|
||||
# Replace standard debian package actions with a new one
|
||||
########################################################
|
||||
|
||||
override_dh_auto_clean:
|
||||
# Do nothing. Added to disable launchpad to use bugged dh_auto_clean search for ant
|
||||
|
||||
override_dh_auto_build:
|
||||
# Do nothing. Added to disable launchpad to use bugged dh_auto_build search for ant
|
||||
|
||||
|
||||
#override_dh_compress:
|
||||
# dh_compress --no-act -X.png
|
||||
|
||||
# We disable this for png file because it modify content of original file so make
|
||||
# the dolibarr signature not valid.
|
||||
override_dh_strip_nondeterminism:
|
||||
dh_strip_nondeterminism -X.png
|
||||
|
||||
override_dh_install:
|
||||
dh_install
|
||||
# Delete files
|
||||
|
||||
@ -558,7 +558,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball for official debian, not for the rest
|
||||
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`;
|
||||
@ -767,8 +767,8 @@ if ($nboftargetok) {
|
||||
$cmd="cp -pr '$BUILDROOT/$PROJECT' '$BUILDROOT/$FILENAMETGZ2'";
|
||||
$ret=`$cmd`;
|
||||
|
||||
# Removed files we don't need
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/htdocs/includes/ckeditor/_source`;
|
||||
# Removed files we don't need (already removed before)
|
||||
#$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/htdocs/includes/ckeditor/_source`;
|
||||
|
||||
print "Set permissions on files/dir\n";
|
||||
$ret=`chmod -R 755 $BUILDROOT/$FILENAMETGZ2`;
|
||||
@ -915,8 +915,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mike42/escpos-php/LICENSE.md`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mobiledetect/mobiledetectlib/LICENSE.txt`;
|
||||
|
||||
# Removed files we don't need
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`;
|
||||
# Removed files we don't need (already removed)
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`;
|
||||
|
||||
# Rename upstream changelog to match debian rules
|
||||
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
|
||||
@ -978,7 +978,7 @@ if ($nboftargetok) {
|
||||
$ret=`chmod 755 $BUILDROOT/$PROJECT.tmp/debian/rules`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/actions_mymodule.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/api_myobject.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/api_mymodule.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/myobject.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/core/modules/modMyModule.class.php`;
|
||||
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.php`;
|
||||
|
||||
@ -15,21 +15,7 @@ diff -up htdocs/filefunc.inc.php.patch htdocs/filefunc.inc.php
|
||||
diff -up htdocs/install/inc.php.patch htdocs/install/inc.php
|
||||
--- htdocs/install/inc.php.patch 2011-09-03 02:33:26.450952000 +0200
|
||||
+++ htdocs/install/inc.php 2011-09-03 02:33:36.286952001 +0200
|
||||
@@ -71,8 +71,8 @@
|
||||
$conffile = "../conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
// For debian/redhat like systems
|
||||
-//$conffile = "/etc/dolibarr/conf.php";
|
||||
-//$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
// Load conf file if it is already defined
|
||||
diff -up htdocs/support/inc.php.patch htdocs/support/inc.php
|
||||
--- htdocs/support/inc.php.patch 2011-09-03 02:34:39.606952000 +0200
|
||||
+++ htdocs/support/inc.php 2011-09-03 02:33:59.814952000 +0200
|
||||
@@ -69,8 +69,8 @@
|
||||
@@ -74,8 +74,8 @@
|
||||
$conffile = "../conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
// For debian/redhat like systems
|
||||
|
||||
@ -25,7 +25,7 @@ BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
Group: Applications/Productivity
|
||||
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysql, php-adodb, php-nusoap, dejavu-sans-fonts
|
||||
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-adodb, php-nusoap, dejavu-sans-fonts
|
||||
Requires: mysql-server, mysql
|
||||
#BuildRequires: desktop-file-utils
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
Group: Applications/Productivity
|
||||
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysql, php-adodb, php-nusoap, dejavu-sans-fonts
|
||||
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-adodb, php-nusoap, dejavu-sans-fonts, php-mbstring, php-xml
|
||||
Requires: mysql-server, mysql
|
||||
BuildRequires: desktop-file-utils
|
||||
%else
|
||||
@ -63,9 +63,9 @@ Requires: mysql-community-server, mysql-community-server-client
|
||||
BuildRequires: update-desktop-files fdupes
|
||||
%else
|
||||
Group: Applications/Productivity
|
||||
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap
|
||||
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mbstring, php-xml
|
||||
Requires: mysql-server, mysql
|
||||
Requires: php-mysql >= 4.1.0
|
||||
Requires: php-mysqli >= 4.1.0
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
@ -441,8 +441,8 @@ if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
||||
%else
|
||||
echo Add SE Linux permissions for dolibarr
|
||||
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
||||
semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)"
|
||||
semanage fcontext -a -t httpd_sys_script_rw_t "/var/lib/dolibarr(/.*?)"
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t "/etc/dolibarr(/.*)?"
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t "/var/lib/dolibarr(/.*)?"
|
||||
restorecon -R -v /etc/dolibarr
|
||||
restorecon -R -v /var/lib/dolibarr
|
||||
%endif
|
||||
|
||||
@ -15,8 +15,14 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
|
||||
|
||||
# Directory for web pages
|
||||
<DirectoryMatch /usr/share/dolibarr>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
<IfVersion >= 2.3>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
|
||||
DirectoryIndex index.php
|
||||
Options +FollowSymLinks +Indexes
|
||||
|
||||
@ -60,27 +66,51 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
|
||||
|
||||
# Directory for public pages
|
||||
<DirectoryMatch /usr/share/dolibarr/public>
|
||||
AllowOverride All
|
||||
<IfVersion >= 2.3>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
|
||||
AllowOverride All
|
||||
</DirectoryMatch>
|
||||
|
||||
# Config files
|
||||
<DirectoryMatch /etc/dolibarr>
|
||||
AllowOverride All
|
||||
<IfVersion >= 2.3>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
|
||||
AllowOverride All
|
||||
</DirectoryMatch>
|
||||
|
||||
# Directory for data files
|
||||
<DirectoryMatch /usr/share/dolibarr/documents>
|
||||
AllowOverride All
|
||||
<IfVersion >= 2.3>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
|
||||
AllowOverride All
|
||||
</DirectoryMatch>
|
||||
<DirectoryMatch /var/lib/dolibarr/documents>
|
||||
AllowOverride All
|
||||
Order deny,allow
|
||||
<IfVersion >= 2.3>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
|
||||
AllowOverride All
|
||||
</DirectoryMatch>
|
||||
|
||||
|
||||
@ -171,6 +171,7 @@ then
|
||||
cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
|
||||
mkdir -p "$documentdir/ecm/Administrative documents"
|
||||
mkdir -p "$documentdir/ecm/Images"
|
||||
rm -f "$documentdir/doctemplates/"*/index.html
|
||||
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||
else
|
||||
|
||||
@ -113,7 +113,7 @@ $tabcond[32]= ! empty($conf->accounting->enabled);
|
||||
|
||||
// List of help for fields
|
||||
$tabhelp=array();
|
||||
$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"));
|
||||
$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"), 'category_type'=>$langs->trans("SetToYesIfGroupIsComputationOfOtherGroups"), 'formula'=>$langs->trans("EnterCalculationRuleIfPreviousFieldIsYes"));
|
||||
|
||||
// List of check for fields (NOT USED YET)
|
||||
$tabfieldcheck=array();
|
||||
|
||||
@ -135,7 +135,7 @@ llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
// $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
// $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup');
|
||||
|
||||
print "\n".'<script type="text/javascript" language="javascript">'."\n";
|
||||
|
||||
@ -159,7 +159,7 @@ llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
//$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
//$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup');
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
|
||||
|
||||
@ -615,8 +615,8 @@ if ($action == 'create')
|
||||
print '<input type="text" name="subledger_account" value="'.$line->subledger_account.'">';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
|
||||
print '<td><input type="text" size="15" name="label_operation" value="' . $line->label_operation. '"/></td>';
|
||||
print '<td><input type="text" class="minwidth100" name="label_compte" value="' . $line->label_compte . '"/></td>';
|
||||
print '<td><input type="text" class="minwidth300" name="label_operation" value="' . $line->label_operation. '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . price($line->debit) . '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . price($line->credit) . '"/></td>';
|
||||
print '<td>';
|
||||
@ -636,8 +636,8 @@ if ($action == 'create')
|
||||
print img_edit();
|
||||
print '</a> ';
|
||||
|
||||
$actiontodelete='detele';
|
||||
if ($mode == '_tmp') $actiontodelete='confirm_delete';
|
||||
$actiontodelete='delete';
|
||||
if ($mode == '_tmp' || $action != 'delmouv') $actiontodelete='confirm_delete';
|
||||
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?action='.$actiontodelete.'&id=' . $line->id . '&piece_num=' . $line->piece_num . '&mode='.$mode.'">';
|
||||
print img_delete();
|
||||
@ -673,8 +673,8 @@ if ($action == 'create')
|
||||
print '<input type="text" name="subledger_account" value="">';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
|
||||
print '<td><input type="text" size="15" name="label_operation" value="' . $line->label_operation. '"/></td>';
|
||||
print '<td><input type="text" class="minwidth100" name="label_compte" value="' . $line->label_compte . '"/></td>';
|
||||
print '<td><input type="text" class="minwidth300" name="label_operation" value="' . $line->label_operation. '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . ($debit ? price($debit) : '') . '"/></td>';
|
||||
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . ($credit ? price($credit) : '') . '"/></td>';
|
||||
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Add") . '"></td>';
|
||||
|
||||
@ -695,8 +695,8 @@ if ($num > 0)
|
||||
|
||||
// Action column
|
||||
print '<td align="center">';
|
||||
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . '">' . img_delete() . '</a>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_delete() . '</a>';
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
@ -730,7 +730,7 @@ if ($num > 0)
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
// TODO Replace this with mass action
|
||||
// TODO Replace this with mass delete action
|
||||
print '<div class="tabsAction tabsActionNoBottom">' . "\n";
|
||||
print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DelBookKeeping") . '</a>';
|
||||
print '</div>';
|
||||
|
||||
@ -113,7 +113,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
|
||||
$db->begin();
|
||||
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as l";
|
||||
$sql1 .= " SET l.fk_code_ventilation=" . $account_parent;
|
||||
$sql1 .= " SET l.fk_code_ventilation=" . GETPOST('account_parent','int');
|
||||
$sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')';
|
||||
|
||||
dol_syslog('accountancy/customer/lines.php::changeaccount sql= ' . $sql1);
|
||||
@ -163,7 +163,7 @@ print '<script type="text/javascript">
|
||||
/*
|
||||
* Customer Invoice lines
|
||||
*/
|
||||
$sql = "SELECT f.rowid, f.facnumber, f.type, f.datef, f.ref_client,";
|
||||
$sql = "SELECT f.rowid as facid, f.facnumber, f.type, f.datef, f.ref_client,";
|
||||
$sql .= " fd.rowid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.vat_src_code, fd.total_ttc,";
|
||||
$sql .= " s.rowid as socid, s.nom as name, s.code_compta, s.code_client,";
|
||||
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number, aa.label as label_compte,";
|
||||
@ -204,7 +204,7 @@ if (strlen(trim($search_account))) {
|
||||
$sql .= natural_search("aa.account_number", $search_account);
|
||||
}
|
||||
if (strlen(trim($search_vat))) {
|
||||
$sql .= natural_search("fd.tva_tx", $search_vat);
|
||||
$sql .= natural_search("fd.tva_tx", price2num($search_vat), 1);
|
||||
}
|
||||
if ($search_month > 0)
|
||||
{
|
||||
@ -223,7 +223,7 @@ if (strlen(trim($search_country))) {
|
||||
$sql .= natural_search("co.label", $search_country);
|
||||
}
|
||||
if (strlen(trim($search_tvaintra))) {
|
||||
$sql .= natural_search("s.tva_intra", $search_tva_intra);
|
||||
$sql .= natural_search("s.tva_intra", $search_tvaintra);
|
||||
}
|
||||
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
@ -245,28 +245,19 @@ if ($result) {
|
||||
$i = 0;
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($search_invoice)
|
||||
$param .= "&search_invoice=" . $search_invoice;
|
||||
if ($search_ref)
|
||||
$param .= "&search_ref=" . $search_ref;
|
||||
if ($search_label)
|
||||
$param .= "&search_label=" . $search_label;
|
||||
if ($search_desc)
|
||||
$param .= "&search_desc=" . $search_desc;
|
||||
if ($search_account)
|
||||
$param .= "&search_account=" . $search_account;
|
||||
if ($search_vat)
|
||||
$param .= "&search_vat=" . $search_vat;
|
||||
if ($search_day) $param.='&search_day='.urlencode($search_day);
|
||||
if ($search_month) $param.='&search_month='.urlencode($search_month);
|
||||
if ($search_year) $param.='&search_year='.urlencode($search_year);
|
||||
if ($search_country)
|
||||
$param .= "&search_country=" . $search_country;
|
||||
if ($search_tvaintra)
|
||||
$param .= "&search_tvaintra=" . $search_tvaintra;
|
||||
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
if ($search_invoice) $param .= "&search_invoice=" . urlencode($search_invoice);
|
||||
if ($search_ref) $param .= "&search_ref=" . urlencode($search_ref);
|
||||
if ($search_label) $param .= "&search_label=" . urlencode($search_label);
|
||||
if ($search_desc) $param .= "&search_desc=" . urlencode($search_desc);
|
||||
if ($search_account) $param .= "&search_account=" . urlencode($search_account);
|
||||
if ($search_vat) $param .= "&search_vat=" . urlencode($search_vat);
|
||||
if ($search_day) $param .= '&search_day='.urlencode($search_day);
|
||||
if ($search_month) $param .= '&search_month='.urlencode($search_month);
|
||||
if ($search_year) $param .= '&search_year='.urlencode($search_year);
|
||||
if ($search_country) $param .= "&search_country=" . urlencode($search_country);
|
||||
if ($search_tvaintra) $param .= "&search_tvaintra=" . urlencode($search_tvaintra);
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
||||
print '<input type="hidden" name="action" value="ventil">';
|
||||
@ -333,7 +324,7 @@ if ($result) {
|
||||
$codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label_compte;
|
||||
|
||||
$facture_static->ref = $objp->facnumber;
|
||||
$facture_static->id = $objp->rowid;
|
||||
$facture_static->id = $objp->facid;
|
||||
|
||||
$product_static->ref = $objp->product_ref;
|
||||
$product_static->id = $objp->product_id;
|
||||
@ -370,7 +361,7 @@ if ($result) {
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center">' . $objp->country .'</td>';
|
||||
print '<td>' . $objp->country .'</td>';
|
||||
|
||||
print '<td>' . $objp->tva_intra . '</td>';
|
||||
|
||||
|
||||
@ -223,7 +223,7 @@ $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountan
|
||||
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.fk_pcg_version = '" . $chartaccountcode."'";
|
||||
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.fk_pcg_version = '" . $chartaccountcode."'";
|
||||
$sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
|
||||
$sql.= " AND product_type <= 2";
|
||||
$sql.= " AND l.product_type <= 2";
|
||||
// Add search filter like
|
||||
if ($search_lineid) {
|
||||
$sql .= natural_search("l.rowid", $search_lineid, 1);
|
||||
|
||||
@ -61,10 +61,10 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC
|
||||
$sortfield = GETPOST('sortfield', 'alpha');
|
||||
$sortorder = GETPOST('sortorder', 'alpha');
|
||||
$page = GETPOST('page', 'int');
|
||||
if ($page < 0) $page = 0;
|
||||
$offset = $conf->liste_limit * $page;
|
||||
if (empty($page) || $page < 0) $page = 0;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
$offset = $limit * $page;
|
||||
if (! $sortfield)
|
||||
$sortfield = "erd.date, erd.rowid";
|
||||
if (! $sortorder) {
|
||||
@ -170,19 +170,19 @@ if (strlen(trim($search_expensereport))) {
|
||||
$sql .= " AND er.ref like '%" . $search_expensereport . "%'";
|
||||
}
|
||||
if (strlen(trim($search_label))) {
|
||||
$sql .= " AND f.label like '%" . $search_label . "%'";
|
||||
$sql .= natural_search("f.label", $search_label);
|
||||
}
|
||||
if (strlen(trim($search_desc))) {
|
||||
$sql .= " AND er.comments like '%" . $search_desc . "%'";
|
||||
$sql .= natural_search("er.comments", $search_desc);
|
||||
}
|
||||
if (strlen(trim($search_amount))) {
|
||||
$sql .= " AND erd.total_ht like '%" . $search_amount . "%'";
|
||||
$sql .= natural_search("erd.total_ht", $search_amount, 1);
|
||||
}
|
||||
if (strlen(trim($search_account))) {
|
||||
$sql .= " AND aa.account_number like '%" . $search_account . "%'";
|
||||
$sql .= natural_search("aa.account_number", $search_account);
|
||||
}
|
||||
if (strlen(trim($search_vat))) {
|
||||
$sql .= " AND (erd.tva_tx like '" . $search_vat . "%')";
|
||||
$sql .= natural_search("erd.tva_tx", price2num($search_vat), 1);
|
||||
}
|
||||
if ($search_month > 0)
|
||||
{
|
||||
@ -219,25 +219,18 @@ if ($result) {
|
||||
$i = 0;
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($search_expensereport)
|
||||
$param .= "&search_expensereport=" . $search_expensereport;
|
||||
if ($search_label)
|
||||
$param .= "&search_label=" . $search_label;
|
||||
if ($search_desc)
|
||||
$param .= "&search_desc=" . $search_desc;
|
||||
if ($search_account)
|
||||
$param .= "&search_account=" . $search_account;
|
||||
if ($search_vat)
|
||||
$param .= "&search_vat=" . $search_vat;
|
||||
if ($search_day) $param.='&search_day='.urlencode($search_day);
|
||||
if ($search_month) $param.='&search_month='.urlencode($search_month);
|
||||
if ($search_year) $param.='&search_year='.urlencode($search_year);
|
||||
if ($search_country)
|
||||
$param .= "&search_country=" . $search_country;
|
||||
if ($search_tvaintra)
|
||||
$param .= "&search_tvaintra=" . $search_tvaintra;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
if ($search_expensereport) $param .= "&search_expensereport=" . urlencode($search_expensereport);
|
||||
if ($search_label) $param .= "&search_label=" . urlencode($search_label);
|
||||
if ($search_desc) $param .= "&search_desc=" . urlencode($search_desc);
|
||||
if ($search_account) $param .= "&search_account=" . urlencode($search_account);
|
||||
if ($search_vat) $param .= "&search_vat=" . urlencode($search_vat);
|
||||
if ($search_day) $param .= '&search_day='.urlencode($search_day);
|
||||
if ($search_month) $param .= '&search_month='.urlencode($search_month);
|
||||
if ($search_year) $param .= '&search_year='.urlencode($search_year);
|
||||
if ($search_country) $param .= "&search_country=" . urlencode($search_country);
|
||||
if ($search_tvaintra) $param .= "&search_tvaintra=" . urlencode($search_tvaintra);
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
||||
print '<input type="hidden" name="action" value="ventil">';
|
||||
@ -297,7 +290,6 @@ if ($result) {
|
||||
|
||||
$expensereport_static = new ExpenseReport($db);
|
||||
|
||||
$var = True;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$codeCompta = length_accountg($objp->account_number) . ' - ' . $objp->label;
|
||||
@ -347,7 +339,7 @@ if ($result) {
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
print $db->error();
|
||||
print $db->lasterror();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -634,7 +634,7 @@ if (! $error && $action == 'writebookkeeping') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($totaldebit != $totalcredit)
|
||||
if (price2num($totaldebit) != price2num($totalcredit))
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
|
||||
@ -344,7 +344,8 @@ if ($action == 'writebookkeeping') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($totaldebit != $totalcredit)
|
||||
// Protection against a bug on line before
|
||||
if (price2num($totaldebit) != price2num($totalcredit))
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
|
||||
@ -98,14 +98,12 @@ $sql = "SELECT f.rowid, f.ref, f.type, f.datef as df, f.libelle,f.ref_supplier,
|
||||
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code,";
|
||||
$sql .= " s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
|
||||
$sql .= " p.accountancy_code_buy , aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
|
||||
//$sql .= " ct.accountancy_code_buy as account_tva";
|
||||
$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 . "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"; // TODO Facture annulée ?
|
||||
$sql .= " WHERE f.fk_statut > 0";
|
||||
$sql .= " AND fd.fk_code_ventilation > 0";
|
||||
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
@ -214,6 +212,29 @@ if ($result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
$errorforinvoice = array();
|
||||
|
||||
// Loop in invoices to detect lines with not binding lines
|
||||
foreach ($tabfac as $key => $val) { // Loop on each invoice
|
||||
$sql = "SELECT COUNT(fd.rowid) as nb";
|
||||
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
|
||||
$sql.= " WHERE fd.product_type <= 2 AND fd.fk_code_ventilation <= 0";
|
||||
$sql.= " AND fd.total_ttc <> 0 AND fk_facture_fourn = ".$key;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj->nb > 0)
|
||||
{
|
||||
$errorforinvoice[$key]='somelinesarenotbound';
|
||||
}
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
//var_dump($errorforinvoice);exit;
|
||||
|
||||
|
||||
|
||||
// Bookkeeping Write
|
||||
if ($action == 'writebookkeeping') {
|
||||
$now = dol_now();
|
||||
@ -257,17 +278,26 @@ if ($action == 'writebookkeeping') {
|
||||
if ($alreadydispatched) $replacedinvoice = 2;
|
||||
}
|
||||
|
||||
// If not already into bookkeeping, we won't add it, if yes, add the counterpart ???.
|
||||
// If not already into bookkeeping, we won't add it. If yes, do nothing (should not happen because creating replacement not possible if invoice is accounted)
|
||||
if ($replacedinvoice == 1)
|
||||
{
|
||||
$db->rollback();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Error if some lines are not binded/ready to be journalized
|
||||
if ($errorforinvoice[$key] == 'somelinesarenotbound')
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
setEventMessages($langs->trans('ErrorInvoiceContainsLinesNotYetBounded', $val['ref']), null, 'errors');
|
||||
}
|
||||
|
||||
// Thirdparty
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
if ($mt) {
|
||||
//if ($mt) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
$bookkeeping->date_lim_reglement = $val["datereg"];
|
||||
@ -298,16 +328,18 @@ if ($action == 'writebookkeeping') {
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='alreadyjournalized';
|
||||
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='other';
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,7 +347,7 @@ if ($action == 'writebookkeeping') {
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
if ($mt) {
|
||||
//if ($mt) {
|
||||
// get compte id and label
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
if ($accountingaccount->fetch(null, $k, true)) {
|
||||
@ -349,17 +381,19 @@ if ($action == 'writebookkeeping') {
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='alreadyjournalized';
|
||||
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='other';
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@ -406,12 +440,14 @@ if ($action == 'writebookkeeping') {
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='alreadyjournalized';
|
||||
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='other';
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
}
|
||||
@ -422,7 +458,7 @@ if ($action == 'writebookkeeping') {
|
||||
|
||||
// Counterpart of VAT for VAT NPR
|
||||
// var_dump($tabother);
|
||||
if (! $errorforline)
|
||||
if (! $errorforline && is_array($tabother[$key]))
|
||||
{
|
||||
foreach ( $tabother[$key] as $k => $mt ) {
|
||||
if ($mt) {
|
||||
@ -456,12 +492,14 @@ if ($action == 'writebookkeeping') {
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='alreadyjournalized';
|
||||
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='other';
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
}
|
||||
@ -469,10 +507,12 @@ if ($action == 'writebookkeeping') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($totaldebit != $totalcredit)
|
||||
// Protection against a bug on lines before
|
||||
if (! $errorforline && (price2num($totaldebit) != price2num($totalcredit)))
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='amountsnotbalanced';
|
||||
setEventMessages('Try to insert a non balanced transaction in book for '.$invoicestatic->ref.'. Canceled. Surely a bug.', null, 'errors');
|
||||
}
|
||||
|
||||
@ -567,7 +607,7 @@ if ($action == 'exportcsv') {
|
||||
if ($alreadydispatched) $replacedinvoice = 2;
|
||||
}
|
||||
|
||||
// If not already into bookkeeping, we won't add it, if yes, add the counterpart ???.
|
||||
// If not already into bookkeeping, we won't add it. If yes, do nothing (should not happen because creating replacement not possible if invoice is accounted)
|
||||
if ($replacedinvoice == 1)
|
||||
{
|
||||
continue;
|
||||
@ -575,26 +615,28 @@ if ($action == 'exportcsv') {
|
||||
|
||||
// Third party
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["refsologest"] . '"' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $langs->trans("Code_tiers") . '"' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
|
||||
print '"' . $journal . '"' ;
|
||||
print "\n";
|
||||
//if ($mt) {
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["refsologest"] . '"' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $langs->trans("Code_tiers") . '"' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
|
||||
print '"' . $journal . '"' ;
|
||||
print "\n";
|
||||
//}
|
||||
}
|
||||
|
||||
// Product / Service
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
if ($mt) {
|
||||
//if ($mt) {
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["refsologest"] . '"' . $sep;
|
||||
@ -608,7 +650,7 @@ if ($action == 'exportcsv') {
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
|
||||
print '"' . $journal . '"' ;
|
||||
print "\n";
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
// VAT
|
||||
@ -787,45 +829,67 @@ if (empty($action) || $action == 'view') {
|
||||
print '<td align="right"></td>';
|
||||
print '<td align="right"></td>';
|
||||
print "</tr>";
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Third party
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
if ($errorforinvoice[$key] == 'somelinesarenotbound')
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Thirdparty --></td>";
|
||||
print "<td><!-- Some lines are not bound --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
|
||||
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
|
||||
}
|
||||
else print $accountoshow;
|
||||
print '<span class="error">'.$langs->trans('ErrorInvoiceContainsLinesNotYetBoundedShort', $val['ref']).'</span>';
|
||||
print '</td>';
|
||||
// Subledger account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($k);
|
||||
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
||||
}
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "<td>";
|
||||
print "</td>";
|
||||
print '<td align="right"></td>';
|
||||
print '<td align="right"></td>';
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
// Third party
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Thirdparty --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
|
||||
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
|
||||
}
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
// Subledger account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($k);
|
||||
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
||||
}
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
//}
|
||||
}
|
||||
|
||||
// Product / Service
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
|
||||
if ($mt) {
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Product --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
@ -848,7 +912,7 @@ if (empty($action) || $action == 'view') {
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
// VAT
|
||||
@ -890,27 +954,28 @@ if (empty($action) || $action == 'view') {
|
||||
if (is_array($tabother[$key]))
|
||||
{
|
||||
foreach ( $tabother[$key] as $k => $mt ) {
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- VAT counterpart NPR --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accountg($k);
|
||||
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("NPR counterpart").'). Set ACCOUNTING_COUNTERPART_VAT_NPR to the subvention account'.'</span>';
|
||||
if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- VAT counterpart NPR --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accountg($k);
|
||||
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("NPR counterpart").'). Set ACCOUNTING_COUNTERPART_VAT_NPR to the subvention account'.'</span>';
|
||||
}
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
// Subledger account
|
||||
print "<td>";
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT") . " NPR (counterpart)</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
// Subledger account
|
||||
print "<td>";
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT") . " NPR (counterpart)</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,17 +93,15 @@ $sql = "SELECT f.rowid, f.facnumber, f.type, f.datef as df, f.ref_client, f.date
|
||||
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.situation_percent, fd.vat_src_code,";
|
||||
$sql .= " s.rowid as socid, s.nom as name, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
|
||||
$sql .= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
|
||||
//$sql .= " 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 . "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.vat_src_code <> '' AND fd.vat_src_code = ct.code) OR (fd.vat_src_code = '' AND fd.tva_tx = ct.taux)) AND ct.fk_pays = '" . $idpays . "'";
|
||||
$sql .= " WHERE fd.fk_code_ventilation > 0";
|
||||
$sql .= " AND f.entity IN (".getEntity('facture', 0).')'; // We don't share object for accountancy
|
||||
$sql .= " AND f.fk_statut > 0"; // TODO Facture annulée ?
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
||||
$sql .= " AND f.entity IN (".getEntity('facture', 0).')'; // We don't share object for accountancy, we use source object sharing
|
||||
$sql .= " AND f.fk_statut > 0";
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { // Non common setup
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
|
||||
} else {
|
||||
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
|
||||
@ -218,6 +216,28 @@ if ($result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
$errorforinvoice = array();
|
||||
|
||||
// Loop in invoices to detect lines with not binding lines
|
||||
foreach ($tabfac as $key => $val) { // Loop on each invoice
|
||||
$sql = "SELECT COUNT(fd.rowid) as nb";
|
||||
$sql.= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql.= " WHERE fd.product_type <= 2 AND fd.fk_code_ventilation <= 0";
|
||||
$sql.= " AND fd.total_ttc <> 0 AND fk_facture = ".$key;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj->nb > 0)
|
||||
{
|
||||
$errorforinvoice[$key]='somelinesarenotbound';
|
||||
}
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
//var_dump($errorforinvoice);exit;
|
||||
|
||||
|
||||
// Bookkeeping Write
|
||||
if ($action == 'writebookkeeping') {
|
||||
$now = dol_now();
|
||||
@ -259,17 +279,26 @@ if ($action == 'writebookkeeping') {
|
||||
if ($alreadydispatched) $replacedinvoice = 2;
|
||||
}
|
||||
|
||||
// If not already into bookkeeping, we won't add it, if yes, add the counterpart ???.
|
||||
// If not already into bookkeeping, we won't add it. If yes, do nothing (should not happen because creating replacement not possible if invoice is accounted)
|
||||
if ($replacedinvoice == 1)
|
||||
{
|
||||
$db->rollback();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Error if some lines are not binded/ready to be journalized
|
||||
if ($errorforinvoice[$key] == 'somelinesarenotbound')
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
setEventMessages($langs->trans('ErrorInvoiceContainsLinesNotYetBounded', $val['ref']), null, 'errors');
|
||||
}
|
||||
|
||||
// Thirdparty
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
if ($mt) {
|
||||
//if ($mt) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
$bookkeeping->date_lim_reglement = $val["datereg"];
|
||||
@ -300,16 +329,18 @@ if ($action == 'writebookkeeping') {
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='alreadyjournalized';
|
||||
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='other';
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@ -317,7 +348,7 @@ if ($action == 'writebookkeeping') {
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
if ($mt) {
|
||||
//if ($mt) {
|
||||
// get compte id and label
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
if ($accountingaccount->fetch(null, $k, true)) {
|
||||
@ -351,22 +382,23 @@ if ($action == 'writebookkeeping') {
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='alreadyjournalized';
|
||||
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='other';
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
// VAT
|
||||
// var_dump($tabtva);
|
||||
if (! $errorforline)
|
||||
{
|
||||
$listoftax=array(0, 1, 2);
|
||||
@ -408,12 +440,14 @@ if ($action == 'writebookkeeping') {
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='alreadyjournalized';
|
||||
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='other';
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
}
|
||||
@ -422,10 +456,12 @@ if ($action == 'writebookkeeping') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($totaldebit != $totalcredit)
|
||||
// Protection against a bug on lines before
|
||||
if (! $errorforline && (price2num($totaldebit) != price2num($totalcredit)))
|
||||
{
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key]='amountsnotbalanced';
|
||||
setEventMessages('Try to insert a non balanced transaction in book for '.$invoicestatic->ref.'. Canceled. Surely a bug.', null, 'errors');
|
||||
}
|
||||
|
||||
@ -522,7 +558,7 @@ if ($action == 'exportcsv') {
|
||||
if ($alreadydispatched) $replacedinvoice = 2;
|
||||
}
|
||||
|
||||
// If not already into bookkeeping, we won't add it, if yes, add the counterpart ???.
|
||||
// If not already into bookkeeping, we won't add it. If yes, do nothing (should not happen because creating replacement not possible if invoice is accounted)
|
||||
if ($replacedinvoice == 1)
|
||||
{
|
||||
continue;
|
||||
@ -530,26 +566,28 @@ if ($action == 'exportcsv') {
|
||||
|
||||
// Third party
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["ref"] . '"' . $sep;
|
||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $langs->trans("Code_tiers") . '"' . $sep;
|
||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||
print '"' . $journal . '"';
|
||||
print "\n";
|
||||
//if ($mt) {
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["ref"] . '"' . $sep;
|
||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $langs->trans("Code_tiers") . '"' . $sep;
|
||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||
print '"' . $journal . '"';
|
||||
print "\n";
|
||||
//}
|
||||
}
|
||||
|
||||
// Product / Service
|
||||
foreach ($tabht[$key] as $k => $mt) {
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
if ($mt) {
|
||||
//if ($mt) {
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["ref"] . '"' . $sep;
|
||||
@ -563,7 +601,7 @@ if ($action == 'exportcsv') {
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||
print '"' . $journal . '"';
|
||||
print "\n";
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
// VAT
|
||||
@ -719,38 +757,60 @@ if (empty($action) || $action == 'view') {
|
||||
print '<td align="right"></td>';
|
||||
print '<td align="right"></td>';
|
||||
print "</tr>";
|
||||
|
||||
continue;
|
||||
}
|
||||
if ($errorforinvoice[$key] == 'somelinesarenotbound')
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Some lines are not bound --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
print "<td>";
|
||||
print '<span class="error">'.$langs->trans('ErrorInvoiceContainsLinesNotYetBoundedShort', $val['ref']).'</span>';
|
||||
print '</td>';
|
||||
// Subledger account
|
||||
print "<td>";
|
||||
print '</td>';
|
||||
print "<td>";
|
||||
print "</td>";
|
||||
print '<td align="right"></td>';
|
||||
print '<td align="right"></td>';
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
// Third party
|
||||
foreach ($tabttc[$key] as $k => $mt)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Thirdparty --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
|
||||
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
|
||||
}
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
// Subledger account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($k);
|
||||
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
||||
}
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Thirdparty --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
|
||||
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
|
||||
}
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
// Subledger account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($k);
|
||||
if (empty($accountoshow) || $accountoshow == 'NotDefined')
|
||||
{
|
||||
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
|
||||
}
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
//}
|
||||
}
|
||||
|
||||
// Product / Service
|
||||
@ -759,7 +819,7 @@ if (empty($action) || $action == 'view') {
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
|
||||
if ($mt) {
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Product --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
@ -782,7 +842,7 @@ if (empty($action) || $action == 'view') {
|
||||
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
// VAT
|
||||
|
||||
@ -65,8 +65,8 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC
|
||||
$sortfield = GETPOST('sortfield', 'alpha');
|
||||
$sortorder = GETPOST('sortorder', 'alpha');
|
||||
$page = GETPOST('page', 'int');
|
||||
if ($page < 0) $page = 0;
|
||||
$offset = $conf->liste_limit * $page;
|
||||
if (empty($page) || $page < 0) $page = 0;
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortfield)
|
||||
@ -195,10 +195,10 @@ if (strlen(trim($search_amount))) {
|
||||
$sql .= natural_search("l.total_ht", $search_amount, 1);
|
||||
}
|
||||
if (strlen(trim($search_account))) {
|
||||
$sql .= natural_search("aa.account_number", $search_account, 1);
|
||||
$sql .= natural_search("aa.account_number", $search_account);
|
||||
}
|
||||
if (strlen(trim($search_vat))) {
|
||||
$sql .= natural_search("l.tva_tx", $search_vat, 1);
|
||||
$sql .= natural_search("l.tva_tx", price2num($search_vat), 1);
|
||||
}
|
||||
if ($search_month > 0)
|
||||
{
|
||||
@ -214,10 +214,10 @@ else if ($search_year > 0)
|
||||
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
|
||||
}
|
||||
if (strlen(trim($search_country))) {
|
||||
$sql .= " AND (co.label like'" . $search_country . "%')";
|
||||
$sql .= natural_search("co.label", $search_country);
|
||||
}
|
||||
if (strlen(trim($search_tvaintra))) {
|
||||
$sql .= " AND (s.tva_intra like'" . $search_tvaintra . "%')";
|
||||
$sql .= natural_search("s.tva_intra", $search_tvaintra);
|
||||
}
|
||||
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
|
||||
|
||||
@ -241,27 +241,19 @@ if ($result) {
|
||||
$i = 0;
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($search_invoice)
|
||||
$param .= "&search_invoice=" . $search_invoice;
|
||||
if ($search_ref)
|
||||
$param .= "&search_ref=" . $search_ref;
|
||||
if ($search_label)
|
||||
$param .= "&search_label=" . $search_label;
|
||||
if ($search_desc)
|
||||
$param .= "&search_desc=" . $search_desc;
|
||||
if ($search_account)
|
||||
$param .= "&search_account=" . $search_account;
|
||||
if ($search_vat)
|
||||
$param .= "&search_vat=" . $search_vat;
|
||||
if ($search_day) $param.='&search_day='.urlencode($search_day);
|
||||
if ($search_month) $param.='&search_month='.urlencode($search_month);
|
||||
if ($search_year) $param.='&search_year='.urlencode($search_year);
|
||||
if ($search_country)
|
||||
$param .= "&search_country=" . $search_country;
|
||||
if ($search_tvaintra)
|
||||
$param .= "&search_tvaintra=" . $search_tvaintra;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||
if ($search_invoice) $param .= "&search_invoice=" . urlencode($search_invoice);
|
||||
if ($search_ref) $param .= "&search_ref=" . urlencode($search_ref);
|
||||
if ($search_label) $param .= "&search_label=" . urlencode($search_label);
|
||||
if ($search_desc) $param .= "&search_desc=" . urlencode($search_desc);
|
||||
if ($search_account) $param .= "&search_account=" . urlencode($search_account);
|
||||
if ($search_vat) $param .= "&search_vat=" . urlencode($search_vat);
|
||||
if ($search_day) $param .= '&search_day='.urlencode($search_day);
|
||||
if ($search_month) $param .= '&search_month='.urlencode($search_month);
|
||||
if ($search_year) $param .= '&search_year='.urlencode($search_year);
|
||||
if ($search_country) $param .= "&search_country=" . urlencode($search_country);
|
||||
if ($search_tvaintra) $param .= "&search_tvaintra=" . urlencode($search_tvaintra);
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
|
||||
print '<input type="hidden" name="action" value="ventil">';
|
||||
@ -277,7 +269,7 @@ if ($result) {
|
||||
print $langs->trans("DescVentilDoneSupplier") . '<br>';
|
||||
|
||||
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
|
||||
print $formaccounting->select_account(GETPOST('account_parent'), 'account_parent', 1);
|
||||
print $formaccounting->select_account($account_parent, 'account_parent', 1);
|
||||
print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '" /></div>';
|
||||
|
||||
$moreforfilter = '';
|
||||
@ -389,7 +381,7 @@ if ($result) {
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
print $db->error();
|
||||
print $db->lasterror();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -222,7 +222,7 @@ $sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.
|
||||
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '" . $chartaccountcode."'";
|
||||
$sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
|
||||
$sql.= " AND product_type <= 2";
|
||||
$sql.= " AND l.product_type <= 2";
|
||||
// Add search filter like
|
||||
if ($search_lineid) {
|
||||
$sql .= natural_search("l.rowid", $search_lineid, 1);
|
||||
|
||||
@ -141,7 +141,7 @@ $help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Mie
|
||||
llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ $help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Mie
|
||||
llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ $help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Mie
|
||||
llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ $help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Mie
|
||||
llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ $help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Mie
|
||||
llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = member_admin_prepare_head();
|
||||
|
||||
@ -35,6 +35,7 @@ class AdherentType extends CommonObject
|
||||
public $table_element = 'adherent_type';
|
||||
public $element = 'adherent_type';
|
||||
public $picto = 'group';
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@ -307,7 +308,7 @@ class AdherentType extends CommonObject
|
||||
|
||||
$sql = "SELECT rowid, libelle as label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type";
|
||||
$sql.= " WHERE entity IN (".getEntity('adherent').")";
|
||||
$sql.= " WHERE entity IN (".getEntity('member_type').")";
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -97,7 +97,7 @@ class MembersTypes extends DolibarrApi
|
||||
|
||||
$sql = "SELECT t.rowid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
|
||||
$sql.= ' WHERE t.entity IN ('.getEntity('adherent').')';
|
||||
$sql.= ' WHERE t.entity IN ('.getEntity('member_type').')';
|
||||
|
||||
// Add sql filters
|
||||
if ($sqlfilters)
|
||||
|
||||
@ -65,7 +65,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d";
|
||||
$sql.= " ON t.rowid = d.fk_adherent_type";
|
||||
$sql.= " AND d.entity IN (".getEntity('adherent').")";
|
||||
$sql.= " WHERE t.entity IN (".getEntity('adherent').")";
|
||||
$sql.= " WHERE t.entity IN (".getEntity('member_type').")";
|
||||
$sql.= " GROUP BY t.rowid, t.libelle, t.subscription, d.statut";
|
||||
|
||||
dol_syslog("index.php::select nb of members by type", LOG_DEBUG);
|
||||
|
||||
@ -574,7 +574,7 @@ if (! empty($arrayfields['d.datefin']['checked'])) print_liste_field_titr
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
|
||||
// Hook fields
|
||||
$parameters=array('arrayfields'=>$arrayfields);
|
||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($arrayfields['d.datec']['checked'])) print_liste_field_titre($arrayfields['d.datec']['label'],$_SERVER["PHP_SELF"],"d.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
|
||||
|
||||
@ -107,7 +107,7 @@ if ($action == 'add' && $user->rights->adherent->configurer)
|
||||
$object->subscription = (int) trim($subscription);
|
||||
$object->note = trim($comment);
|
||||
$object->mail_valid = trim($mail_valid);
|
||||
$object->vote = trim($vote);
|
||||
$object->vote = (boolean) trim($vote);
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
@ -160,7 +160,7 @@ if ($action == 'update' && $user->rights->adherent->configurer)
|
||||
$object->subscription = (int) trim($subscription);
|
||||
$object->note = trim($comment);
|
||||
$object->mail_valid = trim($mail_valid);
|
||||
$object->vote = trim($vote);
|
||||
$object->vote = (boolean) trim($vote);
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
@ -216,7 +216,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
|
||||
$sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.vote";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||
$sql.= " WHERE d.entity IN (".getEntity('adherent').")";
|
||||
$sql.= " WHERE d.entity IN (".getEntity('member_type').")";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
|
||||
@ -143,7 +143,7 @@ if (preg_match('/del_(.*)/',$action,$reg))
|
||||
$wikihelp='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
||||
@ -70,7 +70,7 @@ $textobject=$langs->transnoentitiesnoconv("Agenda");
|
||||
$wikihelp='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
|
||||
$head=agenda_prepare_head();
|
||||
|
||||
@ -128,7 +128,7 @@ $arrayofcss=array();
|
||||
$wikihelp='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
llxHeader('',$langs->trans("AgendaSetup"),$wikihelp,'',0,0,$arrayofjs,$arrayofcss);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
|
||||
print '<form name="extsitesconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
@ -178,7 +178,7 @@ $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
$wikihelp='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
llxHeader('', $langs->trans("AgendaSetup"),$wikihelp);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
|
||||
@ -171,7 +171,7 @@ $formactions=new FormActions($db);
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
llxHeader();
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ if (! isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $conf->global->MAIN_A
|
||||
$wikihelp='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda';
|
||||
llxHeader('', $langs->trans("AgendaSetup"), $wikihelp);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
|
||||
@ -171,7 +171,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
llxHeader("", $langs->trans("BankSetupModule"));
|
||||
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
print load_fiche_titre($langs->trans("BankSetupModule"), $linkback,
|
||||
'title_setup');
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ $textobject = $langs->transnoentitiesnoconv("Bank");
|
||||
llxHeader('',$langs->trans("BankSetupModule"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("BankSetupModule"),$linkback,'title_setup');
|
||||
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ $formbarcode = new FormBarCode($db);
|
||||
$help_url='EN:Module_Barcode|FR:Module_Codes_Barre|ES:Módulo Código de barra';
|
||||
llxHeader('',$langs->trans("BarcodeSetup"),$help_url);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("BarcodeSetup"),$linkback,'title_setup');
|
||||
|
||||
// Detect bar codes modules
|
||||
|
||||
@ -102,7 +102,7 @@ llxHeader("",$langs->trans("BankSetupModule"));
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("BankSetupModule"),$linkback,'title_setup');
|
||||
|
||||
$head = bank_admin_prepare_head(null);
|
||||
|
||||
@ -62,7 +62,7 @@ $user->fetch_clicktodial();
|
||||
$wikihelp='EN:Module_ClickToDial_En|FR:Module_ClickToDial|ES:Módulo_ClickTodial_Es';
|
||||
llxHeader('',$langs->trans("ClickToDialSetup"),$wikihelp);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ClickToDialSetup"),$linkback,'title_setup');
|
||||
|
||||
print $langs->trans("ClickToDialDesc")."<br>\n";
|
||||
|
||||
@ -253,7 +253,7 @@ $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
|
||||
llxHeader("",$langs->trans("OrdersSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("OrdersSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = order_admin_prepare_head();
|
||||
|
||||
@ -103,7 +103,7 @@ llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans('ComptaSetup'),$linkback,'title_setup');
|
||||
|
||||
print '<br>';
|
||||
|
||||
@ -89,7 +89,7 @@ $form=new Form($db);
|
||||
|
||||
llxHeader("",$langs->trans("SendingsSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
$head = expedition_admin_prepare_head();
|
||||
|
||||
@ -187,7 +187,7 @@ llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ContractsSetup"),$linkback,'title_setup');
|
||||
|
||||
$head=contract_admin_prepare_head();
|
||||
|
||||
@ -69,7 +69,7 @@ if (preg_match('/del_(.*)/',$action,$reg))
|
||||
$help_url='';
|
||||
llxHeader('',$langs->trans("ECMSetup"),$help_url);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ECMSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ if ($action == "save")
|
||||
$wikihelp='EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad';
|
||||
llxHeader('',$langs->trans("Audit"),$wikihelp);
|
||||
|
||||
//$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
//$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SecuritySetup"),'','title_setup');
|
||||
|
||||
print $langs->trans("LogEventDesc")."<br>\n";
|
||||
|
||||
@ -194,7 +194,7 @@ $form=new Form($db);
|
||||
|
||||
llxHeader("",$langs->trans("SendingsSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
$head = expedition_admin_prepare_head();
|
||||
|
||||
@ -72,7 +72,7 @@ $textobject=$langs->transnoentitiesnoconv("Sendings");
|
||||
|
||||
llxHeader('',$langs->trans("SendingsSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ $textobject=$langs->transnoentitiesnoconv("Sendings");
|
||||
|
||||
llxHeader('',$langs->trans("SendingsSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -199,7 +199,7 @@ llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ExpenseReportsSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ $textobject=$langs->transnoentitiesnoconv("expensereports");
|
||||
|
||||
llxHeader('',$langs->trans("expensereportsSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ExpenseReportsSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = expensereport_admin_prepare_head();
|
||||
|
||||
@ -93,7 +93,7 @@ llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ExpenseReportsIkSetup"),$linkback,'title_setup');
|
||||
|
||||
$head=expensereport_admin_prepare_head();
|
||||
|
||||
@ -149,7 +149,7 @@ llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ExpenseReportsRulesSetup"),$linkback,'title_setup');
|
||||
|
||||
$head=expensereport_admin_prepare_head();
|
||||
|
||||
@ -191,7 +191,7 @@ if ($_POST["delete"])
|
||||
|
||||
llxHeader('',$langs->trans("ExternalRSSSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ExternalRSSSetup"), $linkback, 'title_setup');
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -253,7 +253,7 @@ llxHeader("",$langs->trans("BillsSetup"),'EN:Invoice_Configuration|FR:Configurat
|
||||
$form=new Form($db);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("BillsSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = invoice_admin_prepare_head();
|
||||
|
||||
@ -135,7 +135,7 @@ if (GETPOST('save','alpha'))
|
||||
|
||||
llxHeader();
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AdvancedEditor"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -263,7 +263,7 @@ llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ $form=new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("GeoIPMaxmindSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ if (empty($reshook))
|
||||
|
||||
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP');
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print load_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
@ -95,7 +95,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
$form=new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP');
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print load_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP');
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print load_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
$form=new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP');
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print load_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP');
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print load_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
$form=new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP');
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print load_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
@ -184,7 +184,7 @@ llxHeader("","");
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
$head = expedition_admin_prepare_head();
|
||||
|
||||
@ -72,7 +72,7 @@ $textobject=$langs->transnoentitiesnoconv("Receivings");
|
||||
|
||||
llxHeader('',$langs->trans("SendingsSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ $textobject=$langs->transnoentitiesnoconv("Receivings");
|
||||
|
||||
llxHeader('',$langs->trans("SendingsSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ llxHeader();
|
||||
$form = new Form($db);
|
||||
if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans('ConfigLoan'),$linkback,'title_setup');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
@ -80,7 +80,7 @@ if ($action == 'setvalue')
|
||||
|
||||
llxHeader('',$langs->trans("MailingSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("MailingSetup"),$linkback,'title_setup');
|
||||
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
|
||||
@ -151,7 +151,7 @@ $help_url='';
|
||||
llxHeader('',$langs->trans("MailmanSpipSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = mailmanspip_admin_prepare_head();
|
||||
|
||||
@ -689,10 +689,19 @@ else
|
||||
print '</div>';
|
||||
|
||||
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && ! in_array($action, array('testconnect', 'test', 'testhtml')))
|
||||
if (! in_array($action, array('testconnect', 'test', 'testhtml')))
|
||||
{
|
||||
$text = $langs->trans("WarningPHPMail");
|
||||
print info_admin($text);
|
||||
$text = '';
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail')
|
||||
{
|
||||
$text.= $langs->trans("WarningPHPMail");
|
||||
}
|
||||
//$conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS='1.2.3.4';
|
||||
if (! empty($conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS))
|
||||
{
|
||||
$text.= ($text?'<br>':'').$langs->trans("WarningPHPMail2", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS);
|
||||
}
|
||||
if ($text) print info_admin($text);
|
||||
}
|
||||
|
||||
// Run the test to connect
|
||||
|
||||
@ -741,12 +741,12 @@ if ($mode == 'common')
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i',$urlpage,$regs))
|
||||
{
|
||||
$urltouse=dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1);
|
||||
print '<a href="'.$urltouse.(preg_match('/\?/',$urltouse)?'&':'?').'backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a>';
|
||||
print '<a href="'.$urltouse.(preg_match('/\?/',$urltouse)?'&':'?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$urltouse=$urlpage;
|
||||
print '<a href="'.$urltouse.(preg_match('/\?/',$urltouse)?'&':'?').'backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a>';
|
||||
print '<a href="'.$urltouse.(preg_match('/\?/',$urltouse)?'&':'?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -754,11 +754,11 @@ if ($mode == 'common')
|
||||
}
|
||||
else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs))
|
||||
{
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="60px"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1).'?backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="60px"><a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1],1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="60px"><a href="'.$objMod->config_page_url.'?backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
print '<td class="tdsetuppicto right valignmiddle" width="60px"><a href="'.$objMod->config_page_url.'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"),"setup",'style="padding-right: 6px"').'</a></td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -179,7 +179,7 @@ $page_name = "MultiCurrencySetup";
|
||||
llxHeader('', $langs->trans($page_name));
|
||||
|
||||
// Subheader
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
print_fiche_titre($langs->trans($page_name), $linkback);
|
||||
|
||||
// Configuration header
|
||||
|
||||
@ -115,7 +115,7 @@ $notify = new Notify($db);
|
||||
|
||||
llxHeader('',$langs->trans("NotificationSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("NotificationSetup"),$linkback,'title_setup');
|
||||
|
||||
print $langs->trans("NotificationsDesc").'<br>';
|
||||
|
||||
@ -77,7 +77,7 @@ llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans('ConfigOAuth'),$linkback,'title_setup');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
@ -113,7 +113,7 @@ $form = new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("PrintingSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans('ConfigOAuth'),$linkback,'title_setup');
|
||||
|
||||
$head=oauthadmin_prepare_head($mode);
|
||||
|
||||
@ -69,7 +69,7 @@ $textobject=$langs->transnoentitiesnoconv("Orders");
|
||||
|
||||
llxHeader('',$langs->trans("OrdersSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("OrdersSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ $textobject=$langs->transnoentitiesnoconv("Orders");
|
||||
|
||||
llxHeader('',$langs->trans("OrdersSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("OrdersSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ llxHeader("",$langs->trans("BillsSetup"),'EN:Invoice_Configuration|FR:Configurat
|
||||
$form=new Form($db);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("BillsSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = invoice_admin_prepare_head();
|
||||
|
||||
@ -187,7 +187,7 @@ $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
|
||||
llxHeader('',$langs->trans("WithdrawalsSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print load_fiche_titre($langs->trans("WithdrawalsSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
@ -234,7 +234,7 @@ llxHeader('',$langs->trans("PropalSetup"));
|
||||
|
||||
//if ($mesg) print $mesg;
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("PropalSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = propal_admin_prepare_head();
|
||||
|
||||
@ -212,7 +212,7 @@ $form = new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("ReceiptPrinterSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ReceiptPrinterSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = receiptprinteradmin_prepare_head($mode);
|
||||
|
||||
@ -46,7 +46,7 @@ $action = GETPOST('action', 'alpha');
|
||||
|
||||
if ($action == 'updateoptions')
|
||||
{
|
||||
if (GETPOST('activate_RESOURCE_USE_SEARCH_TO_SELECT'))
|
||||
if (GETPOST('activate_RESOURCE_USE_SEARCH_TO_SELECT') != '')
|
||||
{
|
||||
if (dolibarr_set_const($db, "RESOURCE_USE_SEARCH_TO_SELECT", GETPOST('activate_RESOURCE_USE_SEARCH_TO_SELECT'), 'chaine', 0, '', $conf->entity))
|
||||
{
|
||||
@ -65,12 +65,12 @@ llxHeader('',$langs->trans('ResourceSetup'));
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans('ResourceSetup'),$linkback,'title_setup');
|
||||
|
||||
$head=resource_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("ResourceSingular"), 0, 'action');
|
||||
dol_fiche_head($head, 'general', $langs->trans("ResourceSingular"), -1, 'action');
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@ -68,13 +68,13 @@ $textobject=$langs->transnoentitiesnoconv("ResourceSingular");
|
||||
|
||||
llxHeader('',$langs->trans("ResourceSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("ResourceSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head=resource_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("ResourceSingular"), 0, 'action');
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("ResourceSingular"), -1, 'action');
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ llxHeader('',$langs->trans('SalariesSetup'));
|
||||
$form = new Form($db);
|
||||
if (! empty($conf->accounting->enabled)) $formaccounting = New FormAccounting($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans('SalariesSetup'),$linkback,'title_setup');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
@ -111,7 +111,7 @@ $help_url='';
|
||||
llxHeader('',$langs->trans("MailmanSpipSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ if($action)
|
||||
|
||||
llxHeader('',$langs->trans("StockSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("StockSetup"),$linkback,'title_setup');
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
@ -199,7 +199,7 @@ llxHeader("","");
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup');
|
||||
|
||||
print "<br>";
|
||||
|
||||
@ -228,7 +228,7 @@ $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
|
||||
llxHeader("","");
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup');
|
||||
|
||||
print "<br>";
|
||||
|
||||
@ -159,7 +159,7 @@ llxHeader("",$langs->trans("SupplierPaymentSetup"),'EN:Supplier_Payment_Configur
|
||||
$form=new Form($db);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SupplierPaymentSetup"),$linkback,'title_setup');
|
||||
|
||||
print "<br>";
|
||||
|
||||
@ -216,7 +216,7 @@ $form=new Form($db);
|
||||
|
||||
//if ($mesg) print $mesg;
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SupplierProposalSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = supplier_proposal_admin_prepare_head();
|
||||
|
||||
@ -73,7 +73,7 @@ $textobject=$langs->transnoentitiesnoconv("BillsSuppliers");
|
||||
|
||||
llxHeader('',$langs->trans("SuppliersSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ $textobject=$langs->transnoentitiesnoconv("BillsSuppliers");
|
||||
|
||||
llxHeader('',$langs->trans("SuppliersSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ $textobject=$langs->transnoentitiesnoconv("SuppliersOrders");
|
||||
|
||||
llxHeader('',$langs->trans("SuppliersSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ $textobject=$langs->transnoentitiesnoconv("SuppliersOrders");
|
||||
|
||||
llxHeader('',$langs->trans("SuppliersSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -164,7 +164,7 @@ llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SyslogSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user