Merge remote-tracking branch 'origin/invoiceextra' into invoiceextra

This commit is contained in:
Frédéric FRANCE 2022-10-20 12:41:01 +02:00
commit d1a9660ade
95 changed files with 655 additions and 285 deletions

View File

@ -26,6 +26,7 @@ Following changes may create regressions for some external modules, but were nec
* The signature of method getNomUrl() of class ProductFournisseur has been modified to match the signature of method Product * The signature of method getNomUrl() of class ProductFournisseur has been modified to match the signature of method Product
* Trigger ORDER_SUPPLIER_DISPATCH is removed, use ORDER_SUPPLIER_RECEIVE and/or LINEORDER_SUPPLIER_DISPATCH instead. * Trigger ORDER_SUPPLIER_DISPATCH is removed, use ORDER_SUPPLIER_RECEIVE and/or LINEORDER_SUPPLIER_DISPATCH instead.
* All functions fetch_all() are deprecated for naming consitency, use fetchAll() instead * All functions fetch_all() are deprecated for naming consitency, use fetchAll() instead
* Code standardization: $user->rights->propale is now $user->rights->propal everywhere.
***** ChangeLog for 16.0.1 compared to 16.0.0 ***** ***** ChangeLog for 16.0.1 compared to 16.0.0 *****

View File

@ -293,6 +293,7 @@ foreach my $PROJECT (@PROJECTLIST) {
} }
print "Clean $BUILDROOT\n"; print "Clean $BUILDROOT\n";
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.cache`; $ret=`rm -fr $BUILDROOT/$PROJECTLC/.cache`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.git`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.project`; $ret=`rm -fr $BUILDROOT/$PROJECTLC/.project`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.settings`; $ret=`rm -fr $BUILDROOT/$PROJECTLC/.settings`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/index.php`; $ret=`rm -fr $BUILDROOT/$PROJECTLC/index.php`;

View File

@ -58,7 +58,7 @@ Requires: mysql, mysql-client
%if 0%{?suse_version} %if 0%{?suse_version}
# Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros # Voir http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros
Group: Productivity/Office/Management Group: Productivity/Office/Management
Requires: apache2, apache2-mod_php5, php5 >= 5.3.0, php5-gd, php5-ldap, php5-imap, php5-mysql, php5-openssl, dejavu Requires: apache2, apache2-mod_php, php >= 5.3.0, php-gd, php-ldap, php-imap, php-mysql, php-openssl, dejavu
Requires: mysql-community-server, mysql-community-server-client Requires: mysql-community-server, mysql-community-server-client
BuildRequires: update-desktop-files fdupes BuildRequires: update-desktop-files fdupes
%else %else

View File

@ -25,7 +25,7 @@ BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Productivity/Office/Management Group: Productivity/Office/Management
Requires: apache2, apache2-mod_php5, php5 >= 5.3.0, php5-gd, php5-ldap, php5-imap, php5-mysql, php5-openssl, dejavu Requires: apache2, apache2-mod_php, php >= 5.3.0, php-gd, php-ldap, php-imap, php-mysql, php-openssl, dejavu
Requires: mysql-community-server, mysql-community-server-client Requires: mysql-community-server, mysql-community-server-client
%if 0%{?suse_version} %if 0%{?suse_version}
BuildRequires: update-desktop-files fdupes BuildRequires: update-desktop-files fdupes
@ -66,7 +66,6 @@ ed essere facile da usare.
Programmo web, progettato per poter fornire solo ciò di Programmo web, progettato per poter fornire solo ciò di
cui hai bisogno ed essere facile da usare. cui hai bisogno ed essere facile da usare.
%_datadir/dolibarr/htdocs/webhook
#---- prep #---- prep
%prep %prep

View File

@ -1,8 +1,7 @@
# Fail2Ban configuration file # Fail2Ban configuration file
# #
# Regexp to catch known spambots and software alike. Please verify # Regexp to detect access on public pages so we can add mitigation on IP making too much
# that it is your intent to block IPs which were driven by # access to your a Dolibarr instance.
# above mentioned bots.
[Definition] [Definition]
@ -11,7 +10,7 @@
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 --- Access to GET /public/clicktodial/cidlookup.php" >> /mypath/documents/dolibarr.log # echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 --- Access to GET /public/clicktodial/cidlookup.php" >> /mypath/documents/dolibarr.log
# #
# then # then
# fail2ban-client status web-dol-passforgotten # fail2ban-client status web-dolibarr-limitpublic
# #
# To test rule file on a existing log file # To test rule file on a existing log file
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-limitpublic.conf # fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-limitpublic.conf

View File

@ -1,8 +1,7 @@
# Fail2Ban configuration file # Fail2Ban configuration file
# #
# Regexp to catch known spambots and software alike. Please verify # Regexp to detect try to check a couple login/password so we can add mitigation
# that it is your intent to block IPs which were driven by # on IP making too much tries.
# above mentioned bots.
[Definition] [Definition]
@ -11,7 +10,7 @@
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 functions_dolibarr::check_user_password_abcd Authentication KO" >> /mypath/documents/dolibarr.log # echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 functions_dolibarr::check_user_password_abcd Authentication KO" >> /mypath/documents/dolibarr.log
# #
# then # then
# fail2ban-client status web-dol-bruteforce # fail2ban-client status web-dolibarr-rulesbruteforce
# #
# To test rule file on a existing log file # To test rule file on a existing log file
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf # fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulesbruteforce.conf

View File

@ -1,8 +1,7 @@
# Fail2Ban configuration file # Fail2Ban configuration file
# #
# Regexp to catch known spambots and software alike. Please verify # Regexp to detect access on passwordforgotten.php page so we can add mitigation on IP making too much
# that it is your intent to block IPs which were driven by # access to this Dolibarr page.
# above mentioned bots.
[Definition] [Definition]
@ -11,7 +10,7 @@
# echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 --- Access to GET /passwordforgotten.php - action=buildnewpassword, massaction=" >> /mypath/documents/dolibarr.log # echo `date +'%Y-%m-%d %H:%M:%S'`" INFO 1.2.3.4 --- Access to GET /passwordforgotten.php - action=buildnewpassword, massaction=" >> /mypath/documents/dolibarr.log
# #
# then # then
# fail2ban-client status web-dol-passforgotten # fail2ban-client status web-dolibarr-rulespassforgotten
# #
# To test rule file on a existing log file # To test rule file on a existing log file
# fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf # fail2ban-regex /mypath/documents/dolibarr.log /etc/fail2ban/filter.d/web-dolibarr-rulespassforgotten.conf

View File

@ -1,5 +1,8 @@
#!/bin/sh #!/bin/sh
#
# Count number of different contributors and number of commits for a given year.
#
if [ "x$1" = "x" ]; then if [ "x$1" = "x" ]; then
echo "Usage: $0 YEAR" echo "Usage: $0 YEAR"
exit exit

View File

@ -1,6 +1,10 @@
#/bin/bash #/bin/bash
Releases=("3.8" "3.9" "4.0" "5.0" "6.0" " 7.0" "develop") #
Dates=("2013-01-01", "2014-01-01", "2015-01-01", "2016-07-01", "2017-02-01", "2017-07-01", "2018-02-01", "2050-01-01") # Count number of commits per user and per versions (using date for version detection)
#
Releases=("16.0" "develop")
Dates=("2022-01-01" "2022-08-31" "2050-01-01")
let "counter = 1" let "counter = 1"
for i in "${Releases[@]}" for i in "${Releases[@]}"

View File

@ -0,0 +1,16 @@
#/bin/bash
#
# Count number of lines modified per user for a given branch
#
if [ "x$2" = "x" ]; then
echo "Usage: $0 tagnamestart|START tagnameend|HEAD"
exit
fi
echo "git log $1..$2 --shortstat | grep ... | perl ... > /tmp/github_lines_perusers.tmp"
git log $1..$2 --shortstat | grep -e 'Author:' -e 'Date:' -e ' changed' -e ' insertion' -e ' deletion' | perl -n -e '/^(.*)$/; $line = $1; if ($line =~ /(changed|insertion|deletion)/) { $line =~ s/[^0-9\s]//g; my @arr=split /\s+/, $line; $tot=0; for (1..@arr) { $tot += $arr[$_]; }; print $tot."\n"; } else { print $line."\n"; };' > /tmp/github_lines_perusers.tmp
cat /tmp/github_lines_perusers.tmp | awk 'BEGIN { FS="\n"; print "user and nb of lines"; lastuser=""; } { if ($1 ~ /Author:/) { lastuser=$1 }; if ($1 ~ /^[0-9]+$/) { aaa[lastuser]+=$1; } } END { for (var in aaa) print var," ",aaa[var]; } '

View File

@ -85,7 +85,7 @@ if ($action == 'add' && $user->hasRight('accounting', 'chartofaccount')) {
// Clean code // Clean code
// To manage zero or not at the end of the accounting account // To manage zero or not at the end of the accounting account
if ($conf->global->ACCOUNTING_MANAGE_ZERO == 1) { if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
$account_number = $account_number; $account_number = $account_number;
} else { } else {
$account_number = clean_account($account_number); $account_number = clean_account($account_number);
@ -148,7 +148,7 @@ if ($action == 'add' && $user->hasRight('accounting', 'chartofaccount')) {
// Clean code // Clean code
// To manage zero or not at the end of the accounting account // To manage zero or not at the end of the accounting account
if (isset($conf->global->ACCOUNTING_MANAGE_ZERO) && $conf->global->ACCOUNTING_MANAGE_ZERO == 1) { if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
$account_number = $account_number; $account_number = $account_number;
} else { } else {
$account_number = clean_account($account_number); $account_number = clean_account($account_number);

View File

@ -480,11 +480,11 @@ class Members extends DolibarrApi
/** /**
* Add a subscription for a member * Add a subscription for a member
* *
* @param int $id ID of member * @param int $id ID of member
* @param int $start_date Start date {@from body} {@type timestamp} * @param string $start_date Start date {@from body} {@type timestamp}
* @param int $end_date End date {@from body} {@type timestamp} * @param string $end_date End date {@from body} {@type timestamp}
* @param float $amount Amount (may be 0) {@from body} * @param float $amount Amount (may be 0) {@from body}
* @param string $label Label {@from body} * @param string $label Label {@from body}
* @return int ID of subscription * @return int ID of subscription
* *
* @url POST {id}/subscriptions * @url POST {id}/subscriptions

View File

@ -220,7 +220,7 @@ if ($action == 'edit') {
foreach ($arrayofparameters as $constname => $val) { foreach ($arrayofparameters as $constname => $val) {
if ($val['enabled']==1) { if ($val['enabled']==1) {
$setupnotempty++; $setupnotempty++;
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td><!-- '.$constname.' -->';
$tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : '');
$tooltiphelp .= (($langs->trans($constname . 'Tooltip2') && $langs->trans($constname . 'Tooltip2') != $constname . 'Tooltip2') ? '<br><br>'."\n".$langs->trans($constname . 'Tooltip2') : ''); $tooltiphelp .= (($langs->trans($constname . 'Tooltip2') && $langs->trans($constname . 'Tooltip2') != $constname . 'Tooltip2') ? '<br><br>'."\n".$langs->trans($constname . 'Tooltip2') : '');
print '<span id="helplink'.$constname.'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1, 'info', '', 0, 3, 'tootips'.$constname).'</span>'; print '<span id="helplink'.$constname.'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1, 'info', '', 0, 3, 'tootips'.$constname).'</span>';
@ -302,7 +302,8 @@ if ($action == 'edit') {
foreach ($arrayofparameters as $constname => $val) { foreach ($arrayofparameters as $constname => $val) {
if ($val['enabled']==1) { if ($val['enabled']==1) {
$setupnotempty++; $setupnotempty++;
print '<tr class="oddeven"><td>'; print '<tr class="oddeven">';
print '<td><!-- '.$constname.' -->';
$tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : '');
$tooltiphelp .= (($langs->trans($constname . 'Tooltip2') && $langs->trans($constname . 'Tooltip2') != $constname . 'Tooltip2') ? '<br><br>'."\n".$langs->trans($constname . 'Tooltip2') : ''); $tooltiphelp .= (($langs->trans($constname . 'Tooltip2') && $langs->trans($constname . 'Tooltip2') != $constname . 'Tooltip2') ? '<br><br>'."\n".$langs->trans($constname . 'Tooltip2') : '');
print $form->textwithpicto($langs->trans($constname), $tooltiphelp); print $form->textwithpicto($langs->trans($constname), $tooltiphelp);
@ -320,12 +321,17 @@ if ($action == 'edit') {
$formmail = new FormMail($db); $formmail = new FormMail($db);
$tmp = explode(':', $val['type']); $tmp = explode(':', $val['type']);
$labelemailtemplate = getDolGlobalString($constname);
$template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, getDolGlobalString($constname)); if ($labelemailtemplate && $labelemailtemplate != '-1') {
if ($template < 0) { $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, getDolGlobalString($constname));
setEventMessages(null, $formmail->errors, 'errors'); if (is_numeric($template) && $template < 0) {
setEventMessages($formmail->error, $formmail->errors, 'errors');
} else {
if ($template->label != 'default') {
print $langs->trans($template->label);
}
}
} }
print $langs->trans($template->label);
} }
} elseif (preg_match('/category:/', $val['type'])) { } elseif (preg_match('/category:/', $val['type'])) {
if (getDolGlobalString($constname)) { if (getDolGlobalString($constname)) {
@ -353,16 +359,21 @@ if ($action == 'edit') {
} }
} elseif ($val['type'] == 'product') { } elseif ($val['type'] == 'product') {
$product = new Product($db); $product = new Product($db);
$resprod = $product->fetch(getDolGlobalString($constname)); $idproduct = getDolGlobalString($constname);
if ($resprod > 0) { if ($idproduct > 0) {
print $product->getNomUrl(1); $resprod = $product->fetch($idproduct);
} elseif ($resprod < 0) { if ($resprod > 0) {
setEventMessages($product->error, $product->errors, "errors"); print $product->getNomUrl(1);
} elseif ($resprod < 0) {
setEventMessages($product->error, $product->errors, "errors");
}
} }
} else { } else {
print getDolGlobalString($constname); print getDolGlobalString($constname);
} }
print '</td></tr>'; print '</td>';
print '</tr>';
} }
} }

View File

@ -1173,7 +1173,7 @@ if ($num) {
$class .= ' tdoverflowmax100'; $class .= ' tdoverflowmax100';
} }
if ($value == 'topic') { if ($value == 'topic') {
$class .= 'tdoverflowmax200 small'; $class .= ' tdoverflowmax200 small';
} }
if ($value == 'type_template') { if ($value == 'type_template') {
$valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow; $valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow;

View File

@ -570,9 +570,10 @@ print 'For a higher security, we also recommend to implement limits and mitigati
print '</span>'; print '</span>';
print '<br>'; print '<br>';
print 'Login process -> This can be done using a fail2ban rule (see example into dev/setup)'."<br>"; $urlexamplebase = 'https://github.com/Dolibarr/dolibarr/blob/develop/dev/setup/fail2ban/filter.d/';
print DOL_URL_ROOT.'/passwordforgotten.php (see example into dev/setup)'."<br>"; print '- Login process (see fail2ban example on <a target="_blank" rel="noopener" href="'.$urlexamplebase.'web-dolibarr-rulesbruteforce.conf">GitHub</a>)<br>';
print DOL_URL_ROOT.'/public/* (see example into dev/setup)'."<br>"; print '- '.DOL_URL_ROOT.'/passwordforgotten.php (see fail2ban example on <a target="_blank" rel="noopener" href="'.$urlexamplebase.'web-dolibarr-rulespassgorgotten.conf">GitHub</a>)<br>';
print '- '.DOL_URL_ROOT.'/public/* (see fail2ban example on <a target="_blank" rel="noopener" href="'.$urlexamplebase.'web-dolibarr-limitpublic.conf">GitHub</a>)<br>';

View File

@ -204,7 +204,7 @@ class CActionComm
if ($obj->module == 'order' && isModEnabled('commande') && empty($user->rights->commande->lire)) { if ($obj->module == 'order' && isModEnabled('commande') && empty($user->rights->commande->lire)) {
$qualified = 1; $qualified = 1;
} }
if ($obj->module == 'propal' && isModEnabled("propal") && !empty($user->rights->propale->lire)) { if ($obj->module == 'propal' && isModEnabled("propal") && !empty($user->rights->propal->lire)) {
$qualified = 1; $qualified = 1;
} }
if ($obj->module == 'invoice_supplier' && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && !empty($user->rights->fournisseur->facture->lire)) || (isModEnabled('supplier_invoice') && !empty($user->rights->supplier_invoice->lire)))) { if ($obj->module == 'invoice_supplier' && ((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && !empty($user->rights->fournisseur->facture->lire)) || (isModEnabled('supplier_invoice') && !empty($user->rights->supplier_invoice->lire)))) {

View File

@ -544,7 +544,7 @@ if ($object->fetch($id) >= 0) {
if ($allowaddtarget) { if ($allowaddtarget) {
$morehtmlcenter = '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ToClearAllRecipientsClickHere").'</span> <a href="'.$_SERVER["PHP_SELF"].'?clearlist=1&id='.$object->id.'" class="button reposition smallpaddingimp">'.$langs->trans("TargetsReset").'</a>'; $morehtmlcenter = '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ToClearAllRecipientsClickHere").'</span> <a href="'.$_SERVER["PHP_SELF"].'?clearlist=1&id='.$object->id.'" class="button reposition smallpaddingimp">'.$langs->trans("TargetsReset").'</a>';
} }
$morehtmlcenter .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?exportcsv=1&id='.$object->id.'">'.$langs->trans("Download").'</a>'; $morehtmlcenter .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=exportcsv&token='.newToken().'&exportcsv=1&id='.$object->id.'">'.img_picto('', 'download', 'class="pictofixedwidth"').$langs->trans("Download").'</a>';
$massactionbutton = ''; $massactionbutton = '';

View File

@ -74,7 +74,7 @@ restrictedArea($user, 'propal', $object->id);
* Add a new contact * Add a new contact
*/ */
if ($action == 'addcontact' && $user->rights->propale->creer) { if ($action == 'addcontact' && $user->rights->propal->creer) {
if ($object->id > 0) { if ($object->id > 0) {
$contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
@ -92,12 +92,12 @@ if ($action == 'addcontact' && $user->rights->propale->creer) {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }
} }
} elseif ($action == 'swapstatut' && $user->rights->propale->creer) { } elseif ($action == 'swapstatut' && $user->rights->propal->creer) {
// Toggle the status of a contact // Toggle the status of a contact
if ($object->id > 0) { if ($object->id > 0) {
$result = $object->swapContactStatus(GETPOST('ligne', 'int')); $result = $object->swapContactStatus(GETPOST('ligne', 'int'));
} }
} elseif ($action == 'deletecontact' && $user->rights->propale->creer) { } elseif ($action == 'deletecontact' && $user->rights->propal->creer) {
// Deletes a contact // Deletes a contact
$result = $object->delete_contact($lineid); $result = $object->delete_contact($lineid);

View File

@ -81,7 +81,7 @@ if (!$sortfield) {
$object = new Propal($db); $object = new Propal($db);
$object->fetch($id, $ref); $object->fetch($id, $ref);
$permissiontoadd = $user->rights->propale->creer; $permissiontoadd = $user->rights->propal->creer;
// Security check // Security check
if (!empty($user->socid)) { if (!empty($user->socid)) {

View File

@ -227,7 +227,7 @@ if ($resql) {
/* /*
* Open (validated) proposals * Open (validated) proposals
*/ */
if (isModEnabled("propal") && $user->rights->propale->lire) { if (isModEnabled("propal") && $user->rights->propal->lire) {
$sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, s.email, s.code_compta"; $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, s.email, s.code_compta";
$sql .= ", p.rowid as propalid, p.entity, p.total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv"; $sql .= ", p.rowid as propalid, p.entity, p.total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s";

View File

@ -244,8 +244,8 @@ $arrayfields = array(
'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), 'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), 'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
'p.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>500), 'p.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>500),
'p.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))), 'p.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
'p.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES))), 'p.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
'p.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), 'p.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
); );

View File

@ -64,7 +64,7 @@ restrictedArea($user, 'propal', $object->id, 'propal');
* Actions * Actions
*/ */
$permissionnote = $user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php $permissionnote = $user->rights->propal->creer; // Used by the include of actions_setnotes.inc.php
$reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) { if ($reshook < 0) {

View File

@ -60,7 +60,7 @@ $endyear = $year;
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array('orders', 'companies', 'other', 'suppliers', 'supplier_proposal')); $langs->loadLangs(array('orders', 'companies', 'other', 'suppliers', 'supplier_proposal'));
if ($mode == 'customer' && !$user->rights->propale->lire) { if ($mode == 'customer' && !$user->rights->propal->lire) {
accessforbidden(); accessforbidden();
} }
if ($mode == 'supplier' && !$user->rights->supplier_proposal->lire) { if ($mode == 'supplier' && !$user->rights->supplier_proposal->lire) {

View File

@ -62,7 +62,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
print '<td class="linkedcol-ref" >'.$objectlink->ref_client.'</td>'; print '<td class="linkedcol-ref" >'.$objectlink->ref_client.'</td>';
print '<td class="linkedcol-date center">'.dol_print_date($objectlink->date, 'day').'</td>'; print '<td class="linkedcol-date center">'.dol_print_date($objectlink->date, 'day').'</td>';
print '<td class="linkedcol-amount right">'; print '<td class="linkedcol-amount right">';
if ($user->rights->propale->lire) { if ($user->rights->propal->lire) {
$total = $total + $objectlink->total_ht; $total = $total + $objectlink->total_ht;
echo price($objectlink->total_ht); echo price($objectlink->total_ht);
} }

View File

@ -119,7 +119,7 @@ if ($resql) {
/* /*
* Liste des propal brouillons * Liste des propal brouillons
*/ */
if (isModEnabled("propal") && $user->rights->propale->lire) { if (isModEnabled("propal") && $user->rights->propal->lire) {
$sql = "SELECT p.rowid, p.ref, p.price, s.nom as sname"; $sql = "SELECT p.rowid, p.ref, p.price, s.nom as sname";
$sql .= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as p";
$sql .= ", ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."societe as s";
@ -177,7 +177,7 @@ if (isModEnabled('agenda')) {
/* /*
* Dernieres propales ouvertes * Dernieres propales ouvertes
*/ */
if (isModEnabled("propal") && $user->rights->propale->lire) { if (isModEnabled("propal") && $user->rights->propal->lire) {
$sql = "SELECT s.nom as name, s.rowid as socid, s.client, s.canvas,"; $sql = "SELECT s.nom as name, s.rowid as socid, s.client, s.canvas,";
$sql .= " p.rowid as propalid, p.total_ttc, p.ref, p.datep as dp, c.label as statut, c.id as statutid"; $sql .= " p.rowid as propalid, p.total_ttc, p.ref, p.datep as dp, c.label as statut, c.id as statutid";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s";

View File

@ -208,8 +208,8 @@ $arrayfields = array(
'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120), 'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120),
'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125), 'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125),
'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130), 'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130),
'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>135), 'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position'=>135),
'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>140), 'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position'=>140),
'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled("expedition")), 'position'=>990), 'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled("expedition")), 'position'=>990),
'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)), 'position'=>995), 'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)), 'position'=>995),
'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999), 'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999),
@ -2446,7 +2446,7 @@ if ($resql) {
// Get local and virtual stock and store it into cache // Get local and virtual stock and store it into cache
if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product])) { if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product])) {
$generic_product->load_stock('nobatch'); // ->load_virtual_stock() is already included into load_stock() $generic_product->load_stock('nobatch,warehouseopen'); // ->load_virtual_stock() is already included into load_stock()
$productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_reel; $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_reel;
$productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique; $productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique;
} else { } else {

View File

@ -471,7 +471,7 @@ class BankAccounts extends DolibarrApi
* Add a line to an account * Add a line to an account
* *
* @param int $id ID of account * @param int $id ID of account
* @param int $date Payment date (timestamp) {@from body} {@type timestamp} * @param string $date Payment date (timestamp) {@from body} {@type timestamp}
* @param string $type Payment mode (TYP,VIR,PRE,LIQ,VAD,CB,CHQ...) {@from body} * @param string $type Payment mode (TYP,VIR,PRE,LIQ,VAD,CB,CHQ...) {@from body}
* @param string $label Label {@from body} * @param string $label Label {@from body}
* @param float $amount Amount (may be 0) {@from body} * @param float $amount Amount (may be 0) {@from body}
@ -480,7 +480,7 @@ class BankAccounts extends DolibarrApi
* @param string $cheque_writer Name of cheque writer {@from body} * @param string $cheque_writer Name of cheque writer {@from body}
* @param string $cheque_bank Bank of cheque writer {@from body} * @param string $cheque_bank Bank of cheque writer {@from body}
* @param string $accountancycode Accountancy code {@from body} * @param string $accountancycode Accountancy code {@from body}
* @param int $datev Payment date value (timestamp) {@from body} {@type timestamp} * @param string $datev Payment date value (timestamp) {@from body} {@type timestamp}
* @param string $num_releve Bank statement numero {@from body} * @param string $num_releve Bank statement numero {@from body}
* @return int ID of line * @return int ID of line
* *

View File

@ -657,13 +657,13 @@ if ($result) {
if ($user->rights->banque->consolidate) { if ($user->rights->banque->consolidate) {
print '<td>'; print '<td>';
if ($objp->rappro) { if ($objp->rappro) {
print '<input name="num_rel_bis" class="flat" value="'.$objp->num_releve.'"'.($objp->rappro ? ' disabled' : '').'>'; print '<input name="num_rel_bis" id="num_rel_bis" class="flat" type="text" value="'.$objp->num_releve.'"'.($objp->rappro ? ' disabled' : '').'>';
print '<input name="num_rel" type="hidden" value="'.$objp->num_releve.'">'; print '<input name="num_rel" id="num_rel" class="flat" type="hidden" value="'.$objp->num_releve.'">';
} else { } else {
print '<input name="num_rel" class="flat" value="'.$objp->num_releve.'"'.($objp->rappro ? ' disabled' : '').'>'; print '<input name="num_rel" id="num_rel" class="flat" value="'.$objp->num_releve.'"'.($objp->rappro ? ' disabled' : '').'>';
} }
if ($objp->num_releve) { if ($objp->num_releve) {
print ' &nbsp; (<a href="'.DOL_URL_ROOT.'/compta/bank/releve.php?num='.$objp->num_releve.'&account='.$acct->id.'">'.$langs->trans("AccountStatement").' '.$objp->num_releve.')</a>'; print ' &nbsp; <a href="'.DOL_URL_ROOT.'/compta/bank/releve.php?num='.$objp->num_releve.'&account='.$acct->id.'">('.$langs->trans("AccountStatement").' '.$objp->num_releve.')</a>';
} }
print '</td>'; print '</td>';
} else { } else {
@ -675,6 +675,28 @@ if ($result) {
if ($user->rights->banque->consolidate) { if ($user->rights->banque->consolidate) {
print '<td>'; print '<td>';
print '<input type="checkbox" id="reconciled" name="reconciled" class="flat" '.(GETPOSTISSET("reconciled") ? (GETPOST("reconciled") ? ' checked="checked"' : '') : ($objp->rappro ? ' checked="checked"' : '')).'">'; print '<input type="checkbox" id="reconciled" name="reconciled" class="flat" '.(GETPOSTISSET("reconciled") ? (GETPOST("reconciled") ? ' checked="checked"' : '') : ($objp->rappro ? ' checked="checked"' : '')).'">';
print '
<script type="text/javascript">
jQuery(document).ready(function() {
$("#reconciled").click(function(){
console.log("We click on checkbox reconciled "+$("#reconciled").prop("checked"));
if ($("#reconciled").prop("checked") == false) {
console.log("we remove disabled");
jQuery("#num_rel_bis").removeAttr("disabled");
jQuery("#num_rel").removeAttr("disabled");
jQuery("#num_rel_bis").attr("type", "hidden");
jQuery("#num_rel").attr("type", "text");
jQuery("#num_rel_bis").hide();
jQuery("#num_rel").show();
} else {
}
});
});
</script>
';
print '</td>'; print '</td>';
} else { } else {
print '<td>'.yn($objp->rappro).'</td>'; print '<td>'.yn($objp->rappro).'</td>';

View File

@ -5719,32 +5719,32 @@ if ($action == 'create') {
$isErasable = $object->is_erasable(); $isErasable = $object->is_erasable();
$params = array( $params = array(
'attr' => array( 'attr' => array(
'title' => '',
'class' => 'classfortooltip' 'class' => 'classfortooltip'
) )
); );
if ($usercandelete || ($usercancreate && $isErasable == 1)) { // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions) if ($usercandelete || ($usercancreate && $isErasable == 1)) { // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions)
$enableDelete = false; $enableDelete = false;
$deleteHref = '#'; $deleteHref = '#';
$htmltooltip = '';
if ($isErasable == -4) { if ($isErasable == -4) {
$params['attr']['title'] = $langs->trans('DisabledBecausePayments'); $htmltooltip = $langs->trans('DisabledBecausePayments');
} elseif ($isErasable == -3) { } elseif ($isErasable == -3) {
$params['attr']['title'] = $langs->trans('DisabledBecauseNotLastSituationInvoice'); $htmltooltip = $langs->trans('DisabledBecauseNotLastSituationInvoice');
} elseif ($isErasable == -2) { } elseif ($isErasable == -2) {
$params['attr']['title'] = $langs->trans('DisabledBecauseNotLastInvoice'); $htmltooltip = $langs->trans('DisabledBecauseNotLastInvoice');
} elseif ($isErasable == -1) { } elseif ($isErasable == -1) {
$params['attr']['title'] = $langs->trans('DisabledBecauseDispatchedInBookkeeping'); $htmltooltip = $langs->trans('DisabledBecauseDispatchedInBookkeeping');
} elseif ($isErasable <= 0) { // Any other cases } elseif ($isErasable <= 0) { // Any other cases
$params['attr']['title'] = $langs->trans('DisabledBecauseNotErasable'); $htmltooltip = $langs->trans('DisabledBecauseNotErasable');
} elseif ($objectidnext) { } elseif ($objectidnext) {
$params['attr']['title'] = $langs->trans('DisabledBecauseReplacedInvoice'); $htmltooltip = $langs->trans('DisabledBecauseReplacedInvoice');
} else { } else {
$deleteHref = $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=delete&token='.newToken(); $deleteHref = $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=delete&token='.newToken();
$enableDelete = true; $enableDelete = true;
} }
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $deleteHref, '', $enableDelete, $params); print dolGetButtonAction($htmltooltip, $langs->trans('Delete'), 'delete', $deleteHref, '', $enableDelete, $params);
} else { } else {
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', '#', '', false); print dolGetButtonAction($langs->trans('Delete'), $langs->trans('Delete'), 'delete', '#', '', false);
} }
} }
print '</div>'; print '</div>';

View File

@ -1452,7 +1452,6 @@ class Invoices extends DolibarrApi
$multicurrency_amounts[$id] = $newvalue; $multicurrency_amounts[$id] = $newvalue;
} }
// Creation of payment line // Creation of payment line
$paymentobj = new Paiement($this->db); $paymentobj = new Paiement($this->db);
$paymentobj->datepaye = $datepaye; $paymentobj->datepaye = $datepaye;

View File

@ -1272,6 +1272,8 @@ class FactureRec extends CommonInvoice
$tmparray = dol_getdate($now); $tmparray = dol_getdate($now);
$today = dol_mktime(23, 59, 59, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); // Today is last second of current day $today = dol_mktime(23, 59, 59, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); // Today is last second of current day
$this->output = null;
dol_syslog("createRecurringInvoices restrictioninvoiceid=".$restrictioninvoiceid." forcevalidation=".$forcevalidation); dol_syslog("createRecurringInvoices restrictioninvoiceid=".$restrictioninvoiceid." forcevalidation=".$forcevalidation);
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'facture_rec'; $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'facture_rec';

View File

@ -89,6 +89,7 @@ $search_project_ref = GETPOST('search_project_ref', 'alpha');
$search_project = GETPOST('search_project', 'alpha'); $search_project = GETPOST('search_project', 'alpha');
$search_company = GETPOST('search_company', 'alpha'); $search_company = GETPOST('search_company', 'alpha');
$search_company_alias = GETPOST('search_company_alias', 'alpha'); $search_company_alias = GETPOST('search_company_alias', 'alpha');
$search_parent_name = trim(GETPOST('search_parent_name', 'alphanohtml'));
$search_montant_ht = GETPOST('search_montant_ht', 'alpha'); $search_montant_ht = GETPOST('search_montant_ht', 'alpha');
$search_montant_vat = GETPOST('search_montant_vat', 'alpha'); $search_montant_vat = GETPOST('search_montant_vat', 'alpha');
$search_montant_localtax1 = GETPOST('search_montant_localtax1', 'alpha'); $search_montant_localtax1 = GETPOST('search_montant_localtax1', 'alpha');
@ -220,6 +221,7 @@ $arrayfields = array(
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>41), 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>41),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>50), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>50),
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1, 'position'=>51), 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1, 'position'=>51),
's2.nom'=>array('label'=>'ParentCompany', 'position'=>32, 'checked'=>0),
's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>55), 's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>55),
's.zip'=>array('label'=>"Zip", 'checked'=>1, 'position'=>60), 's.zip'=>array('label'=>"Zip", 'checked'=>1, 'position'=>60),
'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>65), 'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>65),
@ -251,8 +253,8 @@ $arrayfields = array(
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)), 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || empty($user->rights->margins->liretous) || empty($conf->global->DISPLAY_MARK_RATES) ? 0 : 1)),
'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), 'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>502), 'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>502),
'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))), 'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES))), 'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
'f.fk_fac_rec_source'=>array('label'=>'GeneratedFromTemplate', 'checked'=>0, 'position'=>520, 'enabled'=>'1'), 'f.fk_fac_rec_source'=>array('label'=>'GeneratedFromTemplate', 'checked'=>0, 'position'=>520, 'enabled'=>'1'),
'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), 'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
); );
@ -317,6 +319,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter',
$search_project = ''; $search_project = '';
$search_company = ''; $search_company = '';
$search_company_alias = ''; $search_company_alias = '';
$search_parent_name = '';
$search_montant_ht = ''; $search_montant_ht = '';
$search_montant_vat = ''; $search_montant_vat = '';
$search_montant_localtax1 = ''; $search_montant_localtax1 = '';
@ -336,7 +339,6 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter',
$search_town = ''; $search_town = '';
$search_zip = ""; $search_zip = "";
$search_state = ""; $search_state = "";
$search_type = '';
$search_country = ''; $search_country = '';
$search_type_thirdparty = ''; $search_type_thirdparty = '';
$search_date_startday = ''; $search_date_startday = '';
@ -553,6 +555,8 @@ $bankaccountstatic = new Account($db);
$facturestatic = new Facture($db); $facturestatic = new Facture($db);
$formcompany = new FormCompany($db); $formcompany = new FormCompany($db);
$companystatic = new Societe($db); $companystatic = new Societe($db);
$companyparent = new Societe($db);
$company_url_list = array();
$sql = 'SELECT'; $sql = 'SELECT';
if ($sall || $search_product_category > 0 || $search_user > 0) { if ($sall || $search_product_category > 0 || $search_user > 0) {
@ -567,6 +571,8 @@ $sql .= ' f.paye as paye, f.fk_statut, f.close_code,';
$sql .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,'; $sql .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,';
$sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,'; $sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,';
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,'; $sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,';
$sql .= " s.parent as fk_parent,";
$sql .= " s2.nom as name2,";
$sql .= ' typent.code as typent_code,'; $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 .= ' country.code as country_code,'; $sql .= ' country.code as country_code,';
@ -592,6 +598,7 @@ $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint; $sql .= $hookmanager->resPrint;
$sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe as s';
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s2 ON s2.rowid = s.parent";
$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)";
@ -666,6 +673,9 @@ if ($search_company) {
if ($search_company_alias) { if ($search_company_alias) {
$sql .= natural_search('s.name_alias', $search_company_alias); $sql .= natural_search('s.name_alias', $search_company_alias);
} }
if ($search_parent_name) {
$sql .= natural_search('s2.nom', $search_parent_name);
}
if ($search_town) { if ($search_town) {
$sql .= natural_search('s.town', $search_town); $sql .= natural_search('s.town', $search_town);
} }
@ -1040,10 +1050,13 @@ if ($resql) {
$param .= '&search_type='.urlencode($search_type); $param .= '&search_type='.urlencode($search_type);
} }
if ($search_company) { if ($search_company) {
$param .= '&search_societe='.urlencode($search_company); $param .= '&search_company='.urlencode($search_company);
} }
if ($search_company_alias) { if ($search_company_alias) {
$param .= '&search_societe_alias='.urlencode($search_company_alias); $param .= '&search_company_alias='.urlencode($search_company_alias);
}
if ($search_parent_name != '') {
$param .= '&search_parent_name='.urlencode($search_parent_name);
} }
if ($search_town) { if ($search_town) {
$param .= '&search_town='.urlencode($search_town); $param .= '&search_town='.urlencode($search_town);
@ -1054,6 +1067,9 @@ if ($resql) {
if ($search_country) { if ($search_country) {
$param .= "&search_country=".urlencode($search_country); $param .= "&search_country=".urlencode($search_country);
} }
if ($search_type_thirdparty != '') {
$param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
}
if ($search_sale > 0) { if ($search_sale > 0) {
$param .= '&search_sale='.urlencode($search_sale); $param .= '&search_sale='.urlencode($search_sale);
} }
@ -1369,6 +1385,12 @@ if ($resql) {
if (!empty($arrayfields['s.name_alias']['checked'])) { if (!empty($arrayfields['s.name_alias']['checked'])) {
print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_company_alias" value="'.$search_company_alias.'"></td>'; print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_company_alias" value="'.$search_company_alias.'"></td>';
} }
// Parent company
if (!empty($arrayfields['s2.nom']['checked'])) {
print '<td class="liste_titre">';
print '<input class="flat maxwidth100" type="text" name="search_parent_name" value="'.dol_escape_htmltag($search_parent_name).'">';
print '</td>';
}
// Town // Town
if (!empty($arrayfields['s.town']['checked'])) { if (!empty($arrayfields['s.town']['checked'])) {
print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>'; print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>';
@ -1618,6 +1640,9 @@ if ($resql) {
if (!empty($arrayfields['s.name_alias']['checked'])) { if (!empty($arrayfields['s.name_alias']['checked'])) {
print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER['PHP_SELF'], 's.name_alias', '', $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER['PHP_SELF'], 's.name_alias', '', $param, '', $sortfield, $sortorder);
} }
if (!empty($arrayfields['s2.nom']['checked'])) {
print_liste_field_titre($arrayfields['s2.nom']['label'], $_SERVER['PHP_SELF'], 's2.nom', '', $param, '', $sortfield, $sortorder);
}
if (!empty($arrayfields['s.town']['checked'])) { if (!empty($arrayfields['s.town']['checked'])) {
print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
} }
@ -1747,6 +1772,7 @@ if ($resql) {
if ($num > 0) { if ($num > 0) {
$i = 0; $i = 0;
$typenArray = $formcompany->typent_array(1);
$totalarray = array(); $totalarray = array();
$totalarray['nbfield'] = 0; $totalarray['nbfield'] = 0;
$totalarray['val'] = array(); $totalarray['val'] = array();
@ -2021,6 +2047,26 @@ if ($resql) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Parent company
if (!empty($arrayfields['s2.nom']['checked'])) {
print '<td class="tdoverflowmax200">';
if ($obj->fk_parent > 0) {
if (!isset($company_url_list[$obj->fk_parent])) {
$companyparent = new Societe($db);
$res = $companyparent->fetch($obj->fk_parent);
if ($res > 0) {
$company_url_list[$obj->fk_parent] = $companyparent->getNomUrl(1);
}
}
if (isset($company_url_list[$obj->fk_parent])) {
print $company_url_list[$obj->fk_parent];
}
}
print "</td>";
if (!$i) {
$totalarray['nbfield']++;
}
}
// Town // Town
if (!empty($arrayfields['s.town']['checked'])) { if (!empty($arrayfields['s.town']['checked'])) {
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->town).'">'; print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->town).'">';

View File

@ -353,7 +353,8 @@ class BonPrelevement extends CommonObject
if ($this->fetched == 1) { if ($this->fetched == 1) {
if ($date < $this->date_trans) { if ($date < $this->date_trans) {
$this->error = 'DateOfMovementLowerThanDateOfFileTransmission'; $langs->load("errors");
$this->error = $langs->trans('ErrorDateOfMovementLowerThanDateOfFileTransmission');
dol_syslog("bon-prelevment::set_infocredit 1027 ".$this->error); dol_syslog("bon-prelevment::set_infocredit 1027 ".$this->error);
return -1027; return -1027;
} }

View File

@ -553,7 +553,15 @@ if (strlen($search_fax)) {
if (isModEnabled('socialnetworks')) { if (isModEnabled('socialnetworks')) {
foreach ($socialnetworks as $key => $value) { foreach ($socialnetworks as $key => $value) {
if ($value['active'] && strlen($search_[$key])) { if ($value['active'] && strlen($search_[$key])) {
$sql .= " AND p.socialnetworks LIKE '%\"".$key."\":\"".$search_[$key]."%'"; $searchkeyinjsonformat = preg_replace('/"$/', '', preg_replace('/^"/', '', json_encode($search_[$key])));
if (in_array($db->type, array('mysql', 'mysqli'))) {
$sql .= " AND p.socialnetworks REGEXP '\"".$db->escapeforlike($db->escape($key))."\":\"[^\"]*".$db->escapeforlike($db->escape($searchkeyinjsonformat))."'";
} elseif ($db->type == 'pgsql') {
$sql .= " AND p.socialnetworks ~ '\"".$db->escapeforlike($db->escape($key))."\":\"[^\"]*".$db->escapeforlike($db->escape($searchkeyinjsonformat))."'";
} else {
// Works with all database but not reliable because search only for social network code starting with earched value
$sql .= " AND p.socialnetworks LIKE '%\"".$db->escapeforlike($db->escape($key))."\":\"".$db->escapeforlike($db->escape($searchkeyinjsonformat))."%'";
}
} }
} }
} }
@ -608,6 +616,7 @@ if ($view == "recent") {
} else { } else {
$sql .= $db->order($sortfield, $sortorder); $sql .= $db->order($sortfield, $sortorder);
} }
//print $sql;
// Count total nb of records // Count total nb of records
$nbtotalofrecords = ''; $nbtotalofrecords = '';

View File

@ -90,7 +90,6 @@ if (((isModEnabled('product') && $user->hasRight('product', 'read')) || (isModEn
if (isModEnabled('mrp') && $user->hasRight('mrp', 'read') && empty($conf->global->MAIN_SEARCHFORM_MRP_DISABLED)) { if (isModEnabled('mrp') && $user->hasRight('mrp', 'read') && empty($conf->global->MAIN_SEARCHFORM_MRP_DISABLED)) {
$arrayresult['searchintomo'] = array('position'=>35, 'shortcut'=>'', 'img'=>'object_mrp', 'label'=>$langs->trans("SearchIntoMO", $search_boxvalue), 'text'=>img_picto('', 'object_mrp', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoMO", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/mrp/mo_list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); $arrayresult['searchintomo'] = array('position'=>35, 'shortcut'=>'', 'img'=>'object_mrp', 'label'=>$langs->trans("SearchIntoMO", $search_boxvalue), 'text'=>img_picto('', 'object_mrp', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoMO", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/mrp/mo_list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
} }
if (isModEnabled('project') && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->hasRight('projet', 'lire')) { if (isModEnabled('project') && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->hasRight('projet', 'lire')) {
$arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_project', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_project', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); $arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_project', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_project', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
} }

View File

@ -102,7 +102,7 @@ class box_activity extends ModeleBoxes
// list the summary of the propals // list the summary of the propals
if (isModEnabled("propal") && $user->rights->propale->lire) { if (isModEnabled("propal") && $user->rights->propal->lire) {
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
$propalstatic = new Propal($this->db); $propalstatic = new Propal($this->db);

View File

@ -62,7 +62,7 @@ class box_graph_product_distribution extends ModeleBoxes
$this->hidden = !( $this->hidden = !(
(isModEnabled('facture') && !empty($user->rights->facture->lire)) (isModEnabled('facture') && !empty($user->rights->facture->lire))
|| (isModEnabled('commande') && !empty($user->rights->commande->lire)) || (isModEnabled('commande') && !empty($user->rights->commande->lire))
|| (isModEnabled('propal') && !empty($user->rights->propale->lire)) || (isModEnabled('propal') && !empty($user->rights->propal->lire))
); );
} }
@ -110,7 +110,7 @@ class box_graph_product_distribution extends ModeleBoxes
if (!isModEnabled('facture') || empty($user->rights->facture->lire)) { if (!isModEnabled('facture') || empty($user->rights->facture->lire)) {
$showinvoicenb = 0; $showinvoicenb = 0;
} }
if (isModEnabled('propal') || empty($user->rights->propale->lire)) { if (isModEnabled('propal') || empty($user->rights->propal->lire)) {
$showpropalnb = 0; $showpropalnb = 0;
} }
if (!isModEnabled('commande') || empty($user->rights->commande->lire)) { if (!isModEnabled('commande') || empty($user->rights->commande->lire)) {
@ -152,7 +152,7 @@ class box_graph_product_distribution extends ModeleBoxes
$WIDTH = ($nbofgraph >= 2 || !empty($conf->dol_optimize_smallscreen)) ? '300' : '320'; $WIDTH = ($nbofgraph >= 2 || !empty($conf->dol_optimize_smallscreen)) ? '300' : '320';
$HEIGHT = '150'; // Height require to have 5+1 entries into legend visible. $HEIGHT = '150'; // Height require to have 5+1 entries into legend visible.
if (isModEnabled("propal") && !empty($user->rights->propale->lire)) { if (isModEnabled("propal") && !empty($user->rights->propal->lire)) {
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
if ($showpropalnb) { if ($showpropalnb) {
$langs->load("propal"); $langs->load("propal");
@ -365,7 +365,7 @@ class box_graph_product_distribution extends ModeleBoxes
$stringtoshow .= '<input type="hidden" name="action" value="'.$refreshaction.'">'; $stringtoshow .= '<input type="hidden" name="action" value="'.$refreshaction.'">';
$stringtoshow .= '<input type="hidden" name="page_y" value="">'; $stringtoshow .= '<input type="hidden" name="page_y" value="">';
$stringtoshow .= '<input type="hidden" name="DOL_AUTOSET_COOKIE" value="DOLUSERCOOKIE_box_'.$this->boxcode.':year,showinvoicenb,showpropalnb,showordernb">'; $stringtoshow .= '<input type="hidden" name="DOL_AUTOSET_COOKIE" value="DOLUSERCOOKIE_box_'.$this->boxcode.':year,showinvoicenb,showpropalnb,showordernb">';
if (isModEnabled("propal") || !empty($user->rights->propale->lire)) { if (isModEnabled("propal") || !empty($user->rights->propal->lire)) {
$stringtoshow .= '<input type="checkbox" name="'.$param_showpropalnb.'"'.($showpropalnb ? ' checked' : '').'> '.$langs->trans("ForProposals"); $stringtoshow .= '<input type="checkbox" name="'.$param_showpropalnb.'"'.($showpropalnb ? ' checked' : '').'> '.$langs->trans("ForProposals");
$stringtoshow .= '&nbsp;'; $stringtoshow .= '&nbsp;';
} }

View File

@ -56,7 +56,7 @@ class box_graph_propales_permonth extends ModeleBoxes
$this->db = $db; $this->db = $db;
$this->hidden = empty($user->rights->propale->lire); $this->hidden = empty($user->rights->propal->lire);
} }
/** /**
@ -105,7 +105,7 @@ class box_graph_propales_permonth extends ModeleBoxes
$prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user $prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user
} }
if ($user->rights->propale->lire) { if ($user->rights->propal->lire) {
$param_year = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_year'; $param_year = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_year';
$param_shownb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb'; $param_shownb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb';
$param_showtot = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot'; $param_showtot = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot';

View File

@ -83,7 +83,7 @@ class box_propales extends ModeleBoxes
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."Propals", $max)); $this->info_box_head = array('text' => $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."Propals", $max));
if ($user->rights->propale->lire) { if ($user->rights->propal->lire) {
$sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias"; $sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias";
$sql .= ", s.code_client, s.code_compta, s.client"; $sql .= ", s.code_client, s.code_compta, s.client";
$sql .= ", s.logo, s.email, s.entity"; $sql .= ", s.logo, s.email, s.entity";

View File

@ -3757,25 +3757,7 @@ abstract class CommonObject
$fieldlocaltax2 = 'localtax2'; $fieldlocaltax2 = 'localtax2';
$fieldttc = 'total_ttc'; $fieldttc = 'total_ttc';
// Specific code for backward compatibility with old field names // Specific code for backward compatibility with old field names
if ($this->element == 'facture' || $this->element == 'facturerec') { if (in_array($this->element, array('propal', 'commande', 'facture', 'facturerec', 'supplier_proposal', 'order_supplier', 'facture_fourn', 'invoice_supplier', 'invoice_supplier_rec', 'expensereport'))) {
$fieldtva = 'total_tva';
}
if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier' || $this->element == 'invoice_supplier_rec') {
$fieldtva = 'total_tva';
}
if ($this->element == 'propal') {
$fieldtva = 'total_tva';
}
if ($this->element == 'expensereport') {
$fieldtva = 'total_tva';
}
if ($this->element == 'supplier_proposal') {
$fieldtva = 'total_tva';
}
if ($this->element == 'commande') {
$fieldtva = 'total_tva';
}
if ($this->element == 'order_supplier') {
$fieldtva = 'total_tva'; $fieldtva = 'total_tva';
} }

View File

@ -165,7 +165,7 @@ class Form
$ret .= '<td class="right">'; $ret .= '<td class="right">';
} }
if ($htmlname && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) { if ($htmlname && GETPOST('action', 'aZ09') != 'edit'.$htmlname && $perm) {
$ret .= '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&token='.newToken().'&'.$paramid.'='.$object->id.$moreparam.'">'.img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)).'</a>'; $ret .= '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&token='.newToken().'&'.$paramid.'='.$object->id.$moreparam.'">'.img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)).'</a>';
} }
if (!empty($notabletag) && $notabletag == 1) { if (!empty($notabletag) && $notabletag == 1) {
$ret .= ' : '; $ret .= ' : ';
@ -8251,6 +8251,7 @@ class Form
if(! data.id) return null;'; if(! data.id) return null;';
if ($callurlonselect) { if ($callurlonselect) {
// We forge the url with 'sall='
$outdelayed .= ' $outdelayed .= '
var urlBase = data.url; var urlBase = data.url;

View File

@ -837,18 +837,27 @@ class FormFile
} }
// Show file name with link to download // Show file name with link to download
$imgpreview = $this->showPreview($file, $modulepart, $relativepath, 0, $param);;
$out .= '<td class="minwidth200 tdoverflowmax300">'; $out .= '<td class="minwidth200 tdoverflowmax300">';
$out .= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).($param ? '&'.$param : '').'"'; if ($imgpreview) {
$out .= '<span class="spanoverflow widthcentpercentminusx">';
} else {
$out .= '<span class="spanoverflow">';
}
$out .= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($relativepath).($param ? '&'.$param : '').'"';
$mime = dol_mimetype($relativepath, '', 0); $mime = dol_mimetype($relativepath, '', 0);
if (preg_match('/text/', $mime)) { if (preg_match('/text/', $mime)) {
$out .= ' target="_blank" rel="noopener noreferrer"'; $out .= ' target="_blank" rel="noopener noreferrer"';
} }
$out .= ' title="'.dol_escape_htmltag($file["name"]).'"';
$out .= '>'; $out .= '>';
$out .= img_mime($file["name"], $langs->trans("File").': '.$file["name"]); $out .= img_mime($file["name"], $langs->trans("File").': '.$file["name"]);
$out .= dol_trunc($file["name"], 150); $out .= dol_trunc($file["name"], 150);
$out .= '</a>'."\n"; $out .= '</a>';
$out .= $this->showPreview($file, $modulepart, $relativepath, 0, $param); $out .= '</span>'."\n";
$out .= $imgpreview;
$out .= '</td>'; $out .= '</td>';
// Show file size // Show file size

View File

@ -1284,7 +1284,7 @@ class FormMail extends Form
* @param int $id Id of template to get, or -1 for first found with position 0, or 0 for first found whatever is position (priority order depends on lang provided or not) or -2 for exact match with label (no answer if not found) * @param int $id Id of template to get, or -1 for first found with position 0, or 0 for first found whatever is position (priority order depends on lang provided or not) or -2 for exact match with label (no answer if not found)
* @param int $active 1=Only active template, 0=Only disabled, -1=All * @param int $active 1=Only active template, 0=Only disabled, -1=All
* @param string $label Label of template to get * @param string $label Label of template to get
* @return ModelMail|integer One instance of ModelMail or -1 if error * @return ModelMail|integer One instance of ModelMail or < 0 if error
*/ */
public function getEMailTemplate($dbs, $type_template, $user, $outputlangs, $id = 0, $active = 1, $label = '') public function getEMailTemplate($dbs, $type_template, $user, $outputlangs, $id = 0, $active = 1, $label = '')
{ {

View File

@ -670,23 +670,25 @@ class FormTicket
/** /**
* Return html list of tickets type * Return html list of tickets type
* *
* @param string $selected Id du type pre-selectionne * @param string|array $selected Id du type pre-selectionne
* @param string $htmlname Nom de la zone select * @param string $htmlname Nom de la zone select
* @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz)) * @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz))
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
* @param int $empty 1=peut etre vide, 0 sinon * @param int $empty 1=peut etre vide, 0 sinon
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
* @param int $maxlength Max length of label * @param int $maxlength Max length of label
* @param string $morecss More CSS * @param string $morecss More CSS
* @param int $multiselect Is multiselect ?
* @return void * @return void
*/ */
public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '') public function selectTypesTickets($selected = '', $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $multiselect = 0)
{ {
global $langs, $user; global $langs, $user;
$selected = is_array($selected) ? $selected : (!empty($selected) ? implode(',', $selected) : array());
$ticketstat = new Ticket($this->db); $ticketstat = new Ticket($this->db);
dol_syslog(get_class($this)."::select_types_tickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG); dol_syslog(get_class($this) . "::select_types_tickets " . implode(';', $selected) . ", " . $htmlname . ", " . $filtertype . ", " . $format . ", " . $multiselect, LOG_DEBUG);
$filterarray = array(); $filterarray = array();
@ -696,7 +698,7 @@ class FormTicket
$ticketstat->loadCacheTypesTickets(); $ticketstat->loadCacheTypesTickets();
print '<select id="select'.$htmlname.'" class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'">'; print '<select id="select'.$htmlname.'" class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.($multiselect?'[]':'').'"'.($multiselect?' multiple':'').'>';
if ($empty) { if ($empty) {
print '<option value="">&nbsp;</option>'; print '<option value="">&nbsp;</option>';
} }
@ -730,9 +732,9 @@ class FormTicket
} }
// If text is selected, we compare with code, otherwise with id // If text is selected, we compare with code, otherwise with id
if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) { if (in_array($arraytypes['code'], $selected)) {
print ' selected="selected"'; print ' selected="selected"';
} elseif ($selected == $id) { } elseif (in_array($id, $selected)) {
print ' selected="selected"'; print ' selected="selected"';
} elseif ($arraytypes['use_default'] == "1" && !$selected && !$empty) { } elseif ($arraytypes['use_default'] == "1" && !$selected && !$empty) {
print ' selected="selected"'; print ' selected="selected"';

View File

@ -939,6 +939,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
$search_name = GETPOST("search_name", 'alpha'); $search_name = GETPOST("search_name", 'alpha');
$search_address = GETPOST("search_address", 'alpha'); $search_address = GETPOST("search_address", 'alpha');
$search_poste = GETPOST("search_poste", 'alpha'); $search_poste = GETPOST("search_poste", 'alpha');
$search_note_private = GETPOST('search_note_private', 'alphanohtml');
$search_roles = GETPOST("search_roles", 'array'); $search_roles = GETPOST("search_roles", 'array');
$socialnetworks = getArrayOfSocialNetworks(); $socialnetworks = getArrayOfSocialNetworks();
@ -988,6 +989,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
'name' =>array('type'=>'varchar(128)', 'label'=>'Name', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1), 'name' =>array('type'=>'varchar(128)', 'label'=>'Name', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1),
'poste' =>array('type'=>'varchar(128)', 'label'=>'PostOrFunction', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>2, 'index'=>1, 'position'=>20), 'poste' =>array('type'=>'varchar(128)', 'label'=>'PostOrFunction', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>2, 'index'=>1, 'position'=>20),
'address' =>array('type'=>'varchar(128)', 'label'=>'Address', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>3, 'index'=>1, 'position'=>30), 'address' =>array('type'=>'varchar(128)', 'label'=>'Address', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>3, 'index'=>1, 'position'=>30),
'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'visible'=>3, 'position'=>35),
'role' =>array('type'=>'checkbox', 'label'=>'Role', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>4, 'index'=>1, 'position'=>40), 'role' =>array('type'=>'checkbox', 'label'=>'Role', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>4, 'index'=>1, 'position'=>40),
'statut' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>50, 'arrayofkeyval'=>array(0=>$contactstatic->LibStatut(0, 1), 1=>$contactstatic->LibStatut(1, 1))), 'statut' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>50, 'arrayofkeyval'=>array(0=>$contactstatic->LibStatut(0, 1), 1=>$contactstatic->LibStatut(1, 1))),
); );
@ -998,6 +1000,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
't.name'=>array('label'=>"Name", 'checked'=>1, 'position'=>10), 't.name'=>array('label'=>"Name", 'checked'=>1, 'position'=>10),
't.poste'=>array('label'=>"PostOrFunction", 'checked'=>1, 'position'=>20), 't.poste'=>array('label'=>"PostOrFunction", 'checked'=>1, 'position'=>20),
't.address'=>array('label'=>(empty($conf->dol_optimize_smallscreen) ? $langs->trans("Address").' / '.$langs->trans("Phone").' / '.$langs->trans("Email") : $langs->trans("Address")), 'checked'=>1, 'position'=>30), 't.address'=>array('label'=>(empty($conf->dol_optimize_smallscreen) ? $langs->trans("Address").' / '.$langs->trans("Phone").' / '.$langs->trans("Email") : $langs->trans("Address")), 'checked'=>1, 'position'=>30),
't.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'position'=>35),
'sc.role'=>array('label'=>"ContactByDefaultFor", 'checked'=>1, 'position'=>40), 'sc.role'=>array('label'=>"ContactByDefaultFor", 'checked'=>1, 'position'=>40),
't.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>50, 'class'=>'center'), 't.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>50, 'class'=>'center'),
); );
@ -1032,6 +1035,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
$search_roles = array(); $search_roles = array();
$search_address = ''; $search_address = '';
$search_poste = ''; $search_poste = '';
$search_note_private = '';
$search = array(); $search = array();
$search_array_options = array(); $search_array_options = array();
@ -1088,6 +1092,9 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
if ($search_address != '') { if ($search_address != '') {
$param .= '&search_address='.urlencode($search_address); $param .= '&search_address='.urlencode($search_address);
} }
if ($search_note_private != '') {
$param .= '&search_note_private='.urlencode($search_note_private);
}
if ($optioncss != '') { if ($optioncss != '') {
$param .= '&optioncss='.urlencode($optioncss); $param .= '&optioncss='.urlencode($optioncss);
} }
@ -1098,6 +1105,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
$sql = "SELECT t.rowid, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste, t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo,"; $sql = "SELECT t.rowid, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste, t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo,";
$sql .= " t.civility as civility_id, t.address, t.zip, t.town"; $sql .= " t.civility as civility_id, t.address, t.zip, t.town";
$sql .= ", t.note_private";
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)";
$sql .= " WHERE t.fk_soc = ".((int) $object->id); $sql .= " WHERE t.fk_soc = ".((int) $object->id);
@ -1116,6 +1124,9 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
if ($search_address) { if ($search_address) {
$sql .= natural_search($searchAddressPhoneDBFields, $search_address); $sql .= natural_search($searchAddressPhoneDBFields, $search_address);
} }
if ($search_note_private) {
$sql .= natural_search('t.note_private', $search_note_private);
}
if (count($search_roles) > 0) { if (count($search_roles) > 0) {
$sql .= " AND t.rowid IN (SELECT sc.fk_socpeople FROM ".MAIN_DB_PREFIX."societe_contacts as sc WHERE sc.fk_c_type_contact IN (".$db->sanitize(implode(',', $search_roles))."))"; $sql .= " AND t.rowid IN (SELECT sc.fk_socpeople FROM ".MAIN_DB_PREFIX."societe_contacts as sc WHERE sc.fk_c_type_contact IN (".$db->sanitize(implode(',', $search_roles))."))";
} }
@ -1297,6 +1308,15 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
print '</td>'; print '</td>';
} }
// Note private
if (!empty($arrayfields['t.note_private']['checked'])) {
print '<td>';
if ($obj->note_private) {
print dol_string_nohtmltag($obj->note_private);
}
print '</td>';
}
// Role // Role
if (!empty($arrayfields['sc.role']['checked'])) { if (!empty($arrayfields['sc.role']['checked'])) {
print '<td>'; print '<td>';

View File

@ -169,7 +169,7 @@ function dol_time_plus_duree($time, $duration_value, $duration_unit, $ruleforend
} else { } else {
$date->add($interval); $date->add($interval);
} }
//Change the behavior of PHP over data-interval when the result of this function is Feb 29 (non-leap years), 30 or Feb 31 (php returns March 1, 2 or 3 respectively) //Change the behavior of PHP over data-interval when the result of this function is Feb 29 (non-leap years), 30 or Feb 31 (so php returns March 1, 2 or 3 respectively)
if ($ruleforendofmonth == 1 && $duration_unit == 'm') { if ($ruleforendofmonth == 1 && $duration_unit == 'm') {
$timeyear = dol_print_date($time, '%Y'); $timeyear = dol_print_date($time, '%Y');
$timemonth = dol_print_date($time, '%m'); $timemonth = dol_print_date($time, '%m');

View File

@ -2539,7 +2539,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
$original_file = $conf->facture->multidir_output[$entity].'/'.$original_file; $original_file = $conf->facture->multidir_output[$entity].'/'.$original_file;
} elseif ($modulepart == 'apercupropal' && !empty($conf->propal->multidir_output[$entity])) { } elseif ($modulepart == 'apercupropal' && !empty($conf->propal->multidir_output[$entity])) {
// Wrapping pour les apercu propal // Wrapping pour les apercu propal
if ($fuser->rights->propale->{$lire}) { if ($fuser->rights->propal->{$lire}) {
$accessallowed = 1; $accessallowed = 1;
} }
$original_file = $conf->propal->multidir_output[$entity].'/'.$original_file; $original_file = $conf->propal->multidir_output[$entity].'/'.$original_file;
@ -2611,7 +2611,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
$original_file = $conf->expensereport->dir_output.'/'.$original_file; $original_file = $conf->expensereport->dir_output.'/'.$original_file;
} elseif ($modulepart == 'propalstats' && !empty($conf->propal->multidir_temp[$entity])) { } elseif ($modulepart == 'propalstats' && !empty($conf->propal->multidir_temp[$entity])) {
// Wrapping pour les images des stats propales // Wrapping pour les images des stats propales
if ($fuser->rights->propale->{$lire}) { if ($fuser->rights->propal->{$lire}) {
$accessallowed = 1; $accessallowed = 1;
} }
$original_file = $conf->propal->multidir_temp[$entity].'/'.$original_file; $original_file = $conf->propal->multidir_temp[$entity].'/'.$original_file;
@ -2832,7 +2832,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
} elseif (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) { } elseif (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) {
// Wrapping pour les propales // Wrapping pour les propales
if ($fuser->rights->propale->{$lire} || preg_match('/^specimen/i', $original_file)) { if ($fuser->rights->propal->{$lire} || preg_match('/^specimen/i', $original_file)) {
$accessallowed = 1; $accessallowed = 1;
} }
$original_file = $conf->propal->multidir_output[$entity].'/'.$original_file; $original_file = $conf->propal->multidir_output[$entity].'/'.$original_file;

View File

@ -10567,7 +10567,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
* @param array $params = [ // Various params for future : recommended rather than adding more function arguments * @param array $params = [ // Various params for future : recommended rather than adding more function arguments
* 'attr' => [ // to add or override button attributes * 'attr' => [ // to add or override button attributes
* 'xxxxx' => '', // your xxxxx attribute you want * 'xxxxx' => '', // your xxxxx attribute you want
* 'class' => '', // to add more css class to the button class attribute * 'class' => 'reposition', // to add more css class to the button class attribute
* 'classOverride' => '' // to replace class attribute of the button * 'classOverride' => '' // to replace class attribute of the button
* ], * ],
* 'confirm' => [ * 'confirm' => [
@ -10614,7 +10614,7 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url =
if (empty($userRight)) { if (empty($userRight)) {
$attr['class'] = 'butActionRefused'; $attr['class'] = 'butActionRefused';
$attr['href'] = ''; $attr['href'] = '';
$attr['title'] = $langs->trans('NotEnoughPermissions'); $attr['title'] = (($label && $text && $label != $text) ? $label : $langs->trans('NotEnoughPermissions'));
} }
if (!empty($id)) { if (!empty($id)) {
@ -10670,7 +10670,7 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url =
$TCompiledAttr = array(); $TCompiledAttr = array();
foreach ($attr as $key => $value) { foreach ($attr as $key => $value) {
$TCompiledAttr[] = $key.'="'.$value.'"'; $TCompiledAttr[] = $key.'= "'.$value.'"';
} }
$compiledAttributes = empty($TCompiledAttr) ? '' : implode(' ', $TCompiledAttr); $compiledAttributes = empty($TCompiledAttr) ? '' : implode(' ', $TCompiledAttr);

View File

@ -411,7 +411,7 @@ function show_stats_for_company($product, $socid)
print '</tr>'; print '</tr>';
// Customer proposals // Customer proposals
if (isModEnabled("propal") && $user->rights->propale->lire) { if (isModEnabled("propal") && $user->rights->propal->lire) {
$nblines++; $nblines++;
$ret = $product->load_stats_propale($socid); $ret = $product->load_stats_propale($socid);
if ($ret < 0) { if ($ret < 0) {

View File

@ -157,15 +157,15 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->reception->enabled && $leftmenu=="receptions"', __HANDLER__, 'left', 1353__+MAX_llx_menu__, 'commercial', '', 1350__+MAX_llx_menu__, '/reception/stats/index.php?mainmenu=commercial&amp;leftmenu=receptions', 'Statistics', 1, 'receptions', '$user->rights->reception->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->reception->enabled && $leftmenu=="receptions"', __HANDLER__, 'left', 1353__+MAX_llx_menu__, 'commercial', '', 1350__+MAX_llx_menu__, '/reception/stats/index.php?mainmenu=commercial&amp;leftmenu=receptions', 'Statistics', 1, 'receptions', '$user->rights->reception->lire', '', 2, 2, __ENTITY__);
-- Commercial - Proposals -- Commercial - Proposals
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1100__+MAX_llx_menu__, 'commercial', 'propals', 5__+MAX_llx_menu__, '/comm/propal/index.php?mainmenu=commercial&amp;leftmenu=propals', 'Proposals', 0, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1100__+MAX_llx_menu__, 'commercial', 'propals', 5__+MAX_llx_menu__, '/comm/propal/index.php?mainmenu=commercial&amp;leftmenu=propals', 'Proposals', 0, 'propal', '$user->rights->propal->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1101__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/card.php?mainmenu=commercial&amp;action=create&amp;leftmenu=propals', 'NewPropal', 1, 'propal', '$user->rights->propale->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1101__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/card.php?mainmenu=commercial&amp;action=create&amp;leftmenu=propals', 'NewPropal', 1, 'propal', '$user->rights->propal->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1102__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals', 'List', 1, 'propal', '$user->rights->propale->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1102__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals', 'List', 1, 'propal', '$user->rights->propal->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1103__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=0', 'PropalsDraft', 1, 'propal', '$user->rights->propale->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1103__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=0', 'PropalsDraft', 1, 'propal', '$user->rights->propal->lire', '', 2, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1104__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=1', 'PropalsOpened', 1, 'propal', '$user->rights->propale->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1104__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=1', 'PropalsOpened', 1, 'propal', '$user->rights->propal->lire', '', 2, 3, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1105__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=2', 'PropalStatusSigned', 1, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1105__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=2', 'PropalStatusSigned', 1, 'propal', '$user->rights->propal->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1106__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=3', 'PropalStatusNotSigned', 1, 'propal', '$user->rights->propale->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1106__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=3', 'PropalStatusNotSigned', 1, 'propal', '$user->rights->propal->lire', '', 2, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1107__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=4', 'PropalStatusBilled', 1, 'propal', '$user->rights->propale->lire', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1107__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&amp;leftmenu=propals&amp;search_status=4', 'PropalStatusBilled', 1, 'propal', '$user->rights->propal->lire', '', 2, 6, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1110__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/stats/index.php?mainmenu=commercial&amp;leftmenu=propals', 'Statistics', 1, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1110__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/stats/index.php?mainmenu=commercial&amp;leftmenu=propals', 'Statistics', 1, 'propal', '$user->rights->propal->lire', '', 2, 4, __ENTITY__);
-- Commercial - Customer's orders -- Commercial - Customer's orders
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1200__+MAX_llx_menu__, 'commercial', 'orders', 5__+MAX_llx_menu__, '/commande/index.php?mainmenu=commercial&amp;leftmenu=orders', 'CustomersOrders', 0, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1200__+MAX_llx_menu__, 'commercial', 'orders', 5__+MAX_llx_menu__, '/commande/index.php?mainmenu=commercial&amp;leftmenu=orders', 'CustomersOrders', 0, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__);

View File

@ -458,17 +458,27 @@ class ImportCsv extends ModeleImports
$param_array = array('', $newval, 0, $arrayrecord[0]['val']); // Param to fetch parent from account, in chart. $param_array = array('', $newval, 0, $arrayrecord[0]['val']); // Param to fetch parent from account, in chart.
} }
call_user_func_array(array($classinstance, $method), $param_array); $result = call_user_func_array(array($classinstance, $method), $param_array);
// If duplicate record found
if (!($classinstance->id != '') && $result == -2) {
$this->errors[$error]['lib'] = $langs->trans('ErrorMultipleRecordFoundFromRef', $newval);
$this->errors[$error]['type'] = 'FOREIGNKEY';
$errorforthistable++;
$error++;
}
// If not found, try the fetch from label // If not found, try the fetch from label
if (!($classinstance->id != '') && $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeorlabel') { if (!($classinstance->id != '') && $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeorlabel') {
$param_array = array('', '', $newval); $param_array = array('', '', $newval);
call_user_func_array(array($classinstance, $method), $param_array); call_user_func_array(array($classinstance, $method), $param_array);
} }
$this->cacheconvert[$file.'_'.$class.'_'.$method.'_'][$newval] = $classinstance->id; $this->cacheconvert[$file.'_'.$class.'_'.$method.'_'][$newval] = $classinstance->id;
//print 'We have made a '.$class.'->'.$method.' to get id from code '.$newval.'. '; //print 'We have made a '.$class.'->'.$method.' to get id from code '.$newval.'. ';
if ($classinstance->id != '') { // id may be 0, it is a found value if ($classinstance->id != '') { // id may be 0, it is a found value
$newval = $classinstance->id; $newval = $classinstance->id;
} else { } elseif (! $error) {
if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) {
$this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', num2Alpha($key - 1), $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', num2Alpha($key - 1), $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict']));
} elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) { } elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) {
@ -729,9 +739,13 @@ class ImportCsv extends ModeleImports
if (isModEnabled("socialnetworks") && strpos($fieldname, "socialnetworks") !== false) { if (isModEnabled("socialnetworks") && strpos($fieldname, "socialnetworks") !== false) {
if (!in_array("socialnetworks", $listfields)) { if (!in_array("socialnetworks", $listfields)) {
$listfields[] = "socialnetworks"; $listfields[] = "socialnetworks";
$socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array
$listvalues[$socialkey] = '';
} }
//var_dump($newval); var_dump($arrayrecord[($key - 1)]['type']);
if (!empty($newval) && $arrayrecord[($key - 1)]['type'] > 0) { if (!empty($newval) && $arrayrecord[($key - 1)]['type'] > 0) {
$socialkey = array_search("socialnetworks", $listfields); $socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array
//var_dump('sk='.$socialkey); // socialkey=19
$socialnetwork = explode("_", $fieldname)[1]; $socialnetwork = explode("_", $fieldname)[1];
if (empty($listvalues[$socialkey]) || $listvalues[$socialkey] == "null") { if (empty($listvalues[$socialkey]) || $listvalues[$socialkey] == "null") {
$json = new stdClass(); $json = new stdClass();
@ -833,7 +847,6 @@ class ImportCsv extends ModeleImports
if (empty($lastinsertid)) { // No insert done yet for a parent table if (empty($lastinsertid)) { // No insert done yet for a parent table
$sqlSelect = "SELECT ".$fname." FROM ".$tablename; $sqlSelect = "SELECT ".$fname." FROM ".$tablename;
$data = array_combine($listfields, $listvalues); $data = array_combine($listfields, $listvalues);
$where = array(); // filters to forge SQL request $where = array(); // filters to forge SQL request
$filters = array(); // filters to forge output error message $filters = array(); // filters to forge output error message

View File

@ -502,17 +502,28 @@ class ImportXlsx extends ModeleImports
}*/ }*/
$param_array = array('', $newval, 0, $arrayrecord[0]['val']); // Param to fetch parent from account, in chart. $param_array = array('', $newval, 0, $arrayrecord[0]['val']); // Param to fetch parent from account, in chart.
} }
call_user_func_array(array($classinstance, $method), $param_array);
$result = call_user_func_array(array($classinstance, $method), $param_array);
// If duplicate record found
if (!($classinstance->id != '') && $result == -2) {
$this->errors[$error]['lib'] = $langs->trans('ErrorMultipleRecordFoundFromRef', $newval);
$this->errors[$error]['type'] = 'FOREIGNKEY';
$errorforthistable++;
$error++;
}
// If not found, try the fetch from label // If not found, try the fetch from label
if (!($classinstance->id != '') && $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeorlabel') { if (!($classinstance->id != '') && $objimport->array_import_convertvalue[0][$val]['rule'] == 'fetchidfromcodeorlabel') {
$param_array = array('', '', $newval); $param_array = array('', '', $newval);
call_user_func_array(array($classinstance, $method), $param_array); call_user_func_array(array($classinstance, $method), $param_array);
} }
$this->cacheconvert[$file . '_' . $class . '_' . $method . '_'][$newval] = $classinstance->id; $this->cacheconvert[$file . '_' . $class . '_' . $method . '_'][$newval] = $classinstance->id;
//print 'We have made a '.$class.'->'.$method.' to get id from code '.$newval.'. '; //print 'We have made a '.$class.'->'.$method.' to get id from code '.$newval.'. ';
if ($classinstance->id != '') { // id may be 0, it is a found value if ($classinstance->id != '') { // id may be 0, it is a found value
$newval = $classinstance->id; $newval = $classinstance->id;
} else { } elseif (! $error) {
if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) {
$this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict']));
} elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) { } elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) {
@ -770,12 +781,14 @@ class ImportXlsx extends ModeleImports
} }
// Define $listfields and $listvalues to build SQL request // Define $listfields and $listvalues to build SQL request
if ($conf->socialnetworks->enabled && strpos($fieldname, "socialnetworks") !== false) { if (isModEnabled("socialnetworks") && strpos($fieldname, "socialnetworks") !== false) {
if (!in_array("socialnetworks", $listfields)) { if (!in_array("socialnetworks", $listfields)) {
$listfields[] = "socialnetworks"; $listfields[] = "socialnetworks";
$socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array. Example socialkey=19
$listvalues[$socialkey] = '';
} }
if (!empty($newval) && $arrayrecord[($key)]['type'] > 0) { if (!empty($newval) && $arrayrecord[($key)]['type'] > 0) {
$socialkey = array_search("socialnetworks", $listfields); $socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array. Example socialkey=19
$socialnetwork = explode("_", $fieldname)[1]; $socialnetwork = explode("_", $fieldname)[1];
if (empty($listvalues[$socialkey]) || $listvalues[$socialkey] == "null") { if (empty($listvalues[$socialkey]) || $listvalues[$socialkey] == "null") {
$json = new stdClass(); $json = new stdClass();
@ -797,7 +810,7 @@ class ImportXlsx extends ModeleImports
} elseif (empty($newval) && $arrayrecord[($key)]['type'] == 0) { } elseif (empty($newval) && $arrayrecord[($key)]['type'] == 0) {
$listvalues[] = "''"; $listvalues[] = "''";
} else { } else {
$listvalues[] = "'" . $this->db->escape($newval) . "'"; $listvalues[] = "'".$this->db->escape($newval)."'";
} }
} }
} }
@ -810,7 +823,7 @@ class ImportXlsx extends ModeleImports
if (!empty($listfields) && is_array($objimport->array_import_fieldshidden[0])) { if (!empty($listfields) && is_array($objimport->array_import_fieldshidden[0])) {
// Loop on each hidden fields to add them into listfields/listvalues // Loop on each hidden fields to add them into listfields/listvalues
foreach ($objimport->array_import_fieldshidden[0] as $key => $val) { foreach ($objimport->array_import_fieldshidden[0] as $key => $val) {
if (!preg_match('/^' . preg_quote($alias, '/') . '\./', $key)) { if (!preg_match('/^'.preg_quote($alias, '/').'\./', $key)) {
continue; // Not a field of current table continue; // Not a field of current table
} }
if ($val == 'user->id') { if ($val == 'user->id') {
@ -876,17 +889,17 @@ class ImportXlsx extends ModeleImports
if (!empty($updatekeys)) { if (!empty($updatekeys)) {
// We do SELECT to get the rowid, if we already have the rowid, it's to be used below for related tables (extrafields) // We do SELECT to get the rowid, if we already have the rowid, it's to be used below for related tables (extrafields)
$where = array();
if (empty($lastinsertid)) { // No insert done yet for a parent table if (empty($lastinsertid)) { // No insert done yet for a parent table
$sqlSelect = "SELECT ".$fname." FROM " . $tablename; $sqlSelect = "SELECT ".$fname." FROM " . $tablename;
$data = array_combine($listfields, $listvalues); $data = array_combine($listfields, $listvalues);
$filters = array();
$where = array(); // filters to forge SQL request
$filters = array(); // filters to forge output error message
foreach ($updatekeys as $key) { foreach ($updatekeys as $key) {
$col = $objimport->array_import_updatekeys[0][$key]; $col = $objimport->array_import_updatekeys[0][$key];
$key = preg_replace('/^.*\./i', '', $key); $key = preg_replace('/^.*\./i', '', $key);
if ($conf->socialnetworks->enabled && strpos($key, "socialnetworks") !== false) { if (isModEnabled("socialnetworks") && strpos($key, "socialnetworks") !== false) {
$tmp = explode("_", $key); $tmp = explode("_", $key);
$key = $tmp[0]; $key = $tmp[0];
$socialnetwork = $tmp[1]; $socialnetwork = $tmp[1];

View File

@ -327,7 +327,7 @@ class modEventOrganization extends DolibarrModules
*/ */
public function init($options = '') public function init($options = '')
{ {
global $conf, $langs; global $conf, $langs, $user;
// Permissions // Permissions
$this->remove($options); $this->remove($options);
@ -370,6 +370,28 @@ class modEventOrganization extends DolibarrModules
$init = $this->_init($sql, $options); $init = $this->_init($sql, $options);
// Insert some vars
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($this->db);
$template = $formmail->getEMailTemplate($this->db, 'conferenceorbooth', $user, $langs, 0, 1, '(EventOrganizationEmailAskConf)');
if ($template->id > 0) {
dolibarr_set_const($this->db, 'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF', $template->id, 'chaine', 0, '', $conf->entity);
}
$template = $formmail->getEMailTemplate($this->db, 'conferenceorbooth', $user, $langs, 0, 1, '(EventOrganizationEmailAskBooth)');
if ($template->id > 0) {
dolibarr_set_const($this->db, 'EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH', $template->id, 'chaine', 0, '', $conf->entity);
}
$template = $formmail->getEMailTemplate($this->db, 'conferenceorbooth', $user, $langs, 0, 1, '(EventOrganizationEmailBoothPayment)');
if ($template->id > 0) {
dolibarr_set_const($this->db, 'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH', $template->id, 'chaine', 0, '', $conf->entity);
}
$template = $formmail->getEMailTemplate($this->db, 'conferenceorbooth', $user, $langs, 0, 1, '(EventOrganizationEmailRegistrationPayment)');
if ($template->id > 0) {
dolibarr_set_const($this->db, 'EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT', $template->id, 'chaine', 0, '', $conf->entity);
}
return $init; return $init;
} }

View File

@ -943,7 +943,7 @@ class doc_generic_project_odt extends ModelePDFProjects
'title' => "ListProposalsAssociatedProject", 'title' => "ListProposalsAssociatedProject",
'class' => 'Propal', 'class' => 'Propal',
'table' => 'propal', 'table' => 'propal',
'test' => $conf->propal->enabled && $user->rights->propale->lire 'test' => $conf->propal->enabled && $user->rights->propal->lire
), ),
'order' => array( 'order' => array(
'title' => "ListOrdersAssociatedProject", 'title' => "ListOrdersAssociatedProject",

View File

@ -374,7 +374,7 @@ class pdf_beluga extends ModelePDFProjects
'class'=>'Propal', 'class'=>'Propal',
'table'=>'propal', 'table'=>'propal',
'datefieldname'=>'datep', 'datefieldname'=>'datep',
'test'=>$conf->propal->enabled && $user->rights->propale->lire, 'test'=>$conf->propal->enabled && $user->rights->propal->lire,
'lang'=>'propal'), 'lang'=>'propal'),
'order'=>array( 'order'=>array(
'name'=>"CustomersOrders", 'name'=>"CustomersOrders",

View File

@ -41,7 +41,7 @@ $module = $object->element;
// Special cases // Special cases
if ($module == 'propal') { if ($module == 'propal') {
$permission = $user->rights->propale->creer; $permission = $user->rights->propal->creer;
} elseif ($module == 'fichinter') { } elseif ($module == 'fichinter') {
$permission = $user->rights->ficheinter->creer; $permission = $user->rights->ficheinter->creer;
} elseif ($module == 'order_supplier') { } elseif ($module == 'order_supplier') {

View File

@ -60,7 +60,7 @@ if (!empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES)) {
// Special cases // Special cases
if ($module == 'propal') { if ($module == 'propal') {
$permission = $user->rights->propale->creer; $permission = $user->rights->propal->creer;
} elseif ($module == 'supplier_proposal') { } elseif ($module == 'supplier_proposal') {
$permission = $user->rights->supplier_proposal->creer; $permission = $user->rights->supplier_proposal->creer;
} elseif ($module == 'fichinter') { } elseif ($module == 'fichinter') {

View File

@ -54,7 +54,7 @@ if ($fixedDiscount > 0) {
print $langs->trans($translationKey, $fixedDiscount).'.'; print $langs->trans($translationKey, $fixedDiscount).'.';
} else { } else {
$translationKey = (!empty($discount_type)) ? 'HasNoRelativeDiscountFromSupplier' : 'CompanyHasNoRelativeDiscount'; $translationKey = (!empty($discount_type)) ? 'HasNoRelativeDiscountFromSupplier' : 'CompanyHasNoRelativeDiscount';
print '<span class="opacitymedium">'.$langs->trans($translationKey).'.</span>'; print '<span class="opacitymedium hideonsmartphone">'.$langs->trans($translationKey).'.</span>';
} }
if ($isNewObject) { if ($isNewObject) {
print ' ('.$addrelativediscount.')'; print ' ('.$addrelativediscount.')';
@ -115,7 +115,7 @@ if ($absolute_creditnote > 0) {
if ($absolute_discount <= 0 && $absolute_creditnote <= 0) { if ($absolute_discount <= 0 && $absolute_creditnote <= 0) {
$translationKey = !empty($discount_type) ? 'HasNoAbsoluteDiscountFromSupplier' : 'CompanyHasNoAbsoluteDiscount'; $translationKey = !empty($discount_type) ? 'HasNoAbsoluteDiscountFromSupplier' : 'CompanyHasNoAbsoluteDiscount';
print '<br><span class="opacitymedium">'.$langs->trans($translationKey).'.</span>'; print '<br class="hideonsmartphone"><span class="opacitymedium hideonsmartphone">'.$langs->trans($translationKey).'.</span>';
if ($isInvoice && $object->statut == $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_CREDIT_NOTE && $object->type != $objclassname::TYPE_DEPOSIT) { if ($isInvoice && $object->statut == $objclassname::STATUS_DRAFT && $object->type != $objclassname::TYPE_CREDIT_NOTE && $object->type != $objclassname::TYPE_DEPOSIT) {
print ' ('.$addabsolutediscount.')'; print ' ('.$addabsolutediscount.')';

View File

@ -473,6 +473,16 @@ if (($action == "create") || ($action == "edit")) {
} }
$input .= "<label for=\"frequency_semaine\">".$langs->trans('Weeks')."</label>"; $input .= "<label for=\"frequency_semaine\">".$langs->trans('Weeks')."</label>";
print $input; print $input;
$input = " <input type=\"radio\" name=\"unitfrequency\" value=\"2678400\" id=\"frequency_month\" ";
if ($object->unitfrequency == "2678400") {
$input .= ' checked />';
} else {
$input .= ' />';
}
$input .= "<label for=\"frequency_month\">".$langs->trans('Monthly')."</label>";
print $input;
print "</td>"; print "</td>";
print "<td>"; print "<td>";
print "</td>"; print "</td>";
@ -664,6 +674,9 @@ if (($action == "create") || ($action == "edit")) {
if ($object->unitfrequency == "604800") { if ($object->unitfrequency == "604800") {
print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Weeks'); print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Weeks');
} }
if ($object->unitfrequency == "2678400") {
print $langs->trans('CronEach')." ".($object->frequency)." ".$langs->trans('Month');
}
print "</td></tr>"; print "</td></tr>";
print '<tr><td>'; print '<tr><td>';

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2007-2019 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2007-2022 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -23,6 +23,7 @@
// Put here all includes required by your class file // Put here all includes required by your class file
require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php";
require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php";
/** /**
@ -1408,21 +1409,30 @@ class Cronjob extends CommonObject
if (empty($this->datenextrun)) { if (empty($this->datenextrun)) {
if (empty($this->datestart)) { if (empty($this->datestart)) {
$this->datenextrun = $now + ($this->frequency * $this->unitfrequency); if ($this->unitfrequency == 2678400) {
$this->datenextrun = dol_time_plus_duree($now, $this->frequency, 'm');
} else {
$this->datenextrun = $now + ($this->frequency * $this->unitfrequency);
}
} else { } else {
$this->datenextrun = $this->datestart + ($this->frequency * $this->unitfrequency); if ($this->unitfrequency == 2678400) {
$this->datenextrun = dol_time_plus_duree($this->datestart, $this->frequency, 'm');
} else {
$this->datenextrun = $this->datestart + ($this->frequency * $this->unitfrequency);
}
} }
} }
if ($this->datenextrun < $now && $this->frequency > 0 && $this->unitfrequency > 0) { if ($this->datenextrun < $now && $this->frequency > 0 && $this->unitfrequency > 0) {
// Loop until date is after future // Loop until date is after future
while ($this->datenextrun < $now) { while ($this->datenextrun < $now) {
$this->datenextrun += ($this->frequency * $this->unitfrequency); if ($this->unitfrequency == 2678400) {
$this->datenextrun = dol_time_plus_duree($this->datenextrun, $this->frequency, 'm');
// TODO For exact frequency (every month, every year, ...), use instead a dol_time_plus_duree($time, $duration_value, $duration_unit) } else {
$this->datenextrun += ($this->frequency * $this->unitfrequency);
}
} }
} else { } else {
//$this->datenextrun=$this->datenextrun + ($this->frequency * $this->unitfrequency);
dol_syslog(get_class($this)."::reprogram_jobs datenextrun is already in future, we do not change it"); dol_syslog(get_class($this)."::reprogram_jobs datenextrun is already in future, we do not change it");
} }

View File

@ -451,8 +451,8 @@ class DataPolicyCron
$this->db->begin(); $this->db->begin();
foreach ($arrayofparameters as $key => $params) { foreach ($arrayofparameters as $key => $params) {
if ($conf->global->$key != '' && is_numeric($conf->global->$key) && (int) $conf->global->$key > 0) { if (getDolGlobalInt($key) > 0) {
$sql = sprintf($params['sql'], (int) $conf->entity, (int) $conf->global->$key, (int) $conf->global->$key); $sql = sprintf($params['sql'], (int) $conf->entity, (int) getDolGlobalInt($key), (int) getDolGlobalInt($key));
$resql = $this->db->query($sql); $resql = $this->db->query($sql);

View File

@ -103,12 +103,13 @@ 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_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>0, 'index'=>1, 'picto'=>'agenda'), 'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>0, 'index'=>1, 'picto'=>'agenda'),
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>"isModEnabled('project')", 'position'=>20, 'notnull'=>1, 'visible'=>0, 'index'=>1, 'picto'=>'project', 'css'=>'tdoverflowmax150 maxwidth500'), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>"isModEnabled('project')", 'position'=>20, 'notnull'=>1, 'visible'=>0, 'index'=>1, 'picto'=>'project', 'css'=>'tdoverflowmax150 maxwidth500'),
'email' => array('type'=>'mail', 'label'=>'EmailAttendee', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'autofocusoncreate'=>1, 'searchall'=>1), 'email' => array('type'=>'mail', 'label'=>'EmailAttendee', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'autofocusoncreate'=>1, 'searchall'=>1),
'firstname' => array('type'=>'varchar(100)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'searchall'=>1), 'firstname' => array('type'=>'varchar(100)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'searchall'=>1),
'lastname' => array('type'=>'varchar(100)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>32, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'searchall'=>1), 'lastname' => array('type'=>'varchar(100)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>32, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'searchall'=>1),
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status = 1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'position'=>40, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"OrganizationEventLinkToThirdParty", 'picto'=>'company', 'css'=>'tdoverflowmax150 maxwidth500'), 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status = 1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'position'=>40, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"OrganizationEventLinkToThirdParty", 'picto'=>'company', 'css'=>'tdoverflowmax150 maxwidth500'),
'email_company' => array('type'=>'mail', 'label'=>'EmailCompany', 'enabled'=>'1', 'position'=>41, 'notnull'=>0, 'visible'=>-2, 'searchall'=>1),
'date_subscription' => array('type'=>'datetime', 'label'=>'DateOfRegistration', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1, 'showoncombobox'=>'1',), 'date_subscription' => array('type'=>'datetime', 'label'=>'DateOfRegistration', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1, 'showoncombobox'=>'1',),
'fk_invoice' => array('type'=>'integer:Facture:compta/facture/class/facture.class.php', 'label'=>'Invoice', 'enabled'=>'$conf->facture->enabled', 'position'=>57, 'notnull'=>0, 'visible'=>-1, 'index'=>0, 'picto'=>'bill', 'css'=>'tdoverflowmax150 maxwidth500'), 'fk_invoice' => array('type'=>'integer:Facture:compta/facture/class/facture.class.php', 'label'=>'Invoice', 'enabled'=>'$conf->facture->enabled', 'position'=>57, 'notnull'=>0, 'visible'=>-1, 'index'=>0, 'picto'=>'bill', 'css'=>'tdoverflowmax150 maxwidth500'),
'amount' => array('type'=>'price', 'label'=>'AmountPaid', '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",),
@ -125,11 +126,13 @@ class ConferenceOrBoothAttendee extends CommonObject
); );
public $rowid; public $rowid;
public $ref; public $ref;
public $fk_soc;
public $fk_actioncomm; public $fk_actioncomm;
public $fk_project;
public $email; public $email;
public $firstname; public $firstname;
public $lastname; public $lastname;
public $fk_soc;
public $email_company;
public $date_subscription; public $date_subscription;
public $fk_invoice; public $fk_invoice;
public $amount; public $amount;

View File

@ -126,8 +126,8 @@ $arrayfields = array(
'f.description'=>array('label'=>'Description', 'checked'=>1), 'f.description'=>array('label'=>'Description', 'checked'=>1),
'f.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>500), 'f.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>500),
'f.tms'=>array('label'=>'DateModificationShort', 'checked'=>0, 'position'=>500), 'f.tms'=>array('label'=>'DateModificationShort', 'checked'=>0, 'position'=>500),
'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))), 'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES))), 'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
'f.fk_statut'=>array('label'=>'Status', 'checked'=>1, 'position'=>1000), 'f.fk_statut'=>array('label'=>'Status', 'checked'=>1, 'position'=>1000),
'fd.description'=>array('label'=>"DescriptionOfLine", 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0), 'fd.description'=>array('label'=>"DescriptionOfLine", 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0),
'fd.date'=>array('label'=>'DateOfLine', 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0), 'fd.date'=>array('label'=>'DateOfLine', 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0),

View File

@ -196,8 +196,8 @@ $arrayfields = array(
'country.code_iso'=>array('label'=>"Country", 'enabled'=>1, 'position'=>49), 'country.code_iso'=>array('label'=>"Country", 'enabled'=>1, 'position'=>49),
'typent.code'=>array('label'=>"ThirdPartyType", 'enabled'=>$checkedtypetiers, 'position'=>50), 'typent.code'=>array('label'=>"ThirdPartyType", 'enabled'=>$checkedtypetiers, 'position'=>50),
'u.login'=>array('label'=>"AuthorRequest", 'enabled'=>1, 'position'=>51), 'u.login'=>array('label'=>"AuthorRequest", 'enabled'=>1, 'position'=>51),
'cf.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>100), 'cf.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position'=>100),
'cf.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>110), 'cf.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position'=>110),
); );
foreach ($object->fields as $key => $val) { foreach ($object->fields as $key => $val) {
// If $val['visible']==0, then we never show the field // If $val['visible']==0, then we never show the field

View File

@ -3019,7 +3019,7 @@ if ($action == 'create') {
print $langs->trans('PaymentConditions'); print $langs->trans('PaymentConditions');
print '<td>'; print '<td>';
if ($action != 'editconditions' && $form_permission) { if ($action != 'editconditions' && $form_permission) {
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>'; print '<td class="right"><a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>';
} }
print '</tr></table>'; print '</tr></table>';
print '</td><td>'; print '</td><td>';
@ -3154,7 +3154,7 @@ if ($action == 'create') {
if (isModEnabled('intracommreport')) { if (isModEnabled('intracommreport')) {
$langs->loadLangs(array("intracommreport")); $langs->loadLangs(array("intracommreport"));
print '<tr><td>'; print '<tr><td>';
print '<table width="100%" class="nobordernopadding"><tr><td>'; print '<table class="nobordernopadding centpercent"><tr><td>';
print $langs->trans('IntracommReportTransportMode'); print $langs->trans('IntracommReportTransportMode');
print '</td>'; print '</td>';
if ($action != 'editmode' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { if ($action != 'editmode' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) {
@ -3300,7 +3300,7 @@ if ($action == 'create') {
$i = 0; $i = 0;
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder paymenttable" width="100%">'; print '<table class="noborder paymenttable centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td class="liste_titre">'.($object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).'</td>'; print '<td class="liste_titre">'.($object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).'</td>';
print '<td>'.$langs->trans('Date').'</td>'; print '<td>'.$langs->trans('Date').'</td>';
@ -3326,7 +3326,7 @@ if ($action == 'create') {
$paymentstatic->type_label = $objp->payment_type; $paymentstatic->type_label = $objp->payment_type;
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td class="nowrap">'; print '<td class="nowraponall">';
print $paymentstatic->getNomUrl(1); print $paymentstatic->getNomUrl(1);
print '</td>'; print '</td>';
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day').'</td>'; print '<td>'.dol_print_date($db->jdate($objp->dp), 'day').'</td>';
@ -3784,21 +3784,26 @@ if ($action == 'create') {
// Delete // Delete
$isErasable = $object->is_erasable(); $isErasable = $object->is_erasable();
if ($action != 'confirm_edit' && ($user->rights->fournisseur->facture->supprimer || ($usercancreate && $isErasable == 1))) { // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions) if ($action != 'confirm_edit' && ($usercandelete || ($usercancreate && $isErasable == 1))) { // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions)
//var_dump($isErasable); $enableDelete = false;
$htmltooltip = '';
$params = (empty($conf->use_javascript_ajax) ? array() : array('attr' => array('class' => 'reposition')));
//var_dump($isErasable); var_dump($params);
if ($isErasable == -4) { if ($isErasable == -4) {
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecausePayments").'">'.$langs->trans('Delete').'</a>'; $htmltooltip = $langs->trans("DisabledBecausePayments");
} elseif ($isErasable == -3) { // Should never happen with supplier invoice } elseif ($isErasable == -3) { // Should never happen with supplier invoice
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotLastSituationInvoice").'">'.$langs->trans('Delete').'</a>'; $htmltooltip = $langs->trans("DisabledBecauseNotLastSituationInvoice");
} elseif ($isErasable == -2) { // Should never happen with supplier invoice } elseif ($isErasable == -2) { // Should never happen with supplier invoice
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotLastInvoice").'">'.$langs->trans('Delete').'</a>'; $htmltooltip = $langs->trans("DisabledBecauseNotLastInvoice");
} elseif ($isErasable == -1) { } elseif ($isErasable == -1) {
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseDispatchedInBookkeeping").'">'.$langs->trans('Delete').'</a>'; $htmltooltip = $langs->trans("DisabledBecauseDispatchedInBookkeeping");
} elseif ($isErasable <= 0) { // Any other cases } elseif ($isErasable <= 0) { // Any other cases
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("DisabledBecauseNotErasable").'">'.$langs->trans('Delete').'</a>'; $htmltooltip = $langs->trans("DisabledBecauseNotErasable");
} else { } else {
print '<a class="butActionDelete'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans('Delete').'</a>'; $enableDelete = true;
$htmltooltip = '';
} }
print dolGetButtonAction($htmltooltip, $langs->trans("Delete"), 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), $object->id, $enableDelete, $params);
} }
print '</div>'; print '</div>';

View File

@ -43,7 +43,7 @@ $value_private .= "\n";
/* /*
// Special cases // Special cases
if ($module == 'propal') { if ($module == 'propal') {
$permission = $user->rights->propale->creer; $permission = $user->rights->propal->creer;
} elseif ($module == 'supplier_proposal') { } elseif ($module == 'supplier_proposal') {
$permission = $user->rights->supplier_proposal->creer; $permission = $user->rights->supplier_proposal->creer;
} elseif ($module == 'fichinter') { } elseif ($module == 'fichinter') {

View File

@ -21,25 +21,26 @@
-- --
-- Bank Thirdparty -- Bank Thirdparty
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,'$conf->societe->enabled && $conf->banque->enabled && $conf->prelevement->enabled',0,'__(YourSEPAMandate)__','__(Hello)__,<br><br>\n\n__(FindYourSEPAMandate)__ :<br>\n__MYCOMPANY_NAME__<br>\n__MYCOMPANY_FULLADDRESS__<br><br>\n__(Sincerely)__<br>\n__USER_SIGNATURE__',null, 0); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,'isModEnabled("societe") && isModEnabled("banque") && isModEnabled("prelevement")',0,'__(YourSEPAMandate)__','__(Hello)__,<br><br>\n\n__(FindYourSEPAMandate)__ :<br>\n__MYCOMPANY_NAME__<br>\n__MYCOMPANY_FULLADDRESS__<br><br>\n__(Sincerely)__<br>\n__USER_SIGNATURE__',null, 0);
-- Members -- Members
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnAutoSubscription)' ,10,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnAutoSubscription)' ,10, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnMemberValidation)' ,20,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourMembershipWasValidated)__<br>__(FirstName)__ : __MEMBER_FIRSTNAME__<br>__(LastName)__ : __MEMBER_LASTNAME__<br>__(ID)__ : __MEMBER_ID__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnMemberValidation)' ,20, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourMembershipWasValidated)__<br>__(FirstName)__ : __MEMBER_FIRSTNAME__<br>__(LastName)__ : __MEMBER_LASTNAME__<br>__(ID)__ : __MEMBER_ID__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnNewSubscription)' ,30,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__<br>\n\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 1); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnNewSubscription)' ,30, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__<br>\n\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 1);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingReminderForExpiredSubscription)',40,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfSubscriptionReminderEmail)__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingReminderForExpiredSubscription)',40, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfSubscriptionReminderEmail)__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(YourMembershipWasCanceled)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(YourMembershipWasCanceled)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,<br><br>\n\n__(ThisIsContentOfYourCard)__<br>\n__(ID)__ : __ID__<br>\n__(Civility)__ : __MEMBER_CIVILITY__<br>\n__(Firstname)__ : __MEMBER_FIRSTNAME__<br>\n__(Lastname)__ : __MEMBER_LASTNAME__<br>\n__(Fullname)__ : __MEMBER_FULLNAME__<br>\n__(Company)__ : __MEMBER_COMPANY__<br>\n__(Address)__ : __MEMBER_ADDRESS__<br>\n__(Zip)__ : __MEMBER_ZIP__<br>\n__(Town)__ : __MEMBER_TOWN__<br>\n__(Country)__ : __MEMBER_COUNTRY__<br>\n__(Email)__ : __MEMBER_EMAIL__<br>\n__(Birthday)__ : __MEMBER_BIRTH__<br>\n__(Photo)__ : __MEMBER_PHOTO__<br>\n__(Login)__ : __MEMBER_LOGIN__<br>\n__(Phone)__ : __MEMBER_PHONE__<br>\n__(PhonePerso)__ : __MEMBER_PHONEPRO__<br>\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,<br><br>\n\n__(ThisIsContentOfYourCard)__<br>\n__(ID)__ : __ID__<br>\n__(Civility)__ : __MEMBER_CIVILITY__<br>\n__(Firstname)__ : __MEMBER_FIRSTNAME__<br>\n__(Lastname)__ : __MEMBER_LASTNAME__<br>\n__(Fullname)__ : __MEMBER_FULLNAME__<br>\n__(Company)__ : __MEMBER_COMPANY__<br>\n__(Address)__ : __MEMBER_ADDRESS__<br>\n__(Zip)__ : __MEMBER_ZIP__<br>\n__(Town)__ : __MEMBER_TOWN__<br>\n__(Country)__ : __MEMBER_COUNTRY__<br>\n__(Email)__ : __MEMBER_EMAIL__<br>\n__(Birthday)__ : __MEMBER_BIRTH__<br>\n__(Photo)__ : __MEMBER_PHOTO__<br>\n__(Login)__ : __MEMBER_LOGIN__<br>\n__(Phone)__ : __MEMBER_PHONE__<br>\n__(PhonePerso)__ : __MEMBER_PHONEPRO__<br>\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
-- Recruiting -- Recruiting
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswerMessage)__<br>__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'isModEnabled("recruitment")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswerMessage)__<br>__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
-- Event organization -- Event organization
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__,<br /><br />__(OrganizationEventConfRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__,<br /><br />__(OrganizationEventConfRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__,<br /><br />__(OrganizationEventBoothRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__,<br /><br />__(OrganizationEventBoothRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
-- TODO Add message for registration only to event __ONLINE_PAYMENT_TEXT_AND_URL__ -- TODO Add message for registration only to event __ONLINE_PAYMENT_TEXT_AND_URL__
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsBooth)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfBoothWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailBoothPayment)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfBoothWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsEvent)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfRegistrationWasReceived)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailRegistrationPayment)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfRegistrationWasReceived)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
--
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null); INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);

View File

@ -737,3 +737,34 @@ ALTER TABLE llx_loan_schedule ADD UNIQUE INDEX uk_loan_schedule_ref (fk_loan, da
-- We need when upgrade 15 to 16 with Dolibarr v17+ for upgrade2 function migrate_user_photospath2() -- We need when upgrade 15 to 16 with Dolibarr v17+ for upgrade2 function migrate_user_photospath2()
ALTER TABLE llx_user CHANGE COLUMN note note_private text; ALTER TABLE llx_user CHANGE COLUMN note note_private text;
-- Bank Thirdparty
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,'isModEnabled("societe") && isModEnabled("banque") && isModEnabled("prelevement")',0,'__(YourSEPAMandate)__','__(Hello)__,<br><br>\n\n__(FindYourSEPAMandate)__ :<br>\n__MYCOMPANY_NAME__<br>\n__MYCOMPANY_FULLADDRESS__<br><br>\n__(Sincerely)__<br>\n__USER_SIGNATURE__',null, 0);
-- Members
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnAutoSubscription)' ,10, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnMemberValidation)' ,20, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourMembershipWasValidated)__<br>__(FirstName)__ : __MEMBER_FIRSTNAME__<br>__(LastName)__ : __MEMBER_LASTNAME__<br>__(ID)__ : __MEMBER_ID__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnNewSubscription)' ,30, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__<br>\n\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 1);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingReminderForExpiredSubscription)',40, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfSubscriptionReminderEmail)__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(YourMembershipWasCanceled)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60, 'isModEnabled("adherent")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,<br><br>\n\n__(ThisIsContentOfYourCard)__<br>\n__(ID)__ : __ID__<br>\n__(Civility)__ : __MEMBER_CIVILITY__<br>\n__(Firstname)__ : __MEMBER_FIRSTNAME__<br>\n__(Lastname)__ : __MEMBER_LASTNAME__<br>\n__(Fullname)__ : __MEMBER_FULLNAME__<br>\n__(Company)__ : __MEMBER_COMPANY__<br>\n__(Address)__ : __MEMBER_ADDRESS__<br>\n__(Zip)__ : __MEMBER_ZIP__<br>\n__(Town)__ : __MEMBER_TOWN__<br>\n__(Country)__ : __MEMBER_COUNTRY__<br>\n__(Email)__ : __MEMBER_EMAIL__<br>\n__(Birthday)__ : __MEMBER_BIRTH__<br>\n__(Photo)__ : __MEMBER_PHOTO__<br>\n__(Login)__ : __MEMBER_LOGIN__<br>\n__(Phone)__ : __MEMBER_PHONE__<br>\n__(PhonePerso)__ : __MEMBER_PHONEPRO__<br>\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
-- Recruiting
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'isModEnabled("recruitment")',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswerMessage)__<br>__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
-- Event organization
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__,<br /><br />__(OrganizationEventConfRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__,<br /><br />__(OrganizationEventBoothRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
-- TODO Add message for registration only to event __ONLINE_PAYMENT_TEXT_AND_URL__
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailBoothPayment)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfBoothWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailRegistrationPayment)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfRegistrationWasReceived)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
--
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
-- Partnership
INSERT INTO llx_c_email_templates (entity, module, type_template, label, lang, position, topic, joinfiles, content) VALUES (0, 'partnership', 'partnership_send', '(SendingEmailOnPartnershipWillSoonBeCanceled)', '', 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipWillSoonBeCanceledTopic)__', 0, '<body>\n <p>__(Hello)__,<br><br>\n__(YourPartnershipWillSoonBeCanceledContent)__</p>\n<br />\n\n<br />\n\n __(Sincerely)__ <br />\n __[MAIN_INFO_SOCIETE_NOM]__ <br />\n </body>\n');
INSERT INTO llx_c_email_templates (entity, module, type_template, label, lang, position, topic, joinfiles, content) VALUES (0, 'partnership', 'partnership_send', '(SendingEmailOnPartnershipCanceled)', '', 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipCanceledTopic)__', 0, '<body>\n <p>__(Hello)__,<br><br>\n__(YourPartnershipCanceledContent)__</p>\n<br />\n\n<br />\n\n __(Sincerely)__ <br />\n __[MAIN_INFO_SOCIETE_NOM]__ <br />\n </body>\n');
INSERT INTO llx_c_email_templates (entity, module, type_template, label, lang, position, topic, joinfiles, content) VALUES (0, 'partnership', 'partnership_send', '(SendingEmailOnPartnershipRefused)', '', 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipRefusedTopic)__', 0, '<body>\n <p>__(Hello)__,<br><br>\n__(YourPartnershipRefusedContent)__</p>\n<br />\n\n<br />\n\n __(Sincerely)__ <br />\n __[MAIN_INFO_SOCIETE_NOM]__ <br />\n </body>\n');
INSERT INTO llx_c_email_templates (entity, module, type_template, label, lang, position, topic, joinfiles, content) VALUES (0, 'partnership', 'partnership_send', '(SendingEmailOnPartnershipAccepted)', '', 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipAcceptedTopic)__', 0, '<body>\n <p>__(Hello)__,<br><br>\n__(YourPartnershipAcceptedContent)__</p>\n<br />\n\n<br />\n\n __(Sincerely)__ <br />\n __[MAIN_INFO_SOCIETE_NOM]__ <br />\n </body>\n');

View File

@ -2329,4 +2329,6 @@ HelpCssOnViewDesc=The Css used when viewing the field.
HelpCssOnListDesc=The Css used when field is inside a list table.<br>Example: "tdoverflowmax200" HelpCssOnListDesc=The Css used when field is inside a list table.<br>Example: "tdoverflowmax200"
RECEPTION_PDF_HIDE_ORDERED=Hide the quantity ordered on the generated documents for receptions RECEPTION_PDF_HIDE_ORDERED=Hide the quantity ordered on the generated documents for receptions
MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT=Show the price on the generated documents for receptions MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT=Show the price on the generated documents for receptions
WarningDisabled=Warning disabled WarningDisabled=Warning disabled
LimitsAndMitigation=Access limits and mitigation

View File

@ -13,6 +13,7 @@ BillsStatistics=Customers invoices statistics
BillsStatisticsSuppliers=Vendors invoices statistics BillsStatisticsSuppliers=Vendors invoices statistics
DisabledBecauseDispatchedInBookkeeping=Disabled because invoice was dispatched into bookkeeping DisabledBecauseDispatchedInBookkeeping=Disabled because invoice was dispatched into bookkeeping
DisabledBecauseNotLastInvoice=Disabled because invoice is not erasable. Some invoices were recorded after this one and it will create holes in the counter. DisabledBecauseNotLastInvoice=Disabled because invoice is not erasable. Some invoices were recorded after this one and it will create holes in the counter.
DisabledBecauseNotLastSituationInvoice=Disabled because invoice is not erasable. This invoice is not the last one in situation invoice cycle.
DisabledBecauseNotErasable=Disabled because cannot be erased DisabledBecauseNotErasable=Disabled because cannot be erased
InvoiceStandard=Standard invoice InvoiceStandard=Standard invoice
InvoiceStandardAsk=Standard invoice InvoiceStandardAsk=Standard invoice

View File

@ -97,6 +97,7 @@ ErrorWrongValueForField=Field <b>%s</b>: '<b>%s</b>' does not match regex rule <
ErrorHtmlInjectionForField=Field <b>%s</b>: The value '<b>%s</b>' contains a malicious data not allowed ErrorHtmlInjectionForField=Field <b>%s</b>: The value '<b>%s</b>' contains a malicious data not allowed
ErrorFieldValueNotIn=Field <b>%s</b>: '<b>%s</b>' is not a value found in field <b>%s</b> of <b>%s</b> ErrorFieldValueNotIn=Field <b>%s</b>: '<b>%s</b>' is not a value found in field <b>%s</b> of <b>%s</b>
ErrorFieldRefNotIn=Field <b>%s</b>: '<b>%s</b>' is not a <b>%s</b> existing ref ErrorFieldRefNotIn=Field <b>%s</b>: '<b>%s</b>' is not a <b>%s</b> existing ref
ErrorMultipleRecordFoundFromRef=Several record found when searching from ref <b>%s</b>. No way to know which ID to use.
ErrorsOnXLines=%s errors found ErrorsOnXLines=%s errors found
ErrorFileIsInfectedWithAVirus=The antivirus program was not able to validate the file (file might be infected by a virus) ErrorFileIsInfectedWithAVirus=The antivirus program was not able to validate the file (file might be infected by a virus)
ErrorNumRefModel=A reference exists into database (%s) and is not compatible with this numbering rule. Remove record or renamed reference to activate this module. ErrorNumRefModel=A reference exists into database (%s) and is not compatible with this numbering rule. Remove record or renamed reference to activate this module.
@ -299,6 +300,7 @@ ErrorCharPlusNotSupportedByImapForSearch=IMAP search is not able to search into
ErrorTableNotFound=Table <b>%s</b> not found ErrorTableNotFound=Table <b>%s</b> not found
ErrorValueForTooLow=Value for <b>%s</b> is too low ErrorValueForTooLow=Value for <b>%s</b> is too low
ErrorValueCantBeNull=Value for <b>%s</b> can't be null ErrorValueCantBeNull=Value for <b>%s</b> can't be null
ErrorDateOfMovementLowerThanDateOfFileTransmission=The date of the bank transaction can't be lower than the date of the file transmission
# Warnings # Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.

View File

@ -36,6 +36,7 @@ Language_en_SA=English (Saudi Arabia)
Language_en_SG=English (Singapore) Language_en_SG=English (Singapore)
Language_en_US=English (United States) Language_en_US=English (United States)
Language_en_ZA=English (South Africa) Language_en_ZA=English (South Africa)
Language_en_ZW=English (Zimbabwe)
Language_es_ES=Spanish Language_es_ES=Spanish
Language_es_AR=Spanish (Argentina) Language_es_AR=Spanish (Argentina)
Language_es_BO=Spanish (Bolivia) Language_es_BO=Spanish (Bolivia)

View File

@ -399,7 +399,7 @@ ActionAvailableOnVariantProductOnly=Action only available on the variant of prod
ProductsPricePerCustomer=Product prices per customers ProductsPricePerCustomer=Product prices per customers
ProductSupplierExtraFields=Additional Attributes (Supplier Prices) ProductSupplierExtraFields=Additional Attributes (Supplier Prices)
DeleteLinkedProduct=Delete the child product linked to the combination DeleteLinkedProduct=Delete the child product linked to the combination
AmountUsedToUpdateWAP=Amount to use to update the Weighted Average Price AmountUsedToUpdateWAP=Unit amount to use to update the Weighted Average Price
PMPValue=Weighted average price PMPValue=Weighted average price
PMPValueShort=WAP PMPValueShort=WAP
mandatoryperiod=Mandatory periods mandatoryperiod=Mandatory periods

View File

@ -2469,7 +2469,7 @@ function printDropdownQuickadd()
"title" => "NewPropal@propal", "title" => "NewPropal@propal",
"name" => "Proposal@propal", "name" => "Proposal@propal",
"picto" => "object_propal", "picto" => "object_propal",
"activation" => isModEnabled("propal") && $user->hasRight("propale", "write"), // vs hooking "activation" => isModEnabled("propal") && $user->hasRight("propal", "write"), // vs hooking
"position" => 30, "position" => 30,
), ),

View File

@ -1780,7 +1780,7 @@ if ($dirins && $action == 'generatepackage') {
dol_mkdir($dirofmodule); dol_mkdir($dirofmodule);
} }
// Note: We exclude /bin/ to not include the already generated zip // Note: We exclude /bin/ to not include the already generated zip
$result = dol_compress_dir($dir, $outputfilezip, 'zip', '/\/bin\//', $modulelowercase); $result = dol_compress_dir($dir, $outputfilezip, 'zip', '/\/bin\/|\.git/', $modulelowercase);
} else { } else {
$result = -1; $result = -1;
} }

View File

@ -84,7 +84,7 @@ if (!$sortorder) {
} }
// Initialize array of search criterias // Initialize array of search criterias
$search_all = GETPOST('search_all', 'alphanohtml'); $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml');
$search = array(); $search = array();
foreach ($object->fields as $key => $val) { foreach ($object->fields as $key => $val) {
if (GETPOST('search_'.$key, 'alpha') !== '') { if (GETPOST('search_'.$key, 'alpha') !== '') {
@ -230,8 +230,8 @@ $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
} }
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."mrp_production lineparent ON t.fk_parent_line = lineparent.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."mrp_production as lineparent ON t.fk_parent_line = lineparent.rowid";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."mrp_mo moparent ON lineparent.fk_mo = moparent.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."mrp_mo as moparent ON lineparent.fk_mo = moparent.rowid";
// Add table from hooks // Add table from hooks
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
@ -266,17 +266,17 @@ foreach ($search as $key => $val) {
$mode_search = 2; $mode_search = 2;
} }
if ($search[$key] != '') { if ($search[$key] != '') {
$sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); $sql .= natural_search("t.".$db->escape($key), $search[$key], (($key == 'status') ? 2 : $mode_search));
} }
} else { } else {
if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
$columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key); $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key);
if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) {
if (preg_match('/_dtstart$/', $key)) { if (preg_match('/_dtstart$/', $key)) {
$sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'"; $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'";
} }
if (preg_match('/_dtend$/', $key)) { if (preg_match('/_dtend$/', $key)) {
$sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; $sql .= " AND t.".$db->escape($columnName)." <= '".$db->idate($search[$key])."'";
} }
} }
} }

View File

@ -814,6 +814,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Lines to consume // Lines to consume
$bomcostupdated = 0; // We will recalculate the unitary cost to produce a product using the real "products to consume into MO"
if (!empty($object->lines)) { if (!empty($object->lines)) {
$nblinetoconsume = 0; $nblinetoconsume = 0;
foreach ($object->lines as $line) { foreach ($object->lines as $line) {
@ -832,7 +834,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$linecost = price2num($tmpproduct->pmp, 'MT'); $linecost = price2num($tmpproduct->pmp, 'MT');
if ($object->qty > 0) { if ($object->qty > 0) {
// add free consume line cost to bomcost // add free consume line cost to $bomcostupdated
$costprice = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : $tmpproduct->pmp); $costprice = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : $tmpproduct->pmp);
if (empty($costprice)) { if (empty($costprice)) {
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
@ -843,12 +845,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$costprice = 0; $costprice = 0;
} }
} }
$linecost = price2num(($line->qty * $costprice) / $object->qty, 'MT'); $linecost = price2num(($line->qty * $costprice) / $object->qty, 'MT'); // price for line for all quantities
$bomcost += $linecost; $bomcostupdated += price2num(($line->qty * $costprice) / $object->qty, 'MU'); // same but with full accuracy
} }
$bomcost = price2num($bomcost, 'MU'); $bomcostupdated = price2num($bomcostupdated, 'MU');
$arrayoflines = $object->fetchLinesLinked('consumed', $line->id); $arrayoflines = $object->fetchLinesLinked('consumed', $line->id);
$alreadyconsumed = 0; $alreadyconsumed = 0;
foreach ($arrayoflines as $line2) { foreach ($arrayoflines as $line2) {
@ -1136,7 +1137,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<td>'.$langs->trans("Product").'</td>'; print '<td>'.$langs->trans("Product").'</td>';
print '<td class="right">'.$langs->trans("Qty").'</td>'; print '<td class="right">'.$langs->trans("Qty").'</td>';
if ($permissiontoupdatecost) { if ($permissiontoupdatecost) {
if (empty($bomcost)) { if (empty($bomcostupdated)) {
print '<td class="right">'.$form->textwithpicto($langs->trans("UnitCost"), $langs->trans("AmountUsedToUpdateWAP")).'</td>'; print '<td class="right">'.$form->textwithpicto($langs->trans("UnitCost"), $langs->trans("AmountUsedToUpdateWAP")).'</td>';
} else { } else {
print '<td class="right">'.$form->textwithpicto($langs->trans("ManufacturingPrice"), $langs->trans("AmountUsedToUpdateWAP")).'</td>'; print '<td class="right">'.$form->textwithpicto($langs->trans("ManufacturingPrice"), $langs->trans("AmountUsedToUpdateWAP")).'</td>';
@ -1230,17 +1231,25 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($permissiontoupdatecost) { if ($permissiontoupdatecost) {
// Defined $manufacturingcost // Defined $manufacturingcost
$manufacturingcost = 0; $manufacturingcost = 0;
if ($object->mrptype == 0) { // If MO is a "Manufacture" type (and not "Disassemble" $manufacturingcostsrc = '';
$manufacturingcost = $bomcost; if ($object->mrptype == 0) { // If MO is a "Manufacture" type (and not "Disassemble")
$manufacturingcost = $bomcostupdated;
$manufacturingcostsrc = $langs->trans("CalculatedFromProductsToConsume");
if (empty($manufacturingcost)) {
$manufacturingcost = $bomcost;
$manufacturingcostsrc = $langs->trans("ValueFromBom");
}
if (empty($manufacturingcost)) { if (empty($manufacturingcost)) {
$manufacturingcost = price2num($tmpproduct->cost_price, 'MU'); $manufacturingcost = price2num($tmpproduct->cost_price, 'MU');
$manufacturingcostsrc = $langs->trans("CostPrice");
} }
if (empty($manufacturingcost)) { if (empty($manufacturingcost)) {
$manufacturingcost = price2num($tmpproduct->pmp, 'MU'); $manufacturingcost = price2num($tmpproduct->pmp, 'MU');
$manufacturingcostsrc = $langs->trans("PMPValue");
} }
} }
print '<td class="right nowraponall">'; print '<td class="right nowraponall" title="'.dol_escape_htmltag($manufacturingcostsrc).'">';
if ($manufacturingcost) { if ($manufacturingcost) {
print price($manufacturingcost); print price($manufacturingcost);
} }
@ -1344,19 +1353,27 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($permissiontoupdatecost) { if ($permissiontoupdatecost) {
// Defined $manufacturingcost // Defined $manufacturingcost
$manufacturingcost = 0; $manufacturingcost = 0;
if ($object->mrptype == 0) { // If MO is a "Manufacture" type (and not "Disassemble" $manufacturingcostsrc = '';
$manufacturingcost = $bomcost; if ($object->mrptype == 0) { // If MO is a "Manufacture" type (and not "Disassemble")
$manufacturingcost = $bomcostupdated;
$manufacturingcostsrc = $langs->trans("CalculatedFromProductsToConsume");
if (empty($manufacturingcost)) {
$manufacturingcost = $bomcost;
$manufacturingcostsrc = $langs->trans("ValueFromBom");
}
if (empty($manufacturingcost)) { if (empty($manufacturingcost)) {
$manufacturingcost = price2num($tmpproduct->cost_price, 'MU'); $manufacturingcost = price2num($tmpproduct->cost_price, 'MU');
$manufacturingcostsrc = $langs->trans("CostPrice");
} }
if (empty($manufacturingcost)) { if (empty($manufacturingcost)) {
$manufacturingcost = price2num($tmpproduct->pmp, 'MU'); $manufacturingcost = price2num($tmpproduct->pmp, 'MU');
$manufacturingcostsrc = $langs->trans("PMPValue");
} }
} }
if ($tmpproduct->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { if ($tmpproduct->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
$preselected = (GETPOSTISSET('pricetoproduce-'.$line->id.'-'.$i) ? GETPOST('pricetoproduce-'.$line->id.'-'.$i) : ($manufacturingcost ? price($manufacturingcost) : '')); $preselected = (GETPOSTISSET('pricetoproduce-'.$line->id.'-'.$i) ? GETPOST('pricetoproduce-'.$line->id.'-'.$i) : ($manufacturingcost ? price($manufacturingcost) : ''));
print '<td class="right"><input type="text" class="width50 right" name="pricetoproduce-'.$line->id.'-'.$i.'" value="'.$preselected.'"></td>'; print '<td class="right"><input type="text" class="width75 right" name="pricetoproduce-'.$line->id.'-'.$i.'" value="'.$preselected.'"></td>';
} else { } else {
print '<td><input type="hidden" class="width50 right" name="pricetoproduce-'.$line->id.'-'.$i.'" value="'.($manufacturingcost ? $manufacturingcost : '').'"></td>'; print '<td><input type="hidden" class="width50 right" name="pricetoproduce-'.$line->id.'-'.$i.'" value="'.($manufacturingcost ? $manufacturingcost : '').'"></td>';
} }

View File

@ -2831,7 +2831,7 @@ if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action ==
//print '<div class="fichecenter"><div class="fichehalfleft">'; //print '<div class="fichecenter"><div class="fichehalfleft">';
// Propals // Propals
if (isModEnabled("propal") && $user->rights->propale->creer) { if (isModEnabled("propal") && $user->rights->propal->creer) {
$propal = new Propal($db); $propal = new Propal($db);
$langs->load("propal"); $langs->load("propal");

View File

@ -440,7 +440,7 @@ if ($result || !($id > 0)) {
continue; continue;
} }
if ($graphfiles == 'propal' && !$user->rights->propale->lire) { if ($graphfiles == 'propal' && !$user->rights->propal->lire) {
continue; continue;
} }
if ($graphfiles == 'order' && !$user->rights->commande->lire) { if ($graphfiles == 'order' && !$user->rights->commande->lire) {

View File

@ -138,7 +138,7 @@ if ($id > 0 || !empty($ref)) {
print dol_get_fiche_end(); print dol_get_fiche_end();
if ($user->rights->propale->lire) { if ($user->rights->propal->lire) {
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,"; $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,";
$sql .= " p.ref_client,"; $sql .= " p.ref_client,";
$sql .= "p.datep, p.fk_statut as statut, d.rowid, d.qty"; $sql .= "p.datep, p.fk_statut as statut, d.rowid, d.qty";

View File

@ -137,7 +137,7 @@ if ($id > 0 || !empty($ref)) {
print dol_get_fiche_end(); print dol_get_fiche_end();
if ($user->rights->propale->lire) { if ($user->rights->propal->lire) {
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,"; $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,";
//$sql .= " p.ref_supplier,"; //$sql .= " p.ref_supplier,";
$sql .= "p.date_valid, p.fk_statut as statut, d.rowid, d.qty"; $sql .= "p.date_valid, p.fk_statut as statut, d.rowid, d.qty";

View File

@ -109,7 +109,7 @@ if ($object->element == 'product') {
if (empty($ident) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) { if (empty($ident) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) {
$ident = $conf->global->MAIN_DEFAULT_WAREHOUSE; $ident = $conf->global->MAIN_DEFAULT_WAREHOUSE;
} }
print img_picto('', 'stock').$formproduct->selectWarehouses($ident, 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($ident, 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100 maxwidth300 widthcentpercentminusx');
print '</td>'; print '</td>';
} }
if ($object->element == 'stock') { if ($object->element == 'stock') {
@ -155,10 +155,11 @@ if (ismodEnabled('productbatch') &&
print '<input type="text" name="batch_number_bis" size="40" disabled="disabled" value="'.(GETPOST('batch_number') ?GETPOST('batch_number') : $pdluo->batch).'">'; print '<input type="text" name="batch_number_bis" size="40" disabled="disabled" value="'.(GETPOST('batch_number') ?GETPOST('batch_number') : $pdluo->batch).'">';
print '<input type="hidden" name="batch_number" value="'.(GETPOST('batch_number') ?GETPOST('batch_number') : $pdluo->batch).'">'; print '<input type="hidden" name="batch_number" value="'.(GETPOST('batch_number') ?GETPOST('batch_number') : $pdluo->batch).'">';
} else { } else {
print '<input type="text" name="batch_number" class="minwidth300" value="'.(GETPOST('batch_number') ? GETPOST('batch_number') : $pdluo->batch).'">'; print img_picto('', 'barcode', 'class="pictofixedwidth"').'<input type="text" name="batch_number" class="minwidth300" value="'.(GETPOST('batch_number') ? GETPOST('batch_number') : $pdluo->batch).'">';
} }
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
print '<tr>'; print '<tr>';
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print '<td>'.$langs->trans("SellByDate").'</td><td>'; print '<td>'.$langs->trans("SellByDate").'</td><td>';

View File

@ -104,7 +104,7 @@ if (isModEnabled('productbatch') &&
print '<input type="text" name="batch_number_bis" size="40" disabled="disabled" value="'.(GETPOST('batch_number') ?GETPOST('batch_number') : $pdluo->batch).'">'; print '<input type="text" name="batch_number_bis" size="40" disabled="disabled" value="'.(GETPOST('batch_number') ?GETPOST('batch_number') : $pdluo->batch).'">';
print '<input type="hidden" name="batch_number" value="'.(GETPOST('batch_number') ?GETPOST('batch_number') : $pdluo->batch).'">'; print '<input type="hidden" name="batch_number" value="'.(GETPOST('batch_number') ?GETPOST('batch_number') : $pdluo->batch).'">';
} else { } else {
print '<input type="text" name="batch_number" class="minwidth300" value="'.(GETPOST('batch_number') ? GETPOST('batch_number') : $pdluo->batch).'">'; print img_picto('', 'barcode', 'class="pictofixedwidth"').'<input type="text" name="batch_number" class="minwidth300 widthcentpercentminusx maxwidth300" value="'.(GETPOST('batch_number') ? GETPOST('batch_number') : $pdluo->batch).'">';
} }
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';

View File

@ -388,7 +388,7 @@ $listofreferent = array(
'lang'=>'propal', 'lang'=>'propal',
'buttonnew'=>'AddProp', 'buttonnew'=>'AddProp',
'testnew'=>$user->rights->propal->creer, 'testnew'=>$user->rights->propal->creer,
'test'=>$conf->propal->enabled && $user->rights->propale->lire), 'test'=>$conf->propal->enabled && $user->rights->propal->lire),
'order'=>array( 'order'=>array(
'name'=>"CustomersOrders", 'name'=>"CustomersOrders",
'title'=>"ListOrdersAssociatedProject", 'title'=>"ListOrdersAssociatedProject",

View File

@ -136,6 +136,10 @@ foreach ($_POST as $k => $v) {
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_payment'); dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_payment');
// Set $appli for emails title
$appli = $mysoc->name;
if (!empty($_SESSION['ipaddress'])) { // To avoid to make action twice if (!empty($_SESSION['ipaddress'])) { // To avoid to make action twice
// Get on url call // Get on url call
$fulltag = $FULLTAG; $fulltag = $FULLTAG;
@ -173,21 +177,6 @@ if (!empty($_SESSION['ipaddress'])) { // To avoid to make action twice
$from = $conf->global->MAILING_EMAIL_FROM; $from = $conf->global->MAILING_EMAIL_FROM;
$sendto = $sendemail; $sendto = $sendemail;
// Define link to login card
$appli = constant('DOL_APPLICATION_TITLE');
if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
$appli = $conf->global->MAIN_APPLICATION_TITLE;
if (preg_match('/\d\.\d/', $appli)) {
if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) {
$appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core
}
} else {
$appli .= " ".DOL_VERSION;
}
} else {
$appli .= " ".DOL_VERSION;
}
$urlback = $_SERVER["REQUEST_URI"]; $urlback = $_SERVER["REQUEST_URI"];
$topic = '['.$appli.'] '.$companylangs->transnoentitiesnoconv("NewOnlinePaymentFailed"); $topic = '['.$appli.'] '.$companylangs->transnoentitiesnoconv("NewOnlinePaymentFailed");
$content = ""; $content = "";

View File

@ -1266,7 +1266,7 @@ if ($ispaymentok) {
$thirdparty = new Societe($db); $thirdparty = new Societe($db);
$resultthirdparty = $thirdparty->fetch($attendeetovalidate->fk_soc); $resultthirdparty = $thirdparty->fetch($attendeetovalidate->fk_soc);
if ($resultthirdparty < 0) { if ($resultthirdparty < 0) {
setEventMessages(null, $attendeetovalidate->errors, "errors"); setEventMessages($resultthirdparty->error, $resultthirdparty->errors, "errors");
} else { } else {
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
@ -1289,11 +1289,10 @@ if ($ispaymentok) {
$subject = $arraydefaultmessage->topic; $subject = $arraydefaultmessage->topic;
$msg = $arraydefaultmessage->content; $msg = $arraydefaultmessage->content;
} else { } else {
$subject = '['.$object->ref.' - '.$outputlangs->trans("NewRegistration").']'; $subject = '['.$appli.'] '.$object->ref.' - '.$outputlangs->trans("NewRegistration").']';
$msg = $outputlangs->trans("OrganizationEventPaymentOfRegistrationWasReceived"); $msg = $outputlangs->trans("OrganizationEventPaymentOfRegistrationWasReceived");
} }
$substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty); $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty);
complete_substitutions_array($substitutionarray, $outputlangs, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object);
@ -1301,6 +1300,13 @@ if ($ispaymentok) {
$texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs);
$sendto = $attendeetovalidate->email; $sendto = $attendeetovalidate->email;
$cc = '';
if ($thirdparty->email) {
$cc = $thirdparty->email;
}
if ($attendeetovalidate->email_company && $attendeetovalidate->email_company != $thirdparty->email) {
$cc = ($cc ? ', ' : '').$attendeetovalidate->email_company;
}
$from = $conf->global->MAILING_EMAIL_FROM; $from = $conf->global->MAILING_EMAIL_FROM;
$urlback = $_SERVER["REQUEST_URI"]; $urlback = $_SERVER["REQUEST_URI"];
@ -1321,7 +1327,7 @@ if ($ispaymentok) {
$listofmimes = array(dol_mimetype($file)); $listofmimes = array(dol_mimetype($file));
} }
$mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, $listofpaths, $listofmimes, $listofnames, '', '', 0, $ishtml); $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, $listofpaths, $listofmimes, $listofnames, $cc, '', 0, $ishtml);
$result = $mailfile->sendfile(); $result = $mailfile->sendfile();
if ($result) { if ($result) {
@ -1493,7 +1499,7 @@ if ($ispaymentok) {
$subject = $arraydefaultmessage->topic; $subject = $arraydefaultmessage->topic;
$msg = $arraydefaultmessage->content; $msg = $arraydefaultmessage->content;
} else { } else {
$subject = '['.$booth->ref.' - '.$outputlangs->trans("NewRegistration").']'; $subject = '['.$appli.'] '.$booth->ref.' - '.$outputlangs->trans("NewRegistration").']';
$msg = $outputlangs->trans("OrganizationEventPaymentOfBoothWasReceived"); $msg = $outputlangs->trans("OrganizationEventPaymentOfBoothWasReceived");
} }
@ -1542,6 +1548,11 @@ if ($ispaymentok) {
} }
} }
// Set $appli for emails title
$appli = $mysoc->name;
if ($ispaymentok) { if ($ispaymentok) {
// Get on url call // Get on url call
$onlinetoken = empty($PAYPALTOKEN) ? $_SESSION['onlinetoken'] : $PAYPALTOKEN; $onlinetoken = empty($PAYPALTOKEN) ? $_SESSION['onlinetoken'] : $PAYPALTOKEN;
@ -1600,19 +1611,6 @@ if ($ispaymentok) {
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
// Define link to login card // Define link to login card
$appli = constant('DOL_APPLICATION_TITLE');
if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
$appli = $conf->global->MAIN_APPLICATION_TITLE;
if (preg_match('/\d\.\d/', $appli)) {
if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) {
$appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core
}
} else {
$appli .= " ".DOL_VERSION;
}
} else {
$appli .= " ".DOL_VERSION;
}
$urlback = $_SERVER["REQUEST_URI"]; $urlback = $_SERVER["REQUEST_URI"];
$topic = '['.$appli.'] '.$companylangs->transnoentitiesnoconv("NewOnlinePaymentReceived"); $topic = '['.$appli.'] '.$companylangs->transnoentitiesnoconv("NewOnlinePaymentReceived");
@ -1740,21 +1738,6 @@ if ($ispaymentok) {
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
// Define link to login card
$appli = constant('DOL_APPLICATION_TITLE');
if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
$appli = $conf->global->MAIN_APPLICATION_TITLE;
if (preg_match('/\d\.\d/', $appli)) {
if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) {
$appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core
}
} else {
$appli .= " ".DOL_VERSION;
}
} else {
$appli .= " ".DOL_VERSION;
}
$urlback = $_SERVER["REQUEST_URI"]; $urlback = $_SERVER["REQUEST_URI"];
$topic = '['.$appli.'] '.$companylangs->transnoentitiesnoconv("ValidationOfPaymentFailed"); $topic = '['.$appli.'] '.$companylangs->transnoentitiesnoconv("ValidationOfPaymentFailed");
$content = ""; $content = "";

View File

@ -825,3 +825,118 @@ div#moreinfo, div#infowarehouse {
display: table; display: table;
clear: both; clear: both;
} }
.div5 .price {
display: none;
}
.div5 .imgadd {
display: none;
}
@media screen and (max-width: 767px) {
.div4 {
height: auto;
width: 100%;
float: left;
box-sizing: border-box;
font-size: 6px;
padding-top: 10px;
padding-bottom: 2px;
margin-left: 2px;
}
.div4 .wrapper.divempty, .div4 img, .div4 .wrapper:nth-last-child(1), .div4 .wrapper:nth-last-child(2), #prodiv22, #prodiv23, .catwatermark {
display: none!important;
}
.tab-category {
float: left;
position: relative;
width: 25%;
height: 33%;
margin: 0;
padding: 1px;
border: 2px solid #EEE;
text-align: center;
box-sizing: border-box;
background-color: #fff;
}
.div4 .wrapper, .tab-category {
width: auto;
height: auto;
padding: 6px;
text-align: center;
cursor: pointer;
border: 1px solid #FFF!important;
border-top: 3px solid #FFF!important;
}
.div4 .tab-category.active {
border-right: 1px solid #CCC !important;
border-left: 1px solid #CCC !important;
border-top: 3px solid var(--colorbackhmenu1) !important;
}
.div5 {
height: 100%;
width: 100%;
padding-top: 0px;
}
div.description {
position: initial;
width: auto;
background-color: black;
opacity: 1;
text-align: center;
padding-top: 0px;
background: -webkit-linear-gradient(top, rgba(250,250,250,0), rgba(250,250,250,0.5), rgba(250,250,250,0.95), rgba(250,250,250,1));
}
.div5 .description .description_content {
font-weight: bold;
font-size: 14px;
padding-left: 10px;
}
.div5 .wrapper2 {
width: 100%;
display: inline-flex;
align-items: center;
padding: 10px;
}
.div5 .wrapper2.divempty {
display: none;
}
div.wrapper2 {
float: none;
}
.div5 .arrow {
width: auto;
height: auto;
display: none!important;
}
.div5 .arrow .centerinmiddle {
transform: translate(0, 0);
}
.div5 .price {
font-size: 14px;
margin-left: auto;
margin-right: 30px;
padding-right: 10px;
font-weight: bold;
color: #ff6d6d;
display: flex;
}
.div5 .imgadd {
display: flex;
}
}

View File

@ -1346,7 +1346,7 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
<?php <?php
$count = 0; $count = 0;
while ($count < $MAXPRODUCT) { while ($count < $MAXPRODUCT) {
print '<div class="wrapper2" id="prodiv'.$count.'" '; print '<div class="wrapper2 arrow" id="prodiv'.$count.'" ';
?> ?>
<?php if ($count == ($MAXPRODUCT - 2)) { <?php if ($count == ($MAXPRODUCT - 2)) {
?> onclick="MoreProducts('less');" <?php ?> onclick="MoreProducts('less');" <?php
@ -1375,6 +1375,9 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
<div class="description" id="prodivdesc<?php echo $count; ?>"> <div class="description" id="prodivdesc<?php echo $count; ?>">
<div class="description_content" id="prodesc<?php echo $count; ?>"></div> <div class="description_content" id="prodesc<?php echo $count; ?>"></div>
</div> </div>
<div class="price" id="prodivprice<?php echo $count; ?>">
</div>
<span class="fa fa-plus"></span>
<?php } ?> <?php } ?>
<div class="catwatermark" id='prowatermark<?php echo $count; ?>'>...</div> <div class="catwatermark" id='prowatermark<?php echo $count; ?>'>...</div>
</div> </div>

View File

@ -66,6 +66,7 @@ span.badgeneutral {
background-color: #e4e4e4; background-color: #e4e4e4;
color: #666; color: #666;
border-radius: 10px; border-radius: 10px;
white-space: nowrap;
} }

View File

@ -1295,6 +1295,10 @@ select.flat.selectlimit {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.spanoverflow {
overflow-x: clip;
text-overflow: ellipsis;
}
.tdoverflowmax50 { /* For tdoverflow, the max-midth become a minimum ! */ .tdoverflowmax50 { /* For tdoverflow, the max-midth become a minimum ! */
max-width: 50px; max-width: 50px;
overflow: hidden; overflow: hidden;

View File

@ -69,6 +69,7 @@ span.badgeneutral {
background-color: #e4e4e4; background-color: #e4e4e4;
color: #666; color: #666;
border-radius: 10px; border-radius: 10px;
white-space: nowrap;
} }

View File

@ -1405,12 +1405,19 @@ select.flat.selectlimit {
width: 130px; width: 130px;
} }
/* using a tdoverflowxxx make the min-width not working */ /* using a tdoverflowxxx make the min-width not working */
.tdnooverflowimp {
text-overflow: none;
}
.tdoverflow { .tdoverflow {
max-width: 0; max-width: 0;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.spanoverflow {
overflow-x: clip;
text-overflow: ellipsis;
}
.tdoverflowmax50 { /* For tdoverflow, the max-midth become a minimum ! */ .tdoverflowmax50 { /* For tdoverflow, the max-midth become a minimum ! */
max-width: 50px; max-width: 50px;
overflow: hidden; overflow: hidden;

View File

@ -246,6 +246,7 @@ class Tickets extends DolibarrApi
$socid = DolibarrApiAccess::$user->socid; $socid = DolibarrApiAccess::$user->socid;
} }
$search_sale = null;
// If the internal user must only see his customers, force searching by him // If the internal user must only see his customers, force searching by him
$search_sale = 0; $search_sale = 0;
if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) { if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) {

View File

@ -397,6 +397,12 @@ foreach ($search as $key => $val) {
$sql .= natural_search($key, $search[$key], 2); $sql .= natural_search($key, $search[$key], 2);
} }
continue; continue;
} elseif ($key == 'type_code') {
$newarrayoftypecodes = is_array($search[$key]) ? $search[$key] : (!empty($search[$key]) ? explode(',', $search[$key]) : array());
if (count($newarrayoftypecodes)) {
$sql .= natural_search($key, join(',', $newarrayoftypecodes), 3);
}
continue;
} }
$mode_search = ((!empty($object->fields[$key]) && ($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key]))) ? 1 : 0); $mode_search = ((!empty($object->fields[$key]) && ($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key]))) ? 1 : 0);
@ -814,7 +820,7 @@ foreach ($object->fields as $key => $val) {
print '</td>'; print '</td>';
} elseif ($key == 'type_code') { } elseif ($key == 'type_code') {
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
$formTicket->selectTypesTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key.'', '', 2, 1, 1, 0, (!empty($val['css']) ? $val['css'] : 'maxwidth150')); $formTicket->selectTypesTickets(dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]), 'search_'.$key.'', '', 2, 1, 1, 0, (!empty($val['css']) ? $val['css'] : 'maxwidth150'), 1);
print '</td>'; print '</td>';
} elseif ($key == 'category_code') { } elseif ($key == 'category_code') {
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';

View File

@ -193,7 +193,7 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase
$result=strpos($filecontent, '"'); $result=strpos($filecontent, '"');
if ($result) { if ($result) {
$result=(! strpos($filecontent, '["') && ! strpos($filecontent, '{"')); $result=(! strpos($filecontent, '["') && ! strpos($filecontent, '{"') && ! strpos($filecontent, '("'));
} }
//print __METHOD__." Result for checking we don't have double quote = ".$result."\n"; //print __METHOD__." Result for checking we don't have double quote = ".$result."\n";
$this->assertTrue($result===false, 'Found double quote that is not [" neither {" (used for json content) into '.$file.'. Bad.'); $this->assertTrue($result===false, 'Found double quote that is not [" neither {" (used for json content) into '.$file.'. Bad.');