Merge pull request #13 from Dolibarr/develop

pull from develop
This commit is contained in:
Tobias Sekan 2020-04-10 12:29:26 +02:00 committed by GitHub
commit b710f5e876
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2203 changed files with 34487 additions and 34047 deletions

View File

@ -6,6 +6,7 @@ English Dolibarr ChangeLog
***** ChangeLog for 12.0.0 compared to 11.0.0 ***** ***** ChangeLog for 12.0.0 compared to 11.0.0 *****
For Users: For Users:
NEW: Module MO (Manufacturing Order) is available as stable module. NEW: Module MO (Manufacturing Order) is available as stable module.
NEW: Add option MAIN_VIEW_LINE_NUMBER_IN_LIST for some lists.
For Developers or integrators: For Developers or integrators:
* A new way to navigate between pages in list is available. To use it, you must * A new way to navigate between pages in list is available. To use it, you must
@ -27,6 +28,7 @@ Following changes may create regressions for some external modules, but were nec
* Library jflot (replace with chartjs) and geoip (replaced with geoip2) were removed. * Library jflot (replace with chartjs) and geoip (replaced with geoip2) were removed.
* Hidden constant COMMANDE_VALID_AFTER_CLOSE_PROPAL were renamed into ORDER_VALID_AFTER_CLOSE_PROPAL. * Hidden constant COMMANDE_VALID_AFTER_CLOSE_PROPAL were renamed into ORDER_VALID_AFTER_CLOSE_PROPAL.
***** ChangeLog for 11.0.3 compared to 11.0.2 ***** ***** ChangeLog for 11.0.3 compared to 11.0.2 *****
FIX: unit price for selected supplier products not set. NaN was used. FIX: unit price for selected supplier products not set. NaN was used.
FIX: use bad var to check if total is positive for each VAT rate when validating an invoice FIX: use bad var to check if total is positive for each VAT rate when validating an invoice

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 867 B

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
doc/images/dolibarr_logo.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View File

@ -1773,9 +1773,11 @@ else
if ($action != 'editlogin' && $action != 'editthirdparty') if ($action != 'editlogin' && $action != 'editthirdparty')
{ {
// Send // Send
if (empty($user->socid)) {
if ($object->statut == 1) { if ($object->statut == 1) {
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>'; print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>';
} }
}
// Send card by email // Send card by email
// TODO Remove this to replace with a template // TODO Remove this to replace with a template

View File

@ -191,10 +191,10 @@ if ($conf->use_javascript_ajax)
} }
$total = $SommeA + $SommeB + $SommeC + $SommeD; $total = $SommeA + $SommeB + $SommeC + $SommeD;
$dataseries = array(); $dataseries = array();
$dataseries[] = array($langs->trans("MenuMembersNotUpToDate"), round($SommeB)); $dataseries[] = array($langs->transnoentitiesnoconv("MenuMembersNotUpToDate"), round($SommeB));
$dataseries[] = array($langs->trans("MenuMembersUpToDate"), round($SommeC)); $dataseries[] = array($langs->transnoentitiesnoconv("MenuMembersUpToDate"), round($SommeC));
$dataseries[] = array($langs->trans("MembersStatusResiliated"), round($SommeD)); $dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusResiliated"), round($SommeD));
$dataseries[] = array($langs->trans("MembersStatusToValid"), round($SommeA)); $dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusToValid"), round($SommeA));
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';

View File

@ -106,6 +106,9 @@ $fieldstosearchall = array(
'd.address'=>'Address', 'd.address'=>'Address',
'd.zip'=>'Zip', 'd.zip'=>'Zip',
'd.town'=>'Town', 'd.town'=>'Town',
'd.phone'=>"Phone",
'd.phone_perso'=>"PhonePerso",
'd.phone_mobile'=>"PhoneMobile"?
'd.note_public'=>'NotePublic', 'd.note_public'=>'NotePublic',
'd.note_private'=>'NotePrivate', 'd.note_private'=>'NotePrivate',
); );

View File

@ -109,7 +109,7 @@ print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'" name="form_index">'
print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n"; print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
// Name // Name

View File

@ -410,7 +410,7 @@ print '<form enctype="multipart/form-data" method="POST" action="'.$_SERVER["PHP
print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n"; print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
// Name // Name
@ -493,7 +493,7 @@ if (!empty($mysoc->logo_mini)) {
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_mini).'">'; print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_mini).'">';
print '</div>'; print '</div>';
} }
print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a></div>'; print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'</a></div>';
} else { } else {
print '<img height="60" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">'; print '<img height="60" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
} }
@ -511,7 +511,7 @@ if (!empty($mysoc->logo_squarred_mini)) {
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini).'">'; print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini).'">';
print '</div>'; print '</div>';
} }
print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogosquarred">'.img_delete($langs->trans("Delete")).'</a></div>'; print '<div class="inline-block valignmiddle marginrightonly"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removelogosquarred">'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'</a></div>';
} else { } else {
print '<img height="60" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">'; print '<img height="60" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
} }
@ -527,7 +527,7 @@ print '</table>';
// Social networks // Social networks
print '<br>'; print '<br>';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->trans("SocialNetworksInformation").'</td><td>'.$langs->trans("Value").'</td>'; print '<td class="titlefield">'.$langs->trans("SocialNetworksInformation").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n"; print "</tr>\n";
@ -547,7 +547,7 @@ print "</table>";
print '<br>'; print '<br>';
// IDs of the company (country-specific) // IDs of the company (country-specific)
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>'; print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
$langs->load("companies"); $langs->load("companies");
@ -680,7 +680,7 @@ print '</table>';
// Fiscal year start // Fiscal year start
print '<br>'; print '<br>';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>'; print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
print "</tr>\n"; print "</tr>\n";
@ -695,7 +695,7 @@ print '<br>';
// Sales taxes (VAT, IRPF, ...) // Sales taxes (VAT, IRPF, ...)
print load_fiche_titre($langs->trans("TypeOfSaleTaxes")); print load_fiche_titre($langs->trans("TypeOfSaleTaxes"));
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td width="25%">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>'; print '<td width="25%">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
print '<td class="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
@ -721,7 +721,7 @@ print "</table>";
// Second tax // Second tax
print '<br>'; print '<br>';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td width="25%">'.$form->textwithpicto($langs->transcountry("LocalTax1Management", $mysoc->country_code), $langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code)).'</td><td>'.$langs->trans("Description").'</td>'; print '<td width="25%">'.$form->textwithpicto($langs->transcountry("LocalTax1Management", $mysoc->country_code), $langs->transcountry("LocalTax1IsUsedDesc", $mysoc->country_code)).'</td><td>'.$langs->trans("Description").'</td>';
print '<td class="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
@ -758,9 +758,9 @@ if ($mysoc->useLocalTax(1))
} else { } else {
if (empty($mysoc->country_code)) if (empty($mysoc->country_code))
{ {
print '<tr class="oddeven"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>'; print '<tr class="oddeven nohover"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>';
} else { } else {
print '<tr class="oddeven"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry" , $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryVAT"), $langs->transnoentitiesnoconv("LocalTax1Management")).'</td></tr>'; print '<tr class="oddeven nohover"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryVAT"), $langs->transnoentitiesnoconv("LocalTax1Management")).'</td></tr>';
} }
} }
@ -768,7 +768,7 @@ print "</table>";
// Third tax system // Third tax system
print '<br>'; print '<br>';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td width="25%">'.$form->textwithpicto($langs->transcountry("LocalTax2Management", $mysoc->country_code), $langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code)).'</td><td>'.$langs->trans("Description").'</td>'; print '<td width="25%">'.$form->textwithpicto($langs->transcountry("LocalTax2Management", $mysoc->country_code), $langs->transcountry("LocalTax2IsUsedDesc", $mysoc->country_code)).'</td><td>'.$langs->trans("Description").'</td>';
print '<td class="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
@ -804,18 +804,18 @@ if ($mysoc->useLocalTax(2))
} else { } else {
if (empty($mysoc->country_code)) if (empty($mysoc->country_code))
{ {
print '<tr class="oddeven"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>'; print '<tr class="oddeven nohover"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>';
} else { } else {
print '<tr class="oddeven"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry" , $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryVAT"), $langs->transnoentitiesnoconv("LocalTax2Management")).'</td></tr>'; print '<tr class="oddeven nohover"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryVAT"), $langs->transnoentitiesnoconv("LocalTax2Management")).'</td></tr>';
} }
} }
print "</table>"; print "</table>";
// Third tax system // Tax stamp
print '<br>'; print '<br>';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td width="25%">'.$form->textwithpicto($langs->trans("RevenueStamp"), $langs->trans("RevenueStampDesc")).'</td><td>'.$langs->trans("Description").'</td>'; print '<td width="25%">'.$form->textwithpicto($langs->trans("RevenueStamp"), $langs->trans("RevenueStampDesc")).'</td><td>'.$langs->trans("Description").'</td>';
print '<td class="right">&nbsp;</td>'; print '<td class="right">&nbsp;</td>';
@ -823,7 +823,7 @@ print "</tr>\n";
if ($mysoc->useRevenueStamp()) if ($mysoc->useRevenueStamp())
{ {
// Note: When option is not set, it must not appears as set on on, because there is no default value for this option // Note: When option is not set, it must not appears as set on on, because there is no default value for this option
print "<tr class=\"oddeven\"><td>"; print '<tr class="oddeven"><td>';
print $langs->trans("UseRevenueStamp"); print $langs->trans("UseRevenueStamp");
print "</td>"; print "</td>";
print '<td colspan="2">'; print '<td colspan="2">';
@ -832,9 +832,9 @@ if ($mysoc->useRevenueStamp())
} else { } else {
if (empty($mysoc->country_code)) if (empty($mysoc->country_code))
{ {
print '<tr class="oddeven"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>'; print '<tr class="oddeven nohover"><td class="opacitymedium">'.$countrynotdefined.'</td><td></td><td></td></tr>';
} else { } else {
print '<tr class="oddeven"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry" , $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryRevenueStamp"), $langs->transnoentitiesnoconv("RevenueStamp")).'</td></tr>'; print '<tr class="oddeven nohover"><td class="opacitymedium" colspan="3">'.$langs->trans("NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("Dictionaries"), $langs->transnoentitiesnoconv("DictionaryRevenueStamp"), $langs->transnoentitiesnoconv("RevenueStamp")).'</td></tr>';
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 B

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 943 B

View File

@ -275,7 +275,7 @@ $picto = 'object_'.$objMod->picto;
print load_fiche_titre(($modulename ? $modulename : $moduledesc), $moreinfo, $picto); print load_fiche_titre(($modulename ? $modulename : $moduledesc), $moreinfo, $picto);
print '<br>'; print '<br>';
dol_fiche_head($head, $mode, $title, -1); dol_fiche_head($head, $mode, '', -1);
if (!$modulename) if (!$modulename)
{ {

View File

@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/admin/dolistore/class/dolistore.class.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("errors", "admin", "modulebuilder")); $langs->loadLangs(array("errors", "admin", "modulebuilder"));
$mode = GETPOST('mode', 'alpha'); $mode = GETPOSTISSET('mode') ? GETPOST('mode', 'alpha') : 'commonkanban';
if (empty($mode)) $mode = 'common'; if (empty($mode)) $mode = 'common';
$action = GETPOST('action', 'alpha'); $action = GETPOST('action', 'alpha');
//var_dump($_POST);exit; //var_dump($_POST);exit;
@ -311,7 +311,7 @@ $filename = array();
$modules = array(); $modules = array();
$orders = array(); $orders = array();
$categ = array(); $categ = array();
$dirmod = array();
$i = 0; // is a sequencer of modules found $i = 0; // is a sequencer of modules found
$j = 0; // j is module number. Automatically affected if module number not defined. $j = 0; // j is module number. Automatically affected if module number not defined.
$modNameLoaded = array(); $modNameLoaded = array();
@ -420,8 +420,7 @@ foreach ($modulesdir as $dir)
} }
$orders[$i] = $familyposition."_".$familykey."_".$moduleposition."_".$j; // Sort by family, then by module position then number $orders[$i] = $familyposition."_".$familykey."_".$moduleposition."_".$j; // Sort by family, then by module position then number
$dirmod[$i] = $dir;
//print $i.'-'.$dirmod[$i].'<br>';
// Set categ[$i] // Set categ[$i]
$specialstring = 'unknown'; $specialstring = 'unknown';
if ($objMod->version == 'development' || $objMod->version == 'experimental') $specialstring = 'expdev'; if ($objMod->version == 'development' || $objMod->version == 'experimental') $specialstring = 'expdev';
@ -483,11 +482,11 @@ if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouM
print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup'); print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup');
// Start to show page // Start to show page
if ($mode == 'common') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDesc")."</span><br>\n"; if ($mode == 'common') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDesc")."<br></span>\n";
if ($mode == 'commonkanban') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDesc")."</span><br>\n"; if ($mode == 'commonkanban') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDesc")."<br></span>\n";
if ($mode == 'marketplace') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesMarketPlaceDesc")."</span><br>\n"; if ($mode == 'marketplace') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesMarketPlaceDesc")."<br></span>\n";
if ($mode == 'deploy') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."</span><br>\n"; if ($mode == 'deploy') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."<br></span>\n";
if ($mode == 'develop') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDevelopDesc")."</span><br>\n"; if ($mode == 'develop') print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDevelopDesc")."<br></span>\n";
$head = modules_prepare_head(); $head = modules_prepare_head();
@ -508,7 +507,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
print '<input type="hidden" name="mode" value="'.$mode.'">'; print '<input type="hidden" name="mode" value="'.$mode.'">';
$newmode = $mode; $newmode = $mode;
if ($newmode == 'commonkanban') $newmode = 'common'; if ($newmode == 'common') $newmode = 'commonkanban';
dol_fiche_head($head, $newmode, '', -1); dol_fiche_head($head, $newmode, '', -1);
@ -518,7 +517,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
$moreforfilter .= $langs->trans('Keyword').': <input type="text" id="search_keyword" name="search_keyword" class="maxwidth100" value="'.dol_escape_htmltag($search_keyword).'">'; $moreforfilter .= $langs->trans('Keyword').': <input type="text" id="search_keyword" name="search_keyword" class="maxwidth100" value="'.dol_escape_htmltag($search_keyword).'">';
$moreforfilter .= '</div>'; $moreforfilter .= '</div>';
$moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('Origin').': '.$form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), 1); $moreforfilter .= $langs->trans('Origin').': '.$form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
$moreforfilter .= '</div>'; $moreforfilter .= '</div>';
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) if (!empty($conf->global->MAIN_FEATURES_LEVEL))
{ {
@ -527,11 +526,11 @@ if ($mode == 'common' || $mode == 'commonkanban')
if ($conf->global->MAIN_FEATURES_LEVEL > 0) $array_version['experimental'] = $langs->trans("Experimental"); if ($conf->global->MAIN_FEATURES_LEVEL > 0) $array_version['experimental'] = $langs->trans("Experimental");
if ($conf->global->MAIN_FEATURES_LEVEL > 1) $array_version['development'] = $langs->trans("Development"); if ($conf->global->MAIN_FEATURES_LEVEL > 1) $array_version['development'] = $langs->trans("Development");
$moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('Version').': '.$form->selectarray('search_version', $array_version, $search_version, 1); $moreforfilter .= $langs->trans('Version').': '.$form->selectarray('search_version', $array_version, $search_version, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
$moreforfilter .= '</div>'; $moreforfilter .= '</div>';
} }
$moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('Status').': '.$form->selectarray('search_status', array('active'=>$langs->transnoentitiesnoconv("Enabled"), 'disabled'=>$langs->transnoentitiesnoconv("Disabled")), $search_status, 1); $moreforfilter .= $langs->trans('Status').': '.$form->selectarray('search_status', array('active'=>$langs->transnoentitiesnoconv("Enabled"), 'disabled'=>$langs->transnoentitiesnoconv("Disabled")), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
$moreforfilter .= '</div>'; $moreforfilter .= '</div>';
$moreforfilter .= ' '; $moreforfilter .= ' ';
$moreforfilter .= '<div class="divsearchfield">'; $moreforfilter .= '<div class="divsearchfield">';
@ -543,7 +542,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
$moreforfilter .= '<div class="floatright right">'; $moreforfilter .= '<div class="floatright right">';
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition')); $moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'));
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition')); $moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition'));
$moreforfilter .= '</div>'; $moreforfilter .= '</div>';
$moreforfilter .= '<div class="floatright right margintoponly marginrightonly" style="padding-top: 3px">'.$moreinfo.'</div>'; $moreforfilter .= '<div class="floatright right margintoponly marginrightonly" style="padding-top: 3px">'.$moreinfo.'</div>';
@ -569,9 +568,11 @@ if ($mode == 'common' || $mode == 'commonkanban')
// Show list of modules // Show list of modules
$oldfamily = ''; $oldfamily = '';
$linenum = 0;
foreach ($orders as $key => $value) foreach ($orders as $key => $value)
{ {
$linenum++;
$tab = explode('_', $value); $tab = explode('_', $value);
$familykey = $tab[1]; $familykey = $tab[1];
$module_position = $tab[2]; $module_position = $tab[2];
@ -617,6 +618,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
if ($search_nature) if ($search_nature)
{ {
if (preg_match('/^external/', $search_nature) && $objMod->isCoreOrExternalModule() != 'external') continue; if (preg_match('/^external/', $search_nature) && $objMod->isCoreOrExternalModule() != 'external') continue;
$reg = array();
if (preg_match('/^external_(.*)$/', $search_nature, $reg)) if (preg_match('/^external_(.*)$/', $search_nature, $reg))
{ {
//print $reg[1].'-'.dol_escape_htmltag($objMod->getPublisher()); //print $reg[1].'-'.dol_escape_htmltag($objMod->getPublisher());
@ -685,12 +687,161 @@ if ($mode == 'common' || $mode == 'commonkanban')
$imginfo = "info_black"; $imginfo = "info_black";
} }
$codeenabledisable = '';
$codetoconfig = '';
// Activate/Disable and Setup (2 columns)
if (!empty($conf->global->$const_name)) // If module is already activated
{
// Set $codeenabledisable
$disableSetup = 0;
if (!empty($arrayofwarnings[$modName]))
{
$codeenabledisable .= '<!-- This module has a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
}
if (!empty($objMod->disabled))
{
$codeenabledisable .= $langs->trans("Disabled");
}
elseif (!empty($objMod->always_enabled) || ((!empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity != 1)))
{
if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) $codeenabledisable .= $langs->trans("Used");
else {
$codeenabledisable .= img_picto($langs->trans("Required"), 'switch_on', '', false, 0, 0, '', 'opacitymedium valignmiddle');
//print $langs->trans("Required");
}
if (!empty($conf->multicompany->enabled) && $user->entity) $disableSetup++;
}
else
{
if (!empty($objMod->warnings_unactivation[$mysoc->country_code]) && method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) {
$codeenabledisable .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=reset_confirm&amp;confirm_message_code='.$objMod->warnings_unactivation[$mysoc->country_code].'&amp;value='.$modName.'&amp;mode='.$mode.$param.'">';
$codeenabledisable .= img_picto($langs->trans("Activated"), 'switch_on');
$codeenabledisable .= '</a>';
}
else {
$codeenabledisable .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=reset&amp;value='.$modName.'&amp;mode='.$mode.'&amp;confirm=yes'.$param.'">';
$codeenabledisable .= img_picto($langs->trans("Activated"), 'switch_on');
$codeenabledisable .= '</a>';
}
}
// Set $codetoconfig
if (!empty($objMod->config_page_url) && !$disableSetup)
{
$backtourlparam = '';
if ($search_keyword != '') $backtourlparam .= ($backtourlparam ? '&' : '?').'search_keyword='.$search_keyword; // No urlencode here, done later
if ($search_nature > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_nature='.$search_nature;
if ($search_version > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_version='.$search_version;
if ($search_status > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_status='.$search_status;
$backtourl = $_SERVER["PHP_SELF"].$backtourlparam;
$regs = array();
if (is_array($objMod->config_page_url))
{
$i = 0;
foreach ($objMod->config_page_url as $page)
{
$urlpage = $page;
if ($i++)
{
$codetoconfig .= '<a href="'.$urlpage.'" title="'.$langs->trans($page).'">'.img_picto(ucfirst($page), "setup").'</a>';
// print '<a href="'.$page.'">'.ucfirst($page).'</a>&nbsp;';
}
else
{
if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs))
{
$urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1);
$codetoconfig .= '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').'</a>';
}
else
{
$urltouse = $urlpage;
$codetoconfig .= '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').'</a>';
}
}
}
}
elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs))
{
$codetoconfig .= '<a class="valignmiddle" href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').'</a>';
}
else
{
$codetoconfig .= '<a class="valignmiddle" href="'.$objMod->config_page_url.'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').'</a>';
}
}
else
{
$codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"', false, 0, 0, '', 'fa-15');
}
}
else // Module not yet activated
{
// Set $codeenabledisable
if (!empty($objMod->always_enabled))
{
// Should never happened
}
elseif (!empty($objMod->disabled))
{
$codeenabledisable .= $langs->trans("Disabled");
}
else
{
// Module qualified for activation
$warningmessage = '';
if (!empty($arrayofwarnings[$modName]))
{
$codeenabledisable .= '<!-- This module is a core module and it may have a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
foreach ($arrayofwarnings[$modName] as $keycountry => $cursorwarningmessage)
{
if (preg_match('/^always/', $keycountry) || ($mysoc->country_code && preg_match('/^'.$mysoc->country_code.'/', $keycountry)))
{
$warningmessage .= ($warningmessage ? "\n" : "").$langs->trans($cursorwarningmessage, $objMod->getName(), $mysoc->country_code);
}
}
}
if ($objMod->isCoreOrExternalModule() == 'external' && !empty($arrayofwarningsext))
{
$codeenabledisable .= '<!-- This module is an external module and it may have a warning to show (note: your country is '.$mysoc->country_code.') -->'."\n";
foreach ($arrayofwarningsext as $keymodule => $arrayofwarningsextbycountry)
{
$keymodulelowercase = strtolower(preg_replace('/^mod/', '', $keymodule));
if (in_array($keymodulelowercase, $conf->modules)) // If module that request warning is on
{
foreach ($arrayofwarningsextbycountry as $keycountry => $cursorwarningmessage)
{
if (preg_match('/^always/', $keycountry) || ($mysoc->country_code && preg_match('/^'.$mysoc->country_code.'/', $keycountry)))
{
$warningmessage .= ($warningmessage ? "\n" : "").$langs->trans($cursorwarningmessage, $objMod->getName(), $mysoc->country_code, $modules[$keymodule]->getName());
$warningmessage .= ($warningmessage ? "\n" : "").($warningmessage ? "\n" : "").$langs->trans("Module").' : '.$objMod->getName();
if (!empty($objMod->editor_name)) $warningmessage .= ($warningmessage ? "\n" : "").$langs->trans("Publisher").' : '.$objMod->editor_name;
if (!empty($objMod->editor_name)) $warningmessage .= ($warningmessage ? "\n" : "").$langs->trans("ModuleTriggeringThisWarning").' : '.$modules[$keymodule]->getName();
}
}
}
}
}
$codeenabledisable .= '<!-- Message to show: '.$warningmessage.' -->'."\n";
$codeenabledisable .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=set&amp;value='.$modName.'&amp;mode='.$mode.$param.'"';
if ($warningmessage) $codeenabledisable .= ' onclick="return confirm(\''.dol_escape_js($warningmessage).'\');"';
$codeenabledisable .= '>';
$codeenabledisable .= img_picto($langs->trans("Disabled"), 'switch_off');
$codeenabledisable .= "</a>\n";
}
// Set $codetoconfig
$codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"');
}
if ($mode == 'commonkanban') { if ($mode == 'commonkanban') {
// Output Kanban // Output Kanban
print $objMod->getKanbanView(); print $objMod->getKanbanView($codeenabledisable, $codetoconfig);
} else { } else {
print '<tr class="oddeven">'."\n"; print '<tr class="oddeven">'."\n";
if (!empty($conf->global->MAIN_MODULES_SHOW_LINENUMBERS)) print '<td width="20px">'.++$linenum.'</td>'; if (!empty($conf->global->MAIN_MODULES_SHOW_LINENUMBERS)) print '<td width="20px">'.$linenum.'</td>';
// Picto + Name of module // Picto + Name of module
print ' <td width="200px">'; print ' <td width="200px">';
@ -723,7 +874,7 @@ if ($mode == 'common' || $mode == 'commonkanban')
// Version // Version
print '<td class="center nowrap" width="120px">'; print '<td class="center nowrap" width="120px">';
print $versiontrans; print $versiontrans;
if (!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)) { if (!empty($conf->global->CHECKLASTVERSION_EXTERNALMODULE)) { // This is a bad practice to activate a synch external access during building of a page. 1 external module can hang the application.
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
if (!empty($objMod->url_last_version)) { if (!empty($objMod->url_last_version)) {
$newversion = getURLContent($objMod->url_last_version); $newversion = getURLContent($objMod->url_last_version);
@ -736,158 +887,15 @@ if ($mode == 'common' || $mode == 'commonkanban')
} }
print "</td>\n"; print "</td>\n";
// Activate/Disable and Setup (2 columns)
if (!empty($conf->global->$const_name)) // If module is already activated
{
$disableSetup = 0;
// Link enable/disabme
print '<td class="center valignmiddle" width="60px">';
if (!empty($arrayofwarnings[$modName]))
{
print '<!-- This module has a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
}
if (!empty($objMod->disabled))
{
print $langs->trans("Disabled");
}
elseif (!empty($objMod->always_enabled) || ((!empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity != 1)))
{
if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) print $langs->trans("Used");
else {
print img_picto($langs->trans("Required"), 'switch_on', '', false, 0, 0, '', 'opacitymedium');
//print $langs->trans("Required");
}
if (!empty($conf->multicompany->enabled) && $user->entity) $disableSetup++;
}
else
{
if (!empty($objMod->warnings_unactivation[$mysoc->country_code]) && method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=reset_confirm&amp;confirm_message_code='.$objMod->warnings_unactivation[$mysoc->country_code].'&amp;value='.$modName.'&amp;mode='.$mode.$param.'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=reset&amp;value='.$modName.'&amp;mode='.$mode.'&amp;confirm=yes'.$param.'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
}
print '</td>'."\n";
// Link config
print '<td class="tdsetuppicto right" width="60px">';
if (!empty($objMod->config_page_url) && !$disableSetup)
{
$backtourlparam = '';
if ($search_keyword != '') $backtourlparam .= ($backtourlparam ? '&' : '?').'search_keyword='.$search_keyword; // No urlencode here, done later
if ($search_nature > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_nature='.$search_nature;
if ($search_version > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_version='.$search_version;
if ($search_status > -1) $backtourlparam .= ($backtourlparam ? '&' : '?').'search_status='.$search_status;
$backtourl = $_SERVER["PHP_SELF"].$backtourlparam;
$regs = array();
if (is_array($objMod->config_page_url))
{
$i = 0;
foreach ($objMod->config_page_url as $page)
{
$urlpage = $page;
if ($i++)
{
print '<a href="'.$urlpage.'" title="'.$langs->trans($page).'">'.img_picto(ucfirst($page), "setup").'</a>';
// print '<a href="'.$page.'">'.ucfirst($page).'</a>&nbsp;';
}
else
{
if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs))
{
$urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1);
print '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
else
{
$urltouse = $urlpage;
print '<a href="'.$urltouse.(preg_match('/\?/', $urltouse) ? '&' : '?').'save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
}
}
}
elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs))
{
print '<a href="'.dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1).'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
else
{
print '<a href="'.$objMod->config_page_url.'?save_lastsearch_values=1&backtopage='.urlencode($backtourl).'" title="'.$langs->trans("Setup").'">'.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').'</a>';
}
}
else
{
print img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"');
}
print '</td>';
}
else // Module not yet activated
{
// Link enable/disable // Link enable/disable
print '<td class="center valignmiddle" width="60px">'; print '<td class="center valignmiddle" width="60px">';
if (!empty($objMod->always_enabled)) print $codeenabledisable;
{
// Should never happened
}
elseif (!empty($objMod->disabled))
{
print $langs->trans("Disabled");
}
else
{
// Module qualified for activation
$warningmessage = '';
if (!empty($arrayofwarnings[$modName]))
{
print '<!-- This module is a core module and it may have a warning to show when we activate it (note: your country is '.$mysoc->country_code.') -->'."\n";
foreach ($arrayofwarnings[$modName] as $keycountry => $cursorwarningmessage)
{
if (preg_match('/^always/', $keycountry) || ($mysoc->country_code && preg_match('/^'.$mysoc->country_code.'/', $keycountry)))
{
$warningmessage .= ($warningmessage ? "\n" : "").$langs->trans($cursorwarningmessage, $objMod->getName(), $mysoc->country_code);
}
}
}
if ($objMod->isCoreOrExternalModule() == 'external' && !empty($arrayofwarningsext))
{
print '<!-- This module is an external module and it may have a warning to show (note: your country is '.$mysoc->country_code.') -->'."\n";
foreach ($arrayofwarningsext as $keymodule => $arrayofwarningsextbycountry)
{
$keymodulelowercase = strtolower(preg_replace('/^mod/', '', $keymodule));
if (in_array($keymodulelowercase, $conf->modules)) // If module that request warning is on
{
foreach ($arrayofwarningsextbycountry as $keycountry => $cursorwarningmessage)
{
if (preg_match('/^always/', $keycountry) || ($mysoc->country_code && preg_match('/^'.$mysoc->country_code.'/', $keycountry)))
{
$warningmessage .= ($warningmessage ? "\n" : "").$langs->trans($cursorwarningmessage, $objMod->getName(), $mysoc->country_code, $modules[$keymodule]->getName());
$warningmessage .= ($warningmessage ? "\n" : "").($warningmessage ? "\n" : "").$langs->trans("Module").' : '.$objMod->getName();
if (!empty($objMod->editor_name)) $warningmessage .= ($warningmessage ? "\n" : "").$langs->trans("Publisher").' : '.$objMod->editor_name;
if (!empty($objMod->editor_name)) $warningmessage .= ($warningmessage ? "\n" : "").$langs->trans("ModuleTriggeringThisWarning").' : '.$modules[$keymodule]->getName();
}
}
}
}
}
print '<!-- Message to show: '.$warningmessage.' -->'."\n";
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=set&amp;value='.$modName.'&amp;mode='.$mode.$param.'"';
if ($warningmessage) print ' onclick="return confirm(\''.dol_escape_js($warningmessage).'\');"';
print '>';
print img_picto($langs->trans("Disabled"), 'switch_off');
print "</a>\n";
}
print "</td>\n"; print "</td>\n";
// Link config // Link config
print '<td class="tdsetuppicto right valignmiddle" width="60px">'.img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"').'</td>'; print '<td class="tdsetuppicto right valignmiddle" width="60px">';
} print $codetoconfig;
print '</td>';
print "</tr>\n"; print "</tr>\n";
} }
@ -952,26 +960,24 @@ if ($mode == 'marketplace')
$previouslink = $dolistore->get_previous_link(); $previouslink = $dolistore->get_previous_link();
$nextlink = $dolistore->get_next_link(); $nextlink = $dolistore->get_next_link();
print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">' print '<div class="liste_titre liste_titre_bydiv centpercent"><div class="divsearchfield">';
print '<form method="POST" class="centpercent" id="searchFormList" action="'.$dolistore->url.'">';
?> ?>
<form method="POST" class="centpercent" id="searchFormList" action="<?php echo $dolistore->url ?>">
<input type="hidden" name="token" value="<?php echo newToken(); ?>"> <input type="hidden" name="token" value="<?php echo newToken(); ?>">
<input type="hidden" name="mode" value="marketplace"> <input type="hidden" name="mode" value="marketplace">
<div class="divsearchfield"><?php echo $langs->trans('Keyword') ?>: <div class="divsearchfield"><?php echo $langs->trans('Keyword') ?>:
<input name="search_keyword" placeholder="<?php echo $langs->trans('Chercher un module') ?>" id="search_keyword" type="text" size="50" value="<?php echo $options['search'] ?>"><br> <input name="search_keyword" placeholder="<?php echo $langs->trans('Chercher un module') ?>" id="search_keyword" type="text" size="50" value="<?php echo $options['search'] ?>"><br>
</div> </div>
<div class="divsearchfield"> <div class="divsearchfield">
<input class="button" value="<?php echo $langs->trans('Rechercher') ?>" type="submit"> <input class="button buttongen" value="<?php echo $langs->trans('Rechercher') ?>" type="submit">
<a class="button" href="<?php echo $dolistore->url ?>"><?php echo $langs->trans('Reset') ?></a> <a class="buttonreset" href="<?php echo $dolistore->url ?>"><?php echo $langs->trans('Reset') ?></a>
&nbsp; &nbsp;
</div> </div>
<div class="divsearchfield right">
<?php <?php
print $previouslink; print $previouslink;
print $nextlink; print $nextlink;
print '</div>';
print '</form>'; print '</form>';

View File

@ -89,7 +89,7 @@ if (empty($action) || $action == 'edit' || $action == 'updateedit')
print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("Day").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n"; print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("Day").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';

View File

@ -3,6 +3,7 @@
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -68,9 +69,9 @@ if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2)
print '<br>'; print '<br>';
} }
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
print "\n";
$ErrorPicturePath = "../../theme/eldy/img/error.png"; $ErrorPicturePath = "../../theme/eldy/img/error.png";
$WarningPicturePath = "../../theme/eldy/img/warning.png"; $WarningPicturePath = "../../theme/eldy/img/warning.png";
@ -79,7 +80,8 @@ $OkayPicturePath = "../../theme/eldy/img/tick.png";
print '<tr><td width="220">'.$langs->trans("Version").'</td><td>'; print '<tr><td width="220">'.$langs->trans("Version").'</td><td>';
$arrayphpminversionerror = array(5, 5, 0); $arrayphpminversionerror = array(5, 5, 0);
$arrayphpminversionwarning = array(5,5,0); $arrayphpminversionwarning = array(5, 6, 0);
if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0)
{ {
print '<img src="'.$ErrorPicturePath.'" alt="Error"> '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); print '<img src="'.$ErrorPicturePath.'" alt="Error"> '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror));
@ -118,30 +120,6 @@ else
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupportSessions"); print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupportSessions");
} }
print '</td></tr>';
print '<tr><td>GD support</td><td>';
if (! function_exists("imagecreate"))
{
print '<img src="'.$WarningPicturePath.'" alt="Warning"> '.$langs->trans("ErrorPHPDoesNotSupportGD");
}
else
{
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupportGD");
}
print '</td></tr>';
print '<tr><td>Curl support</td><td>';
if (! function_exists("curl_init"))
{
print '<img src="'.$WarningPicturePath.'" alt="Warning"> '.$langs->trans("ErrorPHPDoesNotSupportCurl");
}
else
{
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupportCurl");
}
print '</td></tr>'; print '</td></tr>';
print '<tr><td>UTF-8 support</td><td>'; print '<tr><td>UTF-8 support</td><td>';
@ -155,32 +133,70 @@ else
} }
print '</td></tr>'; print '</td></tr>';
print '<tr><td>Intl support</td><td>'; print '</table>';
print '<br>';
$activatedExtensions = array_map('strtolower', getActivatedExtensions());
$loadedExtensions = array_map('strtolower', get_loaded_extensions(false));
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td width="200">'.$langs->trans("Extension").'</td>';
print '<td align="center">'.$langs->trans("EnabledInSetup").'</td>';
print '<td align="center">'.$langs->trans("Loaded").'</td>';
print '<td align="center">'.$langs->trans("FunctionTest").'</td>';
print '<td>'.$langs->trans("Result").'</td>';
print '</tr>';
$functions = ["imagecreate"];
$name = "GD";
print "<tr>";
print "<td>".$name."</td>";
print getTableColumn($name, $activatedExtensions);
print getTableColumn($name, $loadedExtensions);
print getTableColumnFunction($functions);
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print "</tr>";
$functions = ["curl_init"];
$name = "Curl";
print "<tr>";
print "<td>".$name."</td>";
print getTableColumn($name, $activatedExtensions);
print getTableColumn($name, $loadedExtensions);
print getTableColumnFunction($functions);
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print "</tr>";
if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@localhost') if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@localhost')
{ {
if (! function_exists("locale_get_primary_language") || ! function_exists("locale_get_region")) $functions = ["locale_get_primary_language", "locale_get_region"];
{ $name = "Intl";
print '<img src="'.$WarningPicturePath.'" alt="Warning"> '.$langs->trans("ErrorPHPDoesNotSupportIntl");
} print "<tr>";
else print "<td>".$name."</td>";
{ print getTableColumn($name, $activatedExtensions);
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupportIntl"); print getTableColumn($name, $loadedExtensions);
} print getTableColumnFunction($functions);
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print "</tr>";
} }
print '<tr><td>Zip support</td><td>'; $functions = array();
$name = "xDebug";
if (!class_exists('ZipArchive')) print "<tr>";
{ print "<td>".$name."</td>";
print '<img src="'.$WarningPicturePath.'" alt="Warning"> '.$langs->trans("ErrorPHPDoesNotSupport", "Zip"); print getTableColumn($name, $activatedExtensions);
} print getTableColumn($name, $loadedExtensions);
else print getTableColumnFunction($functions);
{ print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print '<img src="'.$OkayPicturePath.'" alt="Ok"> '.$langs->trans("PHPSupport", "Zip"); print "</tr>";
}
print '</td></tr>';
print '</table>'; print '</table>';
print '<br>'; print '<br>';
@ -240,3 +256,169 @@ foreach($phparray as $key => $value)
// End of page // End of page
llxFooter(); llxFooter();
$db->close(); $db->close();
/**
* Return all list with all activated, but possible not loaded PHP extensions
*
* @return array
*/
function getActivatedExtensions()
{
$file = getConfigFilePath();
$handle = fopen(GetConfigFilePath(), "r");
$content = fread($handle, filesize($file));
fclose($handle);
$configLines = explode("\r", $content);
$extensions = array();
$lastLine = "";
foreach ($configLines as $line)
{
$line = trim($line);
// ignore comment lines
if (substr($line, 0, 1) === ";")
{
continue;
}
// extension
if (substr($line, 0, 9) === "extension" && substr($line, 0, 10) !== "extension_")
{
$value = trim(end(explode("=", $line)));
$extensions[] = $value === "gd2" ? "gd" : $value;
}
// zend_extension
if (substr($line, 0, 14) === "zend_extension")
{
$extensions[] = str_replace("[", "", str_replace("]", "", $lastLine));
}
$lastLine = $line;
}
return array_unique($extensions);
}
/**
* Return the path to the current used php config file
*
* @return string
*/
function getConfigFilePath()
{
$phparray = phpinfo_array();
foreach ($phparray as $value)
{
foreach ($value as $keyparam => $keyvalue)
{
if (strtolower($keyparam) !== "loaded configuration file")
{
continue;
}
return $keyvalue;
}
}
return "";
}
/**
* Return a table column with a indicator (okay or warning), based on the given name and list
*
* @param string $name The name to check inside the given list
* @param array $list A list that should contains the given name
*
* @return string
*/
function getTableColumn($name, array $list)
{
$name = strtolower($name);
$html = "<td align='center'>";
if (in_array($name, $list))
{
$html .= '<img src="../../theme/eldy/img/tick.png" alt="Ok">';
}
else
{
$html .= '<img src="../../theme/eldy/img/warning.png" alt="Warning">';
}
$html .= "</td>";
return $html;
}
/**
* Return a table column with a indicator (okay or warning), based on the given functions to check
*
* @param array $functions A list with functions to check
*
* @return string
*/
function getTableColumnFunction(array $functions)
{
if (count($functions) < 1)
{
return "<td align='center'>-</td>";
}
$result = true;
$html = "<td align='center'>";
foreach ($functions as $function)
{
$result = $result && function_exists($function);
}
if ($result)
{
$html .= '<img src="../../theme/eldy/img/tick.png" alt="Ok">';
}
else
{
$html .= '<img src="../../theme/eldy/img/warning.png" alt="Warning">';
}
$html .= "</td>";
return $html;
}
/**
* Return a result column with a translated result text
*
* @param string $name The name of the PHP extension
* @param array $activated A list with all activated PHP extensions
* @param array $loaded A list with all loaded PHP extensions
* @param array $functions A list with all PHP functions to check
*
* @return array
*/
function getResultColumn($name, array $activated, array $loaded, array $functions)
{
global $langs;
$result = true;
$result = $result && in_array(strtolower($name), $activated);
$result = $result && in_array(strtolower($name), $loaded);
foreach ($functions as $function)
{
$result = $result && function_exists($function);
}
$html = "<td>";
$html .= $result ? $langs->trans("PHPSupport".$name) : $langs->trans("ErrorPHPDoesNotSupport".$name);
$html .= "</td>";
return $html;
}

View File

@ -281,7 +281,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (empty($reshook)) if (empty($reshook))
{ {
// Send // Send
if (empty($user->socid)) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n"; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
}
if ($user->rights->asset->write) if ($user->rights->asset->write)
{ {

View File

@ -601,7 +601,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (empty($reshook)) if (empty($reshook))
{ {
// Send // Send
//if (empty($user->socid)) {
// print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n"; // print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a>'."\n";
//}
// Back to draft // Back to draft
if ($object->status == $object::STATUS_VALIDATED) if ($object->status == $object::STATUS_VALIDATED)

View File

@ -0,0 +1,74 @@
<?php
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2013-2020 Charlene BENKE <charlie@patas-monkey.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";
exit;
}
print "<!-- BEGIN PHP TEMPLATE -->\n";
global $user, $db;
global $noMoreLinkedObjectBlockAfter;
$langs = $GLOBALS['langs'];
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
// Load translation files required by the page
$langs->load("bom");
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
$total = 0;
$ilink = 0;
foreach ($linkedObjectBlock as $key => $objectlink)
{
$ilink++;
$product_static= new Product($db);
$trclass = 'oddeven';
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total';
echo '<tr class="'.$trclass.'" >';
echo '<td class="linkedcol-element" >'.$langs->trans("Bom");
if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) {
print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a';
}
echo '</td>';
echo '<td class="linkedcol-name nowraponall" >'.$objectlink->getNomUrl(1).'</td>';
$product_static->fetch($objectlink->fk_product);
echo '<td class="linkedcol-ref" align="center">'.$product_static->getNomUrl(1).'</td>';
echo '<td class="linkedcol-date" align="center">'.dol_print_date($objectlink->date_creation, 'day').'</td>';
echo '<td class="linkedcol-amount right">';
if ($user->rights->commande->lire) {
$total = $total + $objectlink->total_ht;
echo price($objectlink->total_ht);
}
echo '</td>';
echo '<td class="linkedcol-statut right">'.$objectlink->getLibStatut(3).'</td>';
echo '<td class="linkedcol-action right">';
// For now, shipments must stay linked to order, so link is not deletable
if ($object->element != 'shipping') {
echo '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a>';
}
echo '</td>';
echo "</tr>\n";
}
echo "<!-- END PHP TEMPLATE -->\n";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 773 B

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 254 B

Some files were not shown because too many files have changed in this diff Show More