Merge branch 'develop' into develop_darkjeff
Conflicts: htdocs/accountancy/admin/productaccount.php
This commit is contained in:
commit
f2c59405d4
11
.codeclimate.yml
Normal file
11
.codeclimate.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Save as .codeclimate.yml (note leading .) in project root directory
|
||||||
|
languages:
|
||||||
|
Ruby: false
|
||||||
|
JavaScript: true
|
||||||
|
PHP: true
|
||||||
|
exclude_paths:
|
||||||
|
- 'build/*'
|
||||||
|
- 'dev/*'
|
||||||
|
- 'doc/*'
|
||||||
|
- 'test/*'
|
||||||
|
- 'htdocs/includes/*'
|
||||||
6
.mailmap
6
.mailmap
@ -21,9 +21,9 @@ Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry.mail@gmail.
|
|||||||
Florian Henry <florian.henry@open-concept.pro> Florian HENRY <florian.henry@open-conept.pro>
|
Florian Henry <florian.henry@open-concept.pro> Florian HENRY <florian.henry@open-conept.pro>
|
||||||
Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry@open-concept.pro>
|
Florian Henry <florian.henry@open-concept.pro> FHenry <florian.henry@open-concept.pro>
|
||||||
Florian Henry <florian.henry@open-concept.pro> HENRY Florian <florian.henry@open-concept.pro>
|
Florian Henry <florian.henry@open-concept.pro> HENRY Florian <florian.henry@open-concept.pro>
|
||||||
Alexandre Spangaro <alexandre.spangaro@gmail.com> aspangaro <alexandre.spangaro@gmail.com>
|
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> aspangaro <aspangaro.dolibarr@gmail.com>
|
||||||
Alexandre Spangaro <alexandre.spangaro@gmail.com> Spangaro Alexandre <alexandre.spangaro@gmail.com>
|
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> Spangaro Alexandre <aspangaro.dolibarr@gmail.com>
|
||||||
Alexandre Spangaro <alexandre.spangaro@gmail.com> Alexandre SPANGARO <alexandre.spangaro@gmail.com>
|
Alexandre Spangaro <aspangaro.dolibarr@gmail.com> Alexandre SPANGARO <aspangaro.dolibarr@gmail.com>
|
||||||
Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> Raphaël Doursenaud <rdoursenaud@free.fr>
|
Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> Raphaël Doursenaud <rdoursenaud@free.fr>
|
||||||
Philippe Grand <philippe.grand@atoo-net.com> Grand Philippe <contact@atoo-net.com>
|
Philippe Grand <philippe.grand@atoo-net.com> Grand Philippe <contact@atoo-net.com>
|
||||||
Philippe Grand <philippe.grand@atoo-net.com> Philippe GRAND <philippe.grand@atoo-net.com>
|
Philippe Grand <philippe.grand@atoo-net.com> Philippe GRAND <philippe.grand@atoo-net.com>
|
||||||
|
|||||||
14
COPYRIGHT
14
COPYRIGHT
@ -26,6 +26,7 @@ php-iban 1.4.6 LGPL-3+ Yes
|
|||||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||||
Restler 3.0 LGPL-3+ Yes Library to develop REST Web services
|
Restler 3.0 LGPL-3+ Yes Library to develop REST Web services
|
||||||
TCPDF 6.2.6 LGPL-3+ Yes PDF generation
|
TCPDF 6.2.6 LGPL-3+ Yes PDF generation
|
||||||
|
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||||
|
|
||||||
JS libraries:
|
JS libraries:
|
||||||
jQuery 1.11.3 MIT License Yes JS library
|
jQuery 1.11.3 MIT License Yes JS library
|
||||||
@ -42,13 +43,13 @@ jQuery jNotify 1.1.00 Apache Software License 2.0 Yes
|
|||||||
jQuery jPicker 1.1.6 GPL and MIT License Yes JS library for color picker with not defined list of colors
|
jQuery jPicker 1.1.6 GPL and MIT License Yes JS library for color picker with not defined list of colors
|
||||||
jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes JS library for color picker with not defined list of colors
|
jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes JS library for color picker with not defined list of colors
|
||||||
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for color picker with not defined list of colors
|
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for color picker with not defined list of colors
|
||||||
jQuery Layout 1.3.0rc30.74 GPL and MIT License Yes JS library plugin Layout (RC-29.15)
|
jQuery Layout 1.4.3 GPL and MIT License Yes JS library plugin Layout
|
||||||
jQuery Mobile 1.3.0 GPL and MIT License Yes JS library for smartphone (not used)
|
jQuery Mobile 1.3.0 GPL and MIT License Yes JS library for smartphone (not used)
|
||||||
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
|
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
|
||||||
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
|
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
|
||||||
jQuery Tiptip 1.3 GPL and MIT License Yes JS library for tooltips
|
jQuery Tiptip 1.3 GPL and MIT License Yes JS library for tooltips
|
||||||
jsGantt 1.2 BSD License Yes JS library (to build Gantt reports)
|
jsGantt 1.2 BSD License Yes JS library (to build Gantt reports)
|
||||||
JsTimezoneDetect 1.0.4 MIT Licence Yes JS library to detect user timezone
|
JsTimezoneDetect 1.0.4 MIT Licence Yes JS library to detect user timezone
|
||||||
|
|
||||||
For licenses compatibility informations:
|
For licenses compatibility informations:
|
||||||
http://www.fsf.org/licensing/licenses/index_html
|
http://www.fsf.org/licensing/licenses/index_html
|
||||||
@ -60,8 +61,9 @@ Copyright
|
|||||||
Copyright (C) 2015
|
Copyright (C) 2015
|
||||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
- Marcos García <marcosgdf@gmail.com>
|
- Marcos García <marcosgdf@gmail.com>
|
||||||
- Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
- Frederic France <frederic.france@free.fr>
|
- Frederic France <frederic.france@free.fr>
|
||||||
|
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
|
||||||
Copyright (C) 2014
|
Copyright (C) 2014
|
||||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
@ -73,7 +75,7 @@ Copyright (C) 2014
|
|||||||
- Regis Houssin <regis.houssin@capnetworks.com>
|
- Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||||
- Juanjo Menent <jmenent@2byte.es>
|
- Juanjo Menent <jmenent@2byte.es>
|
||||||
- Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
- Frederic France <frederic.france@free.fr>
|
- Frederic France <frederic.france@free.fr>
|
||||||
|
|
||||||
Copyright (C) 2013
|
Copyright (C) 2013
|
||||||
@ -87,7 +89,7 @@ Copyright (C) 2013
|
|||||||
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||||
- Juanjo Menent <jmenent@2byte.es>
|
- Juanjo Menent <jmenent@2byte.es>
|
||||||
- Adolfo Segura <adolfo.segura@gmail.com>
|
- Adolfo Segura <adolfo.segura@gmail.com>
|
||||||
- Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
|
|
||||||
Copyright (C) 2012
|
Copyright (C) 2012
|
||||||
- Christophe Battarel <christophe.battarel@altairis.fr>
|
- Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
@ -101,7 +103,7 @@ Copyright (C) 2012
|
|||||||
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||||
- Juanjo Menent <jmenent@2byte.es>
|
- Juanjo Menent <jmenent@2byte.es>
|
||||||
- Nicolas Péré <nicolas@amarok2.net>
|
- Nicolas Péré <nicolas@amarok2.net>
|
||||||
- Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
- Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
|
|
||||||
Copyright (C) 2011
|
Copyright (C) 2011
|
||||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
|||||||
22
ChangeLog
22
ChangeLog
@ -222,13 +222,23 @@ Dolibarr better:
|
|||||||
- Method select_PriceBaseType and load_PriceBaseType were merged into selectPriceBaseType.
|
- Method select_PriceBaseType and load_PriceBaseType were merged into selectPriceBaseType.
|
||||||
- The triggers USER_LOGIN* are deprecated. They are still working but you should prefer use the
|
- The triggers USER_LOGIN* are deprecated. They are still working but you should prefer use the
|
||||||
hook afterLogin or afterLoginFailed instead.
|
hook afterLogin or afterLoginFailed instead.
|
||||||
|
- The trigger USER_CREATE_FROM_CONTACT has been replace with USER_CREATE and property context is now filled
|
||||||
|
to make difference between creation from contact or not.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.7.2 compared to 3.7.1 *****
|
***** ChangeLog for 3.7.2 compared to 3.7.1 *****
|
||||||
FIX [ bug #2855 ] Wrong translation key in localtax report page
|
FIX [ bug #2855 ] Wrong translation key in localtax report page
|
||||||
FIX [ bug #1852 ] JS error when editing a customer order line
|
FIX [ bug #1852 ] JS error when editing a customer order line
|
||||||
FIX [ bug #2900 ] Courtesy title is not stored in create thirdparty form
|
FIX [ bug #2900 ] Courtesy title is not stored in create thirdparty form
|
||||||
|
FIX [ bug #3055 ] Product image thumbnails were not deleted after deleting the image
|
||||||
|
FIX [ bug 1634 ] Error deleting a project when it had many linked objects
|
||||||
|
FIX [ bug 1925 ] "Link to order" option in supplier invoices is not working properly
|
||||||
|
FIX [ bug #3198 ] Trigger LINECONTRACT_INSERT passes Contrat as $object instead of ContratLigne
|
||||||
|
FIX: Not showing delivery date on rouget pdf
|
||||||
|
FIX: Not showing task extrafields when creating from left menu
|
||||||
|
FIX [ bug #3288 ] Tasks box is not properly drawn
|
||||||
|
|
||||||
|
NEW: Created new ContratLigne::insert function
|
||||||
|
|
||||||
***** ChangeLog for 3.7.1 compared to 3.7.* *****
|
***** ChangeLog for 3.7.1 compared to 3.7.* *****
|
||||||
FIX Bug in the new photo system
|
FIX Bug in the new photo system
|
||||||
@ -485,6 +495,11 @@ Dolibarr better:
|
|||||||
- Fix: [ bug #2542 ] Contracts store localtax preferences
|
- Fix: [ bug #2542 ] Contracts store localtax preferences
|
||||||
- Fix: Bad permission assignments for stock movements actions
|
- Fix: Bad permission assignments for stock movements actions
|
||||||
- Fix: [ bug #2891 ] Category hooks do not work
|
- Fix: [ bug #2891 ] Category hooks do not work
|
||||||
|
- Fix: [ bug #2696 ] Adding complementary attribute fails if code is numerics
|
||||||
|
- Fix: [ bug #3074 ] Accruals accounting use payment date instead of commitment date in turnover reports for salaries
|
||||||
|
- Fix: Not showing product supplier reference when page break
|
||||||
|
- Fix: [ bug #3341 ] Missing translation in /compta/paiement_charge.php
|
||||||
|
- Fix: [ bug #3342 ] Taxes dictionary page does not accept localized decimals for localtax2 rate
|
||||||
|
|
||||||
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
||||||
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
|
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
|
||||||
@ -664,6 +679,11 @@ Fix: [ bug #2861 ] Undefined variable $res when migrating
|
|||||||
Fix: [ bug #2837 ] Product list table column header does not match column body
|
Fix: [ bug #2837 ] Product list table column header does not match column body
|
||||||
Fix: [ bug #2835 ] Customer prices of a product shows incorrect history order
|
Fix: [ bug #2835 ] Customer prices of a product shows incorrect history order
|
||||||
Fix: [ bug #2814 ] JPEG photos are not displayed in Product photos page
|
Fix: [ bug #2814 ] JPEG photos are not displayed in Product photos page
|
||||||
|
Fix: [ bug #2715 ] Statistics page has broken layout with long thirdparty names
|
||||||
|
Fix: [ bug #2570 ] [Contacts] Page should not process if ID is invalid
|
||||||
|
Fix: [ bug #3268 ] SQL error when accessing thirdparty log page without a socid parameter
|
||||||
|
Fix: [ bug #3180 ] formObjectOptions hook when editing thirdparty card does not print result
|
||||||
|
Fix: [ bug #1791 ] Margin menu not available if any Finance module is not enabled
|
||||||
|
|
||||||
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
||||||
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
||||||
|
|||||||
@ -475,6 +475,7 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/oscim*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/oscim*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# \file dolibarr.pl
|
# \file dolibarr.pl
|
||||||
# \brief Dolibarr script install for Virtualmin Pro
|
# \brief Dolibarr script install for Virtualmin Pro
|
||||||
# \author (c)2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
# \author (c)2009-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
@ -30,8 +30,7 @@ return "Regis Houssin";
|
|||||||
# script_dolibarr_versions()
|
# script_dolibarr_versions()
|
||||||
sub script_dolibarr_versions
|
sub script_dolibarr_versions
|
||||||
{
|
{
|
||||||
# TODO Replace this with version of Dolibar we want to install
|
return ( "3.7.2", "3.6.3", "3.5.6" );
|
||||||
return ( "x.y.z", "3.6.0");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub script_dolibarr_category
|
sub script_dolibarr_category
|
||||||
@ -57,6 +56,26 @@ local ($d, $ver) = @_;
|
|||||||
return ("mysql", "postgres");
|
return ("mysql", "postgres");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# script_dolibarr_depends(&domain, version)
|
||||||
|
sub script_dolibarr_depends
|
||||||
|
{
|
||||||
|
local ($d, $ver, $sinfo, $phpver) = @_;
|
||||||
|
local @rv;
|
||||||
|
|
||||||
|
if ($ver >= 3.6) {
|
||||||
|
# Check for PHP 5.3+
|
||||||
|
local $phpv = &get_php_version($phpver || 5, $d);
|
||||||
|
if (!$phpv) {
|
||||||
|
push(@rv, "Could not work out exact PHP version");
|
||||||
|
}
|
||||||
|
elsif ($phpv < 5.3) {
|
||||||
|
push(@rv, "Dolibarr requires PHP version 5.3 or later");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return @rv;
|
||||||
|
}
|
||||||
|
|
||||||
# script_dolibarr_params(&domain, version, &upgrade-info)
|
# script_dolibarr_params(&domain, version, &upgrade-info)
|
||||||
# Returns HTML for table rows for options for installing dolibarr
|
# Returns HTML for table rows for options for installing dolibarr
|
||||||
sub script_dolibarr_params
|
sub script_dolibarr_params
|
||||||
@ -78,8 +97,7 @@ else {
|
|||||||
$rv .= &ui_table_row("Database for Dolibarr tables",
|
$rv .= &ui_table_row("Database for Dolibarr tables",
|
||||||
&ui_database_select("db", undef, \@dbs, $d, "dolibarr"));
|
&ui_database_select("db", undef, \@dbs, $d, "dolibarr"));
|
||||||
$rv .= &ui_table_row("Install sub-directory under <tt>$hdir</tt>",
|
$rv .= &ui_table_row("Install sub-directory under <tt>$hdir</tt>",
|
||||||
&ui_opt_textbox("dir", "dolibarr", 30,
|
&ui_opt_textbox("dir", &substitute_scriptname_template("dolibarr", $d), 30, "At top level"));
|
||||||
"At top level"));
|
|
||||||
if ($d->{'ssl'} && $ver >= 3.0) {
|
if ($d->{'ssl'} && $ver >= 3.0) {
|
||||||
$rv .= &ui_table_row("Force https connection?",
|
$rv .= &ui_table_row("Force https connection?",
|
||||||
&ui_yesno_radio("forcehttps", 0));
|
&ui_yesno_radio("forcehttps", 0));
|
||||||
@ -159,7 +177,8 @@ if ($opts->{'newdb'} && !$upgrade) {
|
|||||||
local ($dbtype, $dbname) = split(/_/, $opts->{'db'}, 2);
|
local ($dbtype, $dbname) = split(/_/, $opts->{'db'}, 2);
|
||||||
local $dbuser = $dbtype eq "mysql" ? &mysql_user($d) : &postgres_user($d);
|
local $dbuser = $dbtype eq "mysql" ? &mysql_user($d) : &postgres_user($d);
|
||||||
local $dbpass = $dbtype eq "mysql" ? &mysql_pass($d) : &postgres_pass($d, 1);
|
local $dbpass = $dbtype eq "mysql" ? &mysql_pass($d) : &postgres_pass($d, 1);
|
||||||
local $dbphptype = $dbtype eq "mysql" ? "mysqli" : "pgsql";
|
local $dbphptype = $dbtype eq "mysql" && $version >= 3.6 ? "mysql" :
|
||||||
|
$dbtype eq "mysql" ? "mysqli" : "pgsql";
|
||||||
local $dbhost = &get_database_host($dbtype);
|
local $dbhost = &get_database_host($dbtype);
|
||||||
local $dberr = &check_script_db_connection($dbtype, $dbname, $dbuser, $dbpass);
|
local $dberr = &check_script_db_connection($dbtype, $dbname, $dbuser, $dbpass);
|
||||||
return (0, "Database connection failed : $dberr") if ($dberr);
|
return (0, "Database connection failed : $dberr") if ($dberr);
|
||||||
@ -201,12 +220,10 @@ if ($opts->{'path'} =~ /\w/) {
|
|||||||
if (!$upgrade) {
|
if (!$upgrade) {
|
||||||
local $cdef = "$opts->{'dir'}/conf/conf.php.example";
|
local $cdef = "$opts->{'dir'}/conf/conf.php.example";
|
||||||
&run_as_domain_user($d, "cp ".quotemeta($cdef)." ".quotemeta($cfile));
|
&run_as_domain_user($d, "cp ".quotemeta($cdef)." ".quotemeta($cfile));
|
||||||
&set_ownership_permissions(undef, undef, 0777, $cfiledir);
|
&set_permissions_as_domain_user($d, 0777, $cfiledir);
|
||||||
&set_ownership_permissions(undef, undef, 0666, $cfile);
|
&set_permissions_as_domain_user($d, 0666, $cfile);
|
||||||
&run_as_domain_user($d, "mkdir ".quotemeta($docdir));
|
&run_as_domain_user($d, "mkdir ".quotemeta($docdir));
|
||||||
&set_ownership_permissions(undef, undef, 0777, $docdir);
|
&set_permissions_as_domain_user($d, 0777, $docdir);
|
||||||
&run_as_domain_user($d, "mkdir ".quotemeta($altdir));
|
|
||||||
&set_ownership_permissions(undef, undef, 0777, $altdir);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Preserve old config file, documents and custom directory
|
# Preserve old config file, documents and custom directory
|
||||||
@ -289,8 +306,8 @@ else {
|
|||||||
local $dinstall = "$opts->{'dir'}/install";
|
local $dinstall = "$opts->{'dir'}/install";
|
||||||
$dinstall =~ s/\/$//;
|
$dinstall =~ s/\/$//;
|
||||||
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
|
$out = &run_as_domain_user($d, "rm -rf ".quotemeta($dinstall));
|
||||||
&set_ownership_permissions(undef, undef, 0644, $cfile);
|
&set_permissions_as_domain_user($d, 0644, $cfile);
|
||||||
&set_ownership_permissions(undef, undef, 0755, $cfiledir);
|
&set_permissions_as_domain_user($d, 0755, $cfiledir);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Return a URL for the user
|
# Return a URL for the user
|
||||||
@ -309,6 +326,7 @@ local $ipage = $opts->{'path'}."/install/".$page.".php";
|
|||||||
local ($iout, $ierror);
|
local ($iout, $ierror);
|
||||||
|
|
||||||
&post_http_connection($d, $ipage, $params, \$iout, \$ierror);
|
&post_http_connection($d, $ipage, $params, \$iout, \$ierror);
|
||||||
|
print STDERR $iout;
|
||||||
|
|
||||||
if ($ierror) {
|
if ($ierror) {
|
||||||
return $ierror;
|
return $ierror;
|
||||||
@ -329,10 +347,10 @@ local $derr = &delete_script_install_directory($d, $opts);
|
|||||||
return (0, $derr) if ($derr);
|
return (0, $derr) if ($derr);
|
||||||
|
|
||||||
# Remove all llx_ tables from the database
|
# Remove all llx_ tables from the database
|
||||||
# 3 times because of constraints
|
# 4 times because of constraints
|
||||||
&cleanup_script_database($d, $opts->{'db'}, "llx_");
|
for(my $i=0; $i<4; $i++) {
|
||||||
&cleanup_script_database($d, $opts->{'db'}, "llx_");
|
&cleanup_script_database($d, $opts->{'db'}, "llx_");
|
||||||
&cleanup_script_database($d, $opts->{'db'}, "llx_");
|
}
|
||||||
|
|
||||||
# Take out the DB
|
# Take out the DB
|
||||||
if ($opts->{'newdb'}) {
|
if ($opts->{'newdb'}) {
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
# This directory contains script example to use ansible to deploy or maitains dolibarr instances
|
|
||||||
|
|
||||||
This is a quick tutorial:
|
|
||||||
|
|
||||||
* Install ansible:
|
|
||||||
> apt-get install ansible
|
|
||||||
|
|
||||||
* Add ip of server to manage into
|
|
||||||
/etc/ansible/hosts
|
|
||||||
|
|
||||||
* Deploy public key to managed servers
|
|
||||||
- authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}"
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/env ansible-playbook
|
|
||||||
|
|
||||||
# Run script with ansible-playbook deploydev.yml
|
|
||||||
# or ./deploydev.yml
|
|
||||||
|
|
||||||
- name: Configure webserver with apache
|
|
||||||
hosts: webservers
|
|
||||||
sudo: True
|
|
||||||
tasks:
|
|
||||||
- name: install apache
|
|
||||||
apt: name=apache update_cache=yes
|
|
||||||
- name: copy apache config file
|
|
||||||
copy: src=files/apachealias.conf dest=/etc/apache/conf.d/dolibarr_dev
|
|
||||||
#- name: enable configuration
|
|
||||||
# file: >
|
|
||||||
# dest=/etc/apache/sites-enabled/default
|
|
||||||
# src=/etc/apache/sites-available/default
|
|
||||||
# state=link
|
|
||||||
- name: copy info.html
|
|
||||||
template: src=templates/info.html.j2 dest=/var/www/dolibarr_dev/info.html
|
|
||||||
mode=0644
|
|
||||||
- name: restart apache
|
|
||||||
service: name=apache state=restarted
|
|
||||||
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
|
|
||||||
Alias /dolibarr_dev /var/www/dolibarr
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
[webservers]
|
|
||||||
testserver ansible_ssh_host=127.0.0.1 ansible_ssh_port=22
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Page info ansible</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Apache, configured by Ansible</h1>
|
|
||||||
<p>If you can see this, Ansible successfully installed apache.</p>
|
|
||||||
<p>{{ ansible_managed }}</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -73,7 +73,7 @@ $obj->socid=$argv[1];
|
|||||||
|
|
||||||
$listofcontractsforcompany=$obj->getListOfContracts('all');
|
$listofcontractsforcompany=$obj->getListOfContracts('all');
|
||||||
|
|
||||||
print_r($listofcontractsforcompany);
|
print $listofcontractsforcompany;
|
||||||
|
|
||||||
|
|
||||||
// -------------------- END OF YOUR CODE --------------------
|
// -------------------- END OF YOUR CODE --------------------
|
||||||
|
|||||||
8551
dev/initdata/mysqldump_dolibarr_3.8.0.sql
Normal file
8551
dev/initdata/mysqldump_dolibarr_3.8.0.sql
Normal file
File diff suppressed because one or more lines are too long
@ -117,6 +117,14 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$property[$i]['ischar']=false;
|
$property[$i]['ischar']=false;
|
||||||
}
|
}
|
||||||
|
if (preg_match('/int/i',$property[$i]['type']))
|
||||||
|
{
|
||||||
|
$property[$i]['isint']=true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$property[$i]['isint']=false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -135,7 +143,7 @@ foreach($property as $key => $prop)
|
|||||||
$i++;
|
$i++;
|
||||||
if ($prop['field'] != 'rowid')
|
if ($prop['field'] != 'rowid')
|
||||||
{
|
{
|
||||||
$varpropselect.="\t\t\$sql.= \" ";
|
$varpropselect.="\t\t\$sql .= \" ";
|
||||||
$varpropselect.="t.".$prop['field'];
|
$varpropselect.="t.".$prop['field'];
|
||||||
if ($i < count($property)) $varpropselect.=",";
|
if ($i < count($property)) $varpropselect.=",";
|
||||||
$varpropselect.="\";";
|
$varpropselect.="\";";
|
||||||
@ -173,8 +181,8 @@ $targetcontent=$sourcecontent;
|
|||||||
|
|
||||||
// Substitute class name
|
// Substitute class name
|
||||||
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
||||||
$targetcontent=preg_replace('/\$element=\'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
|
$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element = \''.$classmin.'\'', $targetcontent);
|
||||||
$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$tablenoprefix.'\'', $targetcontent);
|
$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element = \''.$tablenoprefix.'\'', $targetcontent);
|
||||||
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
||||||
|
|
||||||
// Substitute comments
|
// Substitute comments
|
||||||
@ -192,15 +200,18 @@ foreach($property as $key => $prop)
|
|||||||
{
|
{
|
||||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
|
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
|
||||||
{
|
{
|
||||||
$varprop.="\tvar \$".$prop['field'];
|
$varprop.="\tpublic \$".$prop['field'];
|
||||||
if ($prop['istime']) $varprop.="=''";
|
if ($prop['istime']) $varprop.=" = ''";
|
||||||
$varprop.=";";
|
$varprop.=";";
|
||||||
if ($prop['comment']) $varprop.="\t// ".$prop['extra'];
|
if ($prop['comment']) $varprop.="\t// ".$prop['extra'];
|
||||||
$varprop.="\n";
|
$varprop.="\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$targetcontent=preg_replace('/var \$prop1;/', $varprop, $targetcontent);
|
$targetcontent=preg_replace('/public \$prop1;/', $varprop, $targetcontent);
|
||||||
$targetcontent=preg_replace('/var \$prop2;/', '', $targetcontent);
|
$targetcontent=preg_replace('/public \$prop2;/', '', $targetcontent);
|
||||||
|
|
||||||
|
$targetcontent=preg_replace('/\*((\s|\n|\r|\t)*)\@var mixed Sample property 1((\s|\n|\r|\t)*)/', '', $targetcontent);
|
||||||
|
$targetcontent=preg_replace('/\*((\s|\n|\r|\t)*)\@var mixed Sample property 2((\s|\n|\r|\t)*)/', '', $targetcontent);
|
||||||
|
|
||||||
// Substitute clean parameters
|
// Substitute clean parameters
|
||||||
$varprop="\n";
|
$varprop="\n";
|
||||||
@ -209,13 +220,20 @@ foreach($property as $key => $prop)
|
|||||||
{
|
{
|
||||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||||
{
|
{
|
||||||
$varprop.="\t\tif (isset(\$this->".$prop['field'].")) \$this->".$prop['field']."=trim(\$this->".$prop['field'].");";
|
$varprop.="\t\tif (isset(\$this->".$prop['field'].")) {\n\t\t\t \$this->".$prop['field']." = trim(\$this->".$prop['field'].");\n\t\t}";
|
||||||
$varprop.="\n";
|
$varprop.="\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$targetcontent=preg_replace('/if \(isset\(\$this->prop1\)\) \$this->prop1=trim\(\$this->prop1\);/', $varprop, $targetcontent);
|
$targetcontent=preg_replace('/if \(isset\(\$this->prop1\)\) {((\n|\r|\t)*)\$this->prop1 = trim\(\$this->prop1\);((\n|\r|\t)*)}/', $varprop, $targetcontent);
|
||||||
$targetcontent=preg_replace('/if \(isset\(\$this->prop2\)\) \$this->prop2=trim\(\$this->prop2\);/', '', $targetcontent);
|
$targetcontent=preg_replace('/if \(isset\(\$this->prop2\)\) {((\n|\r|\t)*)\$this->prop2 = trim\(\$this->prop2\);((\n|\r|\t)*)}/', '', $targetcontent);
|
||||||
|
|
||||||
|
|
||||||
|
$no_output_field=0;
|
||||||
|
foreach($property as $key => $prop)
|
||||||
|
{
|
||||||
|
if ($prop['field'] == 'tms') $no_output_field++; // This is a field of type timestamp edited automatically
|
||||||
|
if ($prop['extra'] == 'auto_increment') $no_output_field++;
|
||||||
|
}
|
||||||
// Substitute insert into parameters
|
// Substitute insert into parameters
|
||||||
$varprop="\n";
|
$varprop="\n";
|
||||||
$cleanparam='';
|
$cleanparam='';
|
||||||
@ -229,120 +247,138 @@ foreach($property as $key => $prop)
|
|||||||
|
|
||||||
if ($addfield)
|
if ($addfield)
|
||||||
{
|
{
|
||||||
$varprop.="\t\t\$sql.= \"".$prop['field'];
|
$varprop.="\t\t\$sql.= '".$prop['field'];
|
||||||
if ($i < count($property)) $varprop.=",";
|
if ($i <= count($property)-$no_output_field) $varprop.=",";
|
||||||
$varprop.="\";";
|
$varprop.="';";
|
||||||
$varprop.="\n";
|
$varprop.="\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$targetcontent=preg_replace('/\$sql\.= " field1,";/', $varprop, $targetcontent);
|
$targetcontent=preg_replace('/\$sql \.= \' field1,\';/', $varprop, $targetcontent);
|
||||||
$targetcontent=preg_replace('/\$sql\.= " field2";/', '', $targetcontent);
|
$targetcontent=preg_replace('/\$sql \.= \' field2\';/', '', $targetcontent);
|
||||||
|
|
||||||
// Substitute insert values parameters
|
// Substitute insert values parameters
|
||||||
$varprop="\n";
|
$varprop="\n";
|
||||||
$cleanparam='';
|
$cleanparam='';
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|
||||||
|
//Count nb field to output to manage commat at end SQL instruction
|
||||||
|
|
||||||
|
|
||||||
foreach($property as $key => $prop)
|
foreach($property as $key => $prop)
|
||||||
{
|
{
|
||||||
$i++;
|
|
||||||
$addfield=1;
|
$addfield=1;
|
||||||
if ($prop['field'] == 'tms') $addfield=0; // This is a field of type timestamp edited automatically
|
if ($prop['field'] == 'tms') $addfield=0; // This is a field of type timestamp edited automatically
|
||||||
if ($prop['extra'] == 'auto_increment') $addfield=0;
|
if ($prop['extra'] == 'auto_increment') $addfield=0;
|
||||||
|
|
||||||
if ($addfield)
|
if ($addfield)
|
||||||
{
|
{
|
||||||
$varprop.="\t\t\$sql.= \" ";
|
$i++;
|
||||||
|
|
||||||
|
$varprop.="\t\t\$sql .= ' ";
|
||||||
if ($prop['field']=='datec')
|
if ($prop['field']=='datec')
|
||||||
{
|
{
|
||||||
$varprop.='"."\'".$this->db->idate(dol_now())."\'"."';
|
$varprop.='\'."\'".$this->db->idate(dol_now())."\'"';
|
||||||
if ($i < count($property)) $varprop.=",";
|
|
||||||
$varprop.='";';
|
|
||||||
}
|
}
|
||||||
elseif ($prop['istime'])
|
elseif ($prop['istime'])
|
||||||
{
|
{
|
||||||
$varprop.='".(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].')==0?\'NULL\':"\'".$this->db->idate(';
|
$varprop.='\'.(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].')==0?\'NULL\':"\'".$this->db->idate(';
|
||||||
$varprop.="\$this->".$prop['field']."";
|
$varprop.="\$this->".$prop['field']."";
|
||||||
$varprop.=')."\'")."';
|
$varprop.=").\"'\")";
|
||||||
if ($i < count($property)) $varprop.=",";
|
|
||||||
$varprop.='";';
|
|
||||||
}
|
}
|
||||||
elseif ($prop['ischar'])
|
elseif ($prop['ischar'])
|
||||||
{
|
{
|
||||||
$varprop.='".(! isset($this->'.$prop['field'].')?\'NULL\':"\'".';
|
$varprop.="'.(! isset(\$this->".$prop['field'].")?'NULL':\"'\".";
|
||||||
$varprop.='$this->db->escape($this->'.$prop['field'].')';
|
$varprop.="\$this->db->escape(\$this->".$prop['field'].")";
|
||||||
$varprop.='."\'")."';
|
$varprop.=".\"'\")";
|
||||||
if ($i < count($property)) $varprop.=",";
|
|
||||||
$varprop.='";';
|
|
||||||
}
|
}
|
||||||
elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_author')
|
elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_author')
|
||||||
{
|
{
|
||||||
$varprop.='".$user->id."';
|
$varprop.="'.\$user->id";
|
||||||
if ($i < count($property)) $varprop.=",";
|
}
|
||||||
$varprop.='";';
|
elseif ($prop['isint'])
|
||||||
|
{
|
||||||
|
$varprop.='\'.(! isset($this->'.$prop['field'].')?\'NULL\':';
|
||||||
|
$varprop.="\$this->".$prop['field']."";
|
||||||
|
$varprop.=')';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$varprop.='".(! isset($this->'.$prop['field'].')?\'NULL\':"\'".';
|
$varprop.=' \'.(! isset($this->'.$prop['field'].')?\'NULL\':"\'".';
|
||||||
$varprop.="\$this->".$prop['field']."";
|
$varprop.="\$this->".$prop['field']."";
|
||||||
$varprop.='."\'")."';
|
$varprop.='.\').';
|
||||||
if ($i < count($property)) $varprop.=",";
|
|
||||||
$varprop.='";';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($i < (count($property)-$no_output_field)) $varprop.=".','";
|
||||||
|
$varprop.=';';
|
||||||
$varprop.="\n";
|
$varprop.="\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$targetcontent=preg_replace('/\$sql\.= " \'".\$this->prop1\."\',";/', $varprop, $targetcontent);
|
|
||||||
$targetcontent=preg_replace('/\$sql\.= " \'".\$this->prop2\."\'";/', '', $targetcontent);
|
$patern1='/\$sql \.= \' (.*)\' \. \$this->prop1 \. \'(.*),\';/';
|
||||||
|
$patern2='/\$sql \.= \' (.*)\' \. \$this->prop2 \. \'(.*)\';/';
|
||||||
|
$targetcontent=preg_replace($patern1, $varprop, $targetcontent);
|
||||||
|
$targetcontent=preg_replace($patern2, '', $targetcontent);
|
||||||
|
|
||||||
// Substitute update values parameters
|
// Substitute update values parameters
|
||||||
|
|
||||||
|
//Count nb field to output to manage commat at end SQL instruction
|
||||||
|
$no_output_field=0;
|
||||||
|
foreach($property as $key => $prop)
|
||||||
|
{
|
||||||
|
if ($prop['extra'] == 'auto_increment') $no_output_field++;
|
||||||
|
}
|
||||||
|
|
||||||
$varprop="\n";
|
$varprop="\n";
|
||||||
$cleanparam='';
|
$cleanparam='';
|
||||||
$i=0;
|
$i=0;
|
||||||
foreach($property as $key => $prop)
|
foreach($property as $key => $prop)
|
||||||
{
|
{
|
||||||
$i++;
|
|
||||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && $prop['field'] != 'datec' && $prop['field'] != 'fk_user_author')
|
$addfield=1;
|
||||||
|
if ($prop['extra'] == 'auto_increment') $addfield=0;
|
||||||
|
|
||||||
|
if ($addfield)
|
||||||
{
|
{
|
||||||
$varprop.="\t\t\$sql.= \" ";
|
$i++;
|
||||||
$varprop.=$prop['field'].'=';
|
|
||||||
|
$varprop.="\t\t\$sql .= ' ";
|
||||||
|
$varprop.=$prop['field'].' = ';
|
||||||
if ($prop['field']=='tms') {
|
if ($prop['field']=='tms') {
|
||||||
$varprop.='".(dol_strlen($this->'.$prop['field'].')!=0 ? "\'".$this->db->idate(';
|
$varprop.='\'.(dol_strlen($this->'.$prop['field'].') != 0 ? "\'".$this->db->idate(';
|
||||||
$varprop.='$this->'.$prop['field'];
|
$varprop.='$this->'.$prop['field'];
|
||||||
$varprop.=')."\'" : "\'".$this->db->idate(dol_now())."\'").';
|
$varprop.=')."\'" : "\'".$this->db->idate(dol_now())."\'")';
|
||||||
$varprop.='"';
|
|
||||||
}
|
}
|
||||||
elseif ($prop['istime'])
|
elseif ($prop['istime'])
|
||||||
{
|
{
|
||||||
// (dol_strlen($this->datep)!=0 ? "'".$this->db->idate($this->datep)."'" : 'null')
|
$varprop.='\'.(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].') != 0 ? "\'".$this->db->idate(';
|
||||||
$varprop.='".(dol_strlen($this->'.$prop['field'].')!=0 ? "\'".$this->db->idate(';
|
|
||||||
$varprop.='$this->'.$prop['field'];
|
$varprop.='$this->'.$prop['field'];
|
||||||
$varprop.=')."\'" : \'null\').';
|
$varprop.=')."\'" : \'null\')';
|
||||||
$varprop.='"';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
elseif ($prop['field']=='fk_user_mod') {
|
elseif ($prop['field']=='fk_user_mod') {
|
||||||
$varprop.='".$user->id."';
|
$varprop.="'.\$user->id";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$varprop.="\".";
|
$varprop.="'.";
|
||||||
// $sql.= " field1=".(isset($this->field1)?"'".$this->db->escape($this->field1)."'":"null").",";
|
|
||||||
if ($prop['ischar']) $varprop.='(isset($this->'.$prop['field'].')?"\'".$this->db->escape($this->'.$prop['field'].')."\'":"null")';
|
if ($prop['ischar']) $varprop.='(isset($this->'.$prop['field'].')?"\'".$this->db->escape($this->'.$prop['field'].')."\'":"null")';
|
||||||
// $sql.= " field1=".(isset($this->field1)?$this->field1:"null").",";
|
elseif ($prop['isint']) $varprop.='(isset($this->'.$prop['field'].')?$this->'.$prop['field'].':"null")';
|
||||||
else $varprop.='(isset($this->'.$prop['field'].')?$this->'.$prop['field'].':"null")';
|
else $varprop.='(isset($this->'.$prop['field'].')?$this->'.$prop['field'].':"null")';
|
||||||
$varprop.=".\"";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($i < count($property)) $varprop.=',';
|
if ($i < (count($property)-$no_output_field)) $varprop.=".','";
|
||||||
$varprop.='";';
|
$varprop.=';';
|
||||||
$varprop.="\n";
|
$varprop.="\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$targetcontent=preg_replace('/\$sql.= " field1=".\(isset\(\$this->field1\)\?"\'".\$this->db->escape\(\$this->field1\)."\'":"null"\).",";/', $varprop, $targetcontent);
|
$targetcontent=preg_replace('/\$sql \.= " field1=".\(isset\(\$this->field1\)\?"\'".\$this->db->escape\(\$this->field1\)."\'":"null"\).",";/', $varprop, $targetcontent);
|
||||||
$targetcontent=preg_replace('/\$sql.= " field2=".\(isset\(\$this->field2\)\?"\'".\$this->db->escape\(\$this->field2\)."\'":"null"\)."";/', '', $targetcontent);
|
$targetcontent=preg_replace('/\$sql \.= " field2=".\(isset\(\$this->field2\)\?"\'".\$this->db->escape\(\$this->field2\)."\'":"null"\)."";/', '', $targetcontent);
|
||||||
|
|
||||||
// Substitute fetch/select parameters
|
// Substitute fetch/select parameters
|
||||||
$targetcontent=preg_replace('/\$sql\.= " t\.field1,";/', $varpropselect, $targetcontent);
|
$targetcontent=preg_replace('/\$sql \.= \' t\.field1,\';/', $varpropselect, $targetcontent);
|
||||||
$targetcontent=preg_replace('/\$sql\.= " t\.field2";/', '', $targetcontent);
|
$targetcontent=preg_replace('/\$sql \.= \' t\.field2\';/', '', $targetcontent);
|
||||||
|
|
||||||
// Substitute select set parameters
|
// Substitute select set parameters
|
||||||
$varprop="\n";
|
$varprop="\n";
|
||||||
@ -384,12 +420,12 @@ foreach($property as $key => $prop)
|
|||||||
{
|
{
|
||||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
|
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
|
||||||
{
|
{
|
||||||
$varprop.="\t\t\$this->".$prop['field']."='';";
|
$varprop.="\t\t\$this->".$prop['field']." = '';";
|
||||||
$varprop.="\n";
|
$varprop.="\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$targetcontent=preg_replace('/\$this->prop1=\'prop1\';/', $varprop, $targetcontent);
|
$targetcontent=preg_replace('/\$this->prop1 = \'prop1\';/', $varprop, $targetcontent);
|
||||||
$targetcontent=preg_replace('/\$this->prop2=\'prop2\';/', '', $targetcontent);
|
$targetcontent=preg_replace('/\$this->prop2 = \'prop2\';/', '', $targetcontent);
|
||||||
|
|
||||||
// Build file
|
// Build file
|
||||||
$fp=fopen($outfile,"w");
|
$fp=fopen($outfile,"w");
|
||||||
@ -425,8 +461,8 @@ $targetcontent=$sourcecontent;
|
|||||||
// Substitute class name
|
// Substitute class name
|
||||||
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
||||||
$targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent);
|
$targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent);
|
||||||
$targetcontent=preg_replace('/\$element=\'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
|
$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
|
||||||
$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
|
$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
|
||||||
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
||||||
|
|
||||||
// Substitute comments
|
// Substitute comments
|
||||||
@ -471,8 +507,8 @@ $targetcontent=$sourcecontent;
|
|||||||
// Substitute class name
|
// Substitute class name
|
||||||
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
||||||
$targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent);
|
$targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent);
|
||||||
$targetcontent=preg_replace('/\$element=\'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
|
$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
|
||||||
$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
|
$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
|
||||||
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
||||||
$targetcontent=preg_replace('/skeleton/', $classname, $targetcontent);
|
$targetcontent=preg_replace('/skeleton/', $classname, $targetcontent);
|
||||||
|
|
||||||
@ -485,8 +521,8 @@ $targetcontent=preg_replace('/Put here some comments/','Initialy built by build_
|
|||||||
$targetcontent=preg_replace('/MAIN_DB_PREFIX."mytable/', 'MAIN_DB_PREFIX."'.$tablenoprefix, $targetcontent);
|
$targetcontent=preg_replace('/MAIN_DB_PREFIX."mytable/', 'MAIN_DB_PREFIX."'.$tablenoprefix, $targetcontent);
|
||||||
|
|
||||||
// Substitute fetch/select parameters
|
// Substitute fetch/select parameters
|
||||||
$targetcontent=preg_replace('/\$sql\.= " t\.field1,";/', $varpropselect, $targetcontent);
|
$targetcontent=preg_replace('/\$sql \.= " t\.field1,";/', $varpropselect, $targetcontent);
|
||||||
$targetcontent=preg_replace('/\$sql\.= " t\.field2";/', '', $targetcontent);
|
$targetcontent=preg_replace('/\$sql \.= " t\.field2";/', '', $targetcontent);
|
||||||
|
|
||||||
// Build file
|
// Build file
|
||||||
$fp=fopen($outfile,"w");
|
$fp=fopen($outfile,"w");
|
||||||
|
|||||||
@ -222,10 +222,11 @@ class Skeleton_Class extends CommonObject
|
|||||||
* @param int $limit offset limit
|
* @param int $limit offset limit
|
||||||
* @param int $offset offset limit
|
* @param int $offset offset limit
|
||||||
* @param array $filter filter array
|
* @param array $filter filter array
|
||||||
|
* @param string $filtermode filter mode (AND or OR)
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function fetchAll($sortorder, $sortfield, $limit, $offset, array $filter = array())
|
public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND')
|
||||||
{
|
{
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
|
||||||
@ -234,20 +235,25 @@ class Skeleton_Class extends CommonObject
|
|||||||
$sql .= ' t.field1,';
|
$sql .= ' t.field1,';
|
||||||
$sql .= ' t.field2';
|
$sql .= ' t.field2';
|
||||||
//...
|
//...
|
||||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'mytable as t';
|
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element. ' as t';
|
||||||
|
|
||||||
// Manage filter
|
// Manage filter
|
||||||
$sqlwhere = array();
|
$sqlwhere = array();
|
||||||
if (count($filter) > 0) {
|
if (count($filter) > 0) {
|
||||||
foreach ($filter as $key => $value) {
|
foreach ($filter as $key => $value) {
|
||||||
$sqlwhere [] = ' AND ' . $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
|
$sqlwhere [] = $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (count($sqlwhere) > 0) {
|
if (count($sqlwhere) > 0) {
|
||||||
$sql .= ' WHERE ' . implode(' AND ', $sqlwhere);
|
$sql .= ' WHERE ' . implode(' '.$filtermode.' ', $sqlwhere);
|
||||||
}
|
}
|
||||||
$sql .= ' ORDER BY ' . $sortfield . ' ' . $sortorder . ' ' . $this->db->plimit($limit + 1, $offset);
|
|
||||||
|
|
||||||
|
if (!empty($sortfield)) {
|
||||||
|
$sql .= ' ORDER BY ' . $sortfield . ' ' . $sortorder;
|
||||||
|
}
|
||||||
|
if (!empty($limit)) {
|
||||||
|
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
|
||||||
|
}
|
||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
@ -303,16 +309,8 @@ class Skeleton_Class extends CommonObject
|
|||||||
|
|
||||||
// Update request
|
// Update request
|
||||||
$sql = 'UPDATE ' . MAIN_DB_PREFIX . $this->table_element . ' SET';
|
$sql = 'UPDATE ' . MAIN_DB_PREFIX . $this->table_element . ' SET';
|
||||||
if (isset($this->field1)) {
|
$sql .= " field1=".(isset($this->field1)?"'".$this->db->escape($this->field1)."'":"null").",";
|
||||||
$sql .= ' field1=\'' . $this->db->escape($this->field1) . '\',';
|
$sql .= " field2=".(isset($this->field2)?"'".$this->db->escape($this->field2)."'":"null")."";
|
||||||
} else {
|
|
||||||
$sql .= ' field1=null' . ',';
|
|
||||||
}
|
|
||||||
if (isset($this->field2)) {
|
|
||||||
$sql .= ' field2=\'' . $this->db->escape($this->field2) . '\'';
|
|
||||||
} else {
|
|
||||||
$sql .= ' field2=null';
|
|
||||||
}
|
|
||||||
//...
|
//...
|
||||||
$sql .= ' WHERE rowid=' . $this->id;
|
$sql .= ' WHERE rowid=' . $this->id;
|
||||||
|
|
||||||
|
|||||||
9
htdocs/.gitignore
vendored
9
htdocs/.gitignore
vendored
@ -1,13 +1,14 @@
|
|||||||
/test.php
|
|
||||||
/extensions*
|
|
||||||
/nltechno*
|
|
||||||
/ancot*
|
/ancot*
|
||||||
/teclib*
|
|
||||||
/bootstrap*
|
/bootstrap*
|
||||||
|
/extensions*
|
||||||
/google*
|
/google*
|
||||||
/multicompany*
|
/multicompany*
|
||||||
|
/ndf*
|
||||||
/numberingpack*
|
/numberingpack*
|
||||||
|
/nltechno*
|
||||||
/ovh*
|
/ovh*
|
||||||
/pos
|
/pos
|
||||||
|
/teclib*
|
||||||
|
/test.php
|
||||||
/ultimatepdf*
|
/ultimatepdf*
|
||||||
/lead
|
/lead
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2014-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
/* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -219,7 +219,12 @@ print '</form>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
//print $langs->trans('FollowingLinksArePublic').'<br>';
|
//print $langs->trans('FollowingLinksArePublic').'<br>';
|
||||||
print img_picto('','object_globe.png').' '.$langs->trans('BlankSubscriptionForm').':<br>';
|
print img_picto('','object_globe.png').' '.$langs->trans('BlankSubscriptionForm').':<br>';
|
||||||
print '<a target="_blank" href="'.DOL_URL_ROOT.'/public/members/new.php">'.DOL_MAIN_URL_ROOT.'/public/members/new.php</a>';
|
if ($conf->multicompany->enabled) {
|
||||||
|
$entity_qr='?entity='.$conf->entity;
|
||||||
|
} else {
|
||||||
|
$entity_qr='';
|
||||||
|
}
|
||||||
|
print '<a target="_blank" href="'.DOL_URL_ROOT.'/public/members/new.php'.$entity_qr.'">'.DOL_MAIN_URL_ROOT.'/public/members/new.php'.$entity_qr.'</a>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
print '<table class="border" cellspacing="0" cellpadding="3">';
|
print '<table class="border" cellspacing="0" cellpadding="3">';
|
||||||
|
|||||||
@ -141,7 +141,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
if (! empty($conf->agenda->enabled))
|
if (! empty($conf->agenda->enabled))
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create">'.$langs->trans("AddAction").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1">'.$langs->trans("AddAction").'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2012-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2012-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2014-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2014-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -34,8 +34,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
|||||||
|
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
|
|
||||||
$rowid = GETPOST('rowid','int');
|
$rowid = GETPOST('rowid','int');
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
|
$cancel = GETPOST('cancel','alpha');
|
||||||
|
|
||||||
$search_lastname = GETPOST('search_lastname','alpha');
|
$search_lastname = GETPOST('search_lastname','alpha');
|
||||||
$search_login = GETPOST('search_login','alpha');
|
$search_login = GETPOST('search_login','alpha');
|
||||||
@ -85,7 +86,7 @@ $hookmanager->initHooks(array('membertypecard','globalcard'));
|
|||||||
*/
|
*/
|
||||||
if ($action == 'add' && $user->rights->adherent->configurer)
|
if ($action == 'add' && $user->rights->adherent->configurer)
|
||||||
{
|
{
|
||||||
if ($_POST["button"] != $langs->trans("Cancel"))
|
if (! $cancel)
|
||||||
{
|
{
|
||||||
$object = new AdherentType($db);
|
$object = new AdherentType($db);
|
||||||
|
|
||||||
@ -123,7 +124,7 @@ if ($action == 'add' && $user->rights->adherent->configurer)
|
|||||||
|
|
||||||
if ($action == 'update' && $user->rights->adherent->configurer)
|
if ($action == 'update' && $user->rights->adherent->configurer)
|
||||||
{
|
{
|
||||||
if ($_POST["button"] != $langs->trans("Cancel"))
|
if (! $cancel)
|
||||||
{
|
{
|
||||||
$object = new AdherentType($db);
|
$object = new AdherentType($db);
|
||||||
$object->id = $rowid;
|
$object->id = $rowid;
|
||||||
@ -152,14 +153,6 @@ if ($action == 'delete' && $user->rights->adherent->configurer)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'commentaire' && $user->rights->adherent->configurer)
|
|
||||||
{
|
|
||||||
$don = new Don($db);
|
|
||||||
$don->fetch($rowid);
|
|
||||||
$don->update_note(dol_html_entity_decode(GETPOST('commentaire'), ENT_QUOTES));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -291,7 +284,7 @@ if ($action == 'create')
|
|||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Add").'">';
|
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Add").'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'" onclick="history.go(-1)" />';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|||||||
@ -65,6 +65,7 @@ if ($actionsave)
|
|||||||
{
|
{
|
||||||
$name=trim(GETPOST('AGENDA_EXT_NAME'.$i,'alpha'));
|
$name=trim(GETPOST('AGENDA_EXT_NAME'.$i,'alpha'));
|
||||||
$src=trim(GETPOST('AGENDA_EXT_SRC'.$i,'alpha'));
|
$src=trim(GETPOST('AGENDA_EXT_SRC'.$i,'alpha'));
|
||||||
|
$offsettz=trim(GETPOST('AGENDA_EXT_OFFSETTZ'.$i,'alpha'));
|
||||||
$color=trim(GETPOST('AGENDA_EXT_COLOR'.$i,'alpha'));
|
$color=trim(GETPOST('AGENDA_EXT_COLOR'.$i,'alpha'));
|
||||||
if ($color=='-1') $color='';
|
if ($color=='-1') $color='';
|
||||||
$enabled=trim(GETPOST('AGENDA_EXT_ENABLED'.$i,'alpha'));
|
$enabled=trim(GETPOST('AGENDA_EXT_ENABLED'.$i,'alpha'));
|
||||||
@ -82,6 +83,8 @@ if ($actionsave)
|
|||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
$res=dolibarr_set_const($db,'AGENDA_EXT_SRC'.$i,$src,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db,'AGENDA_EXT_SRC'.$i,$src,'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
$res=dolibarr_set_const($db,'AGENDA_EXT_OFFSETTZ'.$i,$offsettz,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
$res=dolibarr_set_const($db,'AGENDA_EXT_COLOR'.$i,$color,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db,'AGENDA_EXT_COLOR'.$i,$color,'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
$res=dolibarr_set_const($db,'AGENDA_EXT_ENABLED'.$i,$enabled,'chaine',0,'',$conf->entity);
|
$res=dolibarr_set_const($db,'AGENDA_EXT_ENABLED'.$i,$enabled,'chaine',0,'',$conf->entity);
|
||||||
@ -191,6 +194,7 @@ print "<tr class=\"liste_titre\">";
|
|||||||
print "<td>".$langs->trans("Parameter")."</td>";
|
print "<td>".$langs->trans("Parameter")."</td>";
|
||||||
print "<td>".$langs->trans("Name")."</td>";
|
print "<td>".$langs->trans("Name")."</td>";
|
||||||
print "<td>".$langs->trans("ExtSiteUrlAgenda")." (".$langs->trans("Example").': http://yoursite/agenda/agenda.ics)</td>';
|
print "<td>".$langs->trans("ExtSiteUrlAgenda")." (".$langs->trans("Example").': http://yoursite/agenda/agenda.ics)</td>';
|
||||||
|
print "<td>".$form->textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Color").'</td>';
|
print '<td align="right">'.$langs->trans("Color").'</td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
@ -201,6 +205,7 @@ while ($i <= $MAXAGENDA)
|
|||||||
$key=$i;
|
$key=$i;
|
||||||
$name='AGENDA_EXT_NAME'.$key;
|
$name='AGENDA_EXT_NAME'.$key;
|
||||||
$src='AGENDA_EXT_SRC'.$key;
|
$src='AGENDA_EXT_SRC'.$key;
|
||||||
|
$offsettz='AGENDA_EXT_OFFSETTZ'.$key;
|
||||||
$color='AGENDA_EXT_COLOR'.$key;
|
$color='AGENDA_EXT_COLOR'.$key;
|
||||||
$enabled='AGENDA_EXT_ENABLED'.$key;
|
$enabled='AGENDA_EXT_ENABLED'.$key;
|
||||||
|
|
||||||
@ -212,6 +217,8 @@ while ($i <= $MAXAGENDA)
|
|||||||
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME'.$key.'" value="'. (GETPOST('AGENDA_EXT_NAME'.$key)?GETPOST('AGENDA_EXT_NAME'.$key):$conf->global->$name) . '" size="28"></td>';
|
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME'.$key.'" value="'. (GETPOST('AGENDA_EXT_NAME'.$key)?GETPOST('AGENDA_EXT_NAME'.$key):$conf->global->$name) . '" size="28"></td>';
|
||||||
// URL
|
// URL
|
||||||
print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC'.$key.'" value="'. (GETPOST('AGENDA_EXT_SRC'.$key)?GETPOST('AGENDA_EXT_SRC'.$key):$conf->global->$src) . '" size="60"></td>';
|
print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC'.$key.'" value="'. (GETPOST('AGENDA_EXT_SRC'.$key)?GETPOST('AGENDA_EXT_SRC'.$key):$conf->global->$src) . '" size="60"></td>';
|
||||||
|
// Offset TZ
|
||||||
|
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ'.$key.'" value="'. (GETPOST('AGENDA_EXT_OFFSETTZ'.$key)?GETPOST('AGENDA_EXT_OFFSETTZ'.$key):$conf->global->$offsettz) . '" size="2"></td>';
|
||||||
// Color (Possible colors are limited by Google)
|
// Color (Possible colors are limited by Google)
|
||||||
print '<td class="nowrap" align="right">';
|
print '<td class="nowrap" align="right">';
|
||||||
//print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist);
|
//print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist);
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
||||||
* Copyright (C) 2011-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2011-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -615,7 +615,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$i=0;
|
$i=0;
|
||||||
foreach ($listfieldinsert as $f => $value)
|
foreach ($listfieldinsert as $f => $value)
|
||||||
{
|
{
|
||||||
if ($value == 'price' || preg_match('/^amount/i',$value)) {
|
if ($value == 'price' || preg_match('/^amount/i',$value) || preg_match('/^localtax/i',$value) || $value == 'taux') {
|
||||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||||
}
|
}
|
||||||
else if ($value == 'entity') {
|
else if ($value == 'entity') {
|
||||||
@ -663,7 +663,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($listfieldmodify as $field)
|
foreach ($listfieldmodify as $field)
|
||||||
{
|
{
|
||||||
if ($field == 'price' || preg_match('/^amount/i',$field)) {
|
if ($field == 'price' || preg_match('/^amount/i',$field) || preg_match('/^localtax/i',$field) || $field == 'taux') {
|
||||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||||
}
|
}
|
||||||
else if ($field == 'entity') {
|
else if ($field == 'entity') {
|
||||||
@ -1274,17 +1274,20 @@ if ($id)
|
|||||||
$align="center";
|
$align="center";
|
||||||
}
|
}
|
||||||
else if ($fieldlist[$field]=='localtax1') {
|
else if ($fieldlist[$field]=='localtax1') {
|
||||||
|
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||||
if ($obj->localtax1 == 0)
|
if ($obj->localtax1 == 0)
|
||||||
$valuetoshow = '';
|
$valuetoshow = '';
|
||||||
$align="right";
|
$align="right";
|
||||||
}
|
}
|
||||||
else if ($fieldlist[$field]=='localtax2') {
|
else if ($fieldlist[$field]=='localtax2') {
|
||||||
|
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||||
if ($obj->localtax2 == 0)
|
if ($obj->localtax2 == 0)
|
||||||
$valuetoshow = '';
|
$valuetoshow = '';
|
||||||
$align="right";
|
$align="right";
|
||||||
}
|
}
|
||||||
else if (in_array($fieldlist[$field],array('taux','localtax1','localtax2')))
|
else if (in_array($fieldlist[$field],array('taux','localtax1','localtax2')))
|
||||||
{
|
{
|
||||||
|
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||||
$align="right";
|
$align="right";
|
||||||
}
|
}
|
||||||
else if (in_array($fieldlist[$field],array('recuperableonly')))
|
else if (in_array($fieldlist[$field],array('recuperableonly')))
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -168,19 +168,11 @@ else if ($action == 'addcat')
|
|||||||
else if ($action == 'set_SUPPLIER_ORDER_OTHER')
|
else if ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||||
{
|
{
|
||||||
$freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT'); // No alpha here, we want exact string
|
$freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT'); // No alpha here, we want exact string
|
||||||
$doubleapproval = GETPOST('SUPPLIER_ORDER_DOUBLE_APPROVAL');
|
$doubleapproval = GETPOST('SUPPLIER_ORDER_DOUBLE_APPROVAL','alpha');
|
||||||
//$doubleapprovalgroup = GETPOST('SUPPLIER_ORDER_DOUBLE_APPROVAL_GROUP') > 0 ? GETPOST('SUPPLIER_ORDER_DOUBLE_APPROVAL_GROUP') : '';
|
$doubleapproval = price2num($doubleapproval );
|
||||||
|
|
||||||
$res1 = dolibarr_set_const($db, "SUPPLIER_ORDER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
$res1 = dolibarr_set_const($db, "SUPPLIER_ORDER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||||
$res2 = dolibarr_set_const($db, "SUPPLIER_ORDER_DOUBLE_APPROVAL",$doubleapproval,'chaine',0,'',$conf->entity);
|
$res2 = dolibarr_set_const($db, "SUPPLIER_ORDER_DOUBLE_APPROVAL",$doubleapproval,'chaine',0,'',$conf->entity);
|
||||||
/*if (isset($_POST["SUPPLIER_ORDER_DOUBLE_APPROVAL_GROUP"]))
|
|
||||||
{
|
|
||||||
$res3 = dolibarr_set_const($db, "SUPPLIER_ORDER_DOUBLE_APPROVAL_GROUP",$doubleapprovalgroup,'chaine',0,'',$conf->entity);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$res3=1;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// TODO We add/delete permission here until permission can have a condition on a global var
|
// TODO We add/delete permission here until permission can have a condition on a global var
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
|
||||||
@ -486,18 +478,11 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
|||||||
print $langs->trans("UseDoubleApproval").'<br>';
|
print $langs->trans("UseDoubleApproval").'<br>';
|
||||||
print $langs->trans("IfSetToYesDontForgetPermission");
|
print $langs->trans("IfSetToYesDontForgetPermission");
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $form->selectyesno('SUPPLIER_ORDER_DOUBLE_APPROVAL', $conf->global->SUPPLIER_ORDER_DOUBLE_APPROVAL, 1);
|
print '<input type="text" size="3" name="SUPPLIER_ORDER_DOUBLE_APPROVAL" value="'.$conf->global->SUPPLIER_ORDER_DOUBLE_APPROVAL.'">';
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
/*print '<tr '.$bc[$var].'><td>';
|
|
||||||
print $langs->trans("GroupOfUserForSecondApproval").'</td><td>';
|
|
||||||
print $form->select_dolgroups($conf->global->SUPPLIER_ORDER_DOUBLE_APPROVAL_GROUP,'SUPPLIER_ORDER_DOUBLE_APPROVAL_GROUP', 1);
|
|
||||||
print '</td><td align="right">';
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
||||||
print "</td></tr>\n";
|
|
||||||
$var=!$var;*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||||
|
|||||||
@ -87,13 +87,16 @@ if (file_exists($xmlfile))
|
|||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
$var = true;
|
$var = true;
|
||||||
$tmpfilelist = dol_sort_array($file_list['missing'], 'filename');
|
$tmpfilelist = dol_sort_array($file_list['missing'], 'filename');
|
||||||
foreach ($tmpfilelist as $file)
|
if (is_array($tmpfilelist))
|
||||||
{
|
{
|
||||||
$var = !$var;
|
foreach ($tmpfilelist as $file)
|
||||||
print '<tr ' . $bc[$var] . '>';
|
{
|
||||||
print '<td>'.$file['filename'].'</td>' . "\n";
|
$var = !$var;
|
||||||
print '<td align="center">'.$file['expectedmd5'].'</td>' . "\n";
|
print '<tr ' . $bc[$var] . '>';
|
||||||
print "</tr>\n";
|
print '<td>'.$file['filename'].'</td>' . "\n";
|
||||||
|
print '<td align="center">'.$file['expectedmd5'].'</td>' . "\n";
|
||||||
|
print "</tr>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -109,16 +112,19 @@ if (file_exists($xmlfile))
|
|||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
$var = true;
|
$var = true;
|
||||||
$tmpfilelist = dol_sort_array($file_list['updated'], 'filename');
|
$tmpfilelist = dol_sort_array($file_list['updated'], 'filename');
|
||||||
foreach ($tmpfilelist as $file)
|
if (is_array($tmpfilelist))
|
||||||
{
|
{
|
||||||
$var = !$var;
|
foreach ($tmpfilelist as $file)
|
||||||
print '<tr ' . $bc[$var] . '>';
|
{
|
||||||
print '<td>'.$file['filename'].'</td>' . "\n";
|
$var = !$var;
|
||||||
print '<td align="center">'.$file['expectedmd5'].'</td>' . "\n";
|
print '<tr ' . $bc[$var] . '>';
|
||||||
print '<td align="center">'.$file['md5'].'</td>' . "\n";
|
print '<td>'.$file['filename'].'</td>' . "\n";
|
||||||
print '<td align="right">'.dol_print_size(dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename'])).'</td>' . "\n";
|
print '<td align="center">'.$file['expectedmd5'].'</td>' . "\n";
|
||||||
print '<td align="right">'.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']),'dayhour').'</td>' . "\n";
|
print '<td align="center">'.$file['md5'].'</td>' . "\n";
|
||||||
print "</tr>\n";
|
print '<td align="right">'.dol_print_size(dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename'])).'</td>' . "\n";
|
||||||
|
print '<td align="right">'.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']),'dayhour').'</td>' . "\n";
|
||||||
|
print "</tr>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -780,6 +780,8 @@ if ($action == 'create')
|
|||||||
print '<td colspan="3">'.dolGetElementUrl($originid,$origin,1).'</td></tr>';
|
print '<td colspan="3">'.dolGetElementUrl($originid,$origin,1).'</td></tr>';
|
||||||
print '<input type="hidden" name="fk_element" size="10" value="'.GETPOST('originid').'">';
|
print '<input type="hidden" name="fk_element" size="10" value="'.GETPOST('originid').'">';
|
||||||
print '<input type="hidden" name="elementtype" size="10" value="'.GETPOST('origin').'">';
|
print '<input type="hidden" name="elementtype" size="10" value="'.GETPOST('origin').'">';
|
||||||
|
print '<input type="hidden" name="originid" size="10" value="'.GETPOST('originid').'">';
|
||||||
|
print '<input type="hidden" name="origin" size="10" value="'.GETPOST('origin').'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GETPOST("datep") && preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])$/',GETPOST("datep"),$reg))
|
if (GETPOST("datep") && preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])$/',GETPOST("datep"),$reg))
|
||||||
|
|||||||
@ -110,8 +110,8 @@ class ActionComm extends CommonObject
|
|||||||
var $note; // Description
|
var $note; // Description
|
||||||
|
|
||||||
var $userassigned = array(); // Array of user ids
|
var $userassigned = array(); // Array of user ids
|
||||||
var $userownerid; // Id of user owner
|
var $userownerid; // Id of user owner = fk_user_action into table
|
||||||
var $userdoneid; // Id of user done
|
var $userdoneid; // Id of user done (deprecated)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Object user of owner
|
* Object user of owner
|
||||||
@ -456,11 +456,12 @@ class ActionComm extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Load object from database
|
* Load object from database
|
||||||
*
|
*
|
||||||
* @param int $id Id of action to get
|
* @param int $id Id of action to get
|
||||||
* @param string $ref Ref of action to get
|
* @param string $ref Ref of action to get
|
||||||
* @return int <0 if KO, >0 if OK
|
* @param string $ref_ext Ref ext to get
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch($id, $ref='')
|
function fetch($id, $ref='',$ref_ext='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -484,11 +485,12 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= " s.nom as socname,";
|
$sql.= " s.nom as socname,";
|
||||||
$sql.= " u.firstname, u.lastname as lastname";
|
$sql.= " u.firstname, u.lastname as lastname";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a ";
|
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a ";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action=c.id ";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action=c.id ";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
|
||||||
$sql.= " WHERE ";
|
$sql.= " WHERE ";
|
||||||
if ($ref) $sql.= " a.id=".$ref; // No field ref, we use id
|
if ($ref) $sql.= " a.id=".$ref; // No field ref, we use id
|
||||||
|
elseif ($ref_ext) $sql.= " a.ref_ext='".$this->db->escape($ref_ext)."'";
|
||||||
else $sql.= " a.id=".$id;
|
else $sql.= " a.id=".$id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||||
|
|||||||
@ -179,12 +179,13 @@ if (empty($conf->global->AGENDA_DISABLE_EXT))
|
|||||||
$i++;
|
$i++;
|
||||||
$source='AGENDA_EXT_SRC'.$i;
|
$source='AGENDA_EXT_SRC'.$i;
|
||||||
$name='AGENDA_EXT_NAME'.$i;
|
$name='AGENDA_EXT_NAME'.$i;
|
||||||
|
$offsettz='AGENDA_EXT_OFFSETTZ'.$i;
|
||||||
$color='AGENDA_EXT_COLOR'.$i;
|
$color='AGENDA_EXT_COLOR'.$i;
|
||||||
$buggedfile='AGENDA_EXT_BUGGEDFILE'.$i;
|
$buggedfile='AGENDA_EXT_BUGGEDFILE'.$i;
|
||||||
if (! empty($conf->global->$source) && ! empty($conf->global->$name))
|
if (! empty($conf->global->$source) && ! empty($conf->global->$name))
|
||||||
{
|
{
|
||||||
// Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight'
|
// Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight'
|
||||||
$listofextcals[]=array('src'=>$conf->global->$source,'name'=>$conf->global->$name,'color'=>$conf->global->$color,'buggedfile'=>(isset($conf->global->buggedfile)?$conf->global->buggedfile:0));
|
$listofextcals[]=array('src'=>$conf->global->$source,'name'=>$conf->global->$name,'offsettz'=>$conf->global->$offsettz,'color'=>$conf->global->$color,'buggedfile'=>(isset($conf->global->buggedfile)?$conf->global->buggedfile:0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -197,13 +198,14 @@ if (empty($user->conf->AGENDA_DISABLE_EXT))
|
|||||||
$i++;
|
$i++;
|
||||||
$source='AGENDA_EXT_SRC_'.$user->id.'_'.$i;
|
$source='AGENDA_EXT_SRC_'.$user->id.'_'.$i;
|
||||||
$name='AGENDA_EXT_NAME_'.$user->id.'_'.$i;
|
$name='AGENDA_EXT_NAME_'.$user->id.'_'.$i;
|
||||||
|
$offsettz='AGENDA_EXT_OFFSETTZ_'.$user->id.'_'.$i;
|
||||||
$color='AGENDA_EXT_COLOR_'.$user->id.'_'.$i;
|
$color='AGENDA_EXT_COLOR_'.$user->id.'_'.$i;
|
||||||
$enabled='AGENDA_EXT_ENABLED_'.$user->id.'_'.$i;
|
$enabled='AGENDA_EXT_ENABLED_'.$user->id.'_'.$i;
|
||||||
$buggedfile='AGENDA_EXT_BUGGEDFILE_'.$user->id.'_'.$i;
|
$buggedfile='AGENDA_EXT_BUGGEDFILE_'.$user->id.'_'.$i;
|
||||||
if (! empty($user->conf->$source) && ! empty($user->conf->$name))
|
if (! empty($user->conf->$source) && ! empty($user->conf->$name))
|
||||||
{
|
{
|
||||||
// Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight'
|
// Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight'
|
||||||
$listofextcals[]=array('src'=>$user->conf->$source,'name'=>$user->conf->$name,'color'=>$user->conf->$color,'buggedfile'=>(isset($user->conf->buggedfile)?$user->conf->buggedfile:0));
|
$listofextcals[]=array('src'=>$user->conf->$source,'name'=>$user->conf->$name,'offsettz'=>$user->conf->$offsettz,'color'=>$user->conf->$color,'buggedfile'=>(isset($user->conf->buggedfile)?$user->conf->buggedfile:0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -507,8 +509,12 @@ if ($resql)
|
|||||||
// Create a new object action
|
// Create a new object action
|
||||||
$event=new ActionComm($db);
|
$event=new ActionComm($db);
|
||||||
$event->id=$obj->id;
|
$event->id=$obj->id;
|
||||||
$event->datep=$db->jdate($obj->datep); // datep and datef are GMT date
|
|
||||||
|
$event->datep=$db->jdate($obj->datep); // datep and datef are GMT date. Example: 1970-01-01 01:00:00, jdate will return 0 if TZ of PHP server is Europe/Berlin
|
||||||
$event->datef=$db->jdate($obj->datep2);
|
$event->datef=$db->jdate($obj->datep2);
|
||||||
|
//var_dump($obj->datep);
|
||||||
|
//var_dump($event->datep);
|
||||||
|
|
||||||
$event->type_code=$obj->type_code;
|
$event->type_code=$obj->type_code;
|
||||||
$event->type_label=$obj->type_label;
|
$event->type_label=$obj->type_label;
|
||||||
$event->libelle=$obj->label;
|
$event->libelle=$obj->label;
|
||||||
@ -664,6 +670,7 @@ if (count($listofextcals))
|
|||||||
{
|
{
|
||||||
$url=$extcal['src']; // Example: https://www.google.com/calendar/ical/eldy10%40gmail.com/private-cde92aa7d7e0ef6110010a821a2aaeb/basic.ics
|
$url=$extcal['src']; // Example: https://www.google.com/calendar/ical/eldy10%40gmail.com/private-cde92aa7d7e0ef6110010a821a2aaeb/basic.ics
|
||||||
$namecal = $extcal['name'];
|
$namecal = $extcal['name'];
|
||||||
|
$offsettz = $extcal['offsettz'];
|
||||||
$colorcal = $extcal['color'];
|
$colorcal = $extcal['color'];
|
||||||
$buggedfile = $extcal['buggedfile'];
|
$buggedfile = $extcal['buggedfile'];
|
||||||
//print "url=".$url." namecal=".$namecal." colorcal=".$colorcal." buggedfile=".$buggedfile;
|
//print "url=".$url." namecal=".$namecal." colorcal=".$colorcal." buggedfile=".$buggedfile;
|
||||||
@ -805,12 +812,22 @@ if (count($listofextcals))
|
|||||||
{
|
{
|
||||||
$datestart=$icalevent['DTSTART'];
|
$datestart=$icalevent['DTSTART'];
|
||||||
$dateend=$icalevent['DTEND'];
|
$dateend=$icalevent['DTEND'];
|
||||||
|
|
||||||
|
$datestart+=+($offsettz * 3600);
|
||||||
|
$dateend+=+($offsettz * 3600);
|
||||||
|
|
||||||
$addevent=true;
|
$addevent=true;
|
||||||
|
//var_dump($offsettz);
|
||||||
|
//var_dump(dol_print_date($datestart, 'dayhour', 'gmt'));
|
||||||
}
|
}
|
||||||
elseif (isset($icalevent['DTSTART']['unixtime'])) // File contains a local timezone + a TZ (for example when using bluemind)
|
elseif (isset($icalevent['DTSTART']['unixtime'])) // File contains a local timezone + a TZ (for example when using bluemind)
|
||||||
{
|
{
|
||||||
$datestart=$icalevent['DTSTART']['unixtime'];
|
$datestart=$icalevent['DTSTART']['unixtime'];
|
||||||
$dateend=$icalevent['DTEND']['unixtime'];
|
$dateend=$icalevent['DTEND']['unixtime'];
|
||||||
|
|
||||||
|
$datestart+=+($offsettz * 3600);
|
||||||
|
$dateend+=+($offsettz * 3600);
|
||||||
|
|
||||||
// $buggedfile is set to uselocalandtznodaylight if conf->global->AGENDA_EXT_BUGGEDFILEx = 'uselocalandtznodaylight'
|
// $buggedfile is set to uselocalandtznodaylight if conf->global->AGENDA_EXT_BUGGEDFILEx = 'uselocalandtznodaylight'
|
||||||
if ($buggedfile === 'uselocalandtznodaylight') // unixtime is a local date that does not take daylight into account, TZID is +1 for example for 'Europe/Paris' in summer instead of 2
|
if ($buggedfile === 'uselocalandtznodaylight') // unixtime is a local date that does not take daylight into account, TZID is +1 for example for 'Europe/Paris' in summer instead of 2
|
||||||
{
|
{
|
||||||
@ -1308,7 +1325,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
// Hour start
|
// Hour start
|
||||||
if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour)
|
if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour)
|
||||||
{
|
{
|
||||||
$daterange.=dol_print_date($event->date_start_in_calendar,'%H:%M');
|
$daterange.=dol_print_date($event->date_start_in_calendar,'%H:%M'); // Il faudrait utiliser ici tzuser, mais si on ne peut pas car qd on rentre un date dans fiche action, en input la conversion local->gmt se base sur le TZ server et non user
|
||||||
if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar)
|
if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar)
|
||||||
{
|
{
|
||||||
if ($tmpyearstart == $tmpyearend && $tmpmonthstart == $tmpmonthend && $tmpdaystart == $tmpdayend)
|
if ($tmpyearstart == $tmpyearend && $tmpmonthstart == $tmpmonthend && $tmpdaystart == $tmpdayend)
|
||||||
@ -1328,7 +1345,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar)
|
if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar)
|
||||||
{
|
{
|
||||||
if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour)
|
if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour)
|
||||||
$daterange.=dol_print_date($event->date_end_in_calendar,'%H:%M');
|
$daterange.=dol_print_date($event->date_end_in_calendar,'%H:%M'); // Il faudrait utiliser ici tzuser, mais si on ne peut pas car qd on rentre un date dans fiche action, en input la conversion local->gmt se base sur le TZ server et non user
|
||||||
}
|
}
|
||||||
//print $daterange;
|
//print $daterange;
|
||||||
if ($event->type_code != 'ICALEVENT')
|
if ($event->type_code != 'ICALEVENT')
|
||||||
|
|||||||
@ -254,8 +254,22 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print_barre_liste($newtitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $link, $num, 0, '', 0, $nav);
|
$s=$newtitle;
|
||||||
//print '<br>';
|
|
||||||
|
// Calendars from hooks
|
||||||
|
$parameters=array(); $object=null;
|
||||||
|
$reshook=$hookmanager->executeHooks('addCalendarChoice',$parameters,$object,$action);
|
||||||
|
if (empty($reshook))
|
||||||
|
{
|
||||||
|
$s.= $hookmanager->resPrint;
|
||||||
|
}
|
||||||
|
elseif ($reshook > 1)
|
||||||
|
{
|
||||||
|
$s = $hookmanager->resPrint;
|
||||||
|
}
|
||||||
|
|
||||||
|
print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $link, $num, 0, '', 0, $nav);
|
||||||
|
|
||||||
|
|
||||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'?'.$param.'">'."\n";
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'?'.$param.'">'."\n";
|
||||||
|
|
||||||
|
|||||||
@ -317,14 +317,27 @@ if ($conf->use_javascript_ajax)
|
|||||||
$s.='<div class="nowrap float"><input type="checkbox" id="check_ext' . $htmlname . '" name="check_ext' . $htmlname . '" checked> ' . $val ['name'] . ' </div>';
|
$s.='<div class="nowrap float"><input type="checkbox" id="check_ext' . $htmlname . '" name="check_ext' . $htmlname . '" checked> ' . $val ['name'] . ' </div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//$s.='<div class="nowrap float"><input type="checkbox" id="check_birthday" name="check_birthday"> '.$langs->trans("AgendaShowBirthdayEvents").' </div>';
|
||||||
|
|
||||||
|
// Calendars from hooks
|
||||||
|
$parameters=array(); $object=null;
|
||||||
|
$reshook=$hookmanager->executeHooks('addCalendarChoice',$parameters,$object,$action);
|
||||||
|
if (empty($reshook))
|
||||||
|
{
|
||||||
|
$s.= $hookmanager->resPrint;
|
||||||
|
}
|
||||||
|
elseif ($reshook > 1)
|
||||||
|
{
|
||||||
|
$s = $hookmanager->resPrint;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//$s.='<div class="nowrap float"><input type="checkbox" id="check_birthday" name="check_birthday"> '.$langs->trans("AgendaShowBirthdayEvents").' </div>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$link='';
|
$link='';
|
||||||
print_fiche_titre($s,$link.' '.$nav, '');
|
print_fiche_titre($s, $link.' '.$nav, '');
|
||||||
|
|
||||||
|
|
||||||
// Get event in an array
|
// Get event in an array
|
||||||
@ -681,7 +694,7 @@ foreach ($usernames as $username)
|
|||||||
{
|
{
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo '<td class="cal_current_month cal_peruserviewname"'.($var?' style="background: #F8F8F8"':'').'>' . $username->getNomUrl(1). '</td>';
|
echo '<td class="cal_current_month cal_peruserviewname'.($var?' cal_impair':'').'">' . $username->getNomUrl(1). '</td>';
|
||||||
$tmpday = $sav;
|
$tmpday = $sav;
|
||||||
|
|
||||||
// Lopp on each day of week
|
// Lopp on each day of week
|
||||||
@ -1009,8 +1022,8 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($h == $begin_h) echo '<td class="'.$style.'_peruserleft cal_peruser"'.($var?' style="background: #F8F8F8"':'').'>';
|
if ($h == $begin_h) echo '<td class="'.$style.'_peruserleft cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'">';
|
||||||
else echo '<td class="'.$style.' cal_peruser"'.($var?' style="background: #F8F8F8"':'').'>';
|
else echo '<td class="'.$style.' cal_peruser'.($var?' cal_impair '.$style.'_impair':'').'">';
|
||||||
if (count($cases1[$h]) == 1) // 1 seul evenement
|
if (count($cases1[$h]) == 1) // 1 seul evenement
|
||||||
{
|
{
|
||||||
$ids=array_keys($cases1[$h]);
|
$ids=array_keys($cases1[$h]);
|
||||||
|
|||||||
@ -38,24 +38,26 @@ print_titre($langs->trans('RelatedAskPriceSupplier'));
|
|||||||
<td align="center"><?php echo $langs->trans("Date"); ?></td>
|
<td align="center"><?php echo $langs->trans("Date"); ?></td>
|
||||||
<td align="right"><?php echo $langs->trans("AmountHTShort"); ?></td>
|
<td align="right"><?php echo $langs->trans("AmountHTShort"); ?></td>
|
||||||
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$var=true;
|
$var=true;
|
||||||
$total=0;
|
$total=0;
|
||||||
foreach($linkedObjectBlock as $object)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
?>
|
?>
|
||||||
<tr <?php echo $bc[$var]; ?> ><td>
|
<tr <?php echo $bc[$var]; ?> ><td>
|
||||||
<a href="<?php echo DOL_URL_ROOT.'/comm/askpricesupplier/card.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowAskPriceSupplier"),"askpricesupplier").' '.$object->ref; ?></a></td>
|
<a href="<?php echo DOL_URL_ROOT.'/comm/askpricesupplier/card.php?id='.$objectlink->id ?>"><?php echo img_object($langs->trans("ShowAskPriceSupplier"),"askpricesupplier").' '.$objectlink->ref; ?></a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td align="center"><?php echo dol_print_date($object->datec,'day'); ?></td>
|
<td align="center"><?php echo dol_print_date($objectlink->datec,'day'); ?></td>
|
||||||
<td align="right"><?php
|
<td align="right"><?php
|
||||||
if ($user->rights->askpricesupplier->lire) {
|
if ($user->rights->askpricesupplier->lire) {
|
||||||
$total = $total + $object->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($object->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
|
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -67,7 +69,8 @@ foreach($linkedObjectBlock as $object)
|
|||||||
if ($user->rights->askpricesupplier->lire) {
|
if ($user->rights->askpricesupplier->lire) {
|
||||||
echo price($total);
|
echo price($total);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td> </td>
|
<td></td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
|
|||||||
@ -103,6 +103,8 @@ if ($id > 0 || ! empty($ref)) {
|
|||||||
$hookmanager->initHooks(array('propalcard','globalcard'));
|
$hookmanager->initHooks(array('propalcard','globalcard'));
|
||||||
|
|
||||||
$permissionnote = $user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
|
$permissiondellink=$user->rights->propale->creer; // Used by the include of actions_dellink.inc.php
|
||||||
|
$permissiontoedit = $user->rights->propale->creer; // Used by the include of actions_lineupdown.inc.php
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -117,7 +119,11 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
if ($cancel) $action = '';
|
if ($cancel) $action = '';
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be include, not includ_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Action clone object
|
// Action clone object
|
||||||
if ($action == 'confirm_clone' && $confirm == 'yes')
|
if ($action == 'confirm_clone' && $confirm == 'yes')
|
||||||
@ -1133,47 +1139,7 @@ if (empty($reshook))
|
|||||||
$result=$object->setShippingMethod(GETPOST('shipping_method_id', 'int'));
|
$result=$object->setShippingMethod(GETPOST('shipping_method_id', 'int'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
else if ($action == 'update_extras') {
|
||||||
* Ordonnancement des lignes
|
|
||||||
*/
|
|
||||||
|
|
||||||
else if ($action == 'up' && $user->rights->propal->creer) {
|
|
||||||
$object->line_up(GETPOST('rowid'));
|
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
|
||||||
// Define output language
|
|
||||||
$outputlangs = $langs;
|
|
||||||
if (! empty($conf->global->MAIN_MULTILANGS)) {
|
|
||||||
$outputlangs = new Translate("", $conf);
|
|
||||||
$newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang);
|
|
||||||
$outputlangs->setDefaultLang($newlang);
|
|
||||||
}
|
|
||||||
$ret = $object->fetch($id); // Reload to get new records
|
|
||||||
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
|
||||||
}
|
|
||||||
|
|
||||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id . '#' . GETPOST('rowid'));
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
else if ($action == 'down' && $user->rights->propal->creer) {
|
|
||||||
$object->line_down(GETPOST('rowid'));
|
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
|
||||||
// Define output language
|
|
||||||
$outputlangs = $langs;
|
|
||||||
if (! empty($conf->global->MAIN_MULTILANGS)) {
|
|
||||||
$outputlangs = new Translate("", $conf);
|
|
||||||
$newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang);
|
|
||||||
$outputlangs->setDefaultLang($newlang);
|
|
||||||
}
|
|
||||||
$ret = $object->fetch($id); // Reload to get new records
|
|
||||||
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
|
||||||
}
|
|
||||||
|
|
||||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id . '#' . GETPOST('rowid'));
|
|
||||||
exit();
|
|
||||||
} else if ($action == 'update_extras') {
|
|
||||||
// Fill array 'array_options' with data from update form
|
// Fill array 'array_options' with data from update form
|
||||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||||
|
|||||||
@ -3138,11 +3138,12 @@ class PropaleLigne extends CommonObjectLine
|
|||||||
if (empty($this->total_localtax2)) $this->total_localtax2=0;
|
if (empty($this->total_localtax2)) $this->total_localtax2=0;
|
||||||
if (empty($this->rang)) $this->rang=0;
|
if (empty($this->rang)) $this->rang=0;
|
||||||
if (empty($this->remise)) $this->remise=0;
|
if (empty($this->remise)) $this->remise=0;
|
||||||
if (empty($this->remise_percent)) $this->remise_percent=0;
|
if (empty($this->remise_percent) || ! is_numeric($this->remise_percent)) $this->remise_percent=0;
|
||||||
if (empty($this->info_bits)) $this->info_bits=0;
|
if (empty($this->info_bits)) $this->info_bits=0;
|
||||||
if (empty($this->special_code)) $this->special_code=0;
|
if (empty($this->special_code)) $this->special_code=0;
|
||||||
if (empty($this->fk_parent_line)) $this->fk_parent_line=0;
|
if (empty($this->fk_parent_line)) $this->fk_parent_line=0;
|
||||||
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
|
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
|
||||||
|
if (! is_numeric($this->qty)) $this->qty = 0;
|
||||||
|
|
||||||
if (empty($this->pa_ht)) $this->pa_ht=0;
|
if (empty($this->pa_ht)) $this->pa_ht=0;
|
||||||
|
|
||||||
|
|||||||
@ -266,8 +266,11 @@ print '<table class="border" width="100%">';
|
|||||||
print '<tr height="24">';
|
print '<tr height="24">';
|
||||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("NbOfProposals").'</td>';
|
print '<td align="center">'.$langs->trans("NbOfProposals").'</td>';
|
||||||
|
print '<td align="center">%</td>';
|
||||||
print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
|
print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
|
||||||
|
print '<td align="center">%</td>';
|
||||||
print '<td align="center">'.$langs->trans("AmountAverage").'</td>';
|
print '<td align="center">'.$langs->trans("AmountAverage").'</td>';
|
||||||
|
print '<td align="center">%</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$oldyear=0;
|
$oldyear=0;
|
||||||
@ -287,8 +290,11 @@ foreach ($data as $val)
|
|||||||
print '<tr height="24">';
|
print '<tr height="24">';
|
||||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||||
print '<td align="right">'.$val['nb'].'</td>';
|
print '<td align="right">'.$val['nb'].'</td>';
|
||||||
|
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
|
print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
|
||||||
|
print '<td align="right" style="'.(($val['total_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['total_diff']).'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['avg'],'MT'),1).'</td>';
|
print '<td align="right">'.price(price2num($val['avg'],'MT'),1).'</td>';
|
||||||
|
print '<td align="right" style="'.(($val['avg_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['avg_diff']).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$oldyear=$year;
|
$oldyear=$year;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,24 +43,26 @@ print_titre($langs->trans('RelatedCommercialProposals'));
|
|||||||
<td align="center"><?php echo $langs->trans("Date"); ?></td>
|
<td align="center"><?php echo $langs->trans("Date"); ?></td>
|
||||||
<td align="right"><?php echo $langs->trans("AmountHTShort"); ?></td>
|
<td align="right"><?php echo $langs->trans("AmountHTShort"); ?></td>
|
||||||
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$var=true;
|
$var=true;
|
||||||
$total=0;
|
$total=0;
|
||||||
foreach($linkedObjectBlock as $object)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
?>
|
?>
|
||||||
<tr <?php echo $bc[$var]; ?> >
|
<tr <?php echo $bc[$var]; ?> >
|
||||||
<td><?php echo $object->getNomUrl(1); ?></td>
|
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
<td><?php echo $object->ref_client; ?></td>
|
<td><?php echo $objectlink->ref_client; ?></td>
|
||||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
<td align="center"><?php echo dol_print_date($objectlink->date,'day'); ?></td>
|
||||||
<td align="right"><?php
|
<td align="right"><?php
|
||||||
if ($user->rights->propale->lire) {
|
if ($user->rights->propale->lire) {
|
||||||
$total = $total + $object->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($object->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
|
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -72,7 +74,8 @@ foreach($linkedObjectBlock as $object)
|
|||||||
if ($user->rights->propale->lire) {
|
if ($user->rights->propale->lire) {
|
||||||
echo price($total);
|
echo price($total);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td> </td>
|
<td></td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@ -93,8 +93,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
|
|||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('ordercard','globalcard'));
|
$hookmanager->initHooks(array('ordercard','globalcard'));
|
||||||
|
|
||||||
$permissionnote = $user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->rights->commande->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
$permissionedit = $user->rights->commande->creer; // Used by the include of actions_lineupdown.inc.php
|
$permissiondellink = $user->rights->commande->creer; // Used by the include of actions_dellink.inc.php
|
||||||
|
$permissionedit = $user->rights->commande->creer; // Used by the include of actions_lineupdown.inc.php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -112,6 +113,8 @@ if (empty($reshook))
|
|||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Action clone object
|
// Action clone object
|
||||||
|
|||||||
@ -279,8 +279,11 @@ print '<table class="border" width="100%">';
|
|||||||
print '<tr height="24">';
|
print '<tr height="24">';
|
||||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("NbOfOrders").'</td>';
|
print '<td align="center">'.$langs->trans("NbOfOrders").'</td>';
|
||||||
|
print '<td align="center">%</td>';
|
||||||
print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
|
print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
|
||||||
|
print '<td align="center">%</td>';
|
||||||
print '<td align="center">'.$langs->trans("AmountAverage").'</td>';
|
print '<td align="center">'.$langs->trans("AmountAverage").'</td>';
|
||||||
|
print '<td align="center">%</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$oldyear=0;
|
$oldyear=0;
|
||||||
@ -302,8 +305,11 @@ foreach ($data as $val)
|
|||||||
print '<tr height="24">';
|
print '<tr height="24">';
|
||||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||||
print '<td align="right">'.$val['nb'].'</td>';
|
print '<td align="right">'.$val['nb'].'</td>';
|
||||||
|
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
|
print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
|
||||||
|
print '<td align="right" style="'.(($val['total_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['total_diff']).'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['avg'],'MT'),1).'</td>';
|
print '<td align="right">'.price(price2num($val['avg'],'MT'),1).'</td>';
|
||||||
|
print '<td align="right" style="'.(($val['avg_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['avg_diff']).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$oldyear=$year;
|
$oldyear=$year;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,24 +40,26 @@ print_titre($langs->trans('RelatedCustomerOrders'));
|
|||||||
<td align="center"><?php echo $langs->trans("Date"); ?></td>
|
<td align="center"><?php echo $langs->trans("Date"); ?></td>
|
||||||
<td align="right"><?php echo $langs->trans("AmountHTShort"); ?></td>
|
<td align="right"><?php echo $langs->trans("AmountHTShort"); ?></td>
|
||||||
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$var=true;
|
$var=true;
|
||||||
$total=0;
|
$total=0;
|
||||||
foreach($linkedObjectBlock as $object)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
?>
|
?>
|
||||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
||||||
<td><?php echo $object->getNomUrl(1); ?></td>
|
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
<td align="center"><?php echo $object->ref_client; ?></td>
|
<td align="center"><?php echo $objectlink->ref_client; ?></td>
|
||||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
<td align="center"><?php echo dol_print_date($objectlink->date,'day'); ?></td>
|
||||||
<td align="right"><?php
|
<td align="right"><?php
|
||||||
if ($user->rights->commande->lire) {
|
if ($user->rights->commande->lire) {
|
||||||
$total = $total + $object->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($object->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
|
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -69,7 +71,8 @@ foreach($linkedObjectBlock as $object)
|
|||||||
if ($user->rights->commande->lire) {
|
if ($user->rights->commande->lire) {
|
||||||
echo price($total);
|
echo price($total);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td> </td>
|
<td></td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@@2byte.es>
|
||||||
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2011-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2011-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2014-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2014-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -579,7 +579,7 @@ else
|
|||||||
|
|
||||||
// State
|
// State
|
||||||
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
||||||
if ($account->fk_departement > 0) print getState($account->fk_departement);
|
if ($account->state_id > 0) print getState($account->state_id);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Conciliate
|
// Conciliate
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1263,7 +1263,7 @@ class AccountLine extends CommonObject
|
|||||||
if ($this->rappro)
|
if ($this->rappro)
|
||||||
{
|
{
|
||||||
// Protection to avoid any delete of consolidated lines
|
// Protection to avoid any delete of consolidated lines
|
||||||
$this->error="DeleteNotPossibleLineIsConsolidated";
|
$this->error="ErrorDeleteNotPossibleLineIsConsolidated";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -181,7 +181,7 @@ if ($resql)
|
|||||||
$var=True;
|
$var=True;
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("Reconciliation").': <a href="account.php?account='.$acct->id.'">'.$acct->label.'</a>','title_bank.png');
|
print_fiche_titre($langs->trans("Reconciliation").': <a href="account.php?account='.$acct->id.'">'.$acct->label.'</a>', '', 'title_bank.png');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Show last bank receipts
|
// Show last bank receipts
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2011-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
*
|
*
|
||||||
|
|||||||
@ -108,6 +108,8 @@ if ($id > 0 || ! empty($ref)) {
|
|||||||
$hookmanager->initHooks(array('invoicecard','globalcard'));
|
$hookmanager->initHooks(array('invoicecard','globalcard'));
|
||||||
|
|
||||||
$permissionnote = $user->rights->facture->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->rights->facture->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
|
$permissiondellink=$user->rights->facture->creer; // Used by the include of actions_dellink.inc.php
|
||||||
|
$permissiontoedit = $user->rights->facture->creer; // Used by the include of actions_lineupdonw.inc.php
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -120,7 +122,11 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
|||||||
|
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be include, not includ_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Action clone object
|
// Action clone object
|
||||||
if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->facture->creer) {
|
if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->facture->creer) {
|
||||||
@ -1644,54 +1650,6 @@ if (empty($reshook))
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modify line position (up)
|
|
||||||
else if ($action == 'up' && $user->rights->facture->creer) {
|
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
$object->line_up($_GET ['rowid']);
|
|
||||||
|
|
||||||
// Define output language
|
|
||||||
$outputlangs = $langs;
|
|
||||||
$newlang = '';
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id']))
|
|
||||||
$newlang = $_REQUEST['lang_id'];
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
|
|
||||||
$newlang = $object->thirdparty->default_lang;
|
|
||||||
if (! empty($newlang)) {
|
|
||||||
$outputlangs = new Translate("", $conf);
|
|
||||||
$outputlangs->setDefaultLang($newlang);
|
|
||||||
}
|
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
|
||||||
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
|
||||||
}
|
|
||||||
|
|
||||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '#' . $_GET ['rowid']);
|
|
||||||
exit();
|
|
||||||
} // Modify line position (down)
|
|
||||||
else if ($action == 'down' && $user->rights->facture->creer) {
|
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
$object->line_down($_GET ['rowid']);
|
|
||||||
|
|
||||||
// Define output language
|
|
||||||
$outputlangs = $langs;
|
|
||||||
$newlang = '';
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id']))
|
|
||||||
$newlang = $_REQUEST['lang_id'];
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
|
|
||||||
$newlang = $object->thirdparty->default_lang;
|
|
||||||
if (! empty($newlang)) {
|
|
||||||
$outputlangs = new Translate("", $conf);
|
|
||||||
$outputlangs->setDefaultLang($newlang);
|
|
||||||
}
|
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
|
||||||
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
|
||||||
}
|
|
||||||
|
|
||||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '#' . $_GET ['rowid']);
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Link invoice to order
|
// Link invoice to order
|
||||||
if (GETPOST('linkedOrder')) {
|
if (GETPOST('linkedOrder')) {
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -218,6 +218,13 @@ complete_head_from_modules($conf,$langs,null,$head,$h,$type);
|
|||||||
|
|
||||||
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
||||||
|
|
||||||
|
$tmp_companies = $form->select_thirdparty_list($socid,'socid',$filter,1, 0, 0, array(), '', 1);
|
||||||
|
//Array passed as an argument to Form::selectarray to build a proper select input
|
||||||
|
$companies = array();
|
||||||
|
|
||||||
|
foreach ($tmp_companies as $value) {
|
||||||
|
$companies[$value['value']] = $value['label'];
|
||||||
|
}
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
@ -233,7 +240,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||||
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
||||||
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
||||||
print $form->select_company($socid,'socid',$filter,1);
|
print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 100%"');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// User
|
// User
|
||||||
print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
|
print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
|
||||||
@ -256,8 +263,11 @@ print '<table class="border" width="100%">';
|
|||||||
print '<tr height="24">';
|
print '<tr height="24">';
|
||||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("NumberOfBills").'</td>';
|
print '<td align="center">'.$langs->trans("NumberOfBills").'</td>';
|
||||||
|
print '<td align="center">%</td>';
|
||||||
print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
|
print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
|
||||||
|
print '<td align="center">%</td>';
|
||||||
print '<td align="center">'.$langs->trans("AmountAverage").'</td>';
|
print '<td align="center">'.$langs->trans("AmountAverage").'</td>';
|
||||||
|
print '<td align="center">%</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$oldyear=0;
|
$oldyear=0;
|
||||||
@ -277,8 +287,11 @@ foreach ($data as $val)
|
|||||||
print '<tr height="24">';
|
print '<tr height="24">';
|
||||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||||
print '<td align="right">'.$val['nb'].'</td>';
|
print '<td align="right">'.$val['nb'].'</td>';
|
||||||
|
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
|
print '<td align="right">'.price(price2num($val['total'],'MT'),1).'</td>';
|
||||||
|
print '<td align="right" style="'.(($val['total_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['total_diff']).'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['avg'],'MT'),1).'</td>';
|
print '<td align="right">'.price(price2num($val['avg'],'MT'),1).'</td>';
|
||||||
|
print '<td align="right" style="'.(($val['avg_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['avg_diff']).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$oldyear=$year;
|
$oldyear=$year;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,24 +39,26 @@ print_titre($langs->trans("RelatedCustomerInvoices"));
|
|||||||
<td align="center"><?php echo $langs->trans("Date"); ?></td>
|
<td align="center"><?php echo $langs->trans("Date"); ?></td>
|
||||||
<td align="right"><?php echo $langs->trans("AmountHTShort"); ?></td>
|
<td align="right"><?php echo $langs->trans("AmountHTShort"); ?></td>
|
||||||
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
<td align="right"><?php echo $langs->trans("Status"); ?></td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$var=true;
|
$var=true;
|
||||||
$total=0;
|
$total=0;
|
||||||
foreach($linkedObjectBlock as $object)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
?>
|
?>
|
||||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
|
||||||
<td><?php echo $object->getNomUrl(1); ?></td>
|
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
<td align="center"><?php echo $object->ref_client; ?></td>
|
<td align="center"><?php echo $objectlink->ref_client; ?></td>
|
||||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
<td align="center"><?php echo dol_print_date($objectlink->date,'day'); ?></td>
|
||||||
<td align="right"><?php
|
<td align="right"><?php
|
||||||
if ($user->rights->facture->lire) {
|
if ($user->rights->facture->lire) {
|
||||||
$total = $total + $object->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($object->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
|
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -67,7 +69,8 @@ foreach($linkedObjectBlock as $object)
|
|||||||
if ($user->rights->facture->lire) {
|
if ($user->rights->facture->lire) {
|
||||||
echo price($total);
|
echo price($total);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td> </td>
|
<td></td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
|
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
|
||||||
* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2012-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||||
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2012 Alexandre spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2011-2012 Alexandre spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||||
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2012 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2011-2012 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -460,7 +460,7 @@ class RemiseCheque extends CommonObject
|
|||||||
$response = new WorkboardResponse();
|
$response = new WorkboardResponse();
|
||||||
$response->warning_delay=$conf->bank->cheque->warning_delay/60/60/24;
|
$response->warning_delay=$conf->bank->cheque->warning_delay/60/60/24;
|
||||||
$response->label=$langs->trans("BankChecksToReceipt");
|
$response->label=$langs->trans("BankChecksToReceipt");
|
||||||
$response->url=DOL_URL_ROOT.'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=accountancy';
|
$response->url=DOL_URL_ROOT.'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank';
|
||||||
$response->img=img_object($langs->trans("BankChecksToReceipt"),"payment");
|
$response->img=img_object($langs->trans("BankChecksToReceipt"),"payment");
|
||||||
|
|
||||||
while ($obj=$this->db->fetch_object($resql))
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -87,7 +87,7 @@ class RejetPrelevement
|
|||||||
|
|
||||||
dol_syslog("RejetPrelevement::Create id $id");
|
dol_syslog("RejetPrelevement::Create id $id");
|
||||||
$bankaccount = $conf->global->PRELEVEMENT_ID_BANKACCOUNT;
|
$bankaccount = $conf->global->PRELEVEMENT_ID_BANKACCOUNT;
|
||||||
$facs = $this->getListInvoices();
|
$facs = $this->getListInvoices(1);
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ class RejetPrelevement
|
|||||||
for ($i = 0; $i < $num; $i++)
|
for ($i = 0; $i < $num; $i++)
|
||||||
{
|
{
|
||||||
$fac = new Facture($this->db);
|
$fac = new Facture($this->db);
|
||||||
$fac->fetch($facs[$i]);
|
$fac->fetch($facs[$i][0]);
|
||||||
|
|
||||||
// Make a negative payment
|
// Make a negative payment
|
||||||
$pai = new Paiement($this->db);
|
$pai = new Paiement($this->db);
|
||||||
@ -144,7 +144,7 @@ class RejetPrelevement
|
|||||||
* PHP installs sends only the part integer negative
|
* PHP installs sends only the part integer negative
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$pai->amounts[$facs[$i]] = price2num($fac->total_ttc * -1);
|
$pai->amounts[$facs[$i][0]] = price2num($facs[$i][1] * -1);
|
||||||
$pai->datepaye = $date_rejet;
|
$pai->datepaye = $date_rejet;
|
||||||
$pai->paiementid = 3; // type of payment: withdrawal
|
$pai->paiementid = 3; // type of payment: withdrawal
|
||||||
$pai->num_paiement = $fac->ref;
|
$pai->num_paiement = $fac->ref;
|
||||||
@ -152,7 +152,7 @@ class RejetPrelevement
|
|||||||
if ($pai->create($this->user) < 0) // we call with no_commit
|
if ($pai->create($this->user) < 0) // we call with no_commit
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
dol_syslog("RejetPrelevement::Create Error creation payment invoice ".$facs[$i]);
|
dol_syslog("RejetPrelevement::Create Error creation payment invoice ".$facs[$i][0]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -270,22 +270,24 @@ class RejetPrelevement
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the list of invoices
|
* Retrieve the list of invoices
|
||||||
*
|
*
|
||||||
* @return array
|
* @param int $amounts If you want to get the amount of the order for each invoice
|
||||||
|
* @return array Array List of invoices related to the withdrawal line
|
||||||
|
* @TODO A withdrawal line is today linked to one and only one invoice. So the function should return only one object ?
|
||||||
*/
|
*/
|
||||||
private function getListInvoices()
|
private function getListInvoices($amounts=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$arr = array();
|
$arr = array();
|
||||||
|
|
||||||
//Returns all invoices of a withdrawal
|
//Returns all invoices of a withdrawal
|
||||||
$sql = "SELECT f.rowid as facid";
|
$sql = "SELECT f.rowid as facid, pl.amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_facture as pf";
|
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_facture as pf";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON (pf.fk_facture = f.rowid)";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."prelevement_lignes as pl ON (pf.fk_prelevement_lignes = pl.rowid)";
|
||||||
$sql.= " WHERE pf.fk_prelevement_lignes = ".$this->id;
|
$sql.= " WHERE pf.fk_prelevement_lignes = ".$this->id;
|
||||||
$sql.= " AND pf.fk_facture = f.rowid";
|
|
||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
@ -299,7 +301,14 @@ class RejetPrelevement
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $this->db->fetch_row($resql);
|
$row = $this->db->fetch_row($resql);
|
||||||
$arr[$i] = $row[0];
|
if (!$amounts) $arr[$i] = $row[0];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$arr[$i] = array(
|
||||||
|
$row[0],
|
||||||
|
$row[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -307,7 +316,7 @@ class RejetPrelevement
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_syslog("RejetPrelevement Erreur");
|
dol_syslog("getListInvoices", LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $arr;
|
return $arr;
|
||||||
|
|||||||
@ -554,13 +554,20 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
|
|||||||
|
|
||||||
if ($conf->salaries->enabled)
|
if ($conf->salaries->enabled)
|
||||||
{
|
{
|
||||||
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
|
$column = 'p.datev';
|
||||||
|
} else {
|
||||||
|
$column = 'p.datep';
|
||||||
|
}
|
||||||
|
|
||||||
print '<tr><td colspan="4">'.$langs->trans("Salaries").'</td></tr>';
|
print '<tr><td colspan="4">'.$langs->trans("Salaries").'</td></tr>';
|
||||||
$sql = "SELECT u.rowid, u.firstname, u.lastname, p.fk_user, p.label as label, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
$sql = "SELECT u.rowid, u.firstname, u.lastname, p.fk_user, p.label as label, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user";
|
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user";
|
||||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
$sql.= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'";
|
||||||
|
|
||||||
$sql.= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm";
|
$sql.= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm";
|
||||||
$sql.= " ORDER BY u.firstname";
|
$sql.= " ORDER BY u.firstname";
|
||||||
|
|
||||||
|
|||||||
@ -477,9 +477,16 @@ $reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$acti
|
|||||||
/*
|
/*
|
||||||
* Salaries
|
* Salaries
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
|
$column = 'p.datev';
|
||||||
|
} else {
|
||||||
|
$column = 'p.datep';
|
||||||
|
}
|
||||||
|
|
||||||
$subtotal_ht = 0;
|
$subtotal_ht = 0;
|
||||||
$subtotal_ttc = 0;
|
$subtotal_ttc = 0;
|
||||||
$sql = "SELECT p.label as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
$sql = "SELECT p.label as nom, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY p.label, dm";
|
$sql.= " GROUP BY p.label, dm";
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2011-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
|
* Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2011-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
/* Copyright (C) 2011-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
*
|
*
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/compta/sociales/charges.php
|
* \file htdocs/compta/sociales/charges.php
|
||||||
* \ingroup tax
|
* \ingroup tax
|
||||||
* \brief Social contribution car page
|
* \brief Social contribution card page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
@ -387,7 +387,7 @@ if ($id > 0)
|
|||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0; $total = 0;
|
$i = 0; $total = 0;
|
||||||
echo '<table class="nobordernopadding" width="100%">';
|
print '<table class="nobordernopadding" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("RefPayment").'</td>';
|
print '<td>'.$langs->trans("RefPayment").'</td>';
|
||||||
print '<td>'.$langs->trans("Date").'</td>';
|
print '<td>'.$langs->trans("Date").'</td>';
|
||||||
@ -488,7 +488,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Boutons actions
|
* Actions buttons
|
||||||
*/
|
*/
|
||||||
if ($action != 'edit')
|
if ($action != 'edit')
|
||||||
{
|
{
|
||||||
@ -500,7 +500,7 @@ if ($id > 0)
|
|||||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/sociales/charges.php?id=$object->id&action=edit\">".$langs->trans("Modify")."</a>";
|
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/sociales/charges.php?id=$object->id&action=edit\">".$langs->trans("Modify")."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emettre paiement
|
// Emit payment
|
||||||
if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->tax->charges->creer)
|
if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->tax->charges->creer)
|
||||||
{
|
{
|
||||||
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/paiement_charge.php?id=$object->id&action=create\">".$langs->trans("DoPayment")."</a>";
|
print "<a class=\"butAction\" href=\"".DOL_URL_ROOT."/compta/paiement_charge.php?id=$object->id&action=create\">".$langs->trans("DoPayment")."</a>";
|
||||||
|
|||||||
@ -317,16 +317,19 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
|
dol_syslog(get_class($this)."::delete");
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if (! $error)
|
if ($this->bank_line > 0)
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url";
|
$accline = new AccountLine($this->db);
|
||||||
$sql.= " WHERE type='payment_sc' AND url_id=".$this->id;
|
$accline->fetch($this->bank_line);
|
||||||
|
$result = $accline->delete();
|
||||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
if($result < 0) {
|
||||||
$resql = $this->db->query($sql);
|
$this->errors[] = $accline->error;
|
||||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
$error++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2011-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -90,9 +90,8 @@ if (empty($min)) {
|
|||||||
// Define modetax (0 or 1)
|
// Define modetax (0 or 1)
|
||||||
// 0=normal, 1=option vat for services is on debit
|
// 0=normal, 1=option vat for services is on debit
|
||||||
$modetax = $conf->global->TAX_MODE;
|
$modetax = $conf->global->TAX_MODE;
|
||||||
if (isset($_REQUEST["modetax"])) {
|
if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"];
|
||||||
$modetax=$_REQUEST["modetax"];
|
if (empty($modetax)) $modetax=0;
|
||||||
}
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid','int');
|
$socid = GETPOST('socid','int');
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2006-2007, 2015 Yannick Warnier <ywarnier@beeznest.org>
|
* Copyright (C) 2006-2007, 2015 Yannick Warnier <ywarnier@beeznest.org>
|
||||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -252,7 +252,7 @@ $vatsup=$langs->trans("VATPaid");
|
|||||||
|
|
||||||
// VAT Received and paid
|
// VAT Received and paid
|
||||||
|
|
||||||
echo '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
$y = $year_current;
|
$y = $year_current;
|
||||||
$total = 0;
|
$total = 0;
|
||||||
@ -538,8 +538,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
|||||||
// Blank line
|
// Blank line
|
||||||
print '<tr><td colspan="'.($span+1).'"> </td></tr>';
|
print '<tr><td colspan="'.($span+1).'"> </td></tr>';
|
||||||
|
|
||||||
//print table headers for this quadri - expenses now
|
// Print table headers for this quadri - expenses now
|
||||||
//imprime les en-tete de tables pour ce quadri - maintenant les d<>penses
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td align="left">'.$elementsup.'</td>';
|
print '<td align="left">'.$elementsup.'</td>';
|
||||||
print '<td align="left">'.$langs->trans("Date").'</td>';
|
print '<td align="left">'.$langs->trans("Date").'</td>';
|
||||||
@ -680,7 +679,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($x_paye) == 0) { // Show a total ine if nothing shown
|
if (count($x_paye) == 0) { // Show a total line if nothing shown
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="'.$span.'"></td>';
|
print '<td colspan="'.$span.'"></td>';
|
||||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||||
@ -706,7 +705,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
|
|||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
echo '</table>';
|
print '</table>';
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2011-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user