Merge branch 'Dolibarr:develop' into develop
This commit is contained in:
commit
f9f6eef7c3
44
ChangeLog
44
ChangeLog
@ -2,6 +2,50 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
***** ChangeLog for 14.0.2 compared to 14.0.1 *****
|
||||||
|
|
||||||
|
FIX: #18353 Invoice list translation issue
|
||||||
|
FIX: #18375 SQL Error on tasks statistics
|
||||||
|
FIX: #18465
|
||||||
|
FIX: #18484
|
||||||
|
FIX: #18531
|
||||||
|
FIX: #18542 REST API: set global $user variable to DolibarrApiAccess::user.
|
||||||
|
FIX: #18544 Shipment REST API: load thirdparty object into the shipment before validating.
|
||||||
|
FIX: #18544 Shipment rest api: load thirdparty object when validating
|
||||||
|
FIX: #18565
|
||||||
|
FIX: #18589 #18617
|
||||||
|
FIX: #18591 : Remove double quotes of SQL Queries for postgresql compatibility
|
||||||
|
FIX: #18666 Order / Shipment list: Don't SQL JOIN category table when not necessary.
|
||||||
|
FIX: Accountancy - Some problems of length with general & subledger account
|
||||||
|
FIX: add DISTINCT
|
||||||
|
FIX: Add option $noescapecommand in executeCLI for better compatibility
|
||||||
|
FIX: Add token to remove error when removing widget
|
||||||
|
FIX: Add token when remove the last widget on home page
|
||||||
|
FIX: an approved holiday can be canceled by an admin.
|
||||||
|
FIX: better sql request
|
||||||
|
FIX: change LOG_DEBUG with LOG_WARNING in syslog and remove sql error in syslog (already done)
|
||||||
|
FIX: Collapsing of extrafields has disappeared.
|
||||||
|
FIX: Date of payment of subscription must not be set to 1970-01-01.
|
||||||
|
FIX: Export of website generates a package that contains a sql error
|
||||||
|
FIX: Field already present in SQL request
|
||||||
|
FIX: increase maxlength of password input
|
||||||
|
FIX: invoice fetch not found syslog debug level instead of error
|
||||||
|
FIX: Invoice list - Wrong name for column total_tva
|
||||||
|
FIX: invoice validation: when checking if any vat rate has a negative amount, prevent false positives with -1E-14 amounts
|
||||||
|
FIX: Manage credit note on situation invoice for calculate margin
|
||||||
|
FIX: Menu List of project was not visible.
|
||||||
|
FIX: migration script
|
||||||
|
FIX: multicompany transverse mode compatibility
|
||||||
|
FIX: option "Default value for field 'Refuse bulk emailings'"
|
||||||
|
FIX: Recommended session.cookie_samesite must be 'Lax' not 'Strict'.
|
||||||
|
FIX: Relative discount with high nb of decimals
|
||||||
|
FIX: salary extrafields don't work and table is not well named
|
||||||
|
FIX: Supplier invoice list - Wrong language key used
|
||||||
|
FIX: wrong table_element_line
|
||||||
|
FIX: wrong users count in multicompany transverse mode
|
||||||
|
FIX: #yogosha6944 Protection against traversal path.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 14.0.1 compared to 14.0.0 *****
|
***** ChangeLog for 14.0.1 compared to 14.0.0 *****
|
||||||
|
|
||||||
FIX: $conf->task used but it does not exist, use $conf->projet instead
|
FIX: $conf->task used but it does not exist, use $conf->projet instead
|
||||||
|
|||||||
@ -5,9 +5,9 @@ This file contains some policies about the security reports on Dolibarr ERP CRM
|
|||||||
## Supported Versions for security reports
|
## Supported Versions for security reports
|
||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
| --------- | ------------------ |
|
| ---------- | ------------------ |
|
||||||
| <= 12.* | :x: |
|
| <= 14.0.1 | :x: |
|
||||||
| >= 13.* | :white_check_mark: |
|
| >= 14.0.2+ | :white_check_mark: |
|
||||||
|
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|||||||
@ -239,11 +239,19 @@ fclose($fp);
|
|||||||
if (empty($buildzip)) {
|
if (empty($buildzip)) {
|
||||||
print "File ".$outputfile." generated\n";
|
print "File ".$outputfile." generated\n";
|
||||||
} else {
|
} else {
|
||||||
$result = dol_compress_file($outputfile, $outputfile.'.zip');
|
if ($buildzip == '1' || $buildzip == 'zip') {
|
||||||
|
$result = dol_compress_file($outputfile, $outputfile.'.zip', 'zip');
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
dol_delete_file($outputfile);
|
dol_delete_file($outputfile);
|
||||||
print "File ".$outputfile.".zip generated\n";
|
print "File ".$outputfile.".zip generated\n";
|
||||||
}
|
}
|
||||||
|
} elseif ($buildzip == '2' || $buildzip == 'gz') {
|
||||||
|
$result = dol_compress_file($outputfile, $outputfile.'.gz', 'gz');
|
||||||
|
if ($result > 0) {
|
||||||
|
dol_delete_file($outputfile);
|
||||||
|
print "File ".$outputfile.".gz generated\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
@ -3,11 +3,26 @@
|
|||||||
#
|
#
|
||||||
# Use this sample to search into a ldap
|
# Use this sample to search into a ldap
|
||||||
#
|
#
|
||||||
# ldapsearch -h hostname -x
|
|
||||||
# ldapsearch -h hostname -x -b "ou=people,dc=teclib,dc=infra"
|
# Anonymous access
|
||||||
# ldapsearch -h hostname -x -z 0 -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
|
# ldapsearch -h hostname -p 389
|
||||||
# ldapsearch -h hostname -x -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
|
#
|
||||||
|
# Login access (using a Bind DN)
|
||||||
|
# ldapsearch -h hostname -p 389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||||
|
# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||||
|
# ldapsearch -d1 -H ldap://hostname:389 -x -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||||
|
# ldapsearch -H ldap://hostname:389 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password
|
||||||
|
#
|
||||||
|
# Login access in SSL (using a Bind DN)
|
||||||
|
# ldapsearch -H ldaps://hostnamme:636 -z 0 -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local
|
||||||
|
# If it fails, you may try to use "hostname" that is real name of certificate.
|
||||||
|
# You must also check that /etc/ldap/ldap.conf contains the line TLS_CACERT /etc/ssl/certs/ca-certificates.crt
|
||||||
|
|
||||||
|
# What to search
|
||||||
|
# ldapsearch -h hostname -p 389 -x -D "uid=root,cn=users,dc=ldap,dc=test,dc=local" -w password -b "cn=users,dc=ldap,dc=test,dc=local"
|
||||||
|
# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "ou=people,dc=teclib,dc=infra"
|
||||||
|
# ldapsearch -h hostname -p 389 -x -D "cn=manager,o=somecompany.com" -w password -b "o=somecompany.com" "(objectclass=*)"
|
||||||
#
|
#
|
||||||
# Example to test a ldap search:
|
# Example to test a ldap search:
|
||||||
# ldapsearch -h hostname -x -z 5 -b 'OU=Collaborateurs,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -D 'CN=UserAdmin,OU=Informatique,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -w password
|
# ldapsearch -h hostname -p 389 -x -z 5 -b 'OU=Collaborateurs,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -D 'CN=UserAdmin,OU=Informatique,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -w password
|
||||||
|
|
||||||
|
|||||||
@ -260,13 +260,13 @@ $y = $year_current;
|
|||||||
|
|
||||||
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?year='.$year_current.'&action=validatehistory">'.$langs->trans("ValidateHistory").'</a>';
|
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?year='.$year_current.'&action=validatehistory">'.$langs->trans("ValidateHistory").'</a>';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
print_barre_liste(img_picto('', 'unlink', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||||
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td width="200">'.$langs->trans("Account").'</td>';
|
print '<tr class="liste_titre"><td class="minwidth100">'.$langs->trans("Account").'</td>';
|
||||||
print '<td width="200" class="left">'.$langs->trans("Label").'</td>';
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||||
if ($j > 12) {
|
if ($j > 12) {
|
||||||
@ -314,12 +314,12 @@ if ($resql) {
|
|||||||
while ($row = $db->fetch_row($resql)) {
|
while ($row = $db->fetch_row($resql)) {
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
if ($row[0] == 'tobind') {
|
if ($row[0] == 'tobind') {
|
||||||
print $langs->trans("Unknown");
|
print '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>';
|
||||||
} else {
|
} else {
|
||||||
print length_accountg($row[0]);
|
print length_accountg($row[0]);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="left">';
|
print '<td>';
|
||||||
if ($row[0] == 'tobind') {
|
if ($row[0] == 'tobind') {
|
||||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||||
} else {
|
} else {
|
||||||
@ -344,13 +344,13 @@ print '</div>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste(img_picto('', 'link', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td width="200">'.$langs->trans("Account").'</td>';
|
print '<tr class="liste_titre"><td class="minwidth100">'.$langs->trans("Account").'</td>';
|
||||||
print '<td width="200" class="left">'.$langs->trans("Label").'</td>';
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||||
if ($j > 12) {
|
if ($j > 12) {
|
||||||
@ -404,7 +404,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="left">';
|
print '<td>';
|
||||||
if ($row[0] == 'tobind') {
|
if ($row[0] == 'tobind') {
|
||||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||||
} else {
|
} else {
|
||||||
@ -436,7 +436,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
|
|||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td width="400" class="left">'.$langs->trans("TotalVente").'</td>';
|
print '<tr class="liste_titre"><td lass="left">'.$langs->trans("TotalVente").'</td>';
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||||
if ($j > 12) {
|
if ($j > 12) {
|
||||||
@ -497,7 +497,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td width="400">'.$langs->trans("TotalMarge").'</td>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("TotalMarge").'</td>';
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||||
if ($j > 12) {
|
if ($j > 12) {
|
||||||
|
|||||||
@ -149,13 +149,13 @@ $y = $year_current;
|
|||||||
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?year='.$year_current.'&action=validatehistory">'.$langs->trans("ValidateHistory").'</a>';
|
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?year='.$year_current.'&action=validatehistory">'.$langs->trans("ValidateHistory").'</a>';
|
||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
print_barre_liste(img_picto('', 'unlink', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||||
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td width="200">'.$langs->trans("Account").'</td>';
|
print '<tr class="liste_titre"><td class="minwidth100">'.$langs->trans("Account").'</td>';
|
||||||
print '<td width="200" class="left">'.$langs->trans("Label").'</td>';
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||||
if ($j > 12) {
|
if ($j > 12) {
|
||||||
@ -197,12 +197,12 @@ if ($resql) {
|
|||||||
while ($row = $db->fetch_row($resql)) {
|
while ($row = $db->fetch_row($resql)) {
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
if ($row[0] == 'tobind') {
|
if ($row[0] == 'tobind') {
|
||||||
print $langs->trans("Unknown");
|
print '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>';
|
||||||
} else {
|
} else {
|
||||||
print length_accountg($row[0]);
|
print length_accountg($row[0]);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="left">';
|
print '<td>';
|
||||||
if ($row[0] == 'tobind') {
|
if ($row[0] == 'tobind') {
|
||||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||||
} else {
|
} else {
|
||||||
@ -227,14 +227,14 @@ print '</div>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste(img_picto('', 'link', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
||||||
|
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td width="200">'.$langs->trans("Account").'</td>';
|
print '<tr class="liste_titre"><td class="minwidth100">'.$langs->trans("Account").'</td>';
|
||||||
print '<td width="200" class="left">'.$langs->trans("Label").'</td>';
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||||
if ($j > 12) {
|
if ($j > 12) {
|
||||||
@ -276,13 +276,13 @@ if ($resql) {
|
|||||||
while ($row = $db->fetch_row($resql)) {
|
while ($row = $db->fetch_row($resql)) {
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
if ($row[0] == 'tobind') {
|
if ($row[0] == 'tobind') {
|
||||||
print $langs->trans("Unknown");
|
print '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>';
|
||||||
} else {
|
} else {
|
||||||
print length_accountg($row[0]);
|
print length_accountg($row[0]);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="left">';
|
print '<td>';
|
||||||
if ($row[0] == 'tobind') {
|
if ($row[0] == 'tobind') {
|
||||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||||
} else {
|
} else {
|
||||||
@ -314,7 +314,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
|
|||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td width="400" class="left">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_titre"><td class="left">'.$langs->trans("Total").'</td>';
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||||
if ($j > 12) {
|
if ($j > 12) {
|
||||||
|
|||||||
@ -610,7 +610,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
$userstatic->id = $tabuser[$key]['id'];
|
$userstatic->id = $tabuser[$key]['id'];
|
||||||
$userstatic->name = $tabuser[$key]['name'];
|
$userstatic->name = $tabuser[$key]['name'];
|
||||||
print "<td>".$userstatic->getNomUrl(0, 'user', 16).' - '.$accountingaccount->label."</td>";
|
print "<td>".$userstatic->getNomUrl(0, 'user', 16).' - '.$accountingaccount->label."</td>";
|
||||||
print '<td class="right nowraponall amount amount">'.($mt >= 0 ? price($mt) : '')."</td>";
|
print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>";
|
||||||
print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>";
|
print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -260,13 +260,13 @@ $y = $year_current;
|
|||||||
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?year='.$year_current.'&action=validatehistory">'.$langs->trans("ValidateHistory").'</a>';
|
$buttonbind = '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?year='.$year_current.'&action=validatehistory">'.$langs->trans("ValidateHistory").'</a>';
|
||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
print_barre_liste(img_picto('', 'unlink', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||||
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td width="200">'.$langs->trans("Account").'</td>';
|
print '<tr class="liste_titre"><td class="minwidth100">'.$langs->trans("Account").'</td>';
|
||||||
print '<td width="200" class="left">'.$langs->trans("Label").'</td>';
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||||
if ($j > 12) {
|
if ($j > 12) {
|
||||||
@ -309,12 +309,12 @@ if ($resql) {
|
|||||||
while ($row = $db->fetch_row($resql)) {
|
while ($row = $db->fetch_row($resql)) {
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
if ($row[0] == 'tobind') {
|
if ($row[0] == 'tobind') {
|
||||||
print $langs->trans("Unknown");
|
print '<span class="opacitymedium">'.$langs->trans("Unknown").'</span>';
|
||||||
} else {
|
} else {
|
||||||
print length_accountg($row[0]);
|
print length_accountg($row[0]);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="left">';
|
print '<td>';
|
||||||
if ($row[0] == 'tobind') {
|
if ($row[0] == 'tobind') {
|
||||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||||
} else {
|
} else {
|
||||||
@ -339,13 +339,13 @@ print '</div>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste(img_picto('', 'link', 'class="paddingright fa-color-unset"').$langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td width="200">'.$langs->trans("Account").'</td>';
|
print '<tr class="liste_titre"><td class="minwidth100">'.$langs->trans("Account").'</td>';
|
||||||
print '<td width="200" class="left">'.$langs->trans("Label").'</td>';
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||||
if ($j > 12) {
|
if ($j > 12) {
|
||||||
@ -393,7 +393,7 @@ if ($resql) {
|
|||||||
print length_accountg($row[0]);
|
print length_accountg($row[0]);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="left">';
|
print '<td>';
|
||||||
if ($row[0] == 'tobind') {
|
if ($row[0] == 'tobind') {
|
||||||
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/supplier/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind"));
|
||||||
} else {
|
} else {
|
||||||
@ -425,7 +425,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
|
|||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td width="400" class="left">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Total").'</td>';
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||||
if ($j > 12) {
|
if ($j > 12) {
|
||||||
|
|||||||
@ -620,11 +620,13 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
|
// Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||||
if (!empty($objp->company_code_buy)) {
|
if (!empty($objp->company_code_buy)) {
|
||||||
$objp->code_buy_t = $objp->company_code_buy;
|
$objp->code_buy_t = $objp->company_code_buy;
|
||||||
$objp->aarowid_suggest = $objp->aarowid_thirdparty;
|
$objp->aarowid_suggest = $objp->aarowid_thirdparty;
|
||||||
$suggestedaccountingaccountfor = '';
|
$suggestedaccountingaccountfor = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($objp->code_buy_p)) {
|
if (!empty($objp->code_buy_p)) {
|
||||||
// Value was defined previously
|
// Value was defined previously
|
||||||
@ -724,11 +726,13 @@ if ($result) {
|
|||||||
$s .= $langs->trans("NotDefined");
|
$s .= $langs->trans("NotDefined");
|
||||||
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||||
}
|
}
|
||||||
|
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||||
print '<br>';
|
print '<br>';
|
||||||
$s = '3. '.(($objp->type_l == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': ';
|
$s = '3. '.(($objp->type_l == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': ';
|
||||||
$shelp = '';
|
$shelp = '';
|
||||||
$s .= ($objp->code_buy_t > 0 ? length_accountg($objp->code_buy_t) : '<span style="'.$code_buy_t_notset.'">'.$langs->trans("NotDefined").'</span>');
|
$s .= ($objp->code_buy_t > 0 ? length_accountg($objp->code_buy_t) : '<span style="'.$code_buy_t_notset.'">'.$langs->trans("NotDefined").'</span>');
|
||||||
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Suggested accounting account
|
// Suggested accounting account
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/adherents/admin/adherent.php
|
* \file htdocs/adherents/admin/member.php
|
||||||
* \ingroup member
|
* \ingroup member
|
||||||
* \brief Page to setup the module Foundation
|
* \brief Page to setup the module Foundation
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -217,15 +217,15 @@ class Dolistore
|
|||||||
for ($i = 0; $i < $nbofcateg; $i++) {
|
for ($i = 0; $i < $nbofcateg; $i++) {
|
||||||
$cat = $this->categories[$i];
|
$cat = $this->categories[$i];
|
||||||
if ($cat->is_root_category == 1 && $parent == 0) {
|
if ($cat->is_root_category == 1 && $parent == 0) {
|
||||||
$html .= '<li class="root"><h3 class="nomargesupinf"><a class="nomargesupinf link2cat" href="?mode=marketplace&categorie='.$cat->id.'" ';
|
$html .= '<li class="root"><h3 class="nomargesupinf"><a class="nomargesupinf link2cat" href="?mode=marketplace&categorie='.((int) $cat->id).'" ';
|
||||||
$html .= 'title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang - 1])).'">'.$cat->name->language[$this->lang - 1].' <sup>'.$cat->nb_products_recursive.'</sup></a></h3>';
|
$html .= 'title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang - 1])).'">'.dol_escape_htmltag($cat->name->language[$this->lang - 1]).' <sup>'.dol_escape_htmltag($cat->nb_products_recursive).'</sup></a></h3>';
|
||||||
$html .= self::get_categories($cat->id);
|
$html .= self::get_categories($cat->id);
|
||||||
$html .= "</li>\n";
|
$html .= "</li>\n";
|
||||||
} elseif (trim($cat->id_parent) == $parent && $cat->active == 1 && trim($cat->id_parent) != 0) { // si cat est de ce niveau
|
} elseif (trim($cat->id_parent) == $parent && $cat->active == 1 && trim($cat->id_parent) != 0) { // si cat est de ce niveau
|
||||||
$select = ($cat->id == $this->categorie) ? ' selected' : '';
|
$select = ($cat->id == $this->categorie) ? ' selected' : '';
|
||||||
$html .= '<li><a class="link2cat'.$select.'" href="?mode=marketplace&categorie='.$cat->id.'"';
|
$html .= '<li><a class="link2cat'.$select.'" href="?mode=marketplace&categorie='.((int) $cat->id).'"';
|
||||||
$html .= ' title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang - 1])).'" ';
|
$html .= ' title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang - 1])).'" ';
|
||||||
$html .= '>'.$cat->name->language[$this->lang - 1].' <sup>'.$cat->nb_products_recursive.'</sup></a>';
|
$html .= '>'.dol_escape_htmltag($cat->name->language[$this->lang - 1]).' <sup>'.dol_escape_htmltag($cat->nb_products_recursive).'</sup></a>';
|
||||||
$html .= self::get_categories($cat->id);
|
$html .= self::get_categories($cat->id);
|
||||||
$html .= "</li>\n";
|
$html .= "</li>\n";
|
||||||
}
|
}
|
||||||
@ -267,9 +267,9 @@ class Dolistore
|
|||||||
|
|
||||||
// add image or default ?
|
// add image or default ?
|
||||||
if ($product->id_default_image != '') {
|
if ($product->id_default_image != '') {
|
||||||
$image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image;
|
$image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.((int) $product->id).'&id_image='.((int) $product->id_default_image);
|
||||||
$images = '<a href="'.$image_url.'" class="documentpreview" target="_blank" mime="image/png" title="'.$product->name->language[$this->lang - 1].', '.$langs->trans('Version').' '.$product->module_version.'">';
|
$images = '<a href="'.urlencode($image_url).'" class="documentpreview" target="_blank" mime="image/png" title="'.dol_escape_htmltag($product->name->language[$this->lang - 1].', '.$langs->trans('Version').' '.$product->module_version).'">';
|
||||||
$images .= '<img src="'.$image_url.'&quality=home_default" style="max-height:250px;max-width: 210px;" alt="" /></a>';
|
$images .= '<img src="'.urlencode($image_url).'&quality=home_default" style="max-height:250px;max-width: 210px;" alt="" /></a>';
|
||||||
} else {
|
} else {
|
||||||
$images = '<img src="'.DOL_URL_ROOT.'/admin/dolistore/img/NoImageAvailable.png" />';
|
$images = '<img src="'.DOL_URL_ROOT.'/admin/dolistore/img/NoImageAvailable.png" />';
|
||||||
}
|
}
|
||||||
@ -277,11 +277,11 @@ class Dolistore
|
|||||||
// free or pay ?
|
// free or pay ?
|
||||||
if ($product->price > 0) {
|
if ($product->price > 0) {
|
||||||
$price = '<h3>'.price(price2num($product->price, 'MT'), 0, $langs, 1, -1, -1, 'EUR').' '.$langs->trans("HT").'</h3>';
|
$price = '<h3>'.price(price2num($product->price, 'MT'), 0, $langs, 1, -1, -1, 'EUR').' '.$langs->trans("HT").'</h3>';
|
||||||
$download_link = '<a target="_blank" href="'.$this->shop_url.$product->id.'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/follow.png" /></a>';
|
$download_link = '<a target="_blank" href="'.urlencode($this->shop_url.$product->id).'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/follow.png" /></a>';
|
||||||
} else {
|
} else {
|
||||||
$price = '<h3>'.$langs->trans('Free').'</h3>';
|
$price = '<h3>'.$langs->trans('Free').'</h3>';
|
||||||
$download_link = '<a target="_blank" href="'.$this->shop_url.$product->id.'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/Download-128.png" /></a>';
|
$download_link = '<a target="_blank" href="'.urlencode($this->shop_url.$product->id).'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/Download-128.png" /></a>';
|
||||||
$download_link .= '<br><br><a target="_blank" href="'.$this->shop_url.$product->id.'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/follow.png" /></a>';
|
$download_link .= '<br><br><a target="_blank" href="'.urlencode($this->shop_url.$product->id).'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/follow.png" /></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
//checking versions
|
//checking versions
|
||||||
@ -319,14 +319,14 @@ class Dolistore
|
|||||||
//.'<br><a class="inline-block valignmiddle" target="_blank" href="'.$this->shop_url.$product->id.'"><span class="details button">'.$langs->trans("SeeInMarkerPlace").'</span></a>
|
//.'<br><a class="inline-block valignmiddle" target="_blank" href="'.$this->shop_url.$product->id.'"><span class="details button">'.$langs->trans("SeeInMarkerPlace").'</span></a>
|
||||||
|
|
||||||
//output template
|
//output template
|
||||||
$html .= '<tr class="app oddeven '.$compatible.'">
|
$html .= '<tr class="app oddeven '.dol_escape_htmltag($compatible).'">
|
||||||
<td class="center" width="210"><div class="newAppParent">'.$newapp.$images.'</div></td>
|
<td class="center" width="210"><div class="newAppParent">'.dol_escape_htmltag($newapp.$images).'</div></td>
|
||||||
<td class="margeCote"><h2 class="appTitle">'.$product->name->language[$this->lang - 1]
|
<td class="margeCote"><h2 class="appTitle">'.dol_escape_htmltag($product->name->language[$this->lang - 1])
|
||||||
.'<br><small>'.$version.'</small></h2>
|
.'<br><small>'.dol_escape_htmltag($version).'</small></h2>
|
||||||
<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.'</small><br><br>'.$product->description_short->language[$this->lang - 1].'</td>';
|
<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.dol_escape_htmltag($product->reference).' - '.dol_escape_htmltag($langs->trans('Id')).': '.((int) $product->id).'</small><br><br>'.dol_escape_htmltag($product->description_short->language[$this->lang - 1]).'</td>';
|
||||||
// do not load if display none
|
// do not load if display none
|
||||||
//$html .= '<td style="display:none;" class="long_description">'.$product->description->language[$this->lang - 1].'</td>';
|
//$html .= '<td style="display:none;" class="long_description">'.$product->description->language[$this->lang - 1].'</td>';
|
||||||
$html .= '<td class="margeCote center">'.$price.'</td>';
|
$html .= '<td class="margeCote center">'.dol_escape_htmltag($price).'</td>';
|
||||||
$html .= '<td class="margeCote">'.$download_link.'</td>';
|
$html .= '<td class="margeCote">'.$download_link.'</td>';
|
||||||
$html .= '</tr>';
|
$html .= '</tr>';
|
||||||
}
|
}
|
||||||
@ -343,7 +343,7 @@ class Dolistore
|
|||||||
public function get_previous_link($text = '<<')
|
public function get_previous_link($text = '<<')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
return '<a href="'.$this->get_previous_url().'" class="button">'.$text.'</a>';
|
return '<a href="'.$this->get_previous_url().'" class="button">'.dol_escape_htmltag($text).'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
@ -356,7 +356,7 @@ class Dolistore
|
|||||||
public function get_next_link($text = '>>')
|
public function get_next_link($text = '>>')
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
return '<a href="'.$this->get_next_url().'" class="button">'.$text.'</a>';
|
return '<a href="'.$this->get_next_url().'" class="button">'.dol_escape_htmltag($text).'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/admin/setup.php
|
* \file htdocs/admin/eventorganization.php
|
||||||
* \ingroup eventorganization
|
* \ingroup eventorganization
|
||||||
* \brief EventOrganization setup page.
|
* \brief EventOrganization setup page.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.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
|
||||||
* 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
|
||||||
@ -43,7 +44,7 @@ if (!$user->admin) {
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminihm'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminihm'; // To manage different context of search
|
||||||
|
|
||||||
$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'language'; // 'language', 'template', 'login', 'other'
|
$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'other'; // 'template', 'dashboard', 'login', 'other'
|
||||||
|
|
||||||
if (!defined("MAIN_MOTD")) {
|
if (!defined("MAIN_MOTD")) {
|
||||||
define("MAIN_MOTD", "");
|
define("MAIN_MOTD", "");
|
||||||
@ -96,12 +97,6 @@ if ($action == 'removebackgroundlogin' && !empty($conf->global->MAIN_LOGIN_BACKG
|
|||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if ($mode == 'language') {
|
|
||||||
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
|
||||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
|
|
||||||
//dolibarr_set_const($db, "MAIN_MULTILANGS", GETPOST("MAIN_MULTILANGS"), 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($mode == 'template') {
|
if ($mode == 'template') {
|
||||||
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
@ -206,7 +201,14 @@ if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($mode == 'dashboard') {
|
||||||
|
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
if ($mode == 'other') {
|
if ($mode == 'other') {
|
||||||
|
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||||
|
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
@ -221,8 +223,6 @@ if ($action == 'update') {
|
|||||||
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'login') {
|
if ($mode == 'login') {
|
||||||
@ -301,10 +301,139 @@ print dol_get_fiche_head($head, $mode, '', -1, '');
|
|||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
if ($mode == 'language') {
|
if ($mode == 'template') {
|
||||||
|
// Themes and themes options
|
||||||
|
showSkins(null, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($mode == 'dashboard') {
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table summary="blockdashboard" class="noborder centpercent editmode tableforfield">';
|
||||||
|
|
||||||
|
// Message of the day on home page
|
||||||
|
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
|
||||||
|
complete_substitutions_array($substitutionarray, $langs);
|
||||||
|
|
||||||
|
print '<tr class="oddeven width25p"><td>';
|
||||||
|
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>';
|
||||||
|
foreach ($substitutionarray as $key => $val) {
|
||||||
|
$texthelp .= $key . '<br>';
|
||||||
|
}
|
||||||
|
print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
|
||||||
|
|
||||||
|
print '</td><td>';
|
||||||
|
|
||||||
|
$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
||||||
|
$doleditor->Create();
|
||||||
|
|
||||||
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
|
/* no more need for this option. It is now a widget already controlled by end user
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('BoxstatsDisableGlobal') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_GLOBAL_BOXSTATS", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
*/
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table summary="blockdashboard" class="noborder centpercent editmode tableforfield">';
|
||||||
|
|
||||||
|
print '<tr class="liste_titre"><td class="titlefieldmiddle">';
|
||||||
|
print $langs->trans("DashboardDisableBlocks");
|
||||||
|
print '</td><td class="titlefieldmiddle">';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableGlobal') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_GLOBAL_WORKBOARD", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||||
|
// Block meteo
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('MAIN_DISABLE_METEO') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_METEO", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block agenda
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAgenda') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_AGENDA", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block agenda
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockProject') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_PROJECT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block customer
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockCustomer') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_CUSTOMER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block supplier
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockSupplier') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_SUPPLIER", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block contract
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockContract') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_CONTRACT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block ticket
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockTicket') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_TICKET", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block bank
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockBank') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_BANK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block adherent
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockAdherent') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_ADHERENT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block expense report
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockExpenseReport') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_EXPENSEREPORT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Block holiday
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans('DashboardDisableBlockHoliday') . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_DISABLE_BLOCK_HOLIDAY", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '_red', 'dashboard');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</table>' . "\n";
|
||||||
|
print '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($mode == 'other') {
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
||||||
|
|
||||||
|
print '<tr class="liste_titre"><td class="titlefieldmiddle">';
|
||||||
|
print $langs->trans("Language");
|
||||||
|
print '</td><td class="titlefieldmiddle">';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Default language
|
// Default language
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultLanguage").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||||
print img_picto('', 'language', 'class="pictofixedwidth"');
|
print img_picto('', 'language', 'class="pictofixedwidth"');
|
||||||
@ -315,32 +444,28 @@ if ($mode == 'language') {
|
|||||||
|
|
||||||
// Multilingual GUI
|
// Multilingual GUI
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans("EnableMultilangInterface") . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans("EnableMultilangInterface") . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'language');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>' . "\n";
|
print '</table>' . "\n";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
|
||||||
|
|
||||||
if ($mode == 'template') {
|
print '<br>';
|
||||||
// Themes and themes options
|
print '<div class="center">';
|
||||||
showSkins(null, 1);
|
print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
|
||||||
}
|
print '</div>';
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
if ($mode == 'other') {
|
|
||||||
// Other
|
// Other
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table summary="otherparameters" class="noborder centpercent editmode tableforfield">';
|
print '<table summary="otherparameters" class="noborder centpercent editmode tableforfield">';
|
||||||
|
|
||||||
// Disable javascript and ajax
|
print '<tr class="liste_titre"><td class="titlefieldmiddle">';
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans("DisableJavascript") . '</td><td>';
|
print $langs->trans("Miscelaneous");
|
||||||
print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0);
|
print '</td><td class="titlefieldmiddle">';
|
||||||
print ' <span class="opacitymedium"> ' . $langs->trans("DisableJavascriptNote") . '</span>';
|
print '</td></tr>';
|
||||||
print '</td>';
|
|
||||||
print '<td>';
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Max size of lists
|
// Max size of lists
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeList") . '</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '"></td>';
|
print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeList") . '</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '"></td>';
|
||||||
@ -393,7 +518,7 @@ if ($mode == 'other') {
|
|||||||
// Hide unauthorized menus
|
// Hide unauthorized menus
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans("HideUnauthorizedMenu") . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans("HideUnauthorizedMenu") . '</td><td>';
|
||||||
//print $form->selectyesno('MAIN_MENU_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_MENU_HIDE_UNAUTHORIZED : 0, 1);
|
//print $form->selectyesno('MAIN_MENU_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_MENU_HIDE_UNAUTHORIZED : 0, 1);
|
||||||
print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -401,7 +526,7 @@ if ($mode == 'other') {
|
|||||||
// Hide unauthorized button
|
// Hide unauthorized button
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans("ButtonHideUnauthorized") . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans("ButtonHideUnauthorized") . '</td><td>';
|
||||||
//print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1);
|
//print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1);
|
||||||
print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -417,7 +542,9 @@ if ($mode == 'other') {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Show bugtrack link
|
// Show bugtrack link
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")) . '</td><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
|
print $form->textwithpicto($langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")), $langs->trans("ShowBugTrackLinkDesc"));
|
||||||
|
print '</td><td>';
|
||||||
print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="' . (empty($conf->global->MAIN_BUGTRACK_ENABLELINK) ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK) . '">';
|
print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="' . (empty($conf->global->MAIN_BUGTRACK_ENABLELINK) ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK) . '">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
@ -426,29 +553,20 @@ if ($mode == 'other') {
|
|||||||
// Hide wiki link on login page
|
// Hide wiki link on login page
|
||||||
$pictohelp = '<span class="fa fa-question-circle"></span>';
|
$pictohelp = '<span class="fa fa-question-circle"></span>';
|
||||||
print '<tr class="oddeven"><td>' . str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')) . '</td><td>';
|
print '<tr class="oddeven"><td>' . str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')) . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
|
||||||
//print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1);
|
//print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Message of the day on home page
|
// Disable javascript and ajax
|
||||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
|
print '<tr class="oddeven"><td>' . $langs->trans("DisableJavascript") . '</td><td>';
|
||||||
complete_substitutions_array($substitutionarray, $langs);
|
print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0, 0, 0, '', 'other');
|
||||||
|
print ' <span class="opacitymedium paddingleft marginleft">' . $langs->trans("DisableJavascriptNote") . '</span>';
|
||||||
print '<tr class="oddeven"><td>';
|
print '</td>';
|
||||||
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>';
|
print '<td>';
|
||||||
foreach ($substitutionarray as $key => $val) {
|
print '</td>';
|
||||||
$texthelp .= $key . '<br>';
|
print '</tr>';
|
||||||
}
|
|
||||||
print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
|
|
||||||
|
|
||||||
print '</td><td colspan="2">';
|
|
||||||
|
|
||||||
$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
|
||||||
$doleditor->Create();
|
|
||||||
|
|
||||||
print '</td></tr>' . "\n";
|
|
||||||
|
|
||||||
print '</table>' . "\n";
|
print '</table>' . "\n";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -459,11 +577,16 @@ if ($mode == 'login') {
|
|||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
||||||
|
|
||||||
|
print '<tr class="liste_titre"><td class="titlefieldmiddle">';
|
||||||
|
print $langs->trans("Parameter");
|
||||||
|
print '</td><td class="titlefieldmiddle">';
|
||||||
|
print $langs->trans("Value");
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Hide helpcenter link on login page
|
// Hide helpcenter link on login page
|
||||||
print '<tr class="oddeven"><td>' . $langs->trans("DisableLinkToHelpCenter") . '</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans("DisableLinkToHelpCenter") . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0);
|
print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0, 0, 0, '', 'login');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Message on login page
|
// Message on login page
|
||||||
@ -475,13 +598,13 @@ if ($mode == 'login') {
|
|||||||
$texthelp .= $key . '<br>';
|
$texthelp .= $key . '<br>';
|
||||||
}
|
}
|
||||||
print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin');
|
print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin');
|
||||||
print '</td><td colspan="2">';
|
print '</td><td>';
|
||||||
$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
// Background
|
// Background
|
||||||
print '<tr class="oddeven"><td><label for="imagebackground">' . $langs->trans("BackgroundImageLogin") . ' (png,jpg)</label></td><td colspan="2">';
|
print '<tr class="oddeven"><td><label for="imagebackground">' . $langs->trans("BackgroundImageLogin") . ' (png,jpg)</label></td><td>';
|
||||||
print '<div class="centpercent inline-block">';
|
print '<div class="centpercent inline-block">';
|
||||||
$disabled = '';
|
$disabled = '';
|
||||||
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
||||||
|
|||||||
@ -43,6 +43,7 @@ $action = GETPOST('action', 'aZ09');
|
|||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$hookmanager->initHooks(array('adminldap', 'globaladmin'));
|
$hookmanager->initHooks(array('adminldap', 'globaladmin'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -150,7 +151,7 @@ $arraylist['0'] = $langs->trans("No");
|
|||||||
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr");
|
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr");
|
||||||
$arraylist['dolibarr2ldap'] = $langs->trans("DolibarrToLDAP");
|
$arraylist['dolibarr2ldap'] = $langs->trans("DolibarrToLDAP");
|
||||||
print $form->selectarray('activesynchro', $arraylist, $conf->global->LDAP_SYNCHRO_ACTIVE);
|
print $form->selectarray('activesynchro', $arraylist, $conf->global->LDAP_SYNCHRO_ACTIVE);
|
||||||
print '</td><td>'.$langs->trans("LDAPDnSynchroActiveExample");
|
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnSynchroActiveExample").'</span>';
|
||||||
if ($conf->global->LDAP_SYNCHRO_ACTIVE && !$conf->global->LDAP_USER_DN) {
|
if ($conf->global->LDAP_SYNCHRO_ACTIVE && !$conf->global->LDAP_USER_DN) {
|
||||||
print '<br><font class="error">'.$langs->trans("LDAPSetupNotComplete").'</font>';
|
print '<br><font class="error">'.$langs->trans("LDAPSetupNotComplete").'</font>';
|
||||||
}
|
}
|
||||||
@ -163,7 +164,7 @@ if (!empty($conf->societe->enabled)) {
|
|||||||
$arraylist['0'] = $langs->trans("No");
|
$arraylist['0'] = $langs->trans("No");
|
||||||
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
|
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
|
||||||
print $form->selectarray('activecontact', $arraylist, $conf->global->LDAP_CONTACT_ACTIVE);
|
print $form->selectarray('activecontact', $arraylist, $conf->global->LDAP_CONTACT_ACTIVE);
|
||||||
print '</td><td>'.$langs->trans("LDAPDnContactActiveExample").'</td></tr>';
|
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnContactActiveExample").'</span></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Synchro member active
|
// Synchro member active
|
||||||
@ -174,7 +175,7 @@ if (!empty($conf->adherent->enabled)) {
|
|||||||
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
|
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
|
||||||
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')';
|
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')';
|
||||||
print $form->selectarray('activemembers', $arraylist, $conf->global->LDAP_MEMBER_ACTIVE);
|
print $form->selectarray('activemembers', $arraylist, $conf->global->LDAP_MEMBER_ACTIVE);
|
||||||
print '</td><td>'.$langs->trans("LDAPDnMemberActiveExample").'</td></tr>';
|
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnMemberActiveExample").'</span></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Synchro member type active
|
// Synchro member type active
|
||||||
@ -185,7 +186,7 @@ if (!empty($conf->adherent->enabled)) {
|
|||||||
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
|
$arraylist['1'] = $langs->trans("DolibarrToLDAP");
|
||||||
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')';
|
$arraylist['ldap2dolibarr'] = $langs->trans("LDAPToDolibarr").' ('.$langs->trans("SupportedForLDAPImportScriptOnly").')';
|
||||||
print $form->selectarray('activememberstypes', $arraylist, $conf->global->LDAP_MEMBER_TYPE_ACTIVE);
|
print $form->selectarray('activememberstypes', $arraylist, $conf->global->LDAP_MEMBER_TYPE_ACTIVE);
|
||||||
print '</td><td>'.$langs->trans("LDAPDnMemberTypeActiveExample").'</td></tr>';
|
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnMemberTypeActiveExample").'</span></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
@ -214,33 +215,33 @@ $arraylist = array();
|
|||||||
$arraylist['3'] = 'Version 3';
|
$arraylist['3'] = 'Version 3';
|
||||||
$arraylist['2'] = 'Version 2';
|
$arraylist['2'] = 'Version 2';
|
||||||
print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION', $arraylist, $conf->global->LDAP_SERVER_PROTOCOLVERSION);
|
print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION', $arraylist, $conf->global->LDAP_SERVER_PROTOCOLVERSION);
|
||||||
print '</td><td>'.$langs->trans("LDAPServerProtocolVersion").'</td></tr>';
|
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerProtocolVersion").'</span></td></tr>';
|
||||||
|
|
||||||
// Serveur primaire
|
// Serveur primaire
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("LDAPPrimaryServer").'</td><td>';
|
print $langs->trans("LDAPPrimaryServer").'</td><td>';
|
||||||
print '<input size="25" type="text" name="host" value="'.$conf->global->LDAP_SERVER_HOST.'">';
|
print '<input class="minwidth200" type="text" name="host" value="'.$conf->global->LDAP_SERVER_HOST.'">';
|
||||||
print '</td><td>'.$langs->trans("LDAPServerExample").'</td></tr>';
|
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerExample").'</span></td></tr>';
|
||||||
|
|
||||||
// Serveur secondaire
|
// Serveur secondaire
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("LDAPSecondaryServer").'</td><td>';
|
print $langs->trans("LDAPSecondaryServer").'</td><td>';
|
||||||
print '<input size="25" type="text" name="slave" value="'.$conf->global->LDAP_SERVER_HOST_SLAVE.'">';
|
print '<input class="minwidth200" type="text" name="slave" value="'.$conf->global->LDAP_SERVER_HOST_SLAVE.'">';
|
||||||
print '</td><td>'.$langs->trans("LDAPServerExample").'</td></tr>';
|
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerExample").'</span></td></tr>';
|
||||||
|
|
||||||
// Port
|
// Port
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPServerPort").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("LDAPServerPort").'</td><td>';
|
||||||
if (!empty($conf->global->LDAP_SERVER_PORT)) {
|
if (!empty($conf->global->LDAP_SERVER_PORT)) {
|
||||||
print '<input size="25" type="text" name="port" value="'.$conf->global->LDAP_SERVER_PORT.'">';
|
print '<input class="width75" type="text" name="port" value="'.$conf->global->LDAP_SERVER_PORT.'">';
|
||||||
} else {
|
} else {
|
||||||
print '<input size="25" type="text" name="port" value="389">';
|
print '<input class="width75" type="text" name="port" value="389">';
|
||||||
}
|
}
|
||||||
print '</td><td>'.$langs->trans("LDAPServerPortExample").'</td></tr>';
|
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerPortExample").'</span></td></tr>';
|
||||||
|
|
||||||
// DNserver
|
// DNserver
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPServerDn").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("LDAPServerDn").'</td><td>';
|
||||||
print '<input size="25" type="text" name="dn" value="'.$conf->global->LDAP_SERVER_DN.'">';
|
print '<input class="minwidth300" type="text" name="dn" value="'.$conf->global->LDAP_SERVER_DN.'">';
|
||||||
print '</td><td>'.$langs->trans("LDAPServerDnExample").'</td></tr>';
|
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerDnExample").'</span></td></tr>';
|
||||||
|
|
||||||
// Utiliser TLS
|
// Utiliser TLS
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPServerUseTLS").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("LDAPServerUseTLS").'</td><td>';
|
||||||
@ -248,7 +249,7 @@ $arraylist = array();
|
|||||||
$arraylist['0'] = $langs->trans("No");
|
$arraylist['0'] = $langs->trans("No");
|
||||||
$arraylist['1'] = $langs->trans("Yes");
|
$arraylist['1'] = $langs->trans("Yes");
|
||||||
print $form->selectarray('usetls', $arraylist, $conf->global->LDAP_SERVER_USE_TLS);
|
print $form->selectarray('usetls', $arraylist, $conf->global->LDAP_SERVER_USE_TLS);
|
||||||
print '</td><td>'.$langs->trans("LDAPServerUseTLSExample").'</td></tr>';
|
print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPServerUseTLSExample").'</span></td></tr>';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">'.$langs->trans("ForANonAnonymousAccess").'</td>';
|
print '<td colspan="3">'.$langs->trans("ForANonAnonymousAccess").'</td>';
|
||||||
@ -257,18 +258,18 @@ print "</tr>\n";
|
|||||||
// DNAdmin
|
// DNAdmin
|
||||||
print '<!-- LDAP_ADMIN_DN -->';
|
print '<!-- LDAP_ADMIN_DN -->';
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPAdminDn").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("LDAPAdminDn").'</td><td>';
|
||||||
print '<input size="25" type="text" name="admin" value="'.$conf->global->LDAP_ADMIN_DN.'">';
|
print '<input class="minwidth300" type="text" name="admin" value="'.$conf->global->LDAP_ADMIN_DN.'">';
|
||||||
print '</td><td>'.$langs->trans("LDAPAdminDnExample").'</td></tr>';
|
print '</td><td class="maxwidthhalf"><span class="opacitymedium">'.$langs->trans("LDAPAdminDnExample").'</span></td></tr>';
|
||||||
|
|
||||||
// Pass
|
// Pass
|
||||||
print '<!-- LDAP_ADMIN_PASS -->';
|
print '<!-- LDAP_ADMIN_PASS -->';
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("LDAPPassword").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("LDAPPassword").'</td><td>';
|
||||||
if (!empty($conf->global->LDAP_ADMIN_PASS)) {
|
if (!empty($conf->global->LDAP_ADMIN_PASS)) {
|
||||||
print '<input size="25" type="password" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">'; // je le met en visible pour test
|
print '<input class="minwidth150" type="password" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">'; // je le met en visible pour test
|
||||||
} else {
|
} else {
|
||||||
print '<input size="25" type="text" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">';
|
print '<input class="minwidth150" type="text" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">';
|
||||||
}
|
}
|
||||||
print '</td><td>'.$langs->trans('Password').' (ex: secret)</td></tr>';
|
print '</td><td><span class="opacitymedium">'.$langs->trans('Password').' (ex: secret)</span></td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -1025,16 +1025,16 @@ if ($mode == 'marketplace') {
|
|||||||
|
|
||||||
print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">';
|
print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">';
|
||||||
|
|
||||||
print '<form method="POST" class="centpercent" id="searchFormList" action="'.$dolistore->url.'">';
|
print '<form method="POST" class="centpercent" id="searchFormList" action="'.urlencode($dolistore->url).'">';
|
||||||
?>
|
?>
|
||||||
<input type="hidden" name="token" value="<?php echo newToken(); ?>">
|
<input type="hidden" name="token" value="<?php echo newToken(); ?>">
|
||||||
<input type="hidden" name="mode" value="marketplace">
|
<input type="hidden" name="mode" value="marketplace">
|
||||||
<div class="divsearchfield">
|
<div class="divsearchfield">
|
||||||
<input name="search_keyword" placeholder="<?php echo $langs->trans('Keyword') ?>" id="search_keyword" type="text" class="minwidth200" value="<?php echo $options['search'] ?>"><br>
|
<input name="search_keyword" placeholder="<?php echo $langs->trans('Keyword') ?>" id="search_keyword" type="text" class="minwidth200" value="<?php echo dol_escape_htmltag($options['search']) ?>"><br>
|
||||||
</div>
|
</div>
|
||||||
<div class="divsearchfield">
|
<div class="divsearchfield">
|
||||||
<input class="button buttongen" value="<?php echo $langs->trans('Rechercher') ?>" type="submit">
|
<input class="button buttongen" value="<?php echo $langs->trans('Rechercher') ?>" type="submit">
|
||||||
<a class="buttonreset" href="<?php echo $dolistore->url ?>"><?php echo $langs->trans('Reset') ?></a>
|
<a class="buttonreset" href="<?php echo urlencode($dolistore->url) ?>"><?php echo $langs->trans('Reset') ?></a>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -1051,7 +1051,7 @@ if ($mode == 'marketplace') {
|
|||||||
|
|
||||||
<div id="category-tree-left">
|
<div id="category-tree-left">
|
||||||
<ul class="tree">
|
<ul class="tree">
|
||||||
<?php echo $dolistore->get_categories(); ?>
|
<?php echo dol_escape_htmltag($dolistore->get_categories()); ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="listing-content">
|
<div id="listing-content">
|
||||||
|
|||||||
@ -513,7 +513,7 @@ if ($resql) {
|
|||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td class="tdoverflowmax300">'.$obj->name.'</td>'."\n";
|
print '<td class="tdoverflowmax600" title="'.dol_escape_htmltag($obj->name).'">'.dol_escape_htmltag($obj->name).'</td>'."\n";
|
||||||
print '<td class="tdoverflowmax300">';
|
print '<td class="tdoverflowmax300">';
|
||||||
if (isASecretKey($obj->name)) {
|
if (isASecretKey($obj->name)) {
|
||||||
if (empty($dolibarr_main_prod)) {
|
if (empty($dolibarr_main_prod)) {
|
||||||
|
|||||||
@ -44,8 +44,9 @@ class Login
|
|||||||
* Login
|
* Login
|
||||||
*
|
*
|
||||||
* Request the API token for a couple username / password.
|
* Request the API token for a couple username / password.
|
||||||
* Using method POST is recommanded for security reasons (method GET is often logged by default by web servers with parameters so with login and pass into server log file).
|
* WARNING: You should NEVER use this API, like you should never use the similare API that uses the POST method. This will expose your password.
|
||||||
* Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "DOLAPIKEY" into field at the top right of page. Note: The API token (DOLAPIKEY) can be found/set on the user page.
|
* To use the APIs, you should instead set an API token to the user you want to allow to use API (This API token called DOLAPIKEY can be found/set on the user page) and use this token as credential for any API call.
|
||||||
|
* From the API explorer, you can enter directly the "DOLAPIKEY" into the field at the top right of the page to get access to any allowed APIs.
|
||||||
*
|
*
|
||||||
* @param string $login User login
|
* @param string $login User login
|
||||||
* @param string $password User password
|
* @param string $password User password
|
||||||
@ -67,8 +68,9 @@ class Login
|
|||||||
* Login
|
* Login
|
||||||
*
|
*
|
||||||
* Request the API token for a couple username / password.
|
* Request the API token for a couple username / password.
|
||||||
* Using method POST is recommanded for security reasons (method GET is often logged by default by web servers with parameters so with login and pass into server log file).
|
* WARNING: You should NEVER use this API, like you should never use the similare API that uses the POST method. This will expose your password.
|
||||||
* Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "DOLAPIKEY" into field at the top right of page. Note: The API token (DOLAPIKEY) can be found/set on the user page.
|
* To use the APIs, you should instead set an API token to the user you want to allow to use API (This API token called DOLAPIKEY can be found/set on the user page) and use this token as credential for any API call.
|
||||||
|
* From the API explorer, you can enter directly the "DOLAPIKEY" into the field at the top right of the page to get access to any allowed APIs.
|
||||||
*
|
*
|
||||||
* @param string $login User login
|
* @param string $login User login
|
||||||
* @param string $password User password
|
* @param string $password User password
|
||||||
|
|||||||
@ -205,10 +205,14 @@ foreach ($fulltree as $key => $val) {
|
|||||||
$entry .= '<a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$val['id'].'&type='.$type.$moreparam.'&backtolist='.urlencode($_SERVER["PHP_SELF"].'?type='.$type).'">'.img_view().'</a>';
|
$entry .= '<a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$val['id'].'&type='.$type.$moreparam.'&backtolist='.urlencode($_SERVER["PHP_SELF"].'?type='.$type).'">'.img_view().'</a>';
|
||||||
$entry .= '</td>';
|
$entry .= '</td>';
|
||||||
$entry .= '<td class="right" width="20px;">';
|
$entry .= '<td class="right" width="20px;">';
|
||||||
|
if ($user->rights->categorie->creer) {
|
||||||
$entry .= '<a class="editfielda" href="' . DOL_URL_ROOT . '/categories/edit.php?id=' . $val['id'] . '&type=' . $type . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type) . '">' . img_edit() . '</a>';
|
$entry .= '<a class="editfielda" href="' . DOL_URL_ROOT . '/categories/edit.php?id=' . $val['id'] . '&type=' . $type . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type) . '">' . img_edit() . '</a>';
|
||||||
|
}
|
||||||
$entry .= '</td>';
|
$entry .= '</td>';
|
||||||
$entry .= '<td class="right" width="20px;">';
|
$entry .= '<td class="right" width="20px;">';
|
||||||
|
if ($user->rights->categorie->supprimer) {
|
||||||
$entry .= '<a class="deletefilelink" href="' . DOL_URL_ROOT . '/categories/viewcat.php?action=delete&token=' . newToken() . '&id=' . $val['id'] . '&type=' . $type . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type . $moreparam) . '&backtolist=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type . $moreparam) . '">' . img_delete() . '</a>';
|
$entry .= '<a class="deletefilelink" href="' . DOL_URL_ROOT . '/categories/viewcat.php?action=delete&token=' . newToken() . '&id=' . $val['id'] . '&type=' . $type . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type . $moreparam) . '&backtolist=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type . $moreparam) . '">' . img_delete() . '</a>';
|
||||||
|
}
|
||||||
$entry .= '</td>';
|
$entry .= '</td>';
|
||||||
|
|
||||||
$entry .= '</tr>';
|
$entry .= '</tr>';
|
||||||
|
|||||||
@ -898,15 +898,23 @@ while ($currentdaytoshow < $lastdaytoshow) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Use this list to have for all users */
|
/* Use this list to have for all users */
|
||||||
$sql = "SELECT u.rowid, u.lastname as lastname, u.firstname, u.statut, u.login, u.admin, u.entity";
|
$sql = "SELECT DISTINCT u.rowid, u.lastname as lastname, u.firstname, u.statut, u.login, u.admin, u.entity";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
|
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||||
|
$sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug";
|
||||||
|
$sql .= " WHERE ug.entity IN (".getEntity('usergroup').")";
|
||||||
|
$sql .= " AND ug.fk_user = u.rowid ";
|
||||||
|
} else {
|
||||||
if ($usergroup > 0) {
|
if ($usergroup > 0) {
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON u.rowid = ug.fk_user";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON u.rowid = ug.fk_user";
|
||||||
}
|
}
|
||||||
$sql .= " WHERE u.statut = 1 AND u.entity IN (".getEntity('user').")";
|
$sql .= " WHERE u.entity IN (".getEntity('user').")";
|
||||||
|
}
|
||||||
|
$sql .= " AND u.statut = 1";
|
||||||
if ($usergroup > 0) {
|
if ($usergroup > 0) {
|
||||||
$sql .= " AND ug.fk_usergroup = ".((int) $usergroup);
|
$sql .= " AND ug.fk_usergroup = ".((int) $usergroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
//print $sql;
|
//print $sql;
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
|
|||||||
@ -399,8 +399,8 @@ if (empty($reshook)) {
|
|||||||
$object->cond_reglement_id = GETPOST('cond_reglement_id');
|
$object->cond_reglement_id = GETPOST('cond_reglement_id');
|
||||||
$object->mode_reglement_id = GETPOST('mode_reglement_id');
|
$object->mode_reglement_id = GETPOST('mode_reglement_id');
|
||||||
$object->fk_account = GETPOST('fk_account', 'int');
|
$object->fk_account = GETPOST('fk_account', 'int');
|
||||||
$object->remise_percent = price2num(GETPOST('remise_percent'), 2);
|
$object->remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU');
|
$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU', 2);
|
||||||
$object->socid = GETPOST('socid', 'int');
|
$object->socid = GETPOST('socid', 'int');
|
||||||
$object->contact_id = GETPOST('contactid', 'int');
|
$object->contact_id = GETPOST('contactid', 'int');
|
||||||
$object->fk_project = GETPOST('projectid', 'int');
|
$object->fk_project = GETPOST('projectid', 'int');
|
||||||
@ -841,8 +841,8 @@ if (empty($reshook)) {
|
|||||||
$tva_tx = '';
|
$tva_tx = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS');
|
$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2);
|
||||||
$remise_percent = price2num(GETPOST('remise_percent'.$predef), 2);
|
$remise_percent = price2num(GETPOST('remise_percent'.$predef), '', 2);
|
||||||
if (empty($remise_percent)) {
|
if (empty($remise_percent)) {
|
||||||
$remise_percent = 0;
|
$remise_percent = 0;
|
||||||
}
|
}
|
||||||
@ -1229,6 +1229,8 @@ if (empty($reshook)) {
|
|||||||
$date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
|
$date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
|
||||||
$date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
|
$date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
|
||||||
|
|
||||||
|
$remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
|
|
||||||
// Extrafields
|
// Extrafields
|
||||||
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
||||||
$array_options = $extrafields->getOptionalsFromPost($object->table_element_line);
|
$array_options = $extrafields->getOptionalsFromPost($object->table_element_line);
|
||||||
@ -1241,7 +1243,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define special_code for special lines
|
// Define special_code for special lines
|
||||||
$special_code = GETPOST('special_code');
|
$special_code = GETPOST('special_code', 'int');
|
||||||
if (!GETPOST('qty')) {
|
if (!GETPOST('qty')) {
|
||||||
$special_code = 3;
|
$special_code = 3;
|
||||||
}
|
}
|
||||||
@ -1260,7 +1262,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
||||||
if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent'), 2) / 100) < price2num($price_min)))) {
|
if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - $remise_percent / 100) < price2num($price_min)))) {
|
||||||
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -1290,7 +1292,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
$qty = price2num(GETPOST('qty', 'alpha'), 'MS');
|
$qty = price2num(GETPOST('qty', 'alpha'), 'MS');
|
||||||
|
|
||||||
$result = $object->updateline(GETPOST('lineid', 'int'), $pu_ht, $qty, price2num(GETPOST('remise_percent'), 2), $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_options, GETPOST("units"), $pu_ht_devise);
|
$result = $object->updateline(GETPOST('lineid', 'int'), $pu_ht, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_options, GETPOST("units"), $pu_ht_devise);
|
||||||
|
|
||||||
if ($result >= 0) {
|
if ($result >= 0) {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@ -1358,9 +1360,9 @@ if (empty($reshook)) {
|
|||||||
// Terms of payment
|
// Terms of payment
|
||||||
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
|
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
|
||||||
} elseif ($action == 'setremisepercent' && $usercancreate) {
|
} elseif ($action == 'setremisepercent' && $usercancreate) {
|
||||||
$result = $object->set_remise_percent($user, price2num(GETPOST('remise_percent')));
|
$result = $object->set_remise_percent($user, price2num(GETPOST('remise_percent'), '', 2));
|
||||||
} elseif ($action == 'setremiseabsolue' && $usercancreate) {
|
} elseif ($action == 'setremiseabsolue' && $usercancreate) {
|
||||||
$result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue')));
|
$result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'), 'MU', 2));
|
||||||
} elseif ($action == 'setmode' && $usercancreate) {
|
} elseif ($action == 'setmode' && $usercancreate) {
|
||||||
// Payment choice
|
// Payment choice
|
||||||
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
|
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
|
||||||
|
|||||||
@ -613,9 +613,9 @@ if (empty($reshook)) {
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
} elseif ($action == 'setremisepercent' && $usercancreate) {
|
} elseif ($action == 'setremisepercent' && $usercancreate) {
|
||||||
$result = $object->setDiscount($user, price2num(GETPOST('remise_percent'), 2));
|
$result = $object->setDiscount($user, price2num(GETPOST('remise_percent'), '', 2));
|
||||||
} elseif ($action == 'setremiseabsolue' && $usercancreate) {
|
} elseif ($action == 'setremiseabsolue' && $usercancreate) {
|
||||||
$result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'), 'MU'));
|
$result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue'), 'MU', 2));
|
||||||
} elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '') {
|
} elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '') {
|
||||||
// Define vat_rate
|
// Define vat_rate
|
||||||
$vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0);
|
$vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0);
|
||||||
@ -645,7 +645,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS');
|
$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS');
|
||||||
|
|
||||||
$remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha')) : 0);
|
$remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha'), '', 2) : 0);
|
||||||
if (empty($remise_percent)) {
|
if (empty($remise_percent)) {
|
||||||
$remise_percent = 0;
|
$remise_percent = 0;
|
||||||
}
|
}
|
||||||
@ -1035,6 +1035,8 @@ if (empty($reshook)) {
|
|||||||
$special_code = 3;
|
$special_code = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
|
|
||||||
// Check minimum price
|
// Check minimum price
|
||||||
$productid = GETPOST('productid', 'int');
|
$productid = GETPOST('productid', 'int');
|
||||||
if (!empty($productid)) {
|
if (!empty($productid)) {
|
||||||
@ -1050,7 +1052,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
||||||
|
|
||||||
if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent'), 2) / 100) < price2num($price_min)))) {
|
if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && ($price_min && (price2num($pu_ht) * (1 - $remise_percent / 100) < price2num($price_min)))) {
|
||||||
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -1075,7 +1077,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$result = $object->updateline(GETPOST('lineid', 'int'), $description, $pu_ht, price2num(GETPOST('qty'), 'MS'), price2num(GETPOST('remise_percent'), 2), $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $date_start, $date_end, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('units'), $pu_ht_devise);
|
$result = $object->updateline(GETPOST('lineid', 'int'), $description, $pu_ht, price2num(GETPOST('qty'), 'MS'), $remise_percent, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $date_start, $date_end, $type, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('units'), $pu_ht_devise);
|
||||||
|
|
||||||
if ($result >= 0) {
|
if ($result >= 0) {
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||||
|
|||||||
@ -429,7 +429,7 @@ $sql .= ' p.rowid as project_id, p.ref as project_ref, p.title as project_label,
|
|||||||
$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender,';
|
$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender,';
|
||||||
$sql .= ' c.fk_cond_reglement,c.fk_mode_reglement,c.fk_shipping_method,';
|
$sql .= ' c.fk_cond_reglement,c.fk_mode_reglement,c.fk_shipping_method,';
|
||||||
$sql .= ' c.fk_input_reason';
|
$sql .= ' c.fk_input_reason';
|
||||||
if ($search_categ_cus) {
|
if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
||||||
$sql .= ", cc.fk_categorie, cc.fk_soc";
|
$sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||||
}
|
}
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
@ -446,7 +446,7 @@ $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
|||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
|
||||||
if (!empty($search_categ_cus)) {
|
if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
||||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
||||||
}
|
}
|
||||||
$sql .= ', '.MAIN_DB_PREFIX.'commande as c';
|
$sql .= ', '.MAIN_DB_PREFIX.'commande as c';
|
||||||
@ -799,7 +799,7 @@ if ($resql) {
|
|||||||
if ($search_product_category != '') {
|
if ($search_product_category != '') {
|
||||||
$param .= '&search_product_category='.urlencode($search_product_category);
|
$param .= '&search_product_category='.urlencode($search_product_category);
|
||||||
}
|
}
|
||||||
if ($search_categ_cus > 0) {
|
if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
||||||
$param .= '&search_categ_cus='.urlencode($search_categ_cus);
|
$param .= '&search_categ_cus='.urlencode($search_categ_cus);
|
||||||
}
|
}
|
||||||
if ($show_files) {
|
if ($show_files) {
|
||||||
|
|||||||
@ -433,8 +433,8 @@ if (empty($reshook)) {
|
|||||||
$tva_tx = '';
|
$tva_tx = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS');
|
$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2);
|
||||||
$remise_percent = price2num(GETPOST('remise_percent'.$predef), 2);
|
$remise_percent = price2num(GETPOST('remise_percent'.$predef), '', 2);
|
||||||
|
|
||||||
// Extrafields
|
// Extrafields
|
||||||
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
||||||
@ -781,6 +781,8 @@ if (empty($reshook)) {
|
|||||||
$result = -1;
|
$result = -1;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
$remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
|
|
||||||
// Check minimum price
|
// Check minimum price
|
||||||
$productid = GETPOST('productid', 'int');
|
$productid = GETPOST('productid', 'int');
|
||||||
if (!empty($productid)) {
|
if (!empty($productid)) {
|
||||||
@ -797,7 +799,7 @@ if (empty($reshook)) {
|
|||||||
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
||||||
|
|
||||||
// Check price is not lower than minimum (check is done only for standard or replacement invoices)
|
// Check price is not lower than minimum (check is done only for standard or replacement invoices)
|
||||||
if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent', 2)) / 100) < price2num($price_min)))) {
|
if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - $remise_percent / 100) < price2num($price_min)))) {
|
||||||
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -830,8 +832,8 @@ if (empty($reshook)) {
|
|||||||
$vat_rate,
|
$vat_rate,
|
||||||
$localtax1_rate,
|
$localtax1_rate,
|
||||||
$localtax1_rate,
|
$localtax1_rate,
|
||||||
GETPOST('productid'),
|
GETPOST('productid', 'int'),
|
||||||
price2num(GETPOST('remise_percent'), 2),
|
$remise_percent,
|
||||||
'HT',
|
'HT',
|
||||||
$info_bits,
|
$info_bits,
|
||||||
0,
|
0,
|
||||||
@ -1226,6 +1228,8 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
$morehtmlref .= '</div>';
|
$morehtmlref .= '</div>';
|
||||||
|
|
||||||
|
$morehtmlright = '';
|
||||||
|
|
||||||
dol_banner_tab($object, 'ref', $linkback, 1, 'title', 'none', $morehtmlref, '', 0, '', $morehtmlright);
|
dol_banner_tab($object, 'ref', $linkback, 1, 'title', 'none', $morehtmlref, '', 0, '', $morehtmlright);
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
|
|||||||
@ -521,7 +521,7 @@ if (empty($reshook)) {
|
|||||||
$result = $object->setBankAccount(GETPOST('fk_account', 'int'));
|
$result = $object->setBankAccount(GETPOST('fk_account', 'int'));
|
||||||
} elseif ($action == 'setremisepercent' && $usercancreate) {
|
} elseif ($action == 'setremisepercent' && $usercancreate) {
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->setDiscount($user, price2num(GETPOST('remise_percent'), 2));
|
$result = $object->setDiscount($user, price2num(GETPOST('remise_percent'), '', 2));
|
||||||
} elseif ($action == "setabsolutediscount" && $usercancreate) {
|
} elseif ($action == "setabsolutediscount" && $usercancreate) {
|
||||||
// POST[remise_id] or POST[remise_id_for_payment]
|
// POST[remise_id] or POST[remise_id_for_payment]
|
||||||
|
|
||||||
@ -1037,8 +1037,8 @@ if (empty($reshook)) {
|
|||||||
$object->cond_reglement_id = GETPOST('cond_reglement_id', 'int');
|
$object->cond_reglement_id = GETPOST('cond_reglement_id', 'int');
|
||||||
$object->mode_reglement_id = GETPOST('mode_reglement_id', 'int');
|
$object->mode_reglement_id = GETPOST('mode_reglement_id', 'int');
|
||||||
$object->fk_account = GETPOST('fk_account', 'int');
|
$object->fk_account = GETPOST('fk_account', 'int');
|
||||||
$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU');
|
$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU', 2);
|
||||||
$object->remise_percent = price2num(GETPOST('remise_percent'), 2);
|
$object->remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
||||||
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
||||||
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
|
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
|
||||||
@ -1094,7 +1094,7 @@ if (empty($reshook)) {
|
|||||||
$object->mode_reglement_id = GETPOST('mode_reglement_id', 'int');
|
$object->mode_reglement_id = GETPOST('mode_reglement_id', 'int');
|
||||||
$object->fk_account = GETPOST('fk_account', 'int');
|
$object->fk_account = GETPOST('fk_account', 'int');
|
||||||
$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU');
|
$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU');
|
||||||
$object->remise_percent = price2num(GETPOST('remise_percent'), 2);
|
$object->remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
||||||
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
||||||
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
|
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
|
||||||
@ -1309,7 +1309,7 @@ if (empty($reshook)) {
|
|||||||
$object->fk_account = GETPOST('fk_account', 'int');
|
$object->fk_account = GETPOST('fk_account', 'int');
|
||||||
$object->amount = price2num(GETPOST('amount'));
|
$object->amount = price2num(GETPOST('amount'));
|
||||||
$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU');
|
$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU');
|
||||||
$object->remise_percent = price2num(GETPOST('remise_percent'), 2);
|
$object->remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
||||||
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
||||||
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
|
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
|
||||||
@ -1390,7 +1390,7 @@ if (empty($reshook)) {
|
|||||||
$object->fk_account = GETPOST('fk_account', 'int');
|
$object->fk_account = GETPOST('fk_account', 'int');
|
||||||
$object->amount = price2num(GETPOST('amount'));
|
$object->amount = price2num(GETPOST('amount'));
|
||||||
$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU');
|
$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU');
|
||||||
$object->remise_percent = price2num(GETPOST('remise_percent'), 2);
|
$object->remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
||||||
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
|
||||||
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
|
$object->multicurrency_code = GETPOST('multicurrency_code', 'alpha');
|
||||||
@ -1813,7 +1813,7 @@ if (empty($reshook)) {
|
|||||||
$product->fetch(GETPOST('idprod'.$i, 'int'));
|
$product->fetch(GETPOST('idprod'.$i, 'int'));
|
||||||
$startday = dol_mktime(12, 0, 0, GETPOST('date_start'.$i.'month'), GETPOST('date_start'.$i.'day'), GETPOST('date_start'.$i.'year'));
|
$startday = dol_mktime(12, 0, 0, GETPOST('date_start'.$i.'month'), GETPOST('date_start'.$i.'day'), GETPOST('date_start'.$i.'year'));
|
||||||
$endday = dol_mktime(12, 0, 0, GETPOST('date_end'.$i.'month'), GETPOST('date_end'.$i.'day'), GETPOST('date_end'.$i.'year'));
|
$endday = dol_mktime(12, 0, 0, GETPOST('date_end'.$i.'month'), GETPOST('date_end'.$i.'day'), GETPOST('date_end'.$i.'year'));
|
||||||
$result = $object->addline($product->description, $product->price, price2num(GETPOST('qty'.$i), 'MS'), $product->tva_tx, $product->localtax1_tx, $product->localtax2_tx, GETPOST('idprod'.$i, 'int'), price2num(GETPOST('remise_percent'.$i)), $startday, $endday, 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', $product->fk_unit);
|
$result = $object->addline($product->description, $product->price, price2num(GETPOST('qty'.$i), 'MS'), $product->tva_tx, $product->localtax1_tx, $product->localtax2_tx, GETPOST('idprod'.$i, 'int'), price2num(GETPOST('remise_percent'.$i), '', 2), $startday, $endday, 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', $product->fk_unit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1914,8 +1914,8 @@ if (empty($reshook)) {
|
|||||||
$object->fk_project = GETPOST('projectid', 'int');
|
$object->fk_project = GETPOST('projectid', 'int');
|
||||||
$object->cond_reglement_id = GETPOST('cond_reglement_id', 'int');
|
$object->cond_reglement_id = GETPOST('cond_reglement_id', 'int');
|
||||||
$object->mode_reglement_id = GETPOST('mode_reglement_id', 'int');
|
$object->mode_reglement_id = GETPOST('mode_reglement_id', 'int');
|
||||||
$object->remise_absolue =price2num(GETPOST('remise_absolue'), 'MU');
|
$object->remise_absolue =price2num(GETPOST('remise_absolue'), 'MU', 2);
|
||||||
$object->remise_percent = price2num(GETPOST('remise_percent'), 2);
|
$object->remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
|
|
||||||
// Proprietes particulieres a facture de remplacement
|
// Proprietes particulieres a facture de remplacement
|
||||||
|
|
||||||
@ -2001,8 +2001,8 @@ if (empty($reshook)) {
|
|||||||
$tva_tx = '';
|
$tva_tx = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$qty = price2num(GETPOST('qty'.$predef), 'MS');
|
$qty = price2num(GETPOST('qty'.$predef), 'MS', 2);
|
||||||
$remise_percent = price2num(GETPOST('remise_percent'.$predef), 2);
|
$remise_percent = price2num(GETPOST('remise_percent'.$predef), '', 2);
|
||||||
|
|
||||||
// Extrafields
|
// Extrafields
|
||||||
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
||||||
@ -2404,6 +2404,8 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
|
|
||||||
// Check minimum price
|
// Check minimum price
|
||||||
$productid = GETPOST('productid', 'int');
|
$productid = GETPOST('productid', 'int');
|
||||||
if (!empty($productid)) {
|
if (!empty($productid)) {
|
||||||
@ -2420,7 +2422,7 @@ if (empty($reshook)) {
|
|||||||
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
$label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : '');
|
||||||
|
|
||||||
// Check price is not lower than minimum (check is done only for standard or replacement invoices)
|
// Check price is not lower than minimum (check is done only for standard or replacement invoices)
|
||||||
if ($usercanproductignorepricemin && (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent'), 2) / 100) < price2num($price_min)))) {
|
if ($usercanproductignorepricemin && (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - $remise_percent / 100) < price2num($price_min)))) {
|
||||||
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
@ -2473,7 +2475,7 @@ if (empty($reshook)) {
|
|||||||
$description,
|
$description,
|
||||||
$pu_ht,
|
$pu_ht,
|
||||||
$qty,
|
$qty,
|
||||||
price2num(GETPOST('remise_percent'), 2),
|
$remise_percent,
|
||||||
$date_start,
|
$date_start,
|
||||||
$date_end,
|
$date_end,
|
||||||
$vat_rate,
|
$vat_rate,
|
||||||
|
|||||||
@ -95,7 +95,9 @@ if (empty($reshook)) {
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
$bank = new Account($db);
|
$bank = new Account($db);
|
||||||
$bank->fetch($conf->global->{$default_account});
|
$bank->fetch($conf->global->{$default_account});
|
||||||
if (empty($bank->ics) || empty($bank->ics_transfer)) {
|
if ((empty($bank->ics) && $type !== 'bank-transfer')
|
||||||
|
|| (empty($bank->ics_transfer) && $type === 'bank-transfer')
|
||||||
|
) {
|
||||||
$errormessage = str_replace('{url}', $bank->getNomUrl(1, '', '', -1, 1), $langs->trans("ErrorICSmissing", '{url}'));
|
$errormessage = str_replace('{url}', $bank->getNomUrl(1, '', '', -1, 1), $langs->trans("ErrorICSmissing", '{url}'));
|
||||||
setEventMessages($errormessage, null, 'errors');
|
setEventMessages($errormessage, null, 'errors');
|
||||||
header("Location: ".DOL_URL_ROOT.'/compta/prelevement/create.php');
|
header("Location: ".DOL_URL_ROOT.'/compta/prelevement/create.php');
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||||
|
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.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
|
||||||
* 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
|
||||||
@ -50,9 +51,22 @@ $search_ref = GETPOST('search_ref', 'int');
|
|||||||
$search_label = GETPOST('search_label', 'alpha');
|
$search_label = GETPOST('search_label', 'alpha');
|
||||||
$search_amount = GETPOST('search_amount', 'alpha');
|
$search_amount = GETPOST('search_amount', 'alpha');
|
||||||
$search_status = GETPOST('search_status', 'int');
|
$search_status = GETPOST('search_status', 'int');
|
||||||
$search_day_lim = GETPOST('search_day_lim', 'int');
|
$search_date_startday = GETPOST('search_date_startday', 'int');
|
||||||
$search_month_lim = GETPOST('search_month_lim', 'int');
|
$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
|
||||||
$search_year_lim = GETPOST('search_year_lim', 'int');
|
$search_date_startyear = GETPOST('search_date_startyear', 'int');
|
||||||
|
$search_date_endday = GETPOST('search_date_endday', 'int');
|
||||||
|
$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
|
||||||
|
$search_date_endyear = GETPOST('search_date_endyear', 'int');
|
||||||
|
$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
|
||||||
|
$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
|
||||||
|
$search_date_limit_startday = GETPOST('search_date_limit_startday', 'int');
|
||||||
|
$search_date_limit_startmonth = GETPOST('search_date_limit_startmonth', 'int');
|
||||||
|
$search_date_limit_startyear = GETPOST('search_date_limit_startyear', 'int');
|
||||||
|
$search_date_limit_endday = GETPOST('search_date_limit_endday', 'int');
|
||||||
|
$search_date_limit_endmonth = GETPOST('search_date_limit_endmonth', 'int');
|
||||||
|
$search_date_limit_endyear = GETPOST('search_date_limit_endyear', 'int');
|
||||||
|
$search_date_limit_start = dol_mktime(0, 0, 0, $search_date_limit_startmonth, $search_date_limit_startday, $search_date_limit_startyear);
|
||||||
|
$search_date_limit_end = dol_mktime(23, 59, 59, $search_date_limit_endmonth, $search_date_limit_endday, $search_date_limit_endyear);
|
||||||
$search_project_ref = GETPOST('search_project_ref', 'alpha');
|
$search_project_ref = GETPOST('search_project_ref', 'alpha');
|
||||||
$search_project = GETPOST('search_project', 'alpha');
|
$search_project = GETPOST('search_project', 'alpha');
|
||||||
$search_users = GETPOST('search_users');
|
$search_users = GETPOST('search_users');
|
||||||
@ -78,7 +92,6 @@ if (!$sortorder) {
|
|||||||
$sortorder = "DESC";
|
$sortorder = "DESC";
|
||||||
}
|
}
|
||||||
|
|
||||||
$year = GETPOST("year", 'int');
|
|
||||||
$filtre = GETPOST("filtre", 'int');
|
$filtre = GETPOST("filtre", 'int');
|
||||||
|
|
||||||
if (!GETPOSTISSET('search_typeid')) {
|
if (!GETPOSTISSET('search_typeid')) {
|
||||||
@ -146,10 +159,22 @@ if (empty($reshook)) {
|
|||||||
$search_amount = '';
|
$search_amount = '';
|
||||||
$search_status = '';
|
$search_status = '';
|
||||||
$search_typeid = '';
|
$search_typeid = '';
|
||||||
$year = '';
|
$search_date_startday = '';
|
||||||
$search_day_lim = '';
|
$search_date_startmonth = '';
|
||||||
$search_year_lim = '';
|
$search_date_startyear = '';
|
||||||
$search_month_lim = '';
|
$search_date_endday = '';
|
||||||
|
$search_date_endmonth = '';
|
||||||
|
$search_date_endyear = '';
|
||||||
|
$search_date_start = '';
|
||||||
|
$search_date_end = '';
|
||||||
|
$search_date_limit_startday = '';
|
||||||
|
$search_date_limit_startmonth = '';
|
||||||
|
$search_date_limit_startyear = '';
|
||||||
|
$search_date_limit_endday = '';
|
||||||
|
$search_date_limit_endmonth = '';
|
||||||
|
$search_date_limit_endyear = '';
|
||||||
|
$search_date_limit_start = '';
|
||||||
|
$search_date_limit_end = '';
|
||||||
$search_project_ref = '';
|
$search_project_ref = '';
|
||||||
$search_project = '';
|
$search_project = '';
|
||||||
$search_users = '';
|
$search_users = '';
|
||||||
@ -220,15 +245,17 @@ if ($search_amount) {
|
|||||||
if ($search_status != '' && $search_status >= 0) {
|
if ($search_status != '' && $search_status >= 0) {
|
||||||
$sql .= " AND cs.paye = ".((int) $search_status);
|
$sql .= " AND cs.paye = ".((int) $search_status);
|
||||||
}
|
}
|
||||||
$sql .= dolSqlDateFilter("cs.periode", $search_day_lim, $search_month_lim, $search_year_lim);
|
if ($search_date_start) {
|
||||||
//$sql.= dolSqlDateFilter("cs.periode", 0, 0, $year);
|
$sql .= " AND cs.date_ech >= '".$db->idate($search_date_start)."'";
|
||||||
if ($year > 0) {
|
}
|
||||||
$sql .= " AND (";
|
if ($search_date_end) {
|
||||||
// Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
|
$sql .= " AND cs.date_ech <= '".$db->idate($search_date_end)."'";
|
||||||
// ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
|
}
|
||||||
$sql .= " (cs.periode IS NOT NULL AND date_format(cs.periode, '%Y') = '".$db->escape($year)."') ";
|
if ($search_date_limit_start) {
|
||||||
$sql .= "OR (cs.periode IS NULL AND date_format(cs.date_ech, '%Y') = '".$db->escape($year)."')";
|
$sql .= " AND cs.periode >= '".$db->idate($search_date_limit_start)."'";
|
||||||
$sql .= ")";
|
}
|
||||||
|
if ($search_date_limit_end) {
|
||||||
|
$sql .= " AND cs.periode <= '".$db->idate($search_date_limit_end)."'";
|
||||||
}
|
}
|
||||||
if ($search_typeid > 0) {
|
if ($search_typeid > 0) {
|
||||||
$sql .= " AND cs.fk_type = ".((int) $search_typeid);
|
$sql .= " AND cs.fk_type = ".((int) $search_typeid);
|
||||||
@ -293,8 +320,41 @@ if ($search_account) {
|
|||||||
if ($search_status != '' && $search_status != '-1') {
|
if ($search_status != '' && $search_status != '-1') {
|
||||||
$param .= '&search_status='.urlencode($search_status);
|
$param .= '&search_status='.urlencode($search_status);
|
||||||
}
|
}
|
||||||
if ($year) {
|
if ($search_date_startday) {
|
||||||
$param .= '&year='.urlencode($year);
|
$param .= '&search_date_startday='.urlencode($search_date_startday);
|
||||||
|
}
|
||||||
|
if ($search_date_startmonth) {
|
||||||
|
$param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
|
||||||
|
}
|
||||||
|
if ($search_date_startyear) {
|
||||||
|
$param .= '&search_date_startyear='.urlencode($search_date_startyear);
|
||||||
|
}
|
||||||
|
if ($search_date_endday) {
|
||||||
|
$param .= '&search_date_endday='.urlencode($search_date_endday);
|
||||||
|
}
|
||||||
|
if ($search_date_endmonth) {
|
||||||
|
$param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
|
||||||
|
}
|
||||||
|
if ($search_date_endyear) {
|
||||||
|
$param .= '&search_date_endyear='.urlencode($search_date_endyear);
|
||||||
|
}
|
||||||
|
if ($search_date_limit_startday) {
|
||||||
|
$param .= '&search_date_limit_startday='.urlencode($search_date_limit_startday);
|
||||||
|
}
|
||||||
|
if ($search_date_limit_startmonth) {
|
||||||
|
$param .= '&search_date_limit_startmonth='.urlencode($search_date_limit_startmonth);
|
||||||
|
}
|
||||||
|
if ($search_date_limit_startyear) {
|
||||||
|
$param .= '&search_date_limit_startyear='.urlencode($search_date_limit_startyear);
|
||||||
|
}
|
||||||
|
if ($search_date_limit_endday) {
|
||||||
|
$param .= '&search_date_limit_endday='.urlencode($search_date_limit_endday);
|
||||||
|
}
|
||||||
|
if ($search_date_limit_endmonth) {
|
||||||
|
$param .= '&search_date_limit_endmonth='.urlencode($search_date_limit_endmonth);
|
||||||
|
}
|
||||||
|
if ($search_date_limit_endyear) {
|
||||||
|
$param .= '&search_date_limit_endyear='.urlencode($search_date_limit_endyear);
|
||||||
}
|
}
|
||||||
|
|
||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
@ -315,11 +375,6 @@ print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
|||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
$center = '';
|
$center = '';
|
||||||
if ($year) {
|
|
||||||
$center = '<a href="list.php?year='.($year - 1).'">'.img_previous().'</a>';
|
|
||||||
$center .= ' '.$langs->trans("Year").' '.$year;
|
|
||||||
$center .= ' <a href="list.php?year='.($year + 1).'">'.img_next().'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
@ -375,18 +430,25 @@ if (!empty($arrayfields['cs.fk_type']['checked'])) {
|
|||||||
|
|
||||||
// Filter: Date (placeholder)
|
// Filter: Date (placeholder)
|
||||||
if (!empty($arrayfields['cs.date_ech']['checked'])) {
|
if (!empty($arrayfields['cs.date_ech']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre center">';
|
||||||
|
print '<div class="nowrap">';
|
||||||
|
print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||||
|
print '</div>';
|
||||||
|
print '<div class="nowrap">';
|
||||||
|
print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||||
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter: Period end date
|
// Filter: Period end date
|
||||||
if (!empty($arrayfields['cs.periode']['checked'])) {
|
if (!empty($arrayfields['cs.periode']['checked'])) {
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
print '<div class="nowrap">';
|
||||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day_lim" value="'.dol_escape_htmltag($search_day_lim).'">';
|
print $form->selectDate($search_date_limit_start ? $search_date_limit_start : -1, 'search_date_limit_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||||
}
|
print '</div>';
|
||||||
print '<input class="flat valignmiddle width25" type="text" size="1" maxlength="2" name="search_month_lim" value="'.dol_escape_htmltag($search_month_lim).'">';
|
print '<div class="nowrap">';
|
||||||
$formother->select_year($search_year_lim ? $search_year_lim : -1, 'search_year_lim', 1, 20, 5, 0, 0, '', 'widthauto valignmiddle');
|
print $form->selectDate($search_date_limit_end ? $search_date_limit_end : -1, 'search_date_limit_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||||
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -549,13 +611,7 @@ while ($i < min($num, $limit)) {
|
|||||||
|
|
||||||
// Date end period
|
// Date end period
|
||||||
if (!empty($arrayfields['cs.periode']['checked'])) {
|
if (!empty($arrayfields['cs.periode']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">'.dol_print_date($db->jdate($obj->periode), 'day').'</td>';
|
||||||
if ($obj->periode) {
|
|
||||||
print '<a href="list.php?search_year_lim='.dol_print_date($db->jdate($obj->periode), "%Y").'">';
|
|
||||||
print dol_print_date($db->jdate($obj->periode), 'day');
|
|
||||||
print '</a>';
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -227,7 +227,7 @@ if (empty($reshook)) {
|
|||||||
$object->note_private = GETPOST('note_private', 'alpha');
|
$object->note_private = GETPOST('note_private', 'alpha');
|
||||||
$object->note_public = GETPOST('note_public', 'alpha');
|
$object->note_public = GETPOST('note_public', 'alpha');
|
||||||
$object->fk_project = GETPOST('projectid', 'int');
|
$object->fk_project = GETPOST('projectid', 'int');
|
||||||
$object->remise_percent = price2num(GETPOST('remise_percent'), 2);
|
$object->remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
$object->ref = GETPOST('ref', 'alpha');
|
$object->ref = GETPOST('ref', 'alpha');
|
||||||
$object->ref_customer = GETPOST('ref_customer', 'alpha');
|
$object->ref_customer = GETPOST('ref_customer', 'alpha');
|
||||||
$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
|
$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
|
||||||
|
|||||||
@ -1287,6 +1287,7 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == '
|
|||||||
|
|
||||||
$objecttmp = new $objectclass($db);
|
$objecttmp = new $objectclass($db);
|
||||||
$nbok = 0;
|
$nbok = 0;
|
||||||
|
$TMsg = array();
|
||||||
foreach ($toselect as $toselectid) {
|
foreach ($toselect as $toselectid) {
|
||||||
$result = $objecttmp->fetch($toselectid);
|
$result = $objecttmp->fetch($toselectid);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
@ -1314,7 +1315,9 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == '
|
|||||||
$result = $objecttmp->delete($user);
|
$result = $objecttmp->delete($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result <= 0) {
|
if (empty($result)) { // if delete returns 0, there is at least one object linked
|
||||||
|
$TMsg = array_merge($objecttmp->errors, $TMsg);
|
||||||
|
} elseif ($result < 0) { // if delete returns is < 0, there is an error, we break and rollback later
|
||||||
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
|
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
break;
|
break;
|
||||||
@ -1328,16 +1331,25 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == '
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (empty($error)) {
|
||||||
|
// Message for elements well deleted
|
||||||
if ($nbok > 1) {
|
if ($nbok > 1) {
|
||||||
setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs');
|
setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs');
|
||||||
} else {
|
} elseif ($nbok == 1) {
|
||||||
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Message for elements which can't be deleted
|
||||||
|
if (!empty($TMsg)) {
|
||||||
|
sort($TMsg);
|
||||||
|
setEventMessages('', array_unique($TMsg), 'warnings');
|
||||||
|
}
|
||||||
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
} else {
|
} else {
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
|
|
||||||
//var_dump($listofobjectthirdparties);exit;
|
//var_dump($listofobjectthirdparties);exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010-2015 Regis Houssin <regis.houssin@inodbox.com>
|
/* Copyright (C) 2010-2021 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -79,7 +79,7 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3)
|
|||||||
$perm = 1;
|
$perm = 1;
|
||||||
} elseif ($table_element_line == 'facturedet' && $user->rights->facture->creer) {
|
} elseif ($table_element_line == 'facturedet' && $user->rights->facture->creer) {
|
||||||
$perm = 1;
|
$perm = 1;
|
||||||
} elseif ($table_element_line == 'facturerecdet' && $user->rights->facture->creer) {
|
} elseif ($table_element_line == 'facturedet_rec' && $user->rights->facture->creer) {
|
||||||
$perm = 1;
|
$perm = 1;
|
||||||
} elseif ($table_element_line == 'ecm_files' && $user->rights->ecm->creer) {
|
} elseif ($table_element_line == 'ecm_files' && $user->rights->ecm->creer) {
|
||||||
$perm = 1;
|
$perm = 1;
|
||||||
@ -89,7 +89,7 @@ if (GETPOST('roworder', 'alpha', 3) && GETPOST('table_element_line', 'aZ09', 3)
|
|||||||
$perm = 1;
|
$perm = 1;
|
||||||
} elseif ($table_element_line == 'mrp_production' && $user->rights->mrp->write) {
|
} elseif ($table_element_line == 'mrp_production' && $user->rights->mrp->write) {
|
||||||
$perm = 1;
|
$perm = 1;
|
||||||
} elseif ($table_element_line == 'supplier_proposaldet' && $user->rights->supplier_proposal->write) {
|
} elseif ($table_element_line == 'supplier_proposaldet' && $user->rights->supplier_proposal->creer) {
|
||||||
$perm = 1;
|
$perm = 1;
|
||||||
} elseif ($table_element_line == 'commande_fournisseurdet' && $user->rights->fournisseur->commande->creer) {
|
} elseif ($table_element_line == 'commande_fournisseurdet' && $user->rights->fournisseur->commande->creer) {
|
||||||
$perm = 1;
|
$perm = 1;
|
||||||
|
|||||||
@ -133,7 +133,8 @@ class box_customers_outstanding_bill_reached extends ModeleBoxes
|
|||||||
$thirdpartystatic->entity = $objp->entity;
|
$thirdpartystatic->entity = $objp->entity;
|
||||||
$thirdpartystatic->outstanding_limit = $objp->outstanding_limit;
|
$thirdpartystatic->outstanding_limit = $objp->outstanding_limit;
|
||||||
|
|
||||||
$outstandingtotal = $thirdpartystatic->getOutstandingBills()['opened'];
|
$tmp = $thirdpartystatic->getOutstandingBills();
|
||||||
|
$outstandingtotal = $tmp['opened'];
|
||||||
$outstandinglimit = $thirdpartystatic->outstanding_limit;
|
$outstandinglimit = $thirdpartystatic->outstanding_limit;
|
||||||
|
|
||||||
if ($outstandingtotal >= $outstandinglimit) {
|
if ($outstandingtotal >= $outstandinglimit) {
|
||||||
|
|||||||
@ -2010,6 +2010,11 @@ abstract class CommonObject
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For backward compatibility
|
||||||
|
if ($this->table_element == 'facture_rec' && $fieldid == 'title') {
|
||||||
|
$fieldid = 'titre';
|
||||||
|
}
|
||||||
|
|
||||||
// Security on socid
|
// Security on socid
|
||||||
$socid = 0;
|
$socid = 0;
|
||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
@ -4292,10 +4297,10 @@ abstract class CommonObject
|
|||||||
//print 'Found into table '.$table.', type '.$langs->transnoentitiesnoconv($elementname).', haschild='.$haschild;
|
//print 'Found into table '.$table.', type '.$langs->transnoentitiesnoconv($elementname).', haschild='.$haschild;
|
||||||
$haschild += $obj->nb;
|
$haschild += $obj->nb;
|
||||||
if (is_numeric($elementname)) { // old usage
|
if (is_numeric($elementname)) { // old usage
|
||||||
$this->errors[] = $langs->trans("ErrorRecordHasAtLeastOneChildOfType", $table);
|
$this->errors[] = $langs->transnoentities("ErrorRecordHasAtLeastOneChildOfType", method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref, $table);
|
||||||
} else // new usage: $elementname=Translation key
|
} else // new usage: $elementname=Translation key
|
||||||
{
|
{
|
||||||
$this->errors[] = $langs->trans("ErrorRecordHasAtLeastOneChildOfType", $langs->transnoentitiesnoconv($elementname));
|
$this->errors[] = $langs->transnoentities("ErrorRecordHasAtLeastOneChildOfType", method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref, $langs->transnoentitiesnoconv($elementname));
|
||||||
}
|
}
|
||||||
break; // We found at least one, we stop here
|
break; // We found at least one, we stop here
|
||||||
}
|
}
|
||||||
@ -8961,7 +8966,7 @@ abstract class CommonObject
|
|||||||
* @param User $user User that deletes
|
* @param User $user User that deletes
|
||||||
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||||
* @param int $forcechilddeletion 0=no, 1=Force deletion of children
|
* @param int $forcechilddeletion 0=no, 1=Force deletion of children
|
||||||
* @return int <=0 if KO, >0 if OK
|
* @return int <=0 if KO, 0=Nothing done because object has child, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function deleteCommon(User $user, $notrigger = false, $forcechilddeletion = 0)
|
public function deleteCommon(User $user, $notrigger = false, $forcechilddeletion = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -388,9 +388,9 @@ class dolReceiptPrinter extends Printer
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'printer_receipt';
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."printer_receipt";
|
||||||
$sql .= ' (name, fk_type, fk_profile, parameter, entity)';
|
$sql .= " (name, fk_type, fk_profile, parameter, entity)";
|
||||||
$sql .= ' VALUES ("'.$this->db->escape($name).'", '.((int) $type).', '.((int) $profile).', "'.$this->db->escape($parameter).'", '.$conf->entity.')';
|
$sql .= " VALUES ('".$this->db->escape($name)."', ".((int) $type).", ".((int) $profile).", '".$this->db->escape($parameter)."', ".((int) $conf->entity).")";
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error++;
|
$error++;
|
||||||
@ -413,12 +413,14 @@ class dolReceiptPrinter extends Printer
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'printer_receipt';
|
|
||||||
$sql .= ' SET name="'.$this->db->escape($name).'"';
|
$sql = "UPDATE ".MAIN_DB_PREFIX."printer_receipt";
|
||||||
$sql .= ', fk_type='.((int) $type);
|
$sql .= " SET name='".$this->db->escape($name)."'";
|
||||||
$sql .= ', fk_profile='.((int) $profile);
|
$sql .= ", fk_type=".((int) $type);
|
||||||
$sql .= ', parameter="'.$this->db->escape($parameter).'"';
|
$sql .= ", fk_profile=".((int) $profile);
|
||||||
$sql .= ' WHERE rowid='.((int) $printerid);
|
$sql .= ", parameter='".$this->db->escape($parameter)."'";
|
||||||
|
$sql .= " WHERE rowid=".((int) $printerid);
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error++;
|
$error++;
|
||||||
@ -458,9 +460,9 @@ class dolReceiptPrinter extends Printer
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'printer_receipt_template';
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."printer_receipt_template";
|
||||||
$sql .= ' (name, template, entity) VALUES ("'.$this->db->escape($name).'"';
|
$sql .= " (name, template, entity) VALUES ('".$this->db->escape($name)."'";
|
||||||
$sql .= ', "'.$this->db->escape($template).'", '.$conf->entity.')';
|
$sql .= ", '".$this->db->escape($template)."', ".$conf->entity.")";
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error++;
|
$error++;
|
||||||
@ -502,10 +504,11 @@ class dolReceiptPrinter extends Printer
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'printer_receipt_template';
|
|
||||||
$sql .= ' SET name="'.$this->db->escape($name).'"';
|
$sql = "UPDATE ".MAIN_DB_PREFIX."printer_receipt_template";
|
||||||
$sql .= ', template="'.$this->db->escape($template).'"';
|
$sql .= " SET name='".$this->db->escape($name)."'";
|
||||||
$sql .= ' WHERE rowid='.((int) $templateid);
|
$sql .= ", template='".$this->db->escape($template)."'";
|
||||||
|
$sql .= " WHERE rowid=".((int) $templateid);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
@ -1976,7 +1976,7 @@ class ExtraFields
|
|||||||
*/
|
*/
|
||||||
public function showSeparator($key, $object, $colspan = 2, $display_type = 'card')
|
public function showSeparator($key, $object, $colspan = 2, $display_type = 'card')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if ($display_type=='card') {
|
if ($display_type=='card') {
|
||||||
$tagtype='tr';
|
$tagtype='tr';
|
||||||
@ -1989,6 +1989,7 @@ class ExtraFields
|
|||||||
|
|
||||||
$out = '<'.$tagtype.' id="trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').'" class="trextrafieldseparator trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').'">';
|
$out = '<'.$tagtype.' id="trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').'" class="trextrafieldseparator trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').'">';
|
||||||
$out .= '<'.$tagtype_dyn.' '.(!empty($colspan)?'colspan="' . $colspan . '"':'').'>';
|
$out .= '<'.$tagtype_dyn.' '.(!empty($colspan)?'colspan="' . $colspan . '"':'').'>';
|
||||||
|
// Some js code will be injected here to manage the collapsing of extrafields
|
||||||
$out .='<strong>';
|
$out .='<strong>';
|
||||||
$out .= $langs->trans($this->attributes[$object->table_element]['label'][$key]);
|
$out .= $langs->trans($this->attributes[$object->table_element]['label'][$key]);
|
||||||
$out .= '</strong>';
|
$out .= '</strong>';
|
||||||
@ -2011,15 +2012,17 @@ class ExtraFields
|
|||||||
$out .= '<script type="text/javascript">'."\n";
|
$out .= '<script type="text/javascript">'."\n";
|
||||||
$out .= 'jQuery(document).ready(function(){'."\n";
|
$out .= 'jQuery(document).ready(function(){'."\n";
|
||||||
if ($collapse_display === false) {
|
if ($collapse_display === false) {
|
||||||
|
$out .= ' console.log("Inject js for the collapsing of extrafield '.$key.' - hide");';
|
||||||
$out .= ' jQuery("#trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').' '.$tagtype_dyn.'").prepend("<span class=\"cursorpointer far fa-plus-square\"></span> ");'."\n";
|
$out .= ' jQuery("#trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').' '.$tagtype_dyn.'").prepend("<span class=\"cursorpointer far fa-plus-square\"></span> ");'."\n";
|
||||||
$out .= ' jQuery(".trextrafields_collapse'.$extrafields_collapse_num.'").hide();'."\n";
|
$out .= ' jQuery(".trextrafields_collapse'.$extrafields_collapse_num.'").hide();'."\n";
|
||||||
} else {
|
} else {
|
||||||
|
$out .= ' console.log("Inject js for collapsing of extrafield '.$key.' - keep visible and set cookie");';
|
||||||
$out .= ' jQuery("#trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').' '.$tagtype_dyn.'").prepend("<span class=\"cursorpointer far fa-minus-square\"></span> ");'."\n";
|
$out .= ' jQuery("#trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').' '.$tagtype_dyn.'").prepend("<span class=\"cursorpointer far fa-minus-square\"></span> ");'."\n";
|
||||||
$out .= ' document.cookie = "DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=1; path='.$_SERVER["PHP_SELF"].'"'."\n";
|
$out .= ' document.cookie = "DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=1; path='.$_SERVER["PHP_SELF"].'"'."\n";
|
||||||
}
|
}
|
||||||
$out .= ' jQuery("#trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').'").click(function(){'."\n";
|
$out .= ' jQuery("#trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').'").click(function(){'."\n";
|
||||||
$out .= ' console.log("We click on collapse/uncollapse .trextrafields_collapse'.$extrafields_collapse_num.'");'."\n";
|
$out .= ' console.log("We click on collapse/uncollapse .trextrafields_collapse'.$extrafields_collapse_num.'");'."\n";
|
||||||
$out .= ' jQuery(".trextrafields_collapse'.$extrafields_collapse_num.'").toggle(300, function(){'."\n";
|
$out .= ' jQuery(".trextrafields_collapse'.$extrafields_collapse_num.'").toggle(100, function(){'."\n";
|
||||||
$out .= ' if (jQuery(".trextrafields_collapse'.$extrafields_collapse_num.'").is(":hidden")) {'."\n";
|
$out .= ' if (jQuery(".trextrafields_collapse'.$extrafields_collapse_num.'").is(":hidden")) {'."\n";
|
||||||
$out .= ' jQuery("#trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').' '.$tagtype_dyn.' span").addClass("fa-plus-square").removeClass("fa-minus-square");'."\n";
|
$out .= ' jQuery("#trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').' '.$tagtype_dyn.' span").addClass("fa-plus-square").removeClass("fa-minus-square");'."\n";
|
||||||
$out .= ' document.cookie = "DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=0; path='.$_SERVER["PHP_SELF"].'"'."\n";
|
$out .= ' document.cookie = "DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=0; path='.$_SERVER["PHP_SELF"].'"'."\n";
|
||||||
|
|||||||
@ -1363,7 +1363,7 @@ class Form
|
|||||||
$sql .= " AND s.status <> 0";
|
$sql .= " AND s.status <> 0";
|
||||||
}
|
}
|
||||||
if (!empty($excludeids)) {
|
if (!empty($excludeids)) {
|
||||||
$sql .= " AND rowid NOT IN (".$this->db->sanitize(join(',', $excludeids)).")";
|
$sql .= " AND s.rowid NOT IN (".$this->db->sanitize(join(',', $excludeids)).")";
|
||||||
}
|
}
|
||||||
// Add criteria
|
// Add criteria
|
||||||
if ($filterkey && $filterkey != '') {
|
if ($filterkey && $filterkey != '') {
|
||||||
@ -3383,9 +3383,9 @@ class Form
|
|||||||
$opt .= ' disabled';
|
$opt .= ' disabled';
|
||||||
}
|
}
|
||||||
if (!empty($objp->idprodfournprice) && $objp->idprodfournprice > 0) {
|
if (!empty($objp->idprodfournprice) && $objp->idprodfournprice > 0) {
|
||||||
$opt .= ' data-qty="'.$objp->quantity.'" data-up="'.$objp->unitprice.'" data-discount="'.$outdiscount.'"';
|
$opt .= ' data-product-id="'.$objp->rowid.'" data-price-id="'.$objp->idprodfournprice.'" data-qty="'.$objp->quantity.'" data-up="'.$objp->unitprice.'" data-discount="'.$outdiscount.'"';
|
||||||
}
|
}
|
||||||
$opt .= ' data-description="'.dol_escape_htmltag($objp->description).'"';
|
$opt .= ' data-description="'.dol_escape_htmltag($objp->description, 0, 1).'"';
|
||||||
$opt .= ' data-html="'.dol_escape_htmltag($optlabel).'"';
|
$opt .= ' data-html="'.dol_escape_htmltag($optlabel).'"';
|
||||||
$opt .= '>';
|
$opt .= '>';
|
||||||
|
|
||||||
|
|||||||
@ -717,6 +717,8 @@ class FormCompany extends Form
|
|||||||
print ' onChange="'.$javaScript.'"';
|
print ' onChange="'.$javaScript.'"';
|
||||||
}
|
}
|
||||||
print '>';
|
print '>';
|
||||||
|
print '<option value="-1"> </option>';
|
||||||
|
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if ($num) {
|
if ($num) {
|
||||||
|
|||||||
@ -1209,7 +1209,7 @@ class FormOther
|
|||||||
async: false
|
async: false
|
||||||
});
|
});
|
||||||
// We force reload to be sure to get all boxes into list
|
// We force reload to be sure to get all boxes into list
|
||||||
window.location.search=\'mainmenu='.GETPOST("mainmenu", "aZ09").'&leftmenu='.GETPOST('leftmenu', "aZ09").'&action=delbox\';
|
window.location.search=\'mainmenu='.GETPOST("mainmenu", "aZ09").'&leftmenu='.GETPOST('leftmenu', "aZ09").'&action=delbox&token='.newToken().'\';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -204,15 +204,27 @@ class Ldap
|
|||||||
|
|
||||||
if ($this->serverPing($host, $this->serverPort) === true) {
|
if ($this->serverPing($host, $this->serverPort) === true) {
|
||||||
$this->connection = ldap_connect($host, $this->serverPort);
|
$this->connection = ldap_connect($host, $this->serverPort);
|
||||||
|
} else {
|
||||||
|
if (preg_match('/^ldaps/i', $host)) {
|
||||||
|
// With host = ldaps://server, the serverPing to ssl://server sometimes fails, even if the ldap_connect succeed, so
|
||||||
|
// we test this case and continue in suche a case even if serverPing fails.
|
||||||
|
$this->connection = ldap_connect($host, $this->serverPort);
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (is_resource($this->connection)) {
|
if (is_resource($this->connection)) {
|
||||||
// Begin TLS if requested by the configuration
|
// Upgrade connexion to TLS, if requested by the configuration
|
||||||
if (!empty($conf->global->LDAP_SERVER_USE_TLS)) {
|
if (!empty($conf->global->LDAP_SERVER_USE_TLS)) {
|
||||||
if (!ldap_start_tls($this->connection)) {
|
// For test/debug
|
||||||
|
//ldap_set_option($this->connection, LDAP_OPT_DEBUG_LEVEL, 7);
|
||||||
|
//ldap_set_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, 3);
|
||||||
|
|
||||||
|
$resulttls = ldap_start_tls($this->connection);
|
||||||
|
if (!$resulttls) {
|
||||||
dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING);
|
dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING);
|
||||||
|
$this->error = 'ldap_start_tls Failed to start TLS '.ldap_errno($this->connection).' '.ldap_error($this->connection);
|
||||||
$connected = 0;
|
$connected = 0;
|
||||||
$this->close();
|
$this->close();
|
||||||
}
|
}
|
||||||
@ -696,15 +708,31 @@ class Ldap
|
|||||||
*/
|
*/
|
||||||
public function serverPing($host, $port = 389, $timeout = 1)
|
public function serverPing($host, $port = 389, $timeout = 1)
|
||||||
{
|
{
|
||||||
// Replace ldaps:// by ssl://
|
$regs = array();
|
||||||
if (preg_match('/^ldaps:\/\/([^\/]+)\/?$/', $host, $regs)) {
|
if (preg_match('/^ldaps:\/\/([^\/]+)\/?$/', $host, $regs)) {
|
||||||
|
// Replace ldaps:// by ssl://
|
||||||
$host = 'ssl://'.$regs[1];
|
$host = 'ssl://'.$regs[1];
|
||||||
}
|
} elseif (preg_match('/^ldap:\/\/([^\/]+)\/?$/', $host, $regs)) {
|
||||||
// Remove ldap://
|
// Remove ldap://
|
||||||
if (preg_match('/^ldap:\/\/([^\/]+)\/?$/', $host, $regs)) {
|
|
||||||
$host = $regs[1];
|
$host = $regs[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//var_dump($newhostforstream); var_dump($host); var_dump($port);
|
||||||
|
//$host = 'ssl://ldap.test.local:636';
|
||||||
|
//$port = 636;
|
||||||
|
|
||||||
|
$errno = $errstr = 0;
|
||||||
|
/*
|
||||||
|
if ($methodtochecktcpconnect == 'socket') {
|
||||||
|
Try to use socket_create() method.
|
||||||
|
Method that use stream_context_create() works only on registered listed in stream stream_get_wrappers(): http, https, ftp, ...
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Use the method fsockopen to test tcp connect. No way to ignore ssl certificate errors with this method !
|
||||||
$op = @fsockopen($host, $port, $errno, $errstr, $timeout);
|
$op = @fsockopen($host, $port, $errno, $errstr, $timeout);
|
||||||
|
|
||||||
|
//var_dump($op);
|
||||||
if (!$op) {
|
if (!$op) {
|
||||||
return false; //DC is N/A
|
return false; //DC is N/A
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -110,14 +110,13 @@ print '
|
|||||||
}
|
}
|
||||||
|
|
||||||
a.alilevel0 {
|
a.alilevel0 {
|
||||||
background-image: url(\''.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/next.png\') !important;
|
background-image: url(\''.DOL_URL_ROOT.'/theme/'.urlencode($conf->theme).'/img/next.png\') !important;
|
||||||
background-repeat: no-repeat !important;
|
background-repeat: no-repeat !important;
|
||||||
background-position-x: 10px;
|
background-position-x: 10px;
|
||||||
background-position-y: 16px;
|
background-position-y: 16px;
|
||||||
padding: 1em 15px 1em 40px;
|
padding: 1em 15px 1em 40px;
|
||||||
}
|
}
|
||||||
li.lilevel0 font.vsmenudisabled {
|
li.lilevel0 font.vsmenudisabled {
|
||||||
/* background-image: url(/dolibarr_dev/htdocs/theme/eldy/img/next.png) !important; */
|
|
||||||
background-repeat: no-repeat !important;
|
background-repeat: no-repeat !important;
|
||||||
background-position-x: 10px;
|
background-position-x: 10px;
|
||||||
background-position-y: 16px;
|
background-position-y: 16px;
|
||||||
@ -178,6 +177,9 @@ print '
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
.vsmenudisabled .fa, .vsmenudisabled .fas, .vsmenudisabled .far {
|
||||||
|
color: #aaa !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@ -675,26 +675,26 @@ function ihm_prepare_head()
|
|||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=language";
|
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=other";
|
||||||
$head[$h][1] = $langs->trans("DefaultLanguage");
|
$head[$h][1] = $langs->trans("LanguageAndPresentation");
|
||||||
$head[$h][2] = 'language';
|
$head[$h][2] = 'other';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=template";
|
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=template";
|
||||||
$head[$h][1] = $langs->trans("DefaultSkin");
|
$head[$h][1] = $langs->trans("SkinAndColors");
|
||||||
$head[$h][2] = 'template';
|
$head[$h][2] = 'template';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=dashboard";
|
||||||
|
$head[$h][1] = $langs->trans("Dashboard");
|
||||||
|
$head[$h][2] = 'dashboard';
|
||||||
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=login";
|
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=login";
|
||||||
$head[$h][1] = $langs->trans("LoginPage");
|
$head[$h][1] = $langs->trans("LoginPage");
|
||||||
$head[$h][2] = 'login';
|
$head[$h][2] = 'login';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=other";
|
|
||||||
$head[$h][1] = $langs->trans("Miscellaneous");
|
|
||||||
$head[$h][2] = 'other';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'ihm_admin');
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'ihm_admin');
|
||||||
|
|
||||||
complete_head_from_modules($conf, $langs, null, $head, $h, 'ihm_admin', 'remove');
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'ihm_admin', 'remove');
|
||||||
|
|||||||
@ -543,12 +543,14 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete =
|
|||||||
* @param int $revertonoff 1=Revert on/off
|
* @param int $revertonoff 1=Revert on/off
|
||||||
* @param int $strict Use only "disabled" with delConstant and "enabled" with setConstant
|
* @param int $strict Use only "disabled" with delConstant and "enabled" with setConstant
|
||||||
* @param int $forcereload Force to reload page if we click/change value (this is supported only when there is no 'alert' option in input)
|
* @param int $forcereload Force to reload page if we click/change value (this is supported only when there is no 'alert' option in input)
|
||||||
* @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No left margin. Works for fontawesome picto only.
|
* @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No left margin.
|
||||||
* @param int $forcenoajax 1 = Force to use a ahref link instead of ajax code.
|
* @param int $forcenoajax 1 = Force to use a ahref link instead of ajax code.
|
||||||
* @param int $setzeroinsteadofdel 1 = Set constantto '0' instead of deleting it
|
* @param int $setzeroinsteadofdel 1 = Set constantto '0' instead of deleting it
|
||||||
|
* @param string $suffix Suffix to use on the name of the switch_on picto. Example: '', '_red'
|
||||||
|
* @param string $mode Add parameter &mode= to the href link (Used for href link)
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function ajax_constantonoff($code, $input = array(), $entity = null, $revertonoff = 0, $strict = 0, $forcereload = 0, $marginleftonlyshort = 2, $forcenoajax = 0, $setzeroinsteadofdel = 0)
|
function ajax_constantonoff($code, $input = array(), $entity = null, $revertonoff = 0, $strict = 0, $forcereload = 0, $marginleftonlyshort = 2, $forcenoajax = 0, $setzeroinsteadofdel = 0, $suffix = '', $mode = '')
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
@ -559,9 +561,9 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof
|
|||||||
|
|
||||||
if (empty($conf->use_javascript_ajax) || $forcenoajax) {
|
if (empty($conf->use_javascript_ajax) || $forcenoajax) {
|
||||||
if (empty($conf->global->$code)) {
|
if (empty($conf->global->$code)) {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_'.$code.'&token='.newToken().'&entity='.$entity.'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_'.$code.'&token='.newToken().'&entity='.$entity.($mode ? '&mode='.$mode : '').'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||||
} else {
|
} else {
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_'.$code.'&token='.newToken().'&entity='.$entity.'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_'.$code.'&token='.newToken().'&entity='.$entity.($mode ? '&mode='.$mode : '').'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$out = "\n<!-- Ajax code to switch constant ".$code." -->".'
|
$out = "\n<!-- Ajax code to switch constant ".$code." -->".'
|
||||||
@ -607,7 +609,7 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof
|
|||||||
|
|
||||||
$out .= '<div id="confirm_'.$code.'" title="" style="display: none;"></div>';
|
$out .= '<div id="confirm_'.$code.'" title="" style="display: none;"></div>';
|
||||||
$out .= '<span id="set_'.$code.'" class="valignmiddle linkobject '.(!empty($conf->global->$code) ? 'hideobject' : '').'">'.($revertonoff ?img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
$out .= '<span id="set_'.$code.'" class="valignmiddle linkobject '.(!empty($conf->global->$code) ? 'hideobject' : '').'">'.($revertonoff ?img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
||||||
$out .= '<span id="del_'.$code.'" class="valignmiddle linkobject '.(!empty($conf->global->$code) ? '' : 'hideobject').'">'.($revertonoff ?img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
$out .= '<span id="del_'.$code.'" class="valignmiddle linkobject '.(!empty($conf->global->$code) ? '' : 'hideobject').'">'.($revertonoff ?img_picto($langs->trans("Disabled"), 'switch_off'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort)).'</span>';
|
||||||
$out .= "\n";
|
$out .= "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1548,7 +1548,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
$sql .= "OR (";
|
$sql .= "OR (";
|
||||||
}
|
}
|
||||||
if (!empty($code)) {
|
if (!empty($code)) {
|
||||||
addEventTypeSQL($sql, $code, $donetodo, $now, $filters, "");
|
addEventTypeSQL($sql, $code);
|
||||||
}
|
}
|
||||||
if ($key != 0) {
|
if ($key != 0) {
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
@ -1556,9 +1556,11 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
}
|
}
|
||||||
$sql .= ')';
|
$sql .= ')';
|
||||||
} elseif (!empty($actioncode)) {
|
} elseif (!empty($actioncode)) {
|
||||||
addEventTypeSQL($sql, $actioncode, $donetodo, $now, $filters);
|
addEventTypeSQL($sql, $actioncode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addOtherFilterSQL($sql, $donetodo, $now, $filters);
|
||||||
|
|
||||||
if (is_array($actioncode)) {
|
if (is_array($actioncode)) {
|
||||||
foreach ($actioncode as $code) {
|
foreach ($actioncode as $code) {
|
||||||
$sql2 = addMailingEventTypeSQL($code, $objcon, $filterobj);
|
$sql2 = addMailingEventTypeSQL($code, $objcon, $filterobj);
|
||||||
@ -2021,13 +2023,10 @@ function show_subsidiaries($conf, $langs, $db, $object)
|
|||||||
*
|
*
|
||||||
* @param string $sql $sql modified
|
* @param string $sql $sql modified
|
||||||
* @param string $actioncode Action code
|
* @param string $actioncode Action code
|
||||||
* @param string $donetodo donetodo
|
|
||||||
* @param string $now now
|
|
||||||
* @param string $filters array
|
|
||||||
* @param string $sqlANDOR "AND", "OR" or "" sql condition
|
* @param string $sqlANDOR "AND", "OR" or "" sql condition
|
||||||
* @return string sql request
|
* @return string sql request
|
||||||
*/
|
*/
|
||||||
function addEventTypeSQL(&$sql, $actioncode, $donetodo, $now, $filters, $sqlANDOR = "AND")
|
function addEventTypeSQL(&$sql, $actioncode, $sqlANDOR = "AND")
|
||||||
{
|
{
|
||||||
global $conf, $db;
|
global $conf, $db;
|
||||||
// Condition on actioncode
|
// Condition on actioncode
|
||||||
@ -2054,6 +2053,23 @@ function addEventTypeSQL(&$sql, $actioncode, $donetodo, $now, $filters, $sqlANDO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $sql;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add Event Type SQL
|
||||||
|
*
|
||||||
|
* @param string $sql $sql modified
|
||||||
|
* @param string $donetodo donetodo
|
||||||
|
* @param string $now now
|
||||||
|
* @param string $filters array
|
||||||
|
* @return string sql request
|
||||||
|
*/
|
||||||
|
function addOtherFilterSQL(&$sql, $donetodo, $now, $filters)
|
||||||
|
{
|
||||||
|
global $conf, $db;
|
||||||
|
// Condition on actioncode
|
||||||
|
|
||||||
if ($donetodo == 'todo') {
|
if ($donetodo == 'todo') {
|
||||||
$sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
|
$sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
|
||||||
} elseif ($donetodo == 'done') {
|
} elseif ($donetodo == 'done') {
|
||||||
|
|||||||
@ -2303,9 +2303,13 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||||||
$sqlprotectagainstexternals = '';
|
$sqlprotectagainstexternals = '';
|
||||||
$ret = array();
|
$ret = array();
|
||||||
|
|
||||||
// Find the subdirectory name as the reference. For exemple original_file='10/myfile.pdf' -> refname='10'
|
// Find the subdirectory name as the reference. For example original_file='10/myfile.pdf' -> refname='10'
|
||||||
if (empty($refname)) {
|
if (empty($refname)) {
|
||||||
$refname = basename(dirname($original_file)."/");
|
$refname = basename(dirname($original_file)."/");
|
||||||
|
if ($refname == 'thumbs') {
|
||||||
|
// If we get the thumbns directory, we must go one step higher. For example original_file='10/thumbs/myfile_small.jpg' -> refname='10'
|
||||||
|
$refname = basename(dirname(dirname($original_file))."/");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define possible keys to use for permission check
|
// Define possible keys to use for permission check
|
||||||
|
|||||||
@ -3615,7 +3615,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'movement', 'mrp', 'note', 'next',
|
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'movement', 'mrp', 'note', 'next',
|
||||||
'off', 'on', 'order',
|
'off', 'on', 'order',
|
||||||
'paiment', 'paragraph', 'play', 'pdf', 'phone', 'phoning', 'phoning_mobile', 'phoning_fax', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'stock', 'resize', 'service', 'stats', 'trip',
|
'paiment', 'paragraph', 'play', 'pdf', 'phone', 'phoning', 'phoning_mobile', 'phoning_fax', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'stock', 'resize', 'service', 'stats', 'trip',
|
||||||
'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench',
|
'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'switch_on_red', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench',
|
||||||
'github', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
'github', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
||||||
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
|
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
|
||||||
'generic', 'home', 'hrm', 'members', 'products', 'invoicing',
|
'generic', 'home', 'hrm', 'members', 'products', 'invoicing',
|
||||||
@ -3659,7 +3659,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'member'=>'user-alt', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
|
'member'=>'user-alt', 'meeting'=>'chalkboard-teacher', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
|
||||||
'trip'=>'wallet', 'expensereport'=>'wallet', 'group'=>'users', 'movement'=>'people-carry',
|
'trip'=>'wallet', 'expensereport'=>'wallet', 'group'=>'users', 'movement'=>'people-carry',
|
||||||
'sign-out'=>'sign-out-alt',
|
'sign-out'=>'sign-out-alt',
|
||||||
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star',
|
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'switch_on_red'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star',
|
||||||
'bank'=>'university', 'close_title'=>'times', 'delete'=>'trash', 'edit'=>'pencil-alt', 'filter'=>'filter',
|
'bank'=>'university', 'close_title'=>'times', 'delete'=>'trash', 'edit'=>'pencil-alt', 'filter'=>'filter',
|
||||||
'list-alt'=>'list-alt', 'calendar'=>'calendar-alt', 'calendarmonth'=>'calendar-alt', 'calendarweek'=>'calendar-week', 'calendarmonth'=>'calendar-alt', 'calendarday'=>'calendar-day', 'calendarperuser'=>'table',
|
'list-alt'=>'list-alt', 'calendar'=>'calendar-alt', 'calendarmonth'=>'calendar-alt', 'calendarweek'=>'calendar-week', 'calendarmonth'=>'calendar-alt', 'calendarday'=>'calendar-day', 'calendarperuser'=>'table',
|
||||||
'intervention'=>'ambulance', 'invoice'=>'file-invoice-dollar', 'multicurrency'=>'dollar-sign', 'order'=>'file-invoice',
|
'intervention'=>'ambulance', 'invoice'=>'file-invoice-dollar', 'multicurrency'=>'dollar-sign', 'order'=>'file-invoice',
|
||||||
@ -3720,7 +3720,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
// Define $marginleftonlyshort
|
// Define $marginleftonlyshort
|
||||||
$arrayconvpictotomarginleftonly = array(
|
$arrayconvpictotomarginleftonly = array(
|
||||||
'bank', 'check', 'delete', 'generic', 'grip', 'grip_title', 'jabber',
|
'bank', 'check', 'delete', 'generic', 'grip', 'grip_title', 'jabber',
|
||||||
'grip_title', 'grip', 'listlight', 'note', 'on', 'off', 'playdisabled', 'printer', 'resize', 'sign-out', 'stats', 'switch_on', 'switch_off',
|
'grip_title', 'grip', 'listlight', 'note', 'on', 'off', 'playdisabled', 'printer', 'resize', 'sign-out', 'stats', 'switch_on', 'switch_on_red', 'switch_off',
|
||||||
'uparrow', '1uparrow', '1downarrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected'
|
'uparrow', '1uparrow', '1downarrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected'
|
||||||
);
|
);
|
||||||
if (!isset($arrayconvpictotomarginleftonly[$pictowithouttext])) {
|
if (!isset($arrayconvpictotomarginleftonly[$pictowithouttext])) {
|
||||||
@ -3742,7 +3742,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'members'=>'infobox-adherent', 'member'=>'infobox-adherent', 'money-bill-alt'=>'infobox-bank_account',
|
'members'=>'infobox-adherent', 'member'=>'infobox-adherent', 'money-bill-alt'=>'infobox-bank_account',
|
||||||
'order'=>'infobox-commande',
|
'order'=>'infobox-commande',
|
||||||
'user'=>'infobox-adherent', 'users'=>'infobox-adherent',
|
'user'=>'infobox-adherent', 'users'=>'infobox-adherent',
|
||||||
'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4',
|
'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4', 'switch_on_red'=>'font-status8',
|
||||||
'holiday'=>'infobox-holiday', 'info'=>'opacityhigh', 'invoice'=>'infobox-commande',
|
'holiday'=>'infobox-holiday', 'info'=>'opacityhigh', 'invoice'=>'infobox-commande',
|
||||||
'knowledgemanagement'=>'infobox-contrat rotate90', 'loan'=>'infobox-bank_account',
|
'knowledgemanagement'=>'infobox-contrat rotate90', 'loan'=>'infobox-bank_account',
|
||||||
'payment'=>'infobox-bank_account', 'poll'=>'infobox-adherent', 'pos'=>'infobox-bank_account', 'project'=>'infobox-project', 'projecttask'=>'infobox-project', 'propal'=>'infobox-propal',
|
'payment'=>'infobox-bank_account', 'poll'=>'infobox-adherent', 'pos'=>'infobox-bank_account', 'project'=>'infobox-project', 'projecttask'=>'infobox-project', 'propal'=>'infobox-propal',
|
||||||
|
|||||||
@ -207,7 +207,7 @@ function project_prepare_head(Project $project)
|
|||||||
if ($conf->eventorganization->enabled && !empty($project->usage_organize_event)) {
|
if ($conf->eventorganization->enabled && !empty($project->usage_organize_event)) {
|
||||||
$langs->load('eventorganization');
|
$langs->load('eventorganization');
|
||||||
$head[$h][0] = DOL_URL_ROOT . '/eventorganization/conferenceorbooth_list.php?projectid=' . $project->id;
|
$head[$h][0] = DOL_URL_ROOT . '/eventorganization/conferenceorbooth_list.php?projectid=' . $project->id;
|
||||||
$head[$h][1] = $langs->trans("ConferenceOrBoothTab");
|
$head[$h][1] = $langs->trans("EventOrganization");
|
||||||
|
|
||||||
// Enable caching of conf or booth count
|
// Enable caching of conf or booth count
|
||||||
$nbConfOrBooth = 0;
|
$nbConfOrBooth = 0;
|
||||||
|
|||||||
@ -611,7 +611,7 @@ function checkUserAccessToObject($user, array $featuresarray, $objectid = 0, $ta
|
|||||||
$feature = 'projet_task';
|
$feature = 'projet_task';
|
||||||
}
|
}
|
||||||
|
|
||||||
$check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'payment', 'payment_supplier', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday', 'salary', 'website'); // Test on entity only (Objects with no link to company)
|
$check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'payment', 'payment_supplier', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday', 'salaries', 'website'); // Test on entity only (Objects with no link to company)
|
||||||
$checksoc = array('societe'); // Test for societe object
|
$checksoc = array('societe'); // Test for societe object
|
||||||
$checkother = array('contact', 'agenda'); // Test on entity + link to third party on field $dbt_keyfield. Allowed if link is empty (Ex: contacts...).
|
$checkother = array('contact', 'agenda'); // Test on entity + link to third party on field $dbt_keyfield. Allowed if link is empty (Ex: contacts...).
|
||||||
$checkproject = array('projet', 'project'); // Test for project object
|
$checkproject = array('projet', 'project'); // Test for project object
|
||||||
|
|||||||
@ -382,12 +382,18 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
|||||||
'submenus' => array(),
|
'submenus' => array(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Tickets and knwoledge base
|
// Tickets and knowledge base
|
||||||
$tmpentry = array(
|
$tmpentry = array(
|
||||||
'enabled'=>(!empty($conf->ticket->enabled) || !empty($conf->knwoledgemanagement->enabled)),
|
'enabled'=>(!empty($conf->ticket->enabled) || !empty($conf->knowledgemanagement->enabled)),
|
||||||
'perms'=>(!empty($user->rights->ticket->read) || !empty($user->rights->knwoledgemanagement->read)),
|
'perms'=>(!empty($user->rights->ticket->read) || !empty($user->rights->knowledgemanagement->knowledgerecord->read)),
|
||||||
'module'=>'ticket|knwoledgemanagement'
|
'module'=>'ticket|knowledgemanagement'
|
||||||
);
|
);
|
||||||
|
$link = '';
|
||||||
|
if (!empty($conf->ticket->enabled)) {
|
||||||
|
$link = '/ticket/index.php?mainmenu=ticket&leftmenu=';
|
||||||
|
} else {
|
||||||
|
$link = '/knowledgemanagement/knowledgerecord_list.php?mainmenu=ticket&leftmenu=';
|
||||||
|
}
|
||||||
$menu_arr[] = array(
|
$menu_arr[] = array(
|
||||||
'name' => 'Ticket',
|
'name' => 'Ticket',
|
||||||
'link' => '/ticket/index.php?mainmenu=ticket&leftmenu=',
|
'link' => '/ticket/index.php?mainmenu=ticket&leftmenu=',
|
||||||
@ -2092,8 +2098,10 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
$cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/', '', $menu_array[$i]['url']));
|
$cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/', '', $menu_array[$i]['url']));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') { // Enabled so visible, except if parent was not enabled.
|
if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') {
|
||||||
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring;
|
// Enabled so visible, except if parent was not enabled.
|
||||||
|
print '<div class="menu_contenu'.$cssmenu.'">';
|
||||||
|
print $tabstring;
|
||||||
if ($shorturlwithoutparam) {
|
if ($shorturlwithoutparam) {
|
||||||
print '<a class="vsmenu" title="'.dol_escape_htmltag(dol_string_nohtmltag($menu_array[$i]['titre'])).'" href="'.$url.'"'.($menu_array[$i]['target'] ? ' target="'.$menu_array[$i]['target'].'"' : '').'>';
|
print '<a class="vsmenu" title="'.dol_escape_htmltag(dol_string_nohtmltag($menu_array[$i]['titre'])).'" href="'.$url.'"'.($menu_array[$i]['target'] ? ' target="'.$menu_array[$i]['target'].'"' : '').'>';
|
||||||
} else {
|
} else {
|
||||||
@ -2110,8 +2118,11 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
print '</div>'."\n";
|
print '</div>'."\n";
|
||||||
} elseif ($showmenu && $lastlevel0 == 'enabled') { // Not enabled but visible (so greyed), except if parent was not enabled.
|
} elseif ($showmenu && $lastlevel0 == 'enabled') {
|
||||||
print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
// Not enabled but visible (so greyed), except if parent was not enabled.
|
||||||
|
print '<div class="menu_contenu'.$cssmenu.'">';
|
||||||
|
print $tabstring;
|
||||||
|
print '<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -206,6 +206,7 @@ class MenuManager
|
|||||||
$canonnexturl = preg_replace('/\?.*$/', '', $nexturl);
|
$canonnexturl = preg_replace('/\?.*$/', '', $nexturl);
|
||||||
//var_dump($canonrelurl);
|
//var_dump($canonrelurl);
|
||||||
//var_dump($canonnexturl);
|
//var_dump($canonnexturl);
|
||||||
|
|
||||||
print '<ul>'."\n";
|
print '<ul>'."\n";
|
||||||
if (($canonrelurl != $canonnexturl && !in_array($val['mainmenu'], array('tools')))
|
if (($canonrelurl != $canonnexturl && !in_array($val['mainmenu'], array('tools')))
|
||||||
|| (strpos($canonrelurl, '/product/index.php') !== false || strpos($canonrelurl, '/compta/bank/list.php') !== false)) {
|
|| (strpos($canonrelurl, '/product/index.php') !== false || strpos($canonrelurl, '/compta/bank/list.php') !== false)) {
|
||||||
@ -225,15 +226,18 @@ class MenuManager
|
|||||||
print '</li>'."\n";
|
print '</li>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if ($val['level'] == 0) {
|
if ($val['level'] == 0) {
|
||||||
if ($val['enabled']) {
|
if ($val['enabled']) {
|
||||||
$lastlevel[0] = 'enabled';
|
$lastlevel[0] = 'enabled';
|
||||||
} elseif ($showmenu) { // Not enabled but visible (so greyed)
|
} elseif ($showmenu) {
|
||||||
|
// Not enabled but visible (so greyed)
|
||||||
$lastlevel[0] = 'greyed';
|
$lastlevel[0] = 'greyed';
|
||||||
} else {
|
} else {
|
||||||
$lastlevel[0] = 'hidden';
|
$lastlevel[0] = 'hidden';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
$lastlevel2 = array();
|
$lastlevel2 = array();
|
||||||
foreach ($submenu->liste as $key2 => $val2) { // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
foreach ($submenu->liste as $key2 => $val2) { // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||||
@ -313,7 +317,14 @@ class MenuManager
|
|||||||
print '</ul>';
|
print '</ul>';
|
||||||
}
|
}
|
||||||
if ($val['enabled'] == 2) {
|
if ($val['enabled'] == 2) {
|
||||||
print '<font class="vsmenudisabled">'.$val['titre'].'</font>';
|
print '<font class="vsmenudisabled">';
|
||||||
|
// Add font-awesome
|
||||||
|
if ($val['level'] == 0 && !empty($val['prefix'])) {
|
||||||
|
print $val['prefix'];
|
||||||
|
}
|
||||||
|
|
||||||
|
print $val['titre'];
|
||||||
|
print '</font>';
|
||||||
}
|
}
|
||||||
print '</li>';
|
print '</li>';
|
||||||
print '</ul>'."\n";
|
print '</ul>'."\n";
|
||||||
|
|||||||
@ -285,13 +285,12 @@ class MenuManager
|
|||||||
}
|
}
|
||||||
print $disabled.'">'; // ui-btn to highlight on clic
|
print $disabled.'">'; // ui-btn to highlight on clic
|
||||||
if ($relurl2) {
|
if ($relurl2) {
|
||||||
if ($val2['enabled']) { // Allowed
|
if ($val2['enabled']) {
|
||||||
print '<a href="'.$relurl2.'"';
|
// Allowed
|
||||||
//print ' data-ajax="false"';
|
print '<a href="'.$relurl2.'">';
|
||||||
print '>';
|
|
||||||
$lastlevel2[$val2['level']] = 'enabled';
|
$lastlevel2[$val2['level']] = 'enabled';
|
||||||
} else // Not allowed but visible (greyed)
|
} else {
|
||||||
{
|
// Not allowed but visible (greyed)
|
||||||
print '<a href="#" class="vsmenudisabled">';
|
print '<a href="#" class="vsmenudisabled">';
|
||||||
$lastlevel2[$val2['level']] = 'greyed';
|
$lastlevel2[$val2['level']] = 'greyed';
|
||||||
}
|
}
|
||||||
@ -310,6 +309,7 @@ class MenuManager
|
|||||||
// Allowed
|
// Allowed
|
||||||
print '</a>';
|
print '</a>';
|
||||||
} else {
|
} else {
|
||||||
|
// Not allowed
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,7 +58,7 @@ foreach ($object->fields as $key => $val) {
|
|||||||
$value = $object->$key;
|
$value = $object->$key;
|
||||||
|
|
||||||
print '<tr class="field_'.$key.'"><td';
|
print '<tr class="field_'.$key.'"><td';
|
||||||
print ' class="titlefield fieldname_'.$key;
|
print ' class="'.(empty($val['tdcss']) ? 'titlefield' : $val['tdcss']).' fieldname_'.$key;
|
||||||
//if ($val['notnull'] > 0) print ' fieldrequired'; // No fieldrequired on the view output
|
//if ($val['notnull'] > 0) print ' fieldrequired'; // No fieldrequired on the view output
|
||||||
if ($val['type'] == 'text' || $val['type'] == 'html') {
|
if ($val['type'] == 'text' || $val['type'] == 'html') {
|
||||||
print ' tdtop';
|
print ' tdtop';
|
||||||
@ -140,7 +140,7 @@ foreach ($object->fields as $key => $val) {
|
|||||||
$value = $object->$key;
|
$value = $object->$key;
|
||||||
|
|
||||||
print '<tr><td';
|
print '<tr><td';
|
||||||
print ' class="titlefield fieldname_'.$key;
|
print ' class="'.(empty($val['tdcss']) ? 'titlefield' : $val['tdcss']).' fieldname_'.$key;
|
||||||
//if ($val['notnull'] > 0) print ' fieldrequired'; // No fieldrequired inthe view output
|
//if ($val['notnull'] > 0) print ' fieldrequired'; // No fieldrequired inthe view output
|
||||||
if ($val['type'] == 'text' || $val['type'] == 'html') {
|
if ($val['type'] == 'text' || $val['type'] == 'html') {
|
||||||
print ' tdtop';
|
print ' tdtop';
|
||||||
|
|||||||
@ -89,7 +89,7 @@ if ($permission) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<form class="tagtr liste_titre">
|
<form class="tagtr liste_titre">
|
||||||
<div class="tagtd liste_titre"><?php echo $langs->trans("ThirdParty"); ?></div>
|
<div class="tagtd liste_titre"><?php echo img_object('', 'company', 'class="optiongrey paddingright"').$langs->trans("ThirdParty"); ?></div>
|
||||||
<div class="tagtd liste_titre"><?php echo img_picto($langs->trans("Users"), 'user', 'class="optiongrey paddingright"').$langs->trans("Users").' | '.img_picto($langs->trans("Contacts"), 'contact', 'class="optiongrey paddingright"').$langs->trans("Contacts"); ?></div>
|
<div class="tagtd liste_titre"><?php echo img_picto($langs->trans("Users"), 'user', 'class="optiongrey paddingright"').$langs->trans("Users").' | '.img_picto($langs->trans("Contacts"), 'contact', 'class="optiongrey paddingright"').$langs->trans("Contacts"); ?></div>
|
||||||
<div class="tagtd liste_titre"><?php echo $langs->trans("ContactType"); ?></div>
|
<div class="tagtd liste_titre"><?php echo $langs->trans("ContactType"); ?></div>
|
||||||
<div class="tagtd liste_titre"> </div>
|
<div class="tagtd liste_titre"> </div>
|
||||||
@ -140,11 +140,8 @@ if ($permission) {
|
|||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<div class="tagtd nowrap maxwidthonsmartphone noborderbottom">
|
<div class="tagtd nowrap maxwidthonsmartphone noborderbottom">
|
||||||
<?php $selectedCompany = isset($_GET["newcompany"]) ? $_GET["newcompany"] : (empty($object->socid) ? 0 : $object->socid);
|
<?php
|
||||||
// add company icon before select list
|
$selectedCompany = GETPOSTISSET("newcompany") ? GETPOST("newcompany", 'int') : (empty($object->socid) ? 0 : $object->socid);
|
||||||
if ($selectedCompany) {
|
|
||||||
echo img_object('', 'company', 'class="hideonsmartphone"');
|
|
||||||
}
|
|
||||||
$selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?>
|
$selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0, '', 'minwidth300imp'); ?>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="tagtd nowrap noborderbottom"><?php echo img_object('', 'contact').' '.$langs->trans("ThirdPartyContacts"); ?></div>-->
|
<!-- <div class="tagtd nowrap noborderbottom"><?php echo img_object('', 'contact').' '.$langs->trans("ThirdPartyContacts"); ?></div>-->
|
||||||
|
|||||||
@ -194,6 +194,9 @@ if (empty($reshook) && isset($extrafields->attributes[$object->table_element]['l
|
|||||||
if ($object->element == 'contact') {
|
if ($object->element == 'contact') {
|
||||||
$permok = $user->rights->societe->contact->creer;
|
$permok = $user->rights->societe->contact->creer;
|
||||||
}
|
}
|
||||||
|
if ($object->element == 'salary') {
|
||||||
|
$permok = $user->rights->salaries->read;
|
||||||
|
}
|
||||||
|
|
||||||
$isdraft = ((isset($object->statut) && $object->statut == 0) || (isset($object->status) && $object->status == 0));
|
$isdraft = ((isset($object->statut) && $object->statut == 0) || (isset($object->status) && $object->status == 0));
|
||||||
if (($isdraft || !empty($extrafields->attributes[$object->table_element]['alwayseditable'][$tmpkeyextra]))
|
if (($isdraft || !empty($extrafields->attributes[$object->table_element]['alwayseditable'][$tmpkeyextra]))
|
||||||
|
|||||||
@ -106,7 +106,7 @@ class ConferenceOrBooth extends ActionComm
|
|||||||
'id' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
'id' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
||||||
'ref' => array('type'=>'integer', 'label'=>'Ref', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
'ref' => array('type'=>'integer', 'label'=>'Ref', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
||||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'help'=>"Help text", 'showoncombobox'=>'1',),
|
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'help'=>"Help text", 'showoncombobox'=>'1',),
|
||||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty", 'picto'=>'company'),
|
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty", 'picto'=>'company', 'css'=>'maxwidth500'),
|
||||||
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1:t.usage_organize_event=1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'picto'=>'project'),
|
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1:t.usage_organize_event=1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'picto'=>'project'),
|
||||||
'note' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1),
|
'note' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1),
|
||||||
'fk_action' => array('type'=>'sellist:c_actioncomm:libelle:id::module LIKE (\'%@eventorganization\')', 'label'=>'Format', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1, 'css'=>'width300'),
|
'fk_action' => array('type'=>'sellist:c_actioncomm:libelle:id::module LIKE (\'%@eventorganization\')', 'label'=>'Format', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1, 'css'=>'width300'),
|
||||||
@ -246,7 +246,7 @@ class ConferenceOrBooth extends ActionComm
|
|||||||
|
|
||||||
$result = parent::fetch($id, $ref, $ref_ext, $email_msgid);
|
$result = parent::fetch($id, $ref, $ref_ext, $email_msgid);
|
||||||
|
|
||||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.urlencode($id).'&type=conf';
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.urlencode($id).'&type=conf';
|
||||||
|
|
||||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
@ -565,7 +565,7 @@ class ConferenceOrBooth extends ActionComm
|
|||||||
$label .= '<br>';
|
$label .= '<br>';
|
||||||
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->id;
|
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->id;
|
||||||
|
|
||||||
$url = dol_buildpath('/eventorganization/conferenceorbooth_card.php', 1).'?id='.$this->id;
|
$url = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.php?id='.$this->id;
|
||||||
|
|
||||||
if ($option != 'nolink') {
|
if ($option != 'nolink') {
|
||||||
// Add param to save lastsearch_values or not
|
// Add param to save lastsearch_values or not
|
||||||
|
|||||||
@ -63,6 +63,7 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $picto = 'contact';
|
public $picto = 'contact';
|
||||||
|
|
||||||
|
public $paid = 0;
|
||||||
|
|
||||||
const STATUS_DRAFT = 0;
|
const STATUS_DRAFT = 0;
|
||||||
const STATUS_VALIDATED = 1;
|
const STATUS_VALIDATED = 1;
|
||||||
@ -102,12 +103,12 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
public $fields=array(
|
public $fields=array(
|
||||||
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
||||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'comment'=>"Reference of object"),
|
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'comment'=>"Reference of object"),
|
||||||
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'Attendee', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty",),
|
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'Attendee', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty", 'picto'=>'company', 'css'=>'maxwidth500'),
|
||||||
'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>0, 'index'=>1,),
|
'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>0, 'index'=>1, 'picto'=>'agenda'),
|
||||||
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>0, 'index'=>1,),
|
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>0, 'index'=>1, 'picto'=>'project'),
|
||||||
'email' => array('type'=>'mail', 'label'=>'Email', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
|
'email' => array('type'=>'mail', 'label'=>'Email', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
|
||||||
'date_subscription' => array('type'=>'datetime', 'label'=>'DateSubscription', 'enabled'=>'1', 'position'=>56, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'1',),
|
'date_subscription' => array('type'=>'datetime', 'label'=>'DateOfRegistration', 'enabled'=>'1', 'position'=>56, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'1',),
|
||||||
'amount' => array('type'=>'price', 'label'=>'AmountOfSubscriptionPaid', 'enabled'=>'1', 'position'=>57, 'notnull'=>0, 'visible'=>1, 'default'=>'null', 'isameasure'=>'1', 'help'=>"AmountOfSubscriptionPaid",),
|
'amount' => array('type'=>'price', 'label'=>'AmountPaid', 'enabled'=>'1', 'position'=>57, 'notnull'=>0, 'visible'=>1, 'default'=>'null', 'isameasure'=>'1', 'help'=>"AmountOfSubscriptionPaid",),
|
||||||
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,),
|
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,),
|
||||||
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,),
|
'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,),
|
||||||
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
|
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
|
||||||
@ -730,6 +731,8 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
}
|
}
|
||||||
$label .= '<br>';
|
$label .= '<br>';
|
||||||
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||||
|
$label .= '<br><b>'.$langs->trans('DateOfRegistration').':</b> '.dol_print_date($this->date_subscription, 'dayhour');
|
||||||
|
$label .= '<br><b>'.$langs->trans('AmountPaid').':</b> '.$this->amount;
|
||||||
|
|
||||||
$url = dol_buildpath('/eventorganization/conferenceorboothattendee_card.php', 1).'?id='.$this->id;
|
$url = dol_buildpath('/eventorganization/conferenceorboothattendee_card.php', 1).'?id='.$this->id;
|
||||||
|
|
||||||
@ -744,15 +747,15 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($option == 'conforboothid') {
|
if ($option == 'conforboothid') {
|
||||||
$url .= '&conforboothid='.$this->fk_actioncomm;
|
$url .= '&conforboothid='.((int) $this->fk_actioncomm);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($option == 'projectid') {
|
if ($option == 'projectid') {
|
||||||
$url .= '&fk_project='.$this->fk_project.'&withproject=1';
|
$url .= '&fk_project='.((int) $this->fk_project).'&withproject=1';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($option == 'conforboothidproject') {
|
if ($option == 'conforboothidproject') {
|
||||||
$url .= '&conforboothid='.$this->fk_actioncomm.'&withproject=1' ;
|
$url .= '&conforboothid='.((int) $this->fk_actioncomm).'&withproject=1' ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -853,14 +856,15 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
public function LibStatut($status, $mode = 0)
|
public function LibStatut($status, $mode = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
|
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
|
if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
|
||||||
//$langs->load("eventorganization@eventorganization");
|
//$langs->load("eventorganization@eventorganization");
|
||||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft');
|
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||||
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated');
|
||||||
$this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled');
|
$this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled');
|
||||||
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft');
|
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||||
$this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
$this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Validated');
|
||||||
$this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled');
|
$this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -870,6 +874,11 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
$statusType = 'status6';
|
$statusType = 'status6';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($status == self::STATUS_VALIDATED && $this->date_subscription && $this->amount) {
|
||||||
|
$statusType = 'status4';
|
||||||
|
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated').' - '.$langs->trans("Paid");
|
||||||
|
}
|
||||||
|
|
||||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -101,7 +101,7 @@ if ($action == 'addcontact' && $permission) { // Add a new contact
|
|||||||
$result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09'));
|
$result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09'));
|
||||||
|
|
||||||
if ($result >= 0) {
|
if ($result >= 0) {
|
||||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id.(!empty($withproject)?'&withproject=1':''));
|
header("Location: ".$_SERVER['PHP_SELF']."?id=".((int) $object->id).(!empty($withproject)?'&withproject=1':''));
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
||||||
@ -119,7 +119,7 @@ if ($action == 'addcontact' && $permission) { // Add a new contact
|
|||||||
$result = $object->delete_contact($lineid);
|
$result = $object->delete_contact($lineid);
|
||||||
|
|
||||||
if ($result >= 0) {
|
if ($result >= 0) {
|
||||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id.(!empty($withproject)?'&withproject=1':''));
|
header("Location: ".$_SERVER['PHP_SELF']."?id=".((int) $object->id).(!empty($withproject)?'&withproject=1':''));
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
|
|||||||
@ -147,9 +147,11 @@ if ($user->socid > 0) { // Protection if external user
|
|||||||
$result = restrictedArea($user, 'eventorganization');
|
$result = restrictedArea($user, 'eventorganization');
|
||||||
if (!$permissiontoread) accessforbidden();
|
if (!$permissiontoread) accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (preg_match('/^set/', $action) && $projectid > 0) {
|
if (preg_match('/^set/', $action) && $projectid > 0) {
|
||||||
$project = new Project($db);
|
$project = new Project($db);
|
||||||
//If "set" fields keys is in projects fields
|
//If "set" fields keys is in projects fields
|
||||||
@ -429,7 +431,7 @@ if ($projectid > 0) {
|
|||||||
//print '</span>';
|
//print '</span>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$project->id;
|
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$project->id;
|
||||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 2);
|
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 'md5');
|
||||||
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
|
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
//print '<div class="urllink">';
|
//print '<div class="urllink">';
|
||||||
//print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
//print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||||
@ -445,8 +447,8 @@ if ($projectid > 0) {
|
|||||||
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
||||||
//print '</span>';
|
//print '</span>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$project->id.'&type=global';
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.$project->id.'&type=global';
|
||||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 2);
|
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 'md5');
|
||||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
//print '<div class="urllink">';
|
//print '<div class="urllink">';
|
||||||
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||||
|
|||||||
@ -382,7 +382,7 @@ if (!empty($withproject)) {
|
|||||||
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
||||||
//print '</span>';
|
//print '</span>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$projectstatic->id.'&type=global';
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.$projectstatic->id.'&type=global';
|
||||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
|
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
|
||||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
//print '<div class="urllink">';
|
//print '<div class="urllink">';
|
||||||
@ -418,6 +418,7 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
if ($projectstatic->id > 0) {
|
if ($projectstatic->id > 0) {
|
||||||
print '<input type="hidden" name="fk_project" value="'.$projectstatic->id.'">';
|
print '<input type="hidden" name="fk_project" value="'.$projectstatic->id.'">';
|
||||||
|
print '<input type="hidden" name="projectid" value="'.$projectstatic->id.'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -57,8 +57,7 @@ $id = GETPOST('id', 'int');
|
|||||||
$conf_or_booth_id = GETPOST('conforboothid', 'int');
|
$conf_or_booth_id = GETPOST('conforboothid', 'int');
|
||||||
|
|
||||||
$withproject = GETPOST('withproject', 'int');
|
$withproject = GETPOST('withproject', 'int');
|
||||||
$project_ref = GETPOST('project_ref', 'alpha');
|
$fk_project = GETPOST('fk_project', 'int') ? GETPOST('fk_project', 'int') : GETPOST('projectid', 'int');
|
||||||
$fk_project = GETPOST('fk_project', 'int');
|
|
||||||
|
|
||||||
$withProjectUrl='';
|
$withProjectUrl='';
|
||||||
|
|
||||||
@ -374,6 +373,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||||||
$tab = 'eventorganisation';
|
$tab = 'eventorganisation';
|
||||||
$withProjectUrl = "&withproject=1";
|
$withProjectUrl = "&withproject=1";
|
||||||
$head = project_prepare_head($projectstatic);
|
$head = project_prepare_head($projectstatic);
|
||||||
|
|
||||||
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', '');
|
print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'), 0, '', '');
|
||||||
|
|
||||||
$param = ($mode == 'mine' ? '&mode=mine' : '');
|
$param = ($mode == 'mine' ? '&mode=mine' : '');
|
||||||
@ -467,7 +467,10 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
$objectconf = $object;
|
||||||
|
$object = $projectstatic;
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
|
$object = $objectconf;
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -554,7 +557,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||||||
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
||||||
//print '</span>';
|
//print '</span>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$projectstatic->id.'&type=global';
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.$projectstatic->id.'&type=global';
|
||||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
|
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
|
||||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
//print '<div class="urllink">';
|
//print '<div class="urllink">';
|
||||||
@ -584,6 +587,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||||||
|
|
||||||
if ($confOrBooth->id > 0) {
|
if ($confOrBooth->id > 0) {
|
||||||
$head = conferenceorboothPrepareHead($confOrBooth, $withproject);
|
$head = conferenceorboothPrepareHead($confOrBooth, $withproject);
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'attendees', $langs->trans("ConferenceOrBooth"), -1, $object->picto);
|
print dol_get_fiche_head($head, 'attendees', $langs->trans("ConferenceOrBooth"), -1, $object->picto);
|
||||||
|
|
||||||
$object_evt = $object;
|
$object_evt = $object;
|
||||||
@ -672,7 +676,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
|||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].(!empty($confOrBooth->id)?'?conforboothid='.$confOrBooth->id:'').$withProjectUrl), '', $permissiontoadd);
|
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.(empty($confOrBooth->id) ? '' : '&conforboothid='.$confOrBooth->id).$withProjectUrl), '', $permissiontoadd);
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
|
|||||||
@ -42,17 +42,17 @@ function conferenceorboothPrepareHead($object, $with_project = 0)
|
|||||||
$withProjectUrl = "&withproject=1";
|
$withProjectUrl = "&withproject=1";
|
||||||
}
|
}
|
||||||
|
|
||||||
$head[$h][0] = dol_buildpath("/eventorganization/conferenceorbooth_card.php", 1).'?id='.$object->id.$withProjectUrl;
|
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_card.ph?id='.$object->id.$withProjectUrl;
|
||||||
$head[$h][1] = $langs->trans("Card");
|
$head[$h][1] = $langs->trans("Card");
|
||||||
$head[$h][2] = 'card';
|
$head[$h][2] = 'card';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = dol_buildpath("/eventorganization/conferenceorbooth_contact.php", 1).'?id='.$object->id.$withProjectUrl;
|
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_contact.php?id='.$object->id.$withProjectUrl;
|
||||||
$head[$h][1] = $langs->trans("ContactsAddresses");
|
$head[$h][1] = $langs->trans("ContactsAddresses");
|
||||||
$head[$h][2] = 'contact';
|
$head[$h][2] = 'contact';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = dol_buildpath("/eventorganization/conferenceorboothattendee_list.php", 1).'?conforboothid='.$object->id.$withProjectUrl;
|
$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_list.php?conforboothid='.$object->id.$withProjectUrl;
|
||||||
$head[$h][1] = $langs->trans("Attendees");
|
$head[$h][1] = $langs->trans("Attendees");
|
||||||
$head[$h][2] = 'attendees';
|
$head[$h][2] = 'attendees';
|
||||||
// Enable caching of conf or booth count attendees
|
// Enable caching of conf or booth count attendees
|
||||||
|
|||||||
@ -239,7 +239,7 @@ $sql .= " typent.code as typent_code,";
|
|||||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||||
$sql .= " e.date_creation as date_creation, e.tms as date_update,";
|
$sql .= " e.date_creation as date_creation, e.tms as date_update,";
|
||||||
$sql .= " u.login";
|
$sql .= " u.login";
|
||||||
if ($search_categ_cus) {
|
if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
||||||
$sql .= ", cc.fk_categorie, cc.fk_soc";
|
$sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||||
}
|
}
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
@ -264,7 +264,7 @@ if ($search_product_category > 0) {
|
|||||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product';
|
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product';
|
||||||
}
|
}
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
|
||||||
if (!empty($search_categ_cus)) {
|
if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
||||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
||||||
}
|
}
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
|
||||||
@ -459,7 +459,7 @@ if ($search_datereceipt_end) {
|
|||||||
if ($search_product_category != '') {
|
if ($search_product_category != '') {
|
||||||
$param .= '&search_product_category='.urlencode($search_product_category);
|
$param .= '&search_product_category='.urlencode($search_product_category);
|
||||||
}
|
}
|
||||||
if ($search_categ_cus > 0) {
|
if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
||||||
$param .= '&search_categ_cus='.urlencode($search_categ_cus);
|
$param .= '&search_categ_cus='.urlencode($search_categ_cus);
|
||||||
}
|
}
|
||||||
if ($search_status != '') {
|
if ($search_status != '') {
|
||||||
|
|||||||
@ -995,14 +995,14 @@ class ExpenseReport extends CommonObject
|
|||||||
$sql .= " , total_tva = ".((float) price2num($total_tva, 'MT'));
|
$sql .= " , total_tva = ".((float) price2num($total_tva, 'MT'));
|
||||||
$sql .= " WHERE rowid = ".((int) $id);
|
$sql .= " WHERE rowid = ".((int) $id);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result) :
|
if ($result) {
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
return 1;
|
return 1;
|
||||||
else :
|
} else {
|
||||||
$this->error = $this->db->lasterror();
|
$this->error = $this->db->lasterror();
|
||||||
dol_syslog(get_class($this)."::recalculer: Error ".$this->error, LOG_ERR);
|
dol_syslog(get_class($this)."::recalculer: Error ".$this->error, LOG_ERR);
|
||||||
return -3;
|
return -3;
|
||||||
endif;
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->error = $this->db->lasterror();
|
$this->error = $this->db->lasterror();
|
||||||
dol_syslog(get_class($this)."::recalculer: Error ".$this->error, LOG_ERR);
|
dol_syslog(get_class($this)."::recalculer: Error ".$this->error, LOG_ERR);
|
||||||
@ -1749,12 +1749,12 @@ class ExpenseReport extends CommonObject
|
|||||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result) :
|
if ($result) {
|
||||||
return 1;
|
return 1;
|
||||||
else :
|
} else {
|
||||||
$this->error = $this->db->error();
|
$this->error = $this->db->error();
|
||||||
return -1;
|
return -1;
|
||||||
endif;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
@ -1779,12 +1779,12 @@ class ExpenseReport extends CommonObject
|
|||||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result) :
|
if ($result) {
|
||||||
return 1;
|
return 1;
|
||||||
else :
|
} else {
|
||||||
$this->error = $this->db->error();
|
$this->error = $this->db->error();
|
||||||
return -1;
|
return -1;
|
||||||
endif;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -224,7 +224,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function post($request_data = null)
|
public function post($request_data = null)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->fournisseur->commande->creer || !DolibarrApiAccess::$user->rights->supplier_order->creer) {
|
if (empty(DolibarrApiAccess::$user->rights->fournisseur->commande->creer) && empty(DolibarrApiAccess::$user->rights->supplier_order->creer)) {
|
||||||
throw new RestException(401, "Insuffisant rights");
|
throw new RestException(401, "Insuffisant rights");
|
||||||
}
|
}
|
||||||
// Check mandatory fields
|
// Check mandatory fields
|
||||||
@ -260,7 +260,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function put($id, $request_data = null)
|
public function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->fournisseur->commande->creer || !DolibarrApiAccess::$user->rights->supplier_order->creer) {
|
if (empty(DolibarrApiAccess::$user->rights->fournisseur->commande->creer) && empty(DolibarrApiAccess::$user->rights->supplier_order->creer)) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -340,7 +340,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function validate($id, $idwarehouse = 0, $notrigger = 0)
|
public function validate($id, $idwarehouse = 0, $notrigger = 0)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->fournisseur->commande->creer || !DolibarrApiAccess::$user->rights->supplier_order->creer) {
|
if (empty(DolibarrApiAccess::$user->rights->fournisseur->commande->creer) && empty(DolibarrApiAccess::$user->rights->supplier_order->creer)) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
$result = $this->order->fetch($id);
|
$result = $this->order->fetch($id);
|
||||||
|
|||||||
@ -156,7 +156,7 @@ if ($reshook < 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
$backurlforlist = DOL_URL_ROOT.'/fourn/commande/list.php'.($socid > 0 ? '&socid='.((int) $socid) : '');
|
$backurlforlist = DOL_URL_ROOT.'/fourn/commande/list.php'.($socid > 0 ? '?socid='.((int) $socid) : '');
|
||||||
|
|
||||||
if (empty($backtopage) || ($cancel && empty($id))) {
|
if (empty($backtopage) || ($cancel && empty($id))) {
|
||||||
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
||||||
@ -759,7 +759,7 @@ if (empty($reshook)) {
|
|||||||
GETPOST('product_desc', 'restricthtml'),
|
GETPOST('product_desc', 'restricthtml'),
|
||||||
$ht,
|
$ht,
|
||||||
price2num(GETPOST('qty'), 'MS'),
|
price2num(GETPOST('qty'), 'MS'),
|
||||||
price2num(GETPOST('remise_percent'), 2),
|
price2num(GETPOST('remise_percent'), '', 2),
|
||||||
$vat_rate,
|
$vat_rate,
|
||||||
$localtax1_rate,
|
$localtax1_rate,
|
||||||
$localtax2_rate,
|
$localtax2_rate,
|
||||||
|
|||||||
@ -134,10 +134,6 @@ if (!$sortorder) {
|
|||||||
$sortorder = 'DESC';
|
$sortorder = 'DESC';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($search_status == '') {
|
|
||||||
$search_status = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$object = new CommandeFournisseur($db);
|
$object = new CommandeFournisseur($db);
|
||||||
$hookmanager->initHooks(array('supplierorderlist'));
|
$hookmanager->initHooks(array('supplierorderlist'));
|
||||||
@ -245,7 +241,7 @@ if (empty($reshook)) {
|
|||||||
$search_multicurrency_montant_tva = '';
|
$search_multicurrency_montant_tva = '';
|
||||||
$search_multicurrency_montant_ttc = '';
|
$search_multicurrency_montant_ttc = '';
|
||||||
$search_project_ref = '';
|
$search_project_ref = '';
|
||||||
$search_status = -1;
|
$search_status = '';
|
||||||
$search_date_order_startday = '';
|
$search_date_order_startday = '';
|
||||||
$search_date_order_startmonth = '';
|
$search_date_order_startmonth = '';
|
||||||
$search_date_order_startyear = '';
|
$search_date_order_startyear = '';
|
||||||
@ -277,9 +273,42 @@ if (empty($reshook)) {
|
|||||||
$objectlabel = 'SupplierOrders';
|
$objectlabel = 'SupplierOrders';
|
||||||
$permissiontoread = $user->rights->fournisseur->commande->lire;
|
$permissiontoread = $user->rights->fournisseur->commande->lire;
|
||||||
$permissiontodelete = $user->rights->fournisseur->commande->supprimer;
|
$permissiontodelete = $user->rights->fournisseur->commande->supprimer;
|
||||||
|
$permissiontovalidate = $user->rights->fournisseur->commande->creer;
|
||||||
$uploaddir = $conf->fournisseur->commande->dir_output;
|
$uploaddir = $conf->fournisseur->commande->dir_output;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||||
|
|
||||||
|
if ($action == 'validate' && $permissiontovalidate) {
|
||||||
|
if (GETPOST('confirm') == 'yes') {
|
||||||
|
$objecttmp = new CommandeFournisseur($db);
|
||||||
|
$db->begin();
|
||||||
|
$error = 0;
|
||||||
|
|
||||||
|
foreach ($toselect as $checked) {
|
||||||
|
if ($objecttmp->fetch($checked)) {
|
||||||
|
if ($objecttmp->statut == 0) {
|
||||||
|
$objecttmp->date_commande = dol_now();
|
||||||
|
$result = $objecttmp->valid($user);
|
||||||
|
if ($result >= 0) {
|
||||||
|
// If we have permission, and if we don't need to provide the idwarehouse, we go directly on approved step
|
||||||
|
if (empty($conf->global->SUPPLIER_ORDER_NO_DIRECT_APPROVE) && $user->rights->fournisseur->commande->approuver && !(!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $objecttmp->hasProductsOrServices(1))) {
|
||||||
|
$result = $objecttmp->approve($user);
|
||||||
|
setEventMessages($langs->trans("SupplierOrderValidatedAndApproved"), array($objecttmp->ref));
|
||||||
|
} else {
|
||||||
|
setEventMessages($langs->trans("SupplierOrderValidated"), array($objecttmp->ref));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) $db->commit();
|
||||||
|
else $db->rollback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Mass action to generate vendor bills
|
// Mass action to generate vendor bills
|
||||||
if ($massaction == 'confirm_createsupplierbills') {
|
if ($massaction == 'confirm_createsupplierbills') {
|
||||||
$orders = GETPOST('toselect', 'array');
|
$orders = GETPOST('toselect', 'array');
|
||||||
@ -947,6 +976,15 @@ if ($resql) {
|
|||||||
'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
||||||
'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($permissiontovalidate) {
|
||||||
|
if ($user->rights->fournisseur->commande->approuver && empty($conf->global->SUPPLIER_ORDER_NO_DIRECT_APPROVE)) {
|
||||||
|
$arrayofmassactions['prevalidate'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ValidateAndApprove");
|
||||||
|
} else {
|
||||||
|
$arrayofmassactions['prevalidate'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) {
|
if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) {
|
||||||
$arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisSupplier");
|
$arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisSupplier");
|
||||||
}
|
}
|
||||||
@ -986,6 +1024,10 @@ if ($resql) {
|
|||||||
$trackid = 'sord'.$object->id;
|
$trackid = 'sord'.$object->id;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||||
|
|
||||||
|
if ($massaction == 'prevalidate') {
|
||||||
|
print $form->formconfirm($_SERVER["PHP_SELF"].$fieldstosearchall, $langs->trans("ConfirmMassValidation"), $langs->trans("ConfirmMassValidationQuestion"), "validate", null, '', 0, 200, 500, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if ($massaction == 'createbills') {
|
if ($massaction == 'createbills') {
|
||||||
//var_dump($_REQUEST);
|
//var_dump($_REQUEST);
|
||||||
print '<input type="hidden" name="massaction" value="confirm_createsupplierbills">';
|
print '<input type="hidden" name="massaction" value="confirm_createsupplierbills">';
|
||||||
|
|||||||
@ -1287,8 +1287,8 @@ if (empty($reshook)) {
|
|||||||
$localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty);
|
$localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty);
|
||||||
$localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty);
|
$localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty);
|
||||||
|
|
||||||
$remise_percent = price2num(GETPOST('remise_percent'), 2);
|
$remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
$pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), 'MU');
|
$pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), 'MU', 2);
|
||||||
|
|
||||||
// Extrafields Lines
|
// Extrafields Lines
|
||||||
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
||||||
|
|||||||
@ -467,22 +467,24 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
$message .= $langs->transnoentities("HolidaysToValidateBody")."\n";
|
$message .= $langs->transnoentities("HolidaysToValidateBody")."\n";
|
||||||
|
|
||||||
$delayForRequest = $object->getConfCP('delayForRequest');
|
|
||||||
//$delayForRequest = $delayForRequest * (60*60*24);
|
|
||||||
|
|
||||||
$nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd');
|
|
||||||
|
|
||||||
// option to warn the validator in case of too short delay
|
// option to warn the validator in case of too short delay
|
||||||
if ($object->getConfCP('AlertValidatorDelay')) {
|
if (empty($conf->global->HOLIDAY_HIDE_APPROVER_ABOUT_TOO_LOW_DELAY)) {
|
||||||
if ($object->date_debut < $nextMonth) {
|
$delayForRequest = 0; // TODO Set delay depending of holiday leave type
|
||||||
|
if ($delayForRequest) {
|
||||||
|
$nowplusdelay = dol_time_plus_duree($now, $delayForRequest, 'd');
|
||||||
|
|
||||||
|
if ($object->date_debut < $nowplusdelay) {
|
||||||
$message .= "\n";
|
$message .= "\n";
|
||||||
$message .= $langs->transnoentities("HolidaysToValidateDelay", $object->getConfCP('delayForRequest'))."\n";
|
$message .= $langs->transnoentities("HolidaysToValidateDelay", $delayForRequest)."\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// option to notify the validator if the balance is less than the request
|
// option to notify the validator if the balance is less than the request
|
||||||
if ($object->getConfCP('AlertValidatorSolde')) {
|
if (empty($conf->global->HOLIDAY_HIDE_APPROVER_ABOUT_NEGATIVE_BALANCE)) {
|
||||||
$nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday);
|
$nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday);
|
||||||
|
|
||||||
if ($nbopenedday > $object->getCPforUser($object->fk_user, $object->fk_type)) {
|
if ($nbopenedday > $object->getCPforUser($object->fk_user, $object->fk_type)) {
|
||||||
$message .= "\n";
|
$message .= "\n";
|
||||||
$message .= $langs->transnoentities("HolidaysToValidateAlertSolde")."\n";
|
$message .= $langs->transnoentities("HolidaysToValidateAlertSolde")."\n";
|
||||||
@ -565,9 +567,10 @@ if (empty($reshook)) {
|
|||||||
$nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday);
|
$nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday);
|
||||||
$soldeActuel = $object->getCpforUser($object->fk_user, $object->fk_type);
|
$soldeActuel = $object->getCpforUser($object->fk_user, $object->fk_type);
|
||||||
$newSolde = ($soldeActuel - $nbopenedday);
|
$newSolde = ($soldeActuel - $nbopenedday);
|
||||||
|
$label = $langs->transnoentitiesnoconv("Holidays").' - '.$object->ref;
|
||||||
|
|
||||||
// The modification is added to the LOG
|
// The modification is added to the LOG
|
||||||
$result = $object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("Holidays"), $newSolde, $object->fk_type);
|
$result = $object->addLogCP($user->id, $object->fk_user, $label, $newSolde, $object->fk_type);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages(null, $object->errors, 'errors');
|
setEventMessages(null, $object->errors, 'errors');
|
||||||
@ -925,12 +928,6 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$delayForRequest = $object->getConfCP('delayForRequest');
|
|
||||||
//$delayForRequest = $delayForRequest * (60*60*24);
|
|
||||||
|
|
||||||
$nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd');
|
|
||||||
|
|
||||||
|
|
||||||
print '<script type="text/javascript">
|
print '<script type="text/javascript">
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
$("input.button-save").click("submit", function(e) {
|
$("input.button-save").click("submit", function(e) {
|
||||||
|
|||||||
@ -1601,7 +1601,7 @@ class Holiday extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne le solde de congés payés pour un utilisateur
|
* Return balance of holiday for one user
|
||||||
*
|
*
|
||||||
* @param int $user_id ID de l'utilisateur
|
* @param int $user_id ID de l'utilisateur
|
||||||
* @param int $fk_type Filter on type
|
* @param int $fk_type Filter on type
|
||||||
@ -1936,7 +1936,7 @@ class Holiday extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param int $fk_user_action Id user creation
|
* @param int $fk_user_action Id user creation
|
||||||
* @param int $fk_user_update Id user update
|
* @param int $fk_user_update Id user update
|
||||||
* @param string $label Label
|
* @param string $label Label (Example: 'Leave', 'Manual update', 'Leave request cancelation'...)
|
||||||
* @param int $new_solde New value
|
* @param int $new_solde New value
|
||||||
* @param int $fk_type Type of vacation
|
* @param int $fk_type Type of vacation
|
||||||
* @return int Id of record added, 0 if nothing done, < 0 if KO
|
* @return int Id of record added, 0 if nothing done, < 0 if KO
|
||||||
|
|||||||
@ -156,28 +156,28 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
|
||||||
|
|
||||||
// Number of actions to do (late)
|
// Number of actions to do (late)
|
||||||
if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read) {
|
if (!empty($conf->agenda->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_AGENDA) && $user->rights->agenda->myactions->read) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||||
$board = new ActionComm($db);
|
$board = new ActionComm($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of project opened
|
// Number of project opened
|
||||||
if (!empty($conf->projet->enabled) && $user->rights->projet->lire) {
|
if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_PROJECT) && $user->rights->projet->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
$board = new Project($db);
|
$board = new Project($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of tasks to do (late)
|
// Number of tasks to do (late)
|
||||||
if (!empty($conf->projet->enabled) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire) {
|
if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_PROJECT) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||||
$board = new Task($db);
|
$board = new Task($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of commercial proposals open (expired)
|
// Number of commercial customer proposals open (expired)
|
||||||
if (!empty($conf->propal->enabled) && $user->rights->propale->lire) {
|
if (!empty($conf->propal->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->rights->propale->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||||
$board = new Propal($db);
|
$board = new Propal($db);
|
||||||
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
||||||
@ -186,7 +186,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of supplier proposals open (expired)
|
// Number of supplier proposals open (expired)
|
||||||
if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) {
|
if (!empty($conf->supplier_proposal->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->rights->supplier_proposal->lire) {
|
||||||
$langs->load("supplier_proposal");
|
$langs->load("supplier_proposal");
|
||||||
include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
|
||||||
$board = new SupplierProposal($db);
|
$board = new SupplierProposal($db);
|
||||||
@ -196,14 +196,14 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of customer orders a deal
|
// Number of customer orders a deal
|
||||||
if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
|
if (!empty($conf->commande->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->rights->commande->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
$board = new Commande($db);
|
$board = new Commande($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of suppliers orders a deal
|
// Number of suppliers orders a deal
|
||||||
if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire) {
|
if (!empty($conf->supplier_order->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->rights->fournisseur->commande->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||||
$board = new CommandeFournisseur($db);
|
$board = new CommandeFournisseur($db);
|
||||||
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
||||||
@ -211,7 +211,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of contract / services enabled (delayed)
|
// Number of contract / services enabled (delayed)
|
||||||
if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
|
if (!empty($conf->contrat->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_CONTRACT) && $user->rights->contrat->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||||
$board = new Contrat($db);
|
$board = new Contrat($db);
|
||||||
$dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive");
|
$dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive");
|
||||||
@ -220,7 +220,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of tickets open
|
// Number of tickets open
|
||||||
if (!empty($conf->ticket->enabled) && $user->rights->ticket->read) {
|
if (!empty($conf->ticket->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_TICKET) && $user->rights->ticket->read) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php';
|
||||||
$board = new Ticket($db);
|
$board = new Ticket($db);
|
||||||
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
|
||||||
@ -229,21 +229,21 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of invoices customers (paid)
|
// Number of invoices customers (paid)
|
||||||
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
|
if (!empty($conf->facture->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->rights->facture->lire) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
$board = new Facture($db);
|
$board = new Facture($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of supplier invoices (paid)
|
// Number of supplier invoices (paid)
|
||||||
if (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->fournisseur->facture->lire)) {
|
if (!empty($conf->supplier_invoice->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && !empty($user->rights->fournisseur->facture->lire)) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
$board = new FactureFournisseur($db);
|
$board = new FactureFournisseur($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of transactions to conciliate
|
// Number of transactions to conciliate
|
||||||
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid) {
|
if (!empty($conf->banque->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_BANK) && $user->rights->banque->lire && !$user->socid) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
$board = new Account($db);
|
$board = new Account($db);
|
||||||
$nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate
|
$nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate
|
||||||
@ -253,14 +253,14 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of cheque to send
|
// Number of cheque to send
|
||||||
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) {
|
if (!empty($conf->banque->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_BANK) && $user->rights->banque->lire && !$user->socid && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||||
$board = new RemiseCheque($db);
|
$board = new RemiseCheque($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of foundation members
|
// Number of foundation members
|
||||||
if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->socid) {
|
if (!empty($conf->adherent->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_ADHERENT) && $user->rights->adherent->lire && !$user->socid) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
$board = new Adherent($db);
|
$board = new Adherent($db);
|
||||||
$dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift');
|
$dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift');
|
||||||
@ -268,21 +268,21 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of expense reports to approve
|
// Number of expense reports to approve
|
||||||
if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->approve) {
|
if (!empty($conf->expensereport->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_EXPENSEREPORT) && $user->rights->expensereport->approve) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||||
$board = new ExpenseReport($db);
|
$board = new ExpenseReport($db);
|
||||||
$dashboardlines[$board->element.'_toapprove'] = $board->load_board($user, 'toapprove');
|
$dashboardlines[$board->element.'_toapprove'] = $board->load_board($user, 'toapprove');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of expense reports to pay
|
// Number of expense reports to pay
|
||||||
if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->to_paid) {
|
if (!empty($conf->expensereport->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_EXPENSEREPORT) && $user->rights->expensereport->to_paid) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||||
$board = new ExpenseReport($db);
|
$board = new ExpenseReport($db);
|
||||||
$dashboardlines[$board->element.'_topay'] = $board->load_board($user, 'topay');
|
$dashboardlines[$board->element.'_topay'] = $board->load_board($user, 'topay');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of holidays to approve
|
// Number of holidays to approve
|
||||||
if (!empty($conf->holiday->enabled) && $user->rights->holiday->approve) {
|
if (!empty($conf->holiday->enabled) && empty($conf->global->MAIN_DISABLE_BLOCK_HOLIDAY) && $user->rights->holiday->approve) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
||||||
$board = new Holiday($db);
|
$board = new Holiday($db);
|
||||||
$dashboardlines[$board->element] = $board->load_board($user);
|
$dashboardlines[$board->element] = $board->load_board($user);
|
||||||
|
|||||||
@ -466,7 +466,8 @@ table.tablesupport {
|
|||||||
@media only screen and (max-width: 570px)
|
@media only screen and (max-width: 570px)
|
||||||
{
|
{
|
||||||
.blocksupport {
|
.blocksupport {
|
||||||
width: 90%;
|
width: calc(100% - 4px);
|
||||||
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tablesupport {
|
.tablesupport {
|
||||||
|
|||||||
@ -47,9 +47,9 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 1
|
|||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 133, 13, '19','0','TVA 19%', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 133, 13, '19','0','TVA 19%', 1);
|
||||||
|
|
||||||
-- ANGOLA (id country=35)
|
-- ANGOLA (id country=35)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 351, 35, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 351, 35, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 352, 35, '7','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 352, 35, '7','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 353, 35, '14','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 353, 35, '14','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- ARGENTINA (id country=23)
|
-- ARGENTINA (id country=23)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (231, 23, '0','0','IVA Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (231, 23, '0','0','IVA Rate 0', 1);
|
||||||
@ -57,31 +57,31 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (23
|
|||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (233, 23, '21','0','IVA standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (233, 23, '21','0','IVA standard rate',1);
|
||||||
|
|
||||||
-- AUSTRALIA (id country=28)
|
-- AUSTRALIA (id country=28)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (281, 28, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (281, 28, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (282, 28, '10','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (282, 28, '10','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- AUSTRIA (id country=41)
|
-- AUSTRIA (id country=41)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (411, 41, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (411, 41, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (412, 41, '10','0','VAT reduced rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (412, 41, '10','0','VAT rate - reduced', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (413, 41, '20','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (413, 41, '20','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- BRASIL (id country=56)
|
-- BRASIL (id country=56)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (561, 56, '0','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (561, 56, '0','0','VAT rate - reduced',1);
|
||||||
|
|
||||||
-- BULGARIA (id country=59)
|
-- BULGARIA (id country=59)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (591, 59, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (591, 59, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (592, 59, '7','0','VAT reduced rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (592, 59, '7','0','VAT rate - reduced', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (593, 59, '20','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (593, 59, '20','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- BELGIUM (id country=2)
|
-- BELGIUM (id country=2)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 21, 2, '0','0','VAT Rate 0 ou non applicable',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 21, 2, '0','0','VAT rate 0 ou non applicable',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 22, 2, '6','0','VAT reduced rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 22, 2, '6','0','VAT rate - reduced', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 23, 2, '21','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 23, 2, '21','0','VAT rate - standard',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 24, 2, '12','0','VAT reduced rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 24, 2, '12','0','VAT rate - reduced', 1);
|
||||||
|
|
||||||
-- CANADA (id country=14)
|
-- CANADA (id country=14)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (141, 14, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (141, 14, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (142, 14, '7','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (142, 14, '7','0','VAT rate - standard',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (143, 14,'5','0','9.975','1','GST/TPS and PST/TVQ rate for Province',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (143, 14,'5','0','9.975','1','GST/TPS and PST/TVQ rate for Province',1);
|
||||||
--insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (143, 14,'5','0','9.975','1','GST/TPS and PST/TVQ rate for Quebec',1);
|
--insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (143, 14,'5','0','9.975','1','GST/TPS and PST/TVQ rate for Quebec',1);
|
||||||
--insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (144, 14,'5','0','7','1','GST/TPS and PST/TVQ rate for British Columbia',1);
|
--insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (144, 14,'5','0','7','1','GST/TPS and PST/TVQ rate for British Columbia',1);
|
||||||
@ -89,43 +89,43 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_typ
|
|||||||
|
|
||||||
|
|
||||||
-- CAMEROUN (id country=24)
|
-- CAMEROUN (id country=24)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (241, 24, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (241, 24, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (242, 24, '19.25','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (242, 24, '19.25','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- CHILE (id country=67)
|
-- CHILE (id country=67)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (671, 67, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (671, 67, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (672, 67, '19','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (672, 67, '19','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- CHINA (id country=9)
|
-- CHINA (id country=9)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 91, 9, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 91, 9, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 92, 9, '13','0','VAT reduced rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 92, 9, '13','0','VAT rate - reduced 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 93, 9, '3','0','VAT super reduced rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 93, 9, '3','0','VAT rate - super-reduced 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 94, 9, '17','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 94, 9, '17','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- CONGO = REPUBLIQUE DU CONGO (id country=72)
|
-- CONGO = REPUBLIQUE DU CONGO (id country=72)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (721, 72, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (721, 72, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (722, 72, '18','0', '0.9', '1', 'VAT Rate 18+0.9', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (722, 72, '18','0', '0.9', '1', 'VAT rate 18+0.9', 1);
|
||||||
|
|
||||||
-- CYPRUS (id country=78)
|
-- CYPRUS (id country=78)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (781, 78, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (781, 78, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (782, 78, '9','0','VAT Rate 9',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (782, 78, '9','0','VAT rate 9',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (783, 78, '5','0','VAT Rate 5',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (783, 78, '5','0','VAT rate 5',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (784, 78, '19','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (784, 78, '19','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- DANMERK (id country=80)
|
-- DANMERK (id country=80)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (801, 80, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (801, 80, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (802, 80, '25','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (802, 80, '25','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- FRANCE (id country=1)
|
-- FRANCE (id country=1)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 11, 1, '0','0','VAT Rate 0 ou non applicable',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 11, 1, '0','0','VAT rate 0 ou non applicable',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 12, 1, '20','0','VAT standard rate (France hors DOM-TOM)',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 12, 1, '20','0','VAT rate - standard (France hors DOM-TOM)',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 13, 1, '10','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 13, 1, '10','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 14, 1, '5.5','0','VAT reduced rate (France hors DOM-TOM)',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 14, 1, '5.5','0','VAT rate - reduced (France hors DOM-TOM)',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 15, 1, '2.1','0','VAT super-reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 15, 1, '2.1','0','VAT rate - super-reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,code,recuperableonly,note,active) values (16, 1, '8.5', '85', '0', 'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0);
|
insert into llx_c_tva(rowid,fk_pays,taux,code,recuperableonly,note,active) values (16, 1, '8.5', '85', '0', 'VAT rate - standard (DOM sauf Guyane et Saint-Martin)',0);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,code,recuperableonly,note,active) values (17, 1, '8.5', '85NPR', '1', 'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0);
|
insert into llx_c_tva(rowid,fk_pays,taux,code,recuperableonly,note,active) values (17, 1, '8.5', '85NPR', '1', 'VAT rate - standard (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,code,recuperableonly,localtax1,localtax1_type,note,active) values (18, 1, '8.5', '85NPROM', '1', 2, 3, 'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer',0);
|
insert into llx_c_tva(rowid,fk_pays,taux,code,recuperableonly,localtax1,localtax1_type,note,active) values (18, 1, '8.5', '85NPROM', '1', 2, 3, 'VAT rate - standard (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer',0);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,code,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values (19, 1, '8.5', '85NPROMOMR', '1', 2, 3, 2.5, 3, 'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer et Octroi de Mer Regional',0);
|
insert into llx_c_tva(rowid,fk_pays,taux,code,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values (19, 1, '8.5', '85NPROMOMR', '1', 2, 3, 2.5, 3, 'VAT rate - standard (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer et Octroi de Mer Regional',0);
|
||||||
|
|
||||||
-- GERMANY (id country=5)
|
-- GERMANY (id country=5)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 51, 5, '0','0','No VAT', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 51, 5, '0','0','No VAT', 1);
|
||||||
@ -147,11 +147,11 @@ insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,loca
|
|||||||
|
|
||||||
-- ICELAND (id country=116)
|
-- ICELAND (id country=116)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1161, 116, '0','0','VAT rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1161, 116, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1163, 116,'25.5','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1163, 116,'25.5','0','VAT rate - standard',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1162, 116, '7','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1162, 116, '7','0','VAT rate - reduced',1);
|
||||||
|
|
||||||
-- INDIA (id country=117)
|
-- INDIA (id country=117)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1171, 117, '0','0','VAT Rate 0', 0);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1171, 117, '0','0','VAT rate 0', 0);
|
||||||
|
|
||||||
insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1172, 117, 'C+S-5' , 0, 2.5, '1', 2.5, '1', 0, 'CGST+SGST - Same state sales', 1);
|
insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1172, 117, 'C+S-5' , 0, 2.5, '1', 2.5, '1', 0, 'CGST+SGST - Same state sales', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1173, 117, 'I-5' , 5, 0, '0', 0, '0', 0, 'IGST', 1);
|
insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1173, 117, 'I-5' , 5, 0, '0', 0, '0', 0, 'IGST', 1);
|
||||||
@ -163,54 +163,58 @@ insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2
|
|||||||
insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1179, 117, 'I-28' , 28, 0, '0', 0, '0', 0, 'IGST', 1);
|
insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1179, 117, 'I-28' , 28, 0, '0', 0, '0', 0, 'IGST', 1);
|
||||||
|
|
||||||
-- IRELAND (id country=8)
|
-- IRELAND (id country=8)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 81, 8, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 81, 8, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 82, 8, '23','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 82, 8, '23','0','VAT rate - standard',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 83, 8, '13.5','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 83, 8, '13.5','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 84, 8, '9','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 84, 8, '9','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 85, 8, '4.8','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 85, 8, '4.8','0','VAT rate - reduced',1);
|
||||||
|
|
||||||
-- ITALY (id country=3)
|
-- ITALY (id country=3)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 31, 3, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 31, 3, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 32, 3, '10','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 32, 3, '10','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 33, 3, '4','0','VAT super-reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 33, 3, '4','0','VAT rate - super-reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 34, 3, '22','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 34, 3, '22','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- IVORY COST (id country=21)
|
-- IVORY COST (id country=21)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values (211, 21, '0','0',0,0,0,0,'IVA Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values (211, 21, '0','0',0,0,0,0,'IVA Rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values (212, 21, '18','0',7.5,2,0,0,'IVA standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values (212, 21, '18','0',7.5,2,0,0,'IVA standard rate',1);
|
||||||
|
|
||||||
-- JAPAN (id country=123)
|
-- JAPAN (id country=123)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1231, 123, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1231, 123, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1232, 123, '5','0','VAT Rate 5',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1232, 123, '5','0','VAT rate 5',1);
|
||||||
|
|
||||||
-- LUXEMBOURG (id country=140)
|
-- LUXEMBOURG (id country=140)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1401, 140, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1401, 140, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1402, 140, '14','0','VAT intermediary rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1402, 140, '14','0','VAT rate - intermediary',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1403, 140, '8','0','VAT reduced rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1403, 140, '8','0','VAT rate - reduced', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1404, 140, '3','0','VAT super-reduced rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1404, 140, '3','0','VAT rate - super-reduced', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1405, 140, '17','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1405, 140, '17','0','VAT rate - standard',1);
|
||||||
|
|
||||||
|
-- MALI (id country=147)
|
||||||
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1471, 147, '0','0','VAT rate 0', 1);
|
||||||
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1471, 147, '18','0','VAT rate - standard', 1);
|
||||||
|
|
||||||
-- MONACO (id country=27)
|
-- MONACO (id country=27)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 271, 27, '0','0','VAT Rate 0 ou non applicable',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 271, 27, '0','0','VAT rate 0 ou non applicable',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 272, 27, '8.5','0','VAT standard rate (DOM sauf Guyane et Saint-Martin)',0);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 272, 27, '8.5','0','VAT rate - standard (DOM sauf Guyane et Saint-Martin)',0);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 273, 27, '8.5','1','VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 273, 27, '8.5','1','VAT rate - standard (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 274, 27, '5.5','0','VAT reduced rate (France hors DOM-TOM)',0);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 274, 27, '5.5','0','VAT rate - reduced (France hors DOM-TOM)',0);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 275, 27,'19.6','0','VAT standard rate (France hors DOM-TOM)',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 275, 27,'19.6','0','VAT rate - standard (France hors DOM-TOM)',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 276, 27, '2.1','0','VAT super-reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 276, 27, '2.1','0','VAT rate - super-reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 277, 27, '7','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 277, 27, '7','0','VAT rate - reduced',1);
|
||||||
|
|
||||||
-- MAROCO (id country=12)
|
-- MAROCO (id country=12)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 121, 12, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 121, 12, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 122, 12, '14','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 122, 12, '14','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 123, 12, '10','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 123, 12, '10','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 124, 12, '7','0','VAT super-reduced rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 124, 12, '7','0','VAT rate - super-reduced', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 125, 12, '20','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 125, 12, '20','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- MALTA (id country=148)
|
-- MALTA (id country=148)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1481, 148, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1481, 148, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1482, 148, '7','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1482, 148, '7','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1483, 148, '5','0','VAT super-reduced rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1483, 148, '5','0','VAT rate - super-reduced', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1484, 148, '18','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1484, 148, '18','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- NEDERLAND (id country=17)
|
-- NEDERLAND (id country=17)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 171, 17, '0','0','0 BTW tarief', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 171, 17, '0','0','0 BTW tarief', 1);
|
||||||
@ -219,96 +223,96 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 1
|
|||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 174, 17, '21','0','Algemeen BTW tarief (vanaf 1 oktober 2012)',0);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 174, 17, '21','0','Algemeen BTW tarief (vanaf 1 oktober 2012)',0);
|
||||||
|
|
||||||
-- NEW CALEDONIA (id country=165)
|
-- NEW CALEDONIA (id country=165)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1651, 165, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1651, 165, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1652, 165, '3','0','VAT standard 3', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1652, 165, '3','0','VAT standard 3', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1653, 165, '6','0','VAT standard 6', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1653, 165, '6','0','VAT standard 6', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1654, 165, '11','0','VAT standard rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1654, 165, '11','0','VAT rate - standard', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1655, 165, '22','0','VAT standard high', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1655, 165, '22','0','VAT standard high', 1);
|
||||||
|
|
||||||
-- NEW ZEALAND (id country=166)
|
-- NEW ZEALAND (id country=166)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1661, 166, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1661, 166, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1662, 166, '15','0','VAT standard rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1662, 166, '15','0','VAT rate - standard', 1);
|
||||||
|
|
||||||
-- NIGERIA (id country=169)
|
-- NIGERIA (id country=169)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1691, 169, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1691, 169, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1692, 169, '5','0','VAT standard rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1692, 169, '5','0','VAT rate - standard', 1);
|
||||||
|
|
||||||
-- NORWAY (id country=173)
|
-- NORWAY (id country=173)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1731, 173, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1731, 173, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1732, 173, '14','0','VAT reduced rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1732, 173, '14','0','VAT rate - reduced', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1733, 173, '8','0','VAT reduced rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1733, 173, '8','0','VAT rate - reduced', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1734, 173, '25','0','VAT standard rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1734, 173, '25','0','VAT rate - standard', 1);
|
||||||
|
|
||||||
-- PANAMA (id country=178)
|
-- PANAMA (id country=178)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1781, 178, '0','0','ITBMS Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1781, 178, '0','0','ITBMS Rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1782, 178, '7','0','ITBMS standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1782, 178, '7','0','ITBMS standard rate',1);
|
||||||
|
|
||||||
-- PERU (id country=181)
|
-- PERU (id country=181)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1811, 181, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1811, 181, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1818, 181, '18','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1818, 181, '18','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- POLAND (id country=184)
|
-- POLAND (id country=184)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1841, 184, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1841, 184, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1842, 184, '8','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1842, 184, '8','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1843, 184, '3','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1843, 184, '3','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1844, 184, '23','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1844, 184, '23','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- PORTUGAL (id country=25)
|
-- PORTUGAL (id country=25)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 251, 25, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 251, 25, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 252, 25, '13','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 252, 25, '13','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 253, 25, '23','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 253, 25, '23','0','VAT rate - standard',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 254, 25, '6','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 254, 25, '6','0','VAT rate - reduced',1);
|
||||||
|
|
||||||
-- ROMANIA (id country=188)
|
-- ROMANIA (id country=188)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1881, 188, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1881, 188, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1882, 188, '9','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1882, 188, '9','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1883, 188, '19','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1883, 188, '19','0','VAT rate - standard',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1884, 188, '5','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1884, 188, '5','0','VAT rate - reduced',1);
|
||||||
|
|
||||||
-- SAUDI ARABIA (id country=26)
|
-- SAUDI ARABIA (id country=26)
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES ( 261, 26, '0', '0', 'VAT Rate 0', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES ( 261, 26, '0', '0', 'VAT rate 0', 1);
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES ( 262, 26, '5', '0', 'VAT Rate 5', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES ( 262, 26, '5', '0', 'VAT rate 5', 1);
|
||||||
|
|
||||||
-- SAN SALVADOR (id country=86)
|
-- SAN SALVADOR (id country=86)
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES ( 861, 86, '0', '0', 'SIN IVA', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES ( 861, 86, '0', '0', 'SIN IVA', 1);
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES ( 862, 86, '13', '0', 'IVA 13', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES ( 862, 86, '13', '0', 'IVA 13', 1);
|
||||||
|
|
||||||
-- SENEGAL (id country=22)
|
-- SENEGAL (id country=22)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 221, 22, '0', '0', 'VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 221, 22, '0', '0', 'VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 222, 22, '10', '0', 'VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 222, 22, '10', '0', 'VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 223, 22, '18', '0', 'VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 223, 22, '18', '0', 'VAT rate - standard',1);
|
||||||
|
|
||||||
-- SLOVAKIA (id country=201)
|
-- SLOVAKIA (id country=201)
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2011, 201, '0', '0', 'VAT Rate 0', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2011, 201, '0', '0', 'VAT rate 0', 1);
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2012, 201, '10', '0', 'VAT reduced rate', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2012, 201, '10', '0', 'VAT rate - reduced', 1);
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2013, 201, '19', '0', 'VAT standard rate', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2013, 201, '19', '0', 'VAT rate - standard', 1);
|
||||||
|
|
||||||
-- SLOVENIA (id country=202)
|
-- SLOVENIA (id country=202)
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2021, 202, '0', '0', 'VAT Rate 0', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2021, 202, '0', '0', 'VAT rate 0', 1);
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2022, 202,'9.5', '0', 'VAT reduced rate', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2022, 202,'9.5', '0', 'VAT rate - reduced', 1);
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2023, 202, '22', '0', 'VAT standard rate', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2023, 202, '22', '0', 'VAT rate - standard', 1);
|
||||||
|
|
||||||
-- SOUTH AFRICA (id country=205)
|
-- SOUTH AFRICA (id country=205)
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2051, 205, '0', '0', 'VAT Rate 0', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2051, 205, '0', '0', 'VAT rate 0', 1);
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2052, 205, '15', '0', 'VAT standard rate', 1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2052, 205, '15', '0', 'VAT rate - standard', 1);
|
||||||
|
|
||||||
-- SPAIN (id country=4)
|
-- SPAIN (id country=4)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 41, 4, '0','0', '0','3','-19:-15:-9','5','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 41, 4, '0','0', '0','3','-19:-15:-9','5','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 42, 4,'10','0','1.4','3','-19:-15:-9','5','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 42, 4,'10','0','1.4','3','-19:-15:-9','5','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 43, 4, '4','0','0.5','3','-19:-15:-9','5','VAT super-reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 43, 4, '4','0','0.5','3','-19:-15:-9','5','VAT rate - super-reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 44, 4,'21','0','5.2','3','-19:-15:-9','5','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 44, 4,'21','0','5.2','3','-19:-15:-9','5','VAT rate - standard',1);
|
||||||
|
|
||||||
-- SWEDEN (id country=20)
|
-- SWEDEN (id country=20)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 201, 20, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 201, 20, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 202, 20, '12','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 202, 20, '12','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 203, 20, '6','0','VAT super-reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 203, 20, '6','0','VAT rate - super-reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 204, 20, '25','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 204, 20, '25','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- SWITZERLAND (id country=6)
|
-- SWITZERLAND (id country=6)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 61, 6, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 61, 6, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 62, 6, '3.7','0','VAT reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 62, 6, '3.7','0','VAT rate - reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 63, 6, '2.5','0','VAT super-reduced rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 63, 6, '2.5','0','VAT rate - super-reduced',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 64, 6, '7.7','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 64, 6, '7.7','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- SRI LANKA (id country=207)
|
-- SRI LANKA (id country=207)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2071, 207, '0','0','VAT 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2071, 207, '0','0','VAT 0', 1);
|
||||||
@ -319,7 +323,7 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (21
|
|||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2132, 213, '5','0','VAT 5%',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2132, 213, '5','0','VAT 5%',1);
|
||||||
|
|
||||||
-- TUNISIA (id country=10)
|
-- TUNISIA (id country=10)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (101,10, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (101,10, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (102,10, '12','0','VAT 12%',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (102,10, '12','0','VAT 12%',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (103,10, '18','0','VAT 18%',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (103,10, '18','0','VAT 18%',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (104,10, '7.5','0','VAT 6% Majoré à 25% (7.5%)',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (104,10, '7.5','0','VAT 6% Majoré à 25% (7.5%)',1);
|
||||||
@ -329,14 +333,14 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (10
|
|||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active,localtax1,localtax1_type,localtax2,localtax2_type) values (107,10,'18.18','0','VAT 18%+FODEC', 1, 1, '4', 0, 0);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active,localtax1,localtax1_type,localtax2,localtax2_type) values (107,10,'18.18','0','VAT 18%+FODEC', 1, 1, '4', 0, 0);
|
||||||
|
|
||||||
-- UKRAINE (id country=226)
|
-- UKRAINE (id country=226)
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2261,226, '0','0','VAT Rate 0',1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2261,226, '0','0','VAT rate 0',1);
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2262,226, '20','0','VAT standart rate',1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2262,226, '20','0','VAT standart rate',1);
|
||||||
|
|
||||||
-- UNITED OF KINGDOM (id country=7)
|
-- UNITED OF KINGDOM (id country=7)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 71, 7, '0','0','VAT Rate 0', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 71, 7, '0','0','VAT rate 0', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 72, 7, '17.5','0','VAT standard rate before 2011',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 72, 7, '17.5','0','VAT rate - standard before 2011',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 73, 7, '5','0','VAT reduced rate', 1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 73, 7, '5','0','VAT rate - reduced', 1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 74, 7, '20','0','VAT standard rate',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 74, 7, '20','0','VAT rate - standard',1);
|
||||||
|
|
||||||
-- UNITED STATES (id country=11)
|
-- UNITED STATES (id country=11)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (111,11, '0','0','No Sales Tax',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (111,11, '0','0','No Sales Tax',1);
|
||||||
@ -350,16 +354,16 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (11
|
|||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1931,193, '0','0','No VAT in SPM',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1931,193, '0','0','No VAT in SPM',1);
|
||||||
|
|
||||||
-- SAINT MARTIN (id country=24)
|
-- SAINT MARTIN (id country=24)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2461,246, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2461,246, '0','0','VAT rate 0',1);
|
||||||
|
|
||||||
|
|
||||||
-- MAURITANIA (id country=151)
|
-- MAURITANIA (id country=151)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1511,151, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1511,151, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1512,151, '14','0','VAT Rate 14',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1512,151, '14','0','VAT rate 14',1);
|
||||||
|
|
||||||
-- MAURITIUS (id country=152)
|
-- MAURITIUS (id country=152)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1521,152, '0','0','VAT Rate 0',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1521,152, '0','0','VAT rate 0',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1522,152, '15','0','VAT Rate 15',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1522,152, '15','0','VAT rate 15',1);
|
||||||
|
|
||||||
-- HONDURAS (id country=114)
|
-- HONDURAS (id country=114)
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1141,114, '0','0','No ISV',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1141,114, '0','0','No ISV',1);
|
||||||
@ -384,7 +388,7 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (23
|
|||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2322,232, '12','0','VAT 12%',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2322,232, '12','0','VAT 12%',1);
|
||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2323,232, '8','0','VAT 8%',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2323,232, '8','0','VAT 8%',1);
|
||||||
|
|
||||||
-- Example of code to insert a vat rate 0 for each country
|
-- Example of code to insert a VAT rate 0 for each country
|
||||||
--delete from llx_c_tva where rowid = 1181; -- to delete a record that does not follow rules for rowid (fk_pays+'1')
|
--delete from llx_c_tva where rowid = 1181; -- to delete a record that does not follow rules for rowid (fk_pays+'1')
|
||||||
--insert into llx_c_tva(rowid, fk_pays, taux, recuperableonly, note, active) SELECT CONCAT(c.rowid, '1'), c.rowid, 0, 0, 'No VAT', 1 from llx_c_country as c where c.rowid not in (select fk_pays from llx_c_tva);
|
--insert into llx_c_tva(rowid, fk_pays, taux, recuperableonly, note, active) SELECT CONCAT(c.rowid, '1'), c.rowid, 0, 0, 'No VAT', 1 from llx_c_country as c where c.rowid not in (select fk_pays from llx_c_tva);
|
||||||
|
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
|
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
|
||||||
-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
|
-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
|
||||||
-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field);
|
-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field);
|
||||||
-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table
|
-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table;
|
||||||
-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex
|
-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex;
|
||||||
-- To make pk to be auto increment (mysql): -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
|
-- To make pk to be auto increment (mysql): -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
|
||||||
-- To make pk to be auto increment (postgres):
|
-- To make pk to be auto increment (postgres):
|
||||||
-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid;
|
-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid;
|
||||||
@ -349,6 +349,13 @@ UPDATE llx_payment_salary SET ref = rowid WHERE ref IS NULL;
|
|||||||
|
|
||||||
ALTER TABLE llx_salary ALTER COLUMN paye set default 0;
|
ALTER TABLE llx_salary ALTER COLUMN paye set default 0;
|
||||||
|
|
||||||
|
UPDATE llx_extrafields SET elementtype = 'salary' WHERE elementtype = 'payment_salary';
|
||||||
|
ALTER TABLE llx_payment_salary_extrafields RENAME TO llx_salary_extrafields;
|
||||||
|
-- VMYSQL4.1 DROP INDEX idx_payment_salary_extrafields on llx_salary_extrafields;
|
||||||
|
-- VPGSQL8.2 DROP INDEX idx_payment_salary_extrafields;
|
||||||
|
ALTER TABLE llx_salary_extrafields ADD INDEX idx_salary_extrafields (fk_object);
|
||||||
|
|
||||||
|
|
||||||
DELETE FROM llx_boxes WHERE box_id IN (SELECT rowid FROM llx_boxes_def WHERE file IN ('box_graph_ticket_by_severity', 'box_ticket_by_severity.php', 'box_nb_ticket_last_x_days.php', 'box_nb_tickets_type.php', 'box_new_vs_close_ticket.php'));
|
DELETE FROM llx_boxes WHERE box_id IN (SELECT rowid FROM llx_boxes_def WHERE file IN ('box_graph_ticket_by_severity', 'box_ticket_by_severity.php', 'box_nb_ticket_last_x_days.php', 'box_nb_tickets_type.php', 'box_new_vs_close_ticket.php'));
|
||||||
DELETE FROM llx_boxes_def WHERE file IN ('box_graph_ticket_by_severity', 'box_ticket_by_severity.php', 'box_nb_ticket_last_x_days.php', 'box_nb_tickets_type.php', 'box_new_vs_close_ticket.php');
|
DELETE FROM llx_boxes_def WHERE file IN ('box_graph_ticket_by_severity', 'box_ticket_by_severity.php', 'box_nb_ticket_last_x_days.php', 'box_nb_tickets_type.php', 'box_new_vs_close_ticket.php');
|
||||||
|
|
||||||
@ -589,7 +596,7 @@ DROP TABLE llx_categorie_association;
|
|||||||
DROP TABLE llx_cond_reglement;
|
DROP TABLE llx_cond_reglement;
|
||||||
DROP TABLE llx_zapier_hook_extrafields;
|
DROP TABLE llx_zapier_hook_extrafields;
|
||||||
|
|
||||||
create table llx_onlinesignature
|
CREATE TABLE llx_onlinesignature
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
entity integer DEFAULT 1 NOT NULL,
|
entity integer DEFAULT 1 NOT NULL,
|
||||||
@ -604,3 +611,6 @@ create table llx_onlinesignature
|
|||||||
|
|
||||||
-- VMYSQL4.3 ALTER TABLE llx_partnership MODIFY COLUMN date_partnership_end date NULL;
|
-- VMYSQL4.3 ALTER TABLE llx_partnership MODIFY COLUMN date_partnership_end date NULL;
|
||||||
-- VPGSQL8.2 ALTER TABLE llx_partnership ALTER COLUMN date_partnership_end DROP NOT NULL;
|
-- VPGSQL8.2 ALTER TABLE llx_partnership ALTER COLUMN date_partnership_end DROP NOT NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_facture_fourn CHANGE COLUMN fk_mode_transport fk_transport_mode integer;
|
||||||
|
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
|
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
|
||||||
-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
|
-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
|
||||||
-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field);
|
-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field);
|
||||||
-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table
|
-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table;
|
||||||
-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex
|
-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex;
|
||||||
-- To make pk to be auto increment (mysql): -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
|
-- To make pk to be auto increment (mysql): -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
|
||||||
-- To make pk to be auto increment (postgres):
|
-- To make pk to be auto increment (postgres):
|
||||||
-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid;
|
-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid;
|
||||||
@ -40,9 +40,18 @@
|
|||||||
|
|
||||||
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN fk_project integer NOT NULL;
|
ALTER TABLE llx_eventorganization_conferenceorboothattendee ADD COLUMN fk_project integer NOT NULL;
|
||||||
|
|
||||||
|
UPDATE llx_extrafields SET elementtype = 'salary' WHERE elementtype = 'payment_salary';
|
||||||
|
ALTER TABLE llx_payment_salary_extrafields RENAME TO llx_salary_extrafields;
|
||||||
|
-- VMYSQL4.1 DROP INDEX idx_payment_salary_extrafields on llx_salary_extrafields;
|
||||||
|
-- VPGSQL8.2 DROP INDEX idx_payment_salary_extrafields;
|
||||||
|
ALTER TABLE llx_salary_extrafields ADD INDEX idx_salary_extrafields (fk_object);
|
||||||
|
|
||||||
|
|
||||||
-- v15
|
-- v15
|
||||||
|
|
||||||
|
ALTER TABLE llx_holiday ADD COLUMN date_approve DATETIME DEFAULT NULL;
|
||||||
|
ALTER TABLE llx_holiday ADD COLUMN fk_user_approve integer DEFAULT NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_emailcollector_emailcollectoraction MODIFY COLUMN actionparam TEXT;
|
ALTER TABLE llx_emailcollector_emailcollectoraction MODIFY COLUMN actionparam TEXT;
|
||||||
|
|
||||||
ALTER TABLE llx_knowledgemanagement_knowledgerecord ADD COLUMN lang varchar(6);
|
ALTER TABLE llx_knowledgemanagement_knowledgerecord ADD COLUMN lang varchar(6);
|
||||||
|
|||||||
@ -42,7 +42,7 @@ create table llx_facture
|
|||||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
|
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
|
||||||
date_closing datetime, -- date de cloture
|
date_closing datetime, -- date de cloture
|
||||||
paye smallint DEFAULT 0 NOT NULL,
|
paye smallint DEFAULT 0 NOT NULL,
|
||||||
--amount double(24,8) DEFAULT 0 NOT NULL,
|
|
||||||
remise_percent real DEFAULT 0, -- remise relative
|
remise_percent real DEFAULT 0, -- remise relative
|
||||||
remise_absolue real DEFAULT 0, -- remise absolue
|
remise_absolue real DEFAULT 0, -- remise absolue
|
||||||
remise real DEFAULT 0, -- remise totale calculee
|
remise real DEFAULT 0, -- remise totale calculee
|
||||||
|
|||||||
@ -33,8 +33,10 @@ date_fin DATE NOT NULL,
|
|||||||
halfday integer DEFAULT 0, -- 0=start morning and end afternoon, -1=start afternoon end afternoon, 1=start morning and end morning, 2=start afternoon and end morning
|
halfday integer DEFAULT 0, -- 0=start morning and end afternoon, -1=start afternoon end afternoon, 1=start morning and end morning, 2=start afternoon and end morning
|
||||||
statut integer NOT NULL DEFAULT '1',
|
statut integer NOT NULL DEFAULT '1',
|
||||||
fk_validator integer NOT NULL, -- who should approve
|
fk_validator integer NOT NULL, -- who should approve
|
||||||
date_valid DATETIME DEFAULT NULL, -- date approval
|
date_valid DATETIME DEFAULT NULL, -- date approval (both date valid and date_approval)
|
||||||
fk_user_valid integer DEFAULT NULL, -- user approval
|
fk_user_valid integer DEFAULT NULL, -- user approval (both user valid and user that approved)
|
||||||
|
date_approve DATETIME DEFAULT NULL, -- date approval (not used yet)
|
||||||
|
fk_user_approve integer DEFAULT NULL, -- user approval (not used yet)
|
||||||
date_refuse DATETIME DEFAULT NULL,
|
date_refuse DATETIME DEFAULT NULL,
|
||||||
fk_user_refuse integer DEFAULT NULL,
|
fk_user_refuse integer DEFAULT NULL,
|
||||||
date_cancel DATETIME DEFAULT NULL,
|
date_cancel DATETIME DEFAULT NULL,
|
||||||
|
|||||||
@ -17,4 +17,4 @@
|
|||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_payment_salary_extrafields ADD INDEX idx_payment_salary_extrafields (fk_object);
|
ALTER TABLE llx_salary_extrafields ADD INDEX idx_salary_extrafields (fk_object);
|
||||||
@ -16,10 +16,10 @@
|
|||||||
--
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
create table llx_payment_salary_extrafields
|
create table llx_salary_extrafields
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
fk_object integer NOT NULL, -- salary payment id
|
fk_object integer NOT NULL, -- salary id
|
||||||
import_key varchar(14) -- import key
|
import_key varchar(14) -- import key
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
@ -102,9 +102,9 @@ class KnowledgeRecord extends CommonObject
|
|||||||
public $fields=array(
|
public $fields=array(
|
||||||
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
||||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'visible'=>5, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", "showoncombobox"=>1),
|
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'visible'=>5, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", "showoncombobox"=>1),
|
||||||
'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1),
|
'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'),
|
||||||
'lang' => array('type'=>'varchar(6)', 'label'=>'Language', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>1),
|
'lang' => array('type'=>'varchar(6)', 'label'=>'Language', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>1, 'tdcss'=>'titlefieldcreate nowraponall'),
|
||||||
'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>3, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1),
|
'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>3, 'csslist'=>'tdoverflowmax300', 'copytoclipboard'=>1, 'tdcss'=>'titlefieldcreate nowraponall'),
|
||||||
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
|
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
|
||||||
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>2,),
|
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>2,),
|
||||||
'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>0,),
|
'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>0,),
|
||||||
|
|||||||
@ -75,7 +75,7 @@ Dictionary=Dictionaries
|
|||||||
ErrorReservedTypeSystemSystemAuto=Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record
|
ErrorReservedTypeSystemSystemAuto=Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record
|
||||||
ErrorCodeCantContainZero=Code can't contain value 0
|
ErrorCodeCantContainZero=Code can't contain value 0
|
||||||
DisableJavascript=Disable JavaScript and Ajax functions
|
DisableJavascript=Disable JavaScript and Ajax functions
|
||||||
DisableJavascriptNote=Note: For test or debug purpose. For optimization for blind person or text browsers, you may prefer to use the setup on the profile of user
|
DisableJavascriptNote=Note: For test or debug purpose only. For optimization for blind person or text browsers, you may prefer to use the setup on the profile of user
|
||||||
UseSearchToSelectCompanyTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
|
UseSearchToSelectCompanyTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
|
||||||
UseSearchToSelectContactTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
|
UseSearchToSelectContactTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
|
||||||
DelaiedFullListToSelectCompany=Wait until a key is pressed before loading content of Third Parties combo list.<br>This may increase performance if you have a large number of third parties, but it is less convenient.
|
DelaiedFullListToSelectCompany=Wait until a key is pressed before loading content of Third Parties combo list.<br>This may increase performance if you have a large number of third parties, but it is less convenient.
|
||||||
@ -375,8 +375,8 @@ UMask=UMask parameter for new files on Unix/Linux/BSD/Mac file system.
|
|||||||
UMaskExplanation=This parameter allow you to define permissions set by default on files created by Dolibarr on server (during upload for example).<br>It must be the octal value (for example, 0666 means read and write for everyone).<br>This parameter is useless on a Windows server.
|
UMaskExplanation=This parameter allow you to define permissions set by default on files created by Dolibarr on server (during upload for example).<br>It must be the octal value (for example, 0666 means read and write for everyone).<br>This parameter is useless on a Windows server.
|
||||||
SeeWikiForAllTeam=Take a look at the Wiki page for a list of contributors and their organization
|
SeeWikiForAllTeam=Take a look at the Wiki page for a list of contributors and their organization
|
||||||
UseACacheDelay= Delay for caching export response in seconds (0 or empty for no cache)
|
UseACacheDelay= Delay for caching export response in seconds (0 or empty for no cache)
|
||||||
DisableLinkToHelpCenter=Hide link "<b>Need help or support</b>" on login page
|
DisableLinkToHelpCenter=Hide the link "<b>Need help or support</b>" on the login page
|
||||||
DisableLinkToHelp=Hide link to online help "<b>%s</b>"
|
DisableLinkToHelp=Hide the link to the online help "<b>%s</b>"
|
||||||
AddCRIfTooLong=There is no automatic text wrapping, text that is too long will not display on documents. Please add carriage returns in the text area if needed.
|
AddCRIfTooLong=There is no automatic text wrapping, text that is too long will not display on documents. Please add carriage returns in the text area if needed.
|
||||||
ConfirmPurge=Are you sure you want to execute this purge?<br>This will permanently delete all your data files with no way to restore them (ECM files, attached files...).
|
ConfirmPurge=Are you sure you want to execute this purge?<br>This will permanently delete all your data files with no way to restore them (ECM files, attached files...).
|
||||||
MinLength=Minimum length
|
MinLength=Minimum length
|
||||||
@ -606,7 +606,7 @@ Module400Desc=Management of projects, leads/opportunities and/or tasks. You can
|
|||||||
Module410Name=Webcalendar
|
Module410Name=Webcalendar
|
||||||
Module410Desc=Webcalendar integration
|
Module410Desc=Webcalendar integration
|
||||||
Module500Name=Taxes & Special Expenses
|
Module500Name=Taxes & Special Expenses
|
||||||
Module500Desc=Management of other expenses (sale taxes, social or fiscal taxes, dividends, ...)
|
Module500Desc=Management of other expenses (sales taxes, social or fiscal taxes, dividends, ...)
|
||||||
Module510Name=Salaries
|
Module510Name=Salaries
|
||||||
Module510Desc=Record and track employee payments
|
Module510Desc=Record and track employee payments
|
||||||
Module520Name=Loans
|
Module520Name=Loans
|
||||||
@ -1168,7 +1168,8 @@ DoNotSuggestPaymentMode=Do not suggest
|
|||||||
NoActiveBankAccountDefined=No active bank account defined
|
NoActiveBankAccountDefined=No active bank account defined
|
||||||
OwnerOfBankAccount=Owner of bank account %s
|
OwnerOfBankAccount=Owner of bank account %s
|
||||||
BankModuleNotActive=Bank accounts module not enabled
|
BankModuleNotActive=Bank accounts module not enabled
|
||||||
ShowBugTrackLink=Define the link "<strong>%s</strong>" (empty to not display this link, 'github' for the link to the Dolibarr project or define directly an url 'https://...')
|
ShowBugTrackLink=Show the link "<strong>%s</strong>"
|
||||||
|
ShowBugTrackLinkDesc=Keep empty to not display this link, use value 'github' for the link to the Dolibarr project or define directly an url 'https://...'
|
||||||
Alerts=Alerts
|
Alerts=Alerts
|
||||||
DelaysOfToleranceBeforeWarning=Delay before displaying a warning alert for:
|
DelaysOfToleranceBeforeWarning=Delay before displaying a warning alert for:
|
||||||
DelaysOfToleranceDesc=Set the delay before an alert icon %s is shown onscreen for the late element.
|
DelaysOfToleranceDesc=Set the delay before an alert icon %s is shown onscreen for the late element.
|
||||||
@ -1218,7 +1219,7 @@ SystemAreaForAdminOnly=This area is available to administrator users only. Dolib
|
|||||||
CompanyFundationDesc=Edit the information of your company/organization. Click on "%s" button at the bottom of the page when done.
|
CompanyFundationDesc=Edit the information of your company/organization. Click on "%s" button at the bottom of the page when done.
|
||||||
AccountantDesc=If you have an external accountant/bookkeeper, you can edit here its information.
|
AccountantDesc=If you have an external accountant/bookkeeper, you can edit here its information.
|
||||||
AccountantFileNumber=Accountant code
|
AccountantFileNumber=Accountant code
|
||||||
DisplayDesc=Parameters affecting the look and behaviour of the application can be modified here.
|
DisplayDesc=Parameters affecting the look and presentation of the application can be modified here.
|
||||||
AvailableModules=Available app/modules
|
AvailableModules=Available app/modules
|
||||||
ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules).
|
ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules).
|
||||||
SessionTimeOut=Time out for session
|
SessionTimeOut=Time out for session
|
||||||
@ -1270,7 +1271,7 @@ SimpleNumRefNoDateModelDesc=Returns the reference number in the format %s-nnnn w
|
|||||||
ShowProfIdInAddress=Show professional ID with addresses
|
ShowProfIdInAddress=Show professional ID with addresses
|
||||||
ShowVATIntaInAddress=Hide intra-Community VAT number
|
ShowVATIntaInAddress=Hide intra-Community VAT number
|
||||||
TranslationUncomplete=Partial translation
|
TranslationUncomplete=Partial translation
|
||||||
MAIN_DISABLE_METEO=Disable meteorological view
|
MAIN_DISABLE_METEO=Disable weather thumb
|
||||||
MeteoStdMod=Standard mode
|
MeteoStdMod=Standard mode
|
||||||
MeteoStdModEnabled=Standard mode enabled
|
MeteoStdModEnabled=Standard mode enabled
|
||||||
MeteoPercentageMod=Percentage mode
|
MeteoPercentageMod=Percentage mode
|
||||||
@ -1472,10 +1473,10 @@ LDAPSynchronizeMembersTypes=Organization of foundation's members types in LDAP
|
|||||||
LDAPPrimaryServer=Primary server
|
LDAPPrimaryServer=Primary server
|
||||||
LDAPSecondaryServer=Secondary server
|
LDAPSecondaryServer=Secondary server
|
||||||
LDAPServerPort=Server port
|
LDAPServerPort=Server port
|
||||||
LDAPServerPortExample=Default port: 389
|
LDAPServerPortExample=Standard or StartTLS: 389, LDAPs: 636
|
||||||
LDAPServerProtocolVersion=Protocol version
|
LDAPServerProtocolVersion=Protocol version
|
||||||
LDAPServerUseTLS=Use TLS
|
LDAPServerUseTLS=Use TLS
|
||||||
LDAPServerUseTLSExample=Your LDAP server use TLS
|
LDAPServerUseTLSExample=Your LDAP server use StartTLS
|
||||||
LDAPServerDn=Server DN
|
LDAPServerDn=Server DN
|
||||||
LDAPAdminDn=Administrator DN
|
LDAPAdminDn=Administrator DN
|
||||||
LDAPAdminDnExample=Complete DN (ex: cn=admin,dc=example,dc=com or cn=Administrator,cn=Users,dc=example,dc=com for active directory)
|
LDAPAdminDnExample=Complete DN (ex: cn=admin,dc=example,dc=com or cn=Administrator,cn=Users,dc=example,dc=com for active directory)
|
||||||
@ -1915,7 +1916,7 @@ UnicodeCurrency=Enter here between braces, list of byte number that represent th
|
|||||||
ColorFormat=The RGB color is in HEX format, eg: FF0000
|
ColorFormat=The RGB color is in HEX format, eg: FF0000
|
||||||
PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module)
|
PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module)
|
||||||
PositionIntoComboList=Position of line into combo lists
|
PositionIntoComboList=Position of line into combo lists
|
||||||
SellTaxRate=Sale tax rate
|
SellTaxRate=Sales tax rate
|
||||||
RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases.
|
RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases.
|
||||||
UrlTrackingDesc=If the provider or transport service offers a page or web site to check the status of your shipments, you may enter it here. You can use the key {TRACKID} in the URL parameters so the system will replace it with the tracking number the user entered into the shipment card.
|
UrlTrackingDesc=If the provider or transport service offers a page or web site to check the status of your shipments, you may enter it here. You can use the key {TRACKID} in the URL parameters so the system will replace it with the tracking number the user entered into the shipment card.
|
||||||
OpportunityPercent=When you create a lead, you will define an estimated amount of project/lead. According to status of the lead, this amount may be multiplied by this rate to evaluate a total amount all your leads may generate. Value is a percentage (between 0 and 100).
|
OpportunityPercent=When you create a lead, you will define an estimated amount of project/lead. According to status of the lead, this amount may be multiplied by this rate to evaluate a total amount all your leads may generate. Value is a percentage (between 0 and 100).
|
||||||
@ -2164,6 +2165,23 @@ YouShouldSetThisToOff=You should set this to 0 or off
|
|||||||
InstallAndUpgradeLockedBy=Install and upgrades are locked by the file <b>%s</b>
|
InstallAndUpgradeLockedBy=Install and upgrades are locked by the file <b>%s</b>
|
||||||
OldImplementation=Old implementation
|
OldImplementation=Old implementation
|
||||||
PDF_SHOW_LINK_TO_ONLINE_PAYMENT=If some online payment modules are enabled (Paypal, Stripe, ...), add a link on the PDF to make the online payment
|
PDF_SHOW_LINK_TO_ONLINE_PAYMENT=If some online payment modules are enabled (Paypal, Stripe, ...), add a link on the PDF to make the online payment
|
||||||
|
DashboardDisableGlobal=Disable globally all the thumbs of open objects
|
||||||
|
BoxstatsDisableGlobal=Disable totally box statistics
|
||||||
|
DashboardDisableBlocks=Thumbs of open objects (to process or late) on main dashboard
|
||||||
|
DashboardDisableBlockAgenda=Disable the thumb for agenda
|
||||||
|
DashboardDisableBlockProject=Disable the thumb for projects
|
||||||
|
DashboardDisableBlockCustomer=Disable the thumb for customers
|
||||||
|
DashboardDisableBlockSupplier=Disable the thumb for suppliers
|
||||||
|
DashboardDisableBlockContract=Disable the thumb for contracts
|
||||||
|
DashboardDisableBlockTicket=Disable the thumb for tickets
|
||||||
|
DashboardDisableBlockBank=Disable the thumb for banks
|
||||||
|
DashboardDisableBlockAdherent=Disable the thumb for memberships
|
||||||
|
DashboardDisableBlockExpenseReport=Disable the thumb for expense reports
|
||||||
|
DashboardDisableBlockHoliday=Disable the thumb for leaves
|
||||||
EnabledCondition=Condition to have field enabled (if not enabled, visibility will always be off)
|
EnabledCondition=Condition to have field enabled (if not enabled, visibility will always be off)
|
||||||
IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sale tax
|
IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sale tax
|
||||||
IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you must enable also the first sale tax
|
IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you must enable also the first sale tax
|
||||||
|
LanguageAndPresentation=Language and presentation
|
||||||
|
SkinAndColors=Skin and colors
|
||||||
|
IfYouUseASecondTaxYouMustSetYouUseTheMainTax=If you want to use a second tax, you must enable also the first sales tax
|
||||||
|
IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you must enable also the first sales tax
|
||||||
|
|||||||
@ -80,7 +80,7 @@ Web=Web
|
|||||||
Poste= Position
|
Poste= Position
|
||||||
DefaultLang=Default language
|
DefaultLang=Default language
|
||||||
VATIsUsed=Sales tax used
|
VATIsUsed=Sales tax used
|
||||||
VATIsUsedWhenSelling=This defines if this third party includes a sale tax or not when it makes an invoice to its own customers
|
VATIsUsedWhenSelling=This defines if this third party includes a sales tax or not when it makes an invoice to its own customers
|
||||||
VATIsNotUsed=Sales tax is not used
|
VATIsNotUsed=Sales tax is not used
|
||||||
CopyAddressFromSoc=Copy address from third-party details
|
CopyAddressFromSoc=Copy address from third-party details
|
||||||
ThirdpartyNotCustomerNotSupplierSoNoRef=Third party neither customer nor vendor, no available referring objects
|
ThirdpartyNotCustomerNotSupplierSoNoRef=Third party neither customer nor vendor, no available referring objects
|
||||||
|
|||||||
@ -188,25 +188,25 @@ LT1ReportByCustomers=Report tax 2 by third party
|
|||||||
LT2ReportByCustomers=Report tax 3 by third party
|
LT2ReportByCustomers=Report tax 3 by third party
|
||||||
LT1ReportByCustomersES=Report by third party RE
|
LT1ReportByCustomersES=Report by third party RE
|
||||||
LT2ReportByCustomersES=Report by third party IRPF
|
LT2ReportByCustomersES=Report by third party IRPF
|
||||||
VATReport=Sale tax report
|
VATReport=Sales tax report
|
||||||
VATReportByPeriods=Sale tax report by period
|
VATReportByPeriods=Sales tax report by period
|
||||||
VATReportByMonth=Sale tax report by month
|
VATReportByMonth=Sales tax report by month
|
||||||
VATReportByRates=Sale tax report by rates
|
VATReportByRates=Sales tax report by rate
|
||||||
VATReportByThirdParties=Sale tax report by third parties
|
VATReportByThirdParties=Sales tax report by third party
|
||||||
VATReportByCustomers=Sale tax report by customer
|
VATReportByCustomers=Sales tax report by customer
|
||||||
VATReportByCustomersInInputOutputMode=Report by the customer VAT collected and paid
|
VATReportByCustomersInInputOutputMode=Report by the customer VAT collected and paid
|
||||||
VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid
|
VATReportByQuartersInInputOutputMode=Report by Sales tax rate of the tax collected and paid
|
||||||
VATReportShowByRateDetails=Show details of this rate
|
VATReportShowByRateDetails=Show details of this rate
|
||||||
LT1ReportByQuarters=Report tax 2 by rate
|
LT1ReportByQuarters=Report tax 2 by rate
|
||||||
LT2ReportByQuarters=Report tax 3 by rate
|
LT2ReportByQuarters=Report tax 3 by rate
|
||||||
LT1ReportByQuartersES=Report by RE rate
|
LT1ReportByQuartersES=Report by RE rate
|
||||||
LT2ReportByQuartersES=Report by IRPF rate
|
LT2ReportByQuartersES=Report by IRPF rate
|
||||||
SeeVATReportInInputOutputMode=See report <b>%sVAT encasement%s</b> for a standard calculation
|
SeeVATReportInInputOutputMode=See report <b>%sVAT collection%s</b> for a standard calculation
|
||||||
SeeVATReportInDueDebtMode=See report <b>%sVAT on flow%s</b> for a calculation with an option on the flow
|
SeeVATReportInDueDebtMode=See report <b>%sVAT on debit%s</b> for a calculation with an option on the invoicing
|
||||||
RulesVATInServices=- For services, the report includes the VAT regulations actually received or issued on the basis of the date of payment.
|
RulesVATInServices=- For services, the report includes the VAT of payments actually received or paid on the basis of the date of payment.
|
||||||
RulesVATInProducts=- For material assets, the report includes the VAT received or issued on the basis of the date of payment.
|
RulesVATInProducts=- For material assets, the report includes the VAT on the basis of the date of payment.
|
||||||
RulesVATDueServices=- For services, the report includes VAT invoices due, paid or not, based on the invoice date.
|
RulesVATDueServices=- For services, the report includes VAT of due invoices, paid or not, based on the invoice date.
|
||||||
RulesVATDueProducts=- For material assets, the report includes the VAT invoices, based on the invoice date.
|
RulesVATDueProducts=- For material assets, the report includes the VAT of due invoices, based on the invoice date.
|
||||||
OptionVatInfoModuleComptabilite=Note: For material assets, it should use the date of delivery to be more fair.
|
OptionVatInfoModuleComptabilite=Note: For material assets, it should use the date of delivery to be more fair.
|
||||||
ThisIsAnEstimatedValue=This is a preview, based on business events and not from the final ledger table, so final results may differ from this preview values
|
ThisIsAnEstimatedValue=This is a preview, based on business events and not from the final ledger table, so final results may differ from this preview values
|
||||||
PercentOfInvoice=%%/invoice
|
PercentOfInvoice=%%/invoice
|
||||||
|
|||||||
@ -83,7 +83,7 @@ ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not s
|
|||||||
ErrorRefAlreadyExists=Ref used for creation already exists.
|
ErrorRefAlreadyExists=Ref used for creation already exists.
|
||||||
ErrorPleaseTypeBankTransactionReportName=Please enter the bank statement name where the entry has to be reported (Format YYYYMM or YYYYMMDD)
|
ErrorPleaseTypeBankTransactionReportName=Please enter the bank statement name where the entry has to be reported (Format YYYYMM or YYYYMMDD)
|
||||||
ErrorRecordHasChildren=Failed to delete record since it has some child records.
|
ErrorRecordHasChildren=Failed to delete record since it has some child records.
|
||||||
ErrorRecordHasAtLeastOneChildOfType=Object has at least one child of type %s
|
ErrorRecordHasAtLeastOneChildOfType=Object %s has at least one child of type %s
|
||||||
ErrorRecordIsUsedCantDelete=Can't delete record. It is already used or included into another object.
|
ErrorRecordIsUsedCantDelete=Can't delete record. It is already used or included into another object.
|
||||||
ErrorModuleRequireJavascript=Javascript must not be disabled to have this feature working. To enable/disable Javascript, go to menu Home->Setup->Display.
|
ErrorModuleRequireJavascript=Javascript must not be disabled to have this feature working. To enable/disable Javascript, go to menu Home->Setup->Display.
|
||||||
ErrorPasswordsMustMatch=Both typed passwords must match each other
|
ErrorPasswordsMustMatch=Both typed passwords must match each other
|
||||||
@ -307,10 +307,10 @@ WarningPaypalPaymentNotCompatibleWithStrict=The value 'Strict' makes the online
|
|||||||
|
|
||||||
# Validate
|
# Validate
|
||||||
RequireValidValue = Value not valid
|
RequireValidValue = Value not valid
|
||||||
RequireAtLeastXString = Requires at least % character(s)
|
RequireAtLeastXString = Requires at least %s character(s)
|
||||||
RequireXStringMax = Requires % character(s) max
|
RequireXStringMax = Requires %s character(s) max
|
||||||
RequireAtLeastXDigits = Requires at least % digit(s)
|
RequireAtLeastXDigits = Requires at least %s digit(s)
|
||||||
RequireXDigitsMax = Requires % digit(s) max
|
RequireXDigitsMax = Requires %s digit(s) max
|
||||||
RequireValidEmail = Email address is not valid
|
RequireValidEmail = Email address is not valid
|
||||||
RequireMaxLength = Length must be less than %s chars
|
RequireMaxLength = Length must be less than %s chars
|
||||||
RequireMinLength = Length must be more than %s char(s)
|
RequireMinLength = Length must be more than %s char(s)
|
||||||
|
|||||||
@ -19,19 +19,27 @@
|
|||||||
#
|
#
|
||||||
ModuleEventOrganizationName = Event Organization
|
ModuleEventOrganizationName = Event Organization
|
||||||
EventOrganizationDescription = Event Organization through Module Project
|
EventOrganizationDescription = Event Organization through Module Project
|
||||||
EventOrganizationDescriptionLong= Manage the organization of an events including conferences, speakers or attendees, with public submission and subscription page
|
EventOrganizationDescriptionLong= Manage the organization of an event (conferences, attendees, speakers, with public suggestion, vote or registration pages)
|
||||||
#
|
#
|
||||||
# Menu
|
# Menu
|
||||||
#
|
#
|
||||||
EventOrganizationMenuLeft = Organized events
|
EventOrganizationMenuLeft = Organized events
|
||||||
EventOrganizationConferenceOrBoothMenuLeft = Conference Or Booth
|
EventOrganizationConferenceOrBoothMenuLeft = Conference Or Booth
|
||||||
|
|
||||||
|
PaymentEvent=Payment of event
|
||||||
|
|
||||||
#
|
#
|
||||||
# Admin page
|
# Admin page
|
||||||
#
|
#
|
||||||
NewRegistration=Registration
|
NewRegistration=Registration
|
||||||
|
<<<<<<< HEAD
|
||||||
EventOrganizationSetup = Event Organization setup
|
EventOrganizationSetup = Event Organization setup
|
||||||
Settings = Settings
|
Settings = Settings
|
||||||
|
=======
|
||||||
|
EventOrganizationSetup=Event Organization setup
|
||||||
|
EventOrganization=Event organization
|
||||||
|
Settings=Settings
|
||||||
|
>>>>>>> branch '14.0' of git@github.com:Dolibarr/dolibarr.git
|
||||||
EventOrganizationSetupPage = Event Organization setup page
|
EventOrganizationSetupPage = Event Organization setup page
|
||||||
EVENTORGANIZATION_TASK_LABEL = Label of tasks to create automatically when project is validated
|
EVENTORGANIZATION_TASK_LABEL = Label of tasks to create automatically when project is validated
|
||||||
EVENTORGANIZATION_TASK_LABELTooltip = When you validate an organized event, some tasks can be automatically created in the project<br><br>For example: <br>Send Call for Conference<br>Send Call for Booth<br>Receive call for conferences<br>Receive call for Booth<br>Open subscriptions to events for attendees<br>Send remind of event to speakers<br>Send remind of event to Booth hoster<br>Send remind of event to attendees
|
EVENTORGANIZATION_TASK_LABELTooltip = When you validate an organized event, some tasks can be automatically created in the project<br><br>For example: <br>Send Call for Conference<br>Send Call for Booth<br>Receive call for conferences<br>Receive call for Booth<br>Open subscriptions to events for attendees<br>Send remind of event to speakers<br>Send remind of event to Booth hoster<br>Send remind of event to attendees
|
||||||
@ -50,11 +58,11 @@ EVENTORGANIZATION_FILTERATTENDEES_TYPE = Filter thirdpartie's select list in att
|
|||||||
# Object
|
# Object
|
||||||
#
|
#
|
||||||
EventOrganizationConfOrBooth= Conference Or Booth
|
EventOrganizationConfOrBooth= Conference Or Booth
|
||||||
ManageOrganizeEvent = Manage event organisation
|
ManageOrganizeEvent = Manage the organization of an event
|
||||||
ConferenceOrBooth = Conference Or Booth
|
ConferenceOrBooth = Conference Or Booth
|
||||||
ConferenceOrBoothTab = Conference Or Booth
|
ConferenceOrBoothTab = Conference Or Booth
|
||||||
AmountOfSubscriptionPaid = Amount of subscription paid
|
AmountPaid = Amount paid
|
||||||
DateSubscription = Date of subscription
|
DateOfRegistration = Date of subscription
|
||||||
ConferenceOrBoothAttendee = Conference Or Booth Attendee
|
ConferenceOrBoothAttendee = Conference Or Booth Attendee
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -122,7 +130,7 @@ BoothLocationFee = Booth location for the event : '%s' occurring from %s to %s
|
|||||||
EventType = Event type
|
EventType = Event type
|
||||||
LabelOfBooth=Booth label
|
LabelOfBooth=Booth label
|
||||||
LabelOfconference=Conference label
|
LabelOfconference=Conference label
|
||||||
ConferenceIsNotConfirmed=Subcription not available, conference is not confirmed yet
|
ConferenceIsNotConfirmed=Registration not available, conference is not confirmed yet
|
||||||
DateMustBeBeforeThan=%s must be before %s
|
DateMustBeBeforeThan=%s must be before %s
|
||||||
DateMustBeAfterThan=%s must be after %s
|
DateMustBeAfterThan=%s must be after %s
|
||||||
|
|
||||||
@ -140,11 +148,11 @@ VoteError = An error has occurred during the vote, please try again.
|
|||||||
#
|
#
|
||||||
# SubscriptionOk page
|
# SubscriptionOk page
|
||||||
#
|
#
|
||||||
SubscriptionOk = Your subscription to this conference has been validated
|
SubscriptionOk = Your subscription has been validated
|
||||||
#
|
#
|
||||||
# Subscription validation mail
|
# Subscription validation mail
|
||||||
#
|
#
|
||||||
ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to a conference
|
ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to an event
|
||||||
#
|
#
|
||||||
# Payment page
|
# Payment page
|
||||||
#
|
#
|
||||||
|
|||||||
@ -206,7 +206,7 @@ VATToUseForSubscriptions=VAT rate to use for contributionss
|
|||||||
NoVatOnSubscription=No VAT for contributions
|
NoVatOnSubscription=No VAT for contributions
|
||||||
ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Product used for contribution line into invoice: %s
|
ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Product used for contribution line into invoice: %s
|
||||||
NameOrCompany=Name or company
|
NameOrCompany=Name or company
|
||||||
SubscriptionRecorded=Subscription recorded
|
SubscriptionRecorded=Contribution recorded
|
||||||
NoEmailSentToMember=No email sent to member
|
NoEmailSentToMember=No email sent to member
|
||||||
EmailSentToMember=Email sent to member at %s
|
EmailSentToMember=Email sent to member at %s
|
||||||
SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired contributions
|
SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired contributions
|
||||||
|
|||||||
@ -74,6 +74,7 @@ NoStockChangeOnServices=No stock change on services
|
|||||||
ProductQtyToConsumeByMO=Product quantity still to consume by open MO
|
ProductQtyToConsumeByMO=Product quantity still to consume by open MO
|
||||||
ProductQtyToProduceByMO=Product quantity still to produce by open MO
|
ProductQtyToProduceByMO=Product quantity still to produce by open MO
|
||||||
AddNewConsumeLines=Add new line to consume
|
AddNewConsumeLines=Add new line to consume
|
||||||
|
AddNewProduceLines=Add new line to produce
|
||||||
ProductsToConsume=Products to consume
|
ProductsToConsume=Products to consume
|
||||||
ProductsToProduce=Products to produce
|
ProductsToProduce=Products to produce
|
||||||
UnitCost=Unit cost
|
UnitCost=Unit cost
|
||||||
|
|||||||
@ -124,6 +124,8 @@ SupplierOrderReceivedInDolibarr=Purchase Order %s received %s
|
|||||||
SupplierOrderSubmitedInDolibarr=Purchase Order %s submitted
|
SupplierOrderSubmitedInDolibarr=Purchase Order %s submitted
|
||||||
SupplierOrderClassifiedBilled=Purchase Order %s set billed
|
SupplierOrderClassifiedBilled=Purchase Order %s set billed
|
||||||
OtherOrders=Other orders
|
OtherOrders=Other orders
|
||||||
|
SupplierOrderValidatedAndApproved=Supplier order is validated and approved : %s
|
||||||
|
SupplierOrderValidated=Supplier order is validated : %s
|
||||||
##### Types de contacts #####
|
##### Types de contacts #####
|
||||||
TypeContact_commande_internal_SALESREPFOLL=Representative following-up sales order
|
TypeContact_commande_internal_SALESREPFOLL=Representative following-up sales order
|
||||||
TypeContact_commande_internal_SHIPPING=Representative following-up shipping
|
TypeContact_commande_internal_SHIPPING=Representative following-up shipping
|
||||||
|
|||||||
@ -22,3 +22,4 @@ AllSalaries=All salaries
|
|||||||
SalariesStatistics=Salary statistics
|
SalariesStatistics=Salary statistics
|
||||||
SalariesAndPayments=Salaries and payments
|
SalariesAndPayments=Salaries and payments
|
||||||
ConfirmDeleteSalaryPayment=Do you want to delete this salary payment ?
|
ConfirmDeleteSalaryPayment=Do you want to delete this salary payment ?
|
||||||
|
FillFieldFirst=Fill employee field first
|
||||||
|
|||||||
@ -12,9 +12,9 @@ AddWarehouse=Create warehouse
|
|||||||
AddOne=Add one
|
AddOne=Add one
|
||||||
DefaultWarehouse=Default warehouse
|
DefaultWarehouse=Default warehouse
|
||||||
WarehouseTarget=Target warehouse
|
WarehouseTarget=Target warehouse
|
||||||
ValidateSending=Confirm sending
|
ValidateSending=Confirm shipment
|
||||||
CancelSending=Cancel sending
|
CancelSending=Cancel shipment
|
||||||
DeleteSending=Delete sending
|
DeleteSending=Delete shipment
|
||||||
Stock=Stock
|
Stock=Stock
|
||||||
Stocks=Stocks
|
Stocks=Stocks
|
||||||
MissingStocks=Missing stocks
|
MissingStocks=Missing stocks
|
||||||
|
|||||||
@ -83,7 +83,7 @@ ErrorCantSaveADoneUserWithZeroPercentage=Impossible de sauver une action à l'é
|
|||||||
ErrorRefAlreadyExists=Le référence <b>%s</b> existe déjà.
|
ErrorRefAlreadyExists=Le référence <b>%s</b> existe déjà.
|
||||||
ErrorPleaseTypeBankTransactionReportName=Choisissez le nom du relevé bancaire sur lequel la ligne est rapportées (Format AAAAMM ou AAAAMMJJ)
|
ErrorPleaseTypeBankTransactionReportName=Choisissez le nom du relevé bancaire sur lequel la ligne est rapportées (Format AAAAMM ou AAAAMMJJ)
|
||||||
ErrorRecordHasChildren=Impossible de supprimer l'enregistrement car il possède des enregistrements fils.
|
ErrorRecordHasChildren=Impossible de supprimer l'enregistrement car il possède des enregistrements fils.
|
||||||
ErrorRecordHasAtLeastOneChildOfType=L'objet a au moins un enfant de type %s
|
ErrorRecordHasAtLeastOneChildOfType=L'objet %s a au moins un enfant de type %s
|
||||||
ErrorRecordIsUsedCantDelete=Ne peut effacer l'enregistrement. Ce dernier est déjà utilisé ou inclut dans un autre élément.
|
ErrorRecordIsUsedCantDelete=Ne peut effacer l'enregistrement. Ce dernier est déjà utilisé ou inclut dans un autre élément.
|
||||||
ErrorModuleRequireJavascript=Le javascript ne doit pas être désactivé pour que cette fonctionnalité soit utilisable. Pour activer/désactiver l'utilisation de javascript, allez dans le menu Accueil->Configuration->Affichage.
|
ErrorModuleRequireJavascript=Le javascript ne doit pas être désactivé pour que cette fonctionnalité soit utilisable. Pour activer/désactiver l'utilisation de javascript, allez dans le menu Accueil->Configuration->Affichage.
|
||||||
ErrorPasswordsMustMatch=Les 2 mots de passe saisis doivent correspondre
|
ErrorPasswordsMustMatch=Les 2 mots de passe saisis doivent correspondre
|
||||||
|
|||||||
@ -72,6 +72,7 @@ NoStockChangeOnServices=Aucune variation de stock sur les services
|
|||||||
ProductQtyToConsumeByMO=Quantité de produit restant à consommer par OF ouvert
|
ProductQtyToConsumeByMO=Quantité de produit restant à consommer par OF ouvert
|
||||||
ProductQtyToProduceByMO=Quantités restant à produire avec les OF ouverts
|
ProductQtyToProduceByMO=Quantités restant à produire avec les OF ouverts
|
||||||
AddNewConsumeLines=Ajouter une nouvelle ligne à consommer
|
AddNewConsumeLines=Ajouter une nouvelle ligne à consommer
|
||||||
|
AddNewProduceLines=Ajouter une nouvelle ligne à produire
|
||||||
ProductsToConsume=Produits à consommer
|
ProductsToConsume=Produits à consommer
|
||||||
ProductsToProduce=Produits à produire
|
ProductsToProduce=Produits à produire
|
||||||
UnitCost=Coût unitaire
|
UnitCost=Coût unitaire
|
||||||
|
|||||||
@ -22,3 +22,4 @@ AllSalaries=Tous les salaires
|
|||||||
SalariesStatistics=Statistiques
|
SalariesStatistics=Statistiques
|
||||||
SalariesAndPayments=Salaires et paiements
|
SalariesAndPayments=Salaires et paiements
|
||||||
ConfirmDeleteSalaryPayment=Voulez-vous supprimer ce paiement de salaire ?
|
ConfirmDeleteSalaryPayment=Voulez-vous supprimer ce paiement de salaire ?
|
||||||
|
FillFieldFirst=Remplisez d'abord le champ salarié
|
||||||
|
|||||||
@ -1998,6 +1998,8 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
|
|||||||
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
||||||
global $menumanager;
|
global $menumanager;
|
||||||
|
|
||||||
|
$langs->load('companies');
|
||||||
|
|
||||||
$userImage = $userDropDownImage = '';
|
$userImage = $userDropDownImage = '';
|
||||||
if (!empty($user->photo)) {
|
if (!empty($user->photo)) {
|
||||||
$userImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'photouserphoto userphoto', 'small', 0, 1);
|
$userImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'photouserphoto userphoto', 'small', 0, 1);
|
||||||
|
|||||||
@ -476,13 +476,13 @@ class Mos extends DolibarrApi
|
|||||||
if (isset($line->fk_warehouse)) { // If there is a warehouse to set
|
if (isset($line->fk_warehouse)) { // If there is a warehouse to set
|
||||||
if (!($line->fk_warehouse > 0)) { // If there is no warehouse set.
|
if (!($line->fk_warehouse > 0)) { // If there is no warehouse set.
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
throw new RestException(500, $langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Warehouse"), $tmpproduct->ref));
|
|
||||||
$error++;
|
$error++;
|
||||||
|
throw new RestException(500, $langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Warehouse"), $tmpproduct->ref));
|
||||||
}
|
}
|
||||||
if ($tmpproduct->status_batch) {
|
if ($tmpproduct->status_batch) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
throw new RestException(500, $langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Batch"), $tmpproduct->ref));
|
|
||||||
$error++;
|
$error++;
|
||||||
|
throw new RestException(500, $langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Batch"), $tmpproduct->ref));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$idstockmove = 0;
|
$idstockmove = 0;
|
||||||
@ -535,13 +535,13 @@ class Mos extends DolibarrApi
|
|||||||
if (isset($line->fk_warehouse)) { // If there is a warehouse to set
|
if (isset($line->fk_warehouse)) { // If there is a warehouse to set
|
||||||
if (!($line->fk_warehouse > 0)) { // If there is no warehouse set.
|
if (!($line->fk_warehouse > 0)) { // If there is no warehouse set.
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
throw new RestException(500, $langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Warehouse"), $tmpproduct->ref));
|
|
||||||
$error++;
|
$error++;
|
||||||
|
throw new RestException(500, $langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Warehouse"), $tmpproduct->ref));
|
||||||
}
|
}
|
||||||
if ($tmpproduct->status_batch) {
|
if ($tmpproduct->status_batch) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
throw new RestException(500, $langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Batch"), $tmpproduct->ref));
|
|
||||||
$error++;
|
$error++;
|
||||||
|
throw new RestException(500, $langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Batch"), $tmpproduct->ref));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$idstockmove = 0;
|
$idstockmove = 0;
|
||||||
|
|||||||
@ -659,6 +659,12 @@ class Mo extends CommonObject
|
|||||||
$role = 'toconsume';
|
$role = 'toconsume';
|
||||||
$moline->role = 'toproduce';
|
$moline->role = 'toproduce';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if ($this->mrptype == 1) {
|
||||||
|
$moline->role = 'toconsume';
|
||||||
|
} else {
|
||||||
|
$moline->role = 'toproduce';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$resultline = $moline->create($user, false); // Never use triggers here
|
$resultline = $moline->create($user, false); // Never use triggers here
|
||||||
|
|||||||
@ -149,14 +149,19 @@ if (empty($reshook)) {
|
|||||||
$result = $object->setStatut($object::STATUS_INPROGRESS, 0, '', 'MRP_REOPEN');
|
$result = $object->setStatut($object::STATUS_INPROGRESS, 0, '', 'MRP_REOPEN');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'confirm_addconsumeline' && GETPOST('addconsumelinebutton') && $permissiontoadd) {
|
if (($action == 'confirm_addconsumeline' && GETPOST('addconsumelinebutton') && $permissiontoadd)
|
||||||
|
|| ($action == 'confirm_addproduceline' && GETPOST('addproducelinebutton') && $permissiontoadd)) {
|
||||||
$moline = new MoLine($db);
|
$moline = new MoLine($db);
|
||||||
|
|
||||||
// Line to produce
|
// Line to produce
|
||||||
$moline->fk_mo = $object->id;
|
$moline->fk_mo = $object->id;
|
||||||
$moline->qty = GETPOST('qtytoadd', 'int'); ;
|
$moline->qty = GETPOST('qtytoadd', 'int'); ;
|
||||||
$moline->fk_product = GETPOST('productidtoadd', 'int');
|
$moline->fk_product = GETPOST('productidtoadd', 'int');
|
||||||
|
if (GETPOST('addconsumelinebutton')) {
|
||||||
$moline->role = 'toconsume';
|
$moline->role = 'toconsume';
|
||||||
|
} else {
|
||||||
|
$moline->role = 'toproduce';
|
||||||
|
}
|
||||||
$moline->origin_type = 'free'; // free consume line
|
$moline->origin_type = 'free'; // free consume line
|
||||||
$moline->position = 0;
|
$moline->position = 0;
|
||||||
|
|
||||||
@ -642,7 +647,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($action, array('consumeorproduce', 'consumeandproduceall', 'addconsumeline'))) {
|
if (in_array($action, array('consumeorproduce', 'consumeandproduceall', 'addconsumeline', 'addproduceline'))) {
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="confirm_'.$action.'">';
|
print '<input type="hidden" name="action" value="confirm_'.$action.'">';
|
||||||
@ -962,7 +967,19 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<div class="fichehalfright">';
|
print '<div class="fichehalfright">';
|
||||||
print '<div class="clearboth"></div>';
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans('Production'), '', '');
|
$nblinetoproduce = 0;
|
||||||
|
foreach ($object->lines as $line) {
|
||||||
|
if ($line->role == 'toproduce') {
|
||||||
|
$nblinetoproduce++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$newlinetext = '';
|
||||||
|
if ($object->status != $object::STATUS_PRODUCED && $object->status != $object::STATUS_CANCELED && $action != 'consumeorproduce' && $action != 'consumeandproduceall') {
|
||||||
|
if ($nblinetoproduce == 0 || $object->mrptype == 1) {
|
||||||
|
$newlinetext = '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addproduceline">'.$langs->trans("AddNewProduceLines").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print load_fiche_titre($langs->trans('Production'), '', '', 0, '', '', $newlinetext);
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table id="tablelinestoproduce" class="noborder noshadow nobottom centpercent">';
|
print '<table id="tablelinestoproduce" class="noborder noshadow nobottom centpercent">';
|
||||||
@ -993,6 +1010,34 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
if ($action == 'addproduceline') {
|
||||||
|
print '<!-- Add line to produce -->'."\n";
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>';
|
||||||
|
print $form->select_produits('', 'productidtoadd', '', 0, 0, -1, 2, '', 0, array(), 0, '1', 0, 'maxwidth300');
|
||||||
|
print '</td>';
|
||||||
|
// Qty
|
||||||
|
print '<td class="right"><input type="text" name="qtytoadd" value="1" class="width50 right"></td>';
|
||||||
|
// Cost price
|
||||||
|
print '<td></td>';
|
||||||
|
|
||||||
|
// Qty already produced
|
||||||
|
print '<td></td>';
|
||||||
|
// Warehouse
|
||||||
|
print '<td>';
|
||||||
|
print '<input type="submit" class="button buttongen" name="addproducelinebutton" value="'.$langs->trans("Add").'">';
|
||||||
|
print '</td>';
|
||||||
|
// Lot - serial
|
||||||
|
if ($conf->productbatch->enabled) {
|
||||||
|
print '<td></td>';
|
||||||
|
}
|
||||||
|
// Action
|
||||||
|
if ($permissiontodelete) {
|
||||||
|
print '<td></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($object->lines)) {
|
if (!empty($object->lines)) {
|
||||||
$nblinetoproduce = 0;
|
$nblinetoproduce = 0;
|
||||||
foreach ($object->lines as $line) {
|
foreach ($object->lines as $line) {
|
||||||
@ -1065,7 +1110,18 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
if ($conf->productbatch->enabled) {
|
if ($conf->productbatch->enabled) {
|
||||||
print '<td></td>'; // Lot
|
print '<td></td>'; // Lot
|
||||||
print '<td></td>';
|
}
|
||||||
|
|
||||||
|
if ($permissiontodelete && $line->origin_type == 'free') {
|
||||||
|
$href = $_SERVER["PHP_SELF"];
|
||||||
|
$href .= '?id='.$object->id;
|
||||||
|
$href .= '&action=deleteline';
|
||||||
|
$href .= '&lineid='.$line->id;
|
||||||
|
print '<td class="center">';
|
||||||
|
print '<a href="'.$href.'">';
|
||||||
|
print img_picto('', "delete");
|
||||||
|
print '</a>';
|
||||||
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -868,7 +868,7 @@ if (empty($reshook)) {
|
|||||||
if (GETPOST('propalid') > 0) {
|
if (GETPOST('propalid') > 0) {
|
||||||
// Define cost price for margin calculation
|
// Define cost price for margin calculation
|
||||||
$buyprice = 0;
|
$buyprice = 0;
|
||||||
if (($result = $propal->defineBuyPrice($pu_ht, price2num(GETPOST('remise_percent'), 2), $object->id)) < 0) {
|
if (($result = $propal->defineBuyPrice($pu_ht, price2num(GETPOST('remise_percent'), '', 2), $object->id)) < 0) {
|
||||||
dol_syslog($langs->trans('FailedToGetCostPrice'));
|
dol_syslog($langs->trans('FailedToGetCostPrice'));
|
||||||
setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors');
|
setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors');
|
||||||
} else {
|
} else {
|
||||||
@ -883,7 +883,7 @@ if (empty($reshook)) {
|
|||||||
$localtax1_tx, // localtax1
|
$localtax1_tx, // localtax1
|
||||||
$localtax2_tx, // localtax2
|
$localtax2_tx, // localtax2
|
||||||
$object->id,
|
$object->id,
|
||||||
price2num(GETPOST('remise_percent'), 2),
|
price2num(GETPOST('remise_percent'), '', 2),
|
||||||
$price_base_type,
|
$price_base_type,
|
||||||
$pu_ttc,
|
$pu_ttc,
|
||||||
0,
|
0,
|
||||||
@ -908,7 +908,7 @@ if (empty($reshook)) {
|
|||||||
} elseif (GETPOST('commandeid') > 0) {
|
} elseif (GETPOST('commandeid') > 0) {
|
||||||
// Define cost price for margin calculation
|
// Define cost price for margin calculation
|
||||||
$buyprice = 0;
|
$buyprice = 0;
|
||||||
if (($result = $commande->defineBuyPrice($pu_ht, GETPOST('remise_percent', 2), $object->id)) < 0) {
|
if (($result = $commande->defineBuyPrice($pu_ht, price2num(GETPOST('remise_percent'), '', 2), $object->id)) < 0) {
|
||||||
dol_syslog($langs->trans('FailedToGetCostPrice'));
|
dol_syslog($langs->trans('FailedToGetCostPrice'));
|
||||||
setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors');
|
setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors');
|
||||||
} else {
|
} else {
|
||||||
@ -923,7 +923,7 @@ if (empty($reshook)) {
|
|||||||
$localtax1_tx, // localtax1
|
$localtax1_tx, // localtax1
|
||||||
$localtax2_tx, // localtax2
|
$localtax2_tx, // localtax2
|
||||||
$object->id,
|
$object->id,
|
||||||
price2num(GETPOST('remise_percent'), 2),
|
price2num(GETPOST('remise_percent'), '', 2),
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
$price_base_type,
|
$price_base_type,
|
||||||
@ -942,13 +942,13 @@ if (empty($reshook)) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
header("Location: ".DOL_URL_ROOT."/commande/card.php?id=".$commande->id);
|
header("Location: ".DOL_URL_ROOT."/commande/card.php?id=".urlencode($commande->id));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
} elseif (GETPOST('factureid') > 0) {
|
} elseif (GETPOST('factureid') > 0) {
|
||||||
// Define cost price for margin calculation
|
// Define cost price for margin calculation
|
||||||
$buyprice = 0;
|
$buyprice = 0;
|
||||||
if (($result = $facture->defineBuyPrice($pu_ht, GETPOST('remise_percent', 2), $object->id)) < 0) {
|
if (($result = $facture->defineBuyPrice($pu_ht, price2num(GETPOST('remise_percent'), '', 2), $object->id)) < 0) {
|
||||||
dol_syslog($langs->trans('FailedToGetCostPrice'));
|
dol_syslog($langs->trans('FailedToGetCostPrice'));
|
||||||
setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors');
|
setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors');
|
||||||
} else {
|
} else {
|
||||||
@ -963,7 +963,7 @@ if (empty($reshook)) {
|
|||||||
$localtax1_tx,
|
$localtax1_tx,
|
||||||
$localtax2_tx,
|
$localtax2_tx,
|
||||||
$object->id,
|
$object->id,
|
||||||
price2num(GETPOST('remise_percent'), 2),
|
price2num(GETPOST('remise_percent'), '', 2),
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
|
|||||||
@ -175,6 +175,9 @@ class Product extends CommonObject
|
|||||||
public $prices_by_qty_id = array();
|
public $prices_by_qty_id = array();
|
||||||
public $prices_by_qty_list = array();
|
public $prices_by_qty_list = array();
|
||||||
|
|
||||||
|
//! Array for multilangs
|
||||||
|
public $multilangs = array();
|
||||||
|
|
||||||
//! Default VAT code for product (link to code into llx_c_tva but without foreign keys)
|
//! Default VAT code for product (link to code into llx_c_tva but without foreign keys)
|
||||||
public $default_vat_code;
|
public $default_vat_code;
|
||||||
|
|
||||||
@ -350,8 +353,6 @@ class Product extends CommonObject
|
|||||||
public $stats_mrptoconsume = array();
|
public $stats_mrptoconsume = array();
|
||||||
public $stats_mrptoproduce = array();
|
public $stats_mrptoproduce = array();
|
||||||
|
|
||||||
public $multilangs = array();
|
|
||||||
|
|
||||||
//! Size of image
|
//! Size of image
|
||||||
public $imgWidth;
|
public $imgWidth;
|
||||||
public $imgHeight;
|
public $imgHeight;
|
||||||
@ -2229,8 +2230,8 @@ class Product extends CommonObject
|
|||||||
* @param string $ref_ext Ref ext of product/service to load
|
* @param string $ref_ext Ref ext of product/service to load
|
||||||
* @param string $barcode Barcode of product/service to load
|
* @param string $barcode Barcode of product/service to load
|
||||||
* @param int $ignore_expression When module dynamicprices is on, ignores the math expression for calculating price and uses the db value instead
|
* @param int $ignore_expression When module dynamicprices is on, ignores the math expression for calculating price and uses the db value instead
|
||||||
* @param int $ignore_price_load Load product without loading prices arrays (when we are sure we don't need them)
|
* @param int $ignore_price_load Load product without loading $this->multiprices... array (when we are sure we don't need them)
|
||||||
* @param int $ignore_lang_load Load product without loading language arrays (when we are sure we don't need them)
|
* @param int $ignore_lang_load Load product without loading $this->multilangs language arrays (when we are sure we don't need them)
|
||||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function fetch($id = '', $ref = '', $ref_ext = '', $barcode = '', $ignore_expression = 0, $ignore_price_load = 0, $ignore_lang_load = 0)
|
public function fetch($id = '', $ref = '', $ref_ext = '', $barcode = '', $ignore_expression = 0, $ignore_price_load = 0, $ignore_lang_load = 0)
|
||||||
|
|||||||
@ -715,7 +715,7 @@ END;
|
|||||||
|
|
||||||
// Discount qty min
|
// Discount qty min
|
||||||
print '<tr><td>'.$langs->trans("DiscountQtyMin").'</td>';
|
print '<tr><td>'.$langs->trans("DiscountQtyMin").'</td>';
|
||||||
print '<td><input class="flat" name="remise_percent" size="4" value="'.(GETPOSTISSET('remise_percent') ? vatrate(price2num(GETPOST('remise_percent'), 2)) : (isset($object->fourn_remise_percent) ?vatrate($object->fourn_remise_percent) : '')).'"> %';
|
print '<td><input class="flat" name="remise_percent" size="4" value="'.(GETPOSTISSET('remise_percent') ? vatrate(price2num(GETPOST('remise_percent'), '', 2)) : (isset($object->fourn_remise_percent) ?vatrate($object->fourn_remise_percent) : '')).'"> %';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -412,10 +412,10 @@ if (empty($reshook)) {
|
|||||||
// Récupération des variables
|
// Récupération des variables
|
||||||
$rowid = GETPOST('rowid', 'int');
|
$rowid = GETPOST('rowid', 'int');
|
||||||
$priceid = GETPOST('priceid', 'int');
|
$priceid = GETPOST('priceid', 'int');
|
||||||
$newprice = price2num(GETPOST("price"), 'MU');
|
$newprice = price2num(GETPOST("price"), 'MU', 2);
|
||||||
// $newminprice=price2num(GETPOST("price_min"),'MU'); // TODO : Add min price management
|
// $newminprice=price2num(GETPOST("price_min"),'MU'); // TODO : Add min price management
|
||||||
$quantity = price2num(GETPOST('quantity'), 'MS');
|
$quantity = price2num(GETPOST('quantity'), 'MS', 2);
|
||||||
$remise_percent = price2num(GETPOST('remise_percent'), 2);
|
$remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
$remise = 0; // TODO : allow discount by amount when available on documents
|
$remise = 0; // TODO : allow discount by amount when available on documents
|
||||||
|
|
||||||
if (empty($quantity)) {
|
if (empty($quantity)) {
|
||||||
|
|||||||
@ -548,7 +548,7 @@ if (!empty($search_user)) {
|
|||||||
if (!empty($search_batch)) {
|
if (!empty($search_batch)) {
|
||||||
$sql .= natural_search('m.batch', $search_batch);
|
$sql .= natural_search('m.batch', $search_batch);
|
||||||
}
|
}
|
||||||
if (!empty($product_id)) {
|
if (!empty($product_id) && $product_id != '-1') {
|
||||||
$sql .= natural_search('p.rowid', $product_id);
|
$sql .= natural_search('p.rowid', $product_id);
|
||||||
}
|
}
|
||||||
if (!empty($search_fk_projet) && $search_fk_projet != '-1') {
|
if (!empty($search_fk_projet) && $search_fk_projet != '-1') {
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/public/eventorganization/attendee_subscription.php
|
* \file htdocs/public/eventorganization/attendee_registration.php
|
||||||
* \ingroup project
|
* \ingroup project
|
||||||
* \brief Example of form to subscribe to an event
|
* \brief Example of form to subscribe to an event
|
||||||
*
|
*
|
||||||
@ -79,8 +79,12 @@ $email = GETPOST("email");
|
|||||||
$societe = GETPOST("societe");
|
$societe = GETPOST("societe");
|
||||||
|
|
||||||
// Getting id from Post and decoding it
|
// Getting id from Post and decoding it
|
||||||
|
$type = GETPOST('type', 'aZ09');
|
||||||
|
if ($type == 'conf') {
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$type = GETPOST('type', 'alpha');
|
} else {
|
||||||
|
$id = GETPOST('fk_project', 'int') ? GETPOST('fk_project', 'int') : GETPOST('id', 'int');
|
||||||
|
}
|
||||||
|
|
||||||
$conference = new ConferenceOrBooth($db);
|
$conference = new ConferenceOrBooth($db);
|
||||||
$project = new Project($db);
|
$project = new Project($db);
|
||||||
@ -98,10 +102,6 @@ if ($type=='conf') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($type == 'global') {
|
if ($type == 'global') {
|
||||||
$project = new Project($db);
|
|
||||||
if (empty($id)) {
|
|
||||||
$id = GETPOST('fk_project', 'int');
|
|
||||||
}
|
|
||||||
$resultproject = $project->fetch($id);
|
$resultproject = $project->fetch($id);
|
||||||
if ($resultproject < 0) {
|
if ($resultproject < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
@ -110,10 +110,9 @@ if ($type=='global') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$securekeyreceived = GETPOST('securekey', 'alpha');
|
$securekeyreceived = GETPOST('securekey', 'alpha');
|
||||||
$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'md5');
|
||||||
|
|
||||||
// We check if the securekey collected is OK
|
// We check if the securekey collected is OK
|
||||||
if ($securekeytocompare != $securekeyreceived) {
|
if ($securekeytocompare != $securekeyreceived) {
|
||||||
@ -254,17 +253,19 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
if ($type == 'global') {
|
if ($type == 'global') {
|
||||||
$filter = array('t.fk_project'=>$id, 'customsql'=>'t.email="'.$email.'"');
|
$filter = array('t.fk_project'=>$id, 'customsql'=>'t.email="'.$email.'"');
|
||||||
}
|
}
|
||||||
if ($action='conf') {
|
if ($action == 'conf') {
|
||||||
$filter = array('t.fk_actioncomm'=>$id, 'customsql'=>'t.email="'.$email.'"');
|
$filter = array('t.fk_actioncomm'=>$id, 'customsql'=>'t.email="'.$email.'"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if there is already an attendee into table eventorganization_conferenceorboothattendee for same event (or conference/booth)
|
||||||
$resultfetchconfattendee = $confattendee->fetchAll('', '', 0, 0, $filter);
|
$resultfetchconfattendee = $confattendee->fetchAll('', '', 0, 0, $filter);
|
||||||
if ($resultfetchconfattendee > 0 && count($resultfetchconfattendee)>0) {
|
|
||||||
|
if (is_array($resultfetchconfattendee) && count($resultfetchconfattendee) > 0) {
|
||||||
// Found confattendee
|
// Found confattendee
|
||||||
$confattendee = array_shift($resultfetchconfattendee);
|
$confattendee = array_shift($resultfetchconfattendee);
|
||||||
} else {
|
} else {
|
||||||
// Need to create a confattendee
|
// Need to create a confattendee
|
||||||
$confattendee->date_subscription = dol_now();
|
$confattendee->date_creation = dol_now();
|
||||||
$confattendee->email = $email;
|
$confattendee->email = $email;
|
||||||
$confattendee->fk_project = $project->id;
|
$confattendee->fk_project = $project->id;
|
||||||
$confattendee->fk_actioncomm = $id;
|
$confattendee->fk_actioncomm = $id;
|
||||||
@ -274,29 +275,33 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
$errmsg .= $confattendee->error;
|
$errmsg .= $confattendee->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// At this point, we have an attendee. It may not be linked to a thirdparty if we just created it
|
|
||||||
|
|
||||||
// If the attendee has already paid
|
// At this point, we have an existing $confattendee. It may not be linked to a thirdparty.
|
||||||
if ($confattendee->status == 1) {
|
//var_dump($confattendee);
|
||||||
|
|
||||||
|
// If the attendee has already been paid
|
||||||
|
if (!empty($confattendee->date_subscription)) {
|
||||||
$securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
$securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||||
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$id.'&securekey='.$securekeyurl;
|
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl);
|
||||||
Header("Location: ".$redirection);
|
Header("Location: ".$redirection);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getting the thirdparty or creating it
|
// Getting the thirdparty or creating it
|
||||||
$thirdparty = new Societe($db);
|
$thirdparty = new Societe($db);
|
||||||
// Fetch using fk_soc if the attendee was already existing
|
// Fetch using fk_soc if the attendee was already found
|
||||||
if (!empty($confattendee->fk_soc)) {
|
if (!empty($confattendee->fk_soc) && $confattendee->fk_soc > 0) {
|
||||||
$resultfetchthirdparty = $thirdparty->fetch($confattendee->fk_soc);
|
$resultfetchthirdparty = $thirdparty->fetch($confattendee->fk_soc);
|
||||||
} else {
|
} else {
|
||||||
|
if (empty($conf->global->EVENTORGANIZATION_DISABLE_RETREIVE_THIRDPARTY_FROM_NAME)) {
|
||||||
// Fetch using the input field by user if we just created the attendee
|
// Fetch using the input field by user if we just created the attendee
|
||||||
if (!empty($societe)) {
|
if (!empty($societe)) {
|
||||||
$resultfetchthirdparty = $thirdparty->fetch('', $societe);
|
$resultfetchthirdparty = $thirdparty->fetch('', $societe, '', '', '', '', '', '', '', '', $email);
|
||||||
if ($resultfetchthirdparty <= 0) {
|
if ($resultfetchthirdparty <= 0) {
|
||||||
// Need to create a new one (not found or multiple with the same name)
|
// Need to create a new one (not found or multiple with the same name/email)
|
||||||
$resultfetchthirdparty = 0;
|
$resultfetchthirdparty = 0;
|
||||||
} else {
|
} else {
|
||||||
// We found an unique result with that name, so we put in in fk_soc of attendee
|
// We found an unique result with that name/email, so we set the fk_soc of attendee
|
||||||
$confattendee->fk_soc = $thirdparty->id;
|
$confattendee->fk_soc = $thirdparty->id;
|
||||||
$confattendee->update($user);
|
$confattendee->update($user);
|
||||||
}
|
}
|
||||||
@ -304,12 +309,16 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
// Need to create a thirdparty (put number>0 if we do not want to create a thirdparty for free-conferences)
|
// Need to create a thirdparty (put number>0 if we do not want to create a thirdparty for free-conferences)
|
||||||
$resultfetchthirdparty = 0;
|
$resultfetchthirdparty = 0;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$resultfetchthirdparty = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($resultfetchthirdparty < 0) {
|
if ($resultfetchthirdparty < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
$errmsg .= $thirdparty->error;
|
$errmsg .= $thirdparty->error;
|
||||||
} elseif ($resultfetchthirdparty == 0) {
|
} elseif ($resultfetchthirdparty == 0) {
|
||||||
// creation of a new thirdparty
|
// Creation of a new thirdparty
|
||||||
if (!empty($societe)) {
|
if (!empty($societe)) {
|
||||||
$thirdparty->name = $societe;
|
$thirdparty->name = $societe;
|
||||||
} else {
|
} else {
|
||||||
@ -318,7 +327,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
$thirdparty->address = GETPOST("address");
|
$thirdparty->address = GETPOST("address");
|
||||||
$thirdparty->zip = GETPOST("zipcode");
|
$thirdparty->zip = GETPOST("zipcode");
|
||||||
$thirdparty->town = GETPOST("town");
|
$thirdparty->town = GETPOST("town");
|
||||||
$thirdparty->client = 2;
|
$thirdparty->client = $thirdparty::PROSPECT;
|
||||||
$thirdparty->fournisseur = 0;
|
$thirdparty->fournisseur = 0;
|
||||||
$thirdparty->country_id = GETPOST("country_id", 'int');
|
$thirdparty->country_id = GETPOST("country_id", 'int');
|
||||||
$thirdparty->state_id = GETPOST("state_id", 'int');
|
$thirdparty->state_id = GETPOST("state_id", 'int');
|
||||||
@ -349,6 +358,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
} else {
|
} else {
|
||||||
$thirdparty->country_code = getCountry($thirdparty->country_id, 2, $db, $langs);
|
$thirdparty->country_code = getCountry($thirdparty->country_id, 2, $db, $langs);
|
||||||
$thirdparty->country = getCountry($thirdparty->country_code, 0, $db, $langs);
|
$thirdparty->country = getCountry($thirdparty->country_code, 0, $db, $langs);
|
||||||
|
|
||||||
$confattendee->fk_soc = $thirdparty->id;
|
$confattendee->fk_soc = $thirdparty->id;
|
||||||
$confattendee->update($user);
|
$confattendee->update($user);
|
||||||
}
|
}
|
||||||
@ -356,10 +366,18 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$db->commit();
|
|
||||||
if (!empty(floatval($project->price_registration))) {
|
if (!empty(floatval($project->price_registration))) {
|
||||||
|
$outputlangs = $langs;
|
||||||
|
// TODO Use default language of $thirdparty->default_lang to build $outputlang
|
||||||
|
|
||||||
$productforinvoicerow = new Product($db);
|
$productforinvoicerow = new Product($db);
|
||||||
|
$productforinvoicerow->id = 0;
|
||||||
|
|
||||||
|
$resultprod = 0;
|
||||||
|
if ($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION > 0) {
|
||||||
$resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
|
$resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
|
||||||
|
}
|
||||||
|
|
||||||
if ($resultprod < 0) {
|
if ($resultprod < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
$errmsg .= $productforinvoicerow->error;
|
$errmsg .= $productforinvoicerow->error;
|
||||||
@ -371,6 +389,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
$facture->date = dol_now();
|
$facture->date = dol_now();
|
||||||
$facture->cond_reglement_id = $confattendee->cond_reglement_id;
|
$facture->cond_reglement_id = $confattendee->cond_reglement_id;
|
||||||
$facture->fk_project = $project->id;
|
$facture->fk_project = $project->id;
|
||||||
|
|
||||||
if (empty($facture->cond_reglement_id)) {
|
if (empty($facture->cond_reglement_id)) {
|
||||||
$paymenttermstatic = new PaymentTerm($confattendee->db);
|
$paymenttermstatic = new PaymentTerm($confattendee->db);
|
||||||
$facture->cond_reglement_id = $paymenttermstatic->getDefaultId();
|
$facture->cond_reglement_id = $paymenttermstatic->getDefaultId();
|
||||||
@ -393,29 +412,44 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
if (!$error) {
|
if (!$error) {
|
||||||
// Add line to draft invoice
|
// Add line to draft invoice
|
||||||
$vattouse = get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id);
|
$vattouse = get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id);
|
||||||
$result = $facture->addline($langs->trans("ConferenceAttendeeFee", $conference->label, dol_print_date($conference->datep, '%d/%m/%y %H:%M:%S'), dol_print_date($conference->datep2, '%d/%m/%y %H:%M:%S')), floatval($project->price_registration), 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, dol_now(), '', 0, 0, '', 'HT', 0, 1);
|
|
||||||
|
$labelforproduct = $outputlangs->trans("EventFee", $project->title);
|
||||||
|
$date_start = $project->date_start;
|
||||||
|
$date_end = $project->date_end;
|
||||||
|
|
||||||
|
$result = $facture->addline($labelforproduct, floatval($project->price_registration), 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, $date_start, $date_end, 0, 0, '', 'HT', 0, 1);
|
||||||
if ($result <= 0) {
|
if ($result <= 0) {
|
||||||
$confattendee->error = $facture->error;
|
$confattendee->error = $facture->error;
|
||||||
$confattendee->errors = $facture->errors;
|
$confattendee->errors = $facture->errors;
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$valid = true;
|
$db->commit();
|
||||||
$sourcetouse = 'conferencesubscription';
|
|
||||||
|
// Registration was recorded and invoice was generated, so we send an email
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// Now we redirect to the payment page
|
||||||
|
$sourcetouse = 'organizedeventregistration';
|
||||||
$reftouse = $facture->id;
|
$reftouse = $facture->id;
|
||||||
$redirection = $dolibarr_main_url_root.'/public/payment/newpayment.php?source='.$sourcetouse.'&ref='.$reftouse;
|
$redirection = $dolibarr_main_url_root.'/public/payment/newpayment.php?source='.urlencode($sourcetouse).'&ref='.urlencode($reftouse);
|
||||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
||||||
$redirection .= '&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical
|
$redirection .= '&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical
|
||||||
} else {
|
} else {
|
||||||
$redirection .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
|
$redirection .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Header("Location: ".$redirection);
|
Header("Location: ".$redirection);
|
||||||
exit;
|
exit;
|
||||||
}
|
} else {
|
||||||
|
$db->rollback();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$db->commit();
|
||||||
|
|
||||||
// No price has been set
|
// No price has been set
|
||||||
// Validating the subscription
|
// Validating the subscription
|
||||||
$confattendee->setStatut(1);
|
$confattendee->setStatut(1);
|
||||||
@ -464,7 +498,8 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
}
|
}
|
||||||
|
|
||||||
$securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
$securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||||
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$id.'&securekey='.$securekeyurl;
|
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl);
|
||||||
|
|
||||||
Header("Location: ".$redirection);
|
Header("Location: ".$redirection);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -524,8 +559,8 @@ if (!empty($conference->id) && $conference->status==ConferenceOrBooth::STATUS_CO
|
|||||||
print '<input type="hidden" name="token" value="' . newToken() . '" / >';
|
print '<input type="hidden" name="token" value="' . newToken() . '" / >';
|
||||||
print '<input type="hidden" name="entity" value="' . $entity . '" />';
|
print '<input type="hidden" name="entity" value="' . $entity . '" />';
|
||||||
print '<input type="hidden" name="action" value="add" />';
|
print '<input type="hidden" name="action" value="add" />';
|
||||||
print '<input type="hidden" name="id" value="' . $conference->id . '" />';
|
|
||||||
print '<input type="hidden" name="type" value="' . $type . '" />';
|
print '<input type="hidden" name="type" value="' . $type . '" />';
|
||||||
|
print '<input type="hidden" name="id" value="' . $conference->id . '" />';
|
||||||
print '<input type="hidden" name="fk_project" value="' . $project->id . '" />';
|
print '<input type="hidden" name="fk_project" value="' . $project->id . '" />';
|
||||||
print '<input type="hidden" name="securekey" value="' . $securekeyreceived . '" />';
|
print '<input type="hidden" name="securekey" value="' . $securekeyreceived . '" />';
|
||||||
|
|
||||||
@ -724,7 +724,7 @@ if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT) || !empty($conf->global->MEMBER
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) {
|
if (!empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) {
|
||||||
$amount = $amount ? $amount : (GETPOST('amount') ? GETPOST('amount') : $conf->global->MEMBER_NEWFORM_AMOUNT);
|
$amount = $amount ? $amount : (GETPOST('amount') ? price2num(GETPOST('amount'), 'MT', 2) : $conf->global->MEMBER_NEWFORM_AMOUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
$amount = price2num($amount);
|
$amount = price2num($amount);
|
||||||
@ -732,10 +732,10 @@ if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT) || !empty($conf->global->MEMBER
|
|||||||
// $conf->global->MEMBER_NEWFORM_PAYONLINE is 'paypal', 'paybox' or 'stripe'
|
// $conf->global->MEMBER_NEWFORM_PAYONLINE is 'paypal', 'paybox' or 'stripe'
|
||||||
print '<tr><td>'.$langs->trans("Subscription").'</td><td class="nowrap">';
|
print '<tr><td>'.$langs->trans("Subscription").'</td><td class="nowrap">';
|
||||||
if (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) {
|
if (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) {
|
||||||
print '<input type="text" name="amount" id="amount" class="flat amount" size="6" value="'.$amount.'">';
|
print '<input type="text" name="amount" id="amount" class="flat amount width50" value="'.$amount.'">';
|
||||||
} else {
|
} else {
|
||||||
print '<input type="text" name="amount" id="amounthidden" class="flat amount" disabled size="6" value="'.$amount.'">';
|
print '<input type="text" name="amount" id="amounthidden" class="flat amount width50" disabled value="'.$amount.'">';
|
||||||
print '<input type="hidden" name="amount" id="amount" class="flat amount" size="6" value="'.$amount.'">';
|
print '<input type="hidden" name="amount" id="amount" class="flat amount" value="'.$amount.'">';
|
||||||
}
|
}
|
||||||
print ' '.$langs->trans("Currency".$conf->currency);
|
print ' '.$langs->trans("Currency".$conf->currency);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user