Merge remote-tracking branch 'origin/develop' into HEAD

This commit is contained in:
Yoan Mollard 2022-07-08 10:11:22 +02:00
commit 07b5657ba1
325 changed files with 8243 additions and 4147 deletions

View File

@ -140,18 +140,6 @@ source_file = htdocs/langs/en_US/exports.lang
source_lang = en_US source_lang = en_US
type = MOZILLAPROPERTIES type = MOZILLAPROPERTIES
[dolibarr.externalsite]
file_filter = htdocs/langs/<lang>/externalsite.lang
source_file = htdocs/langs/en_US/externalsite.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.ftp]
file_filter = htdocs/langs/<lang>/ftp.lang
source_file = htdocs/langs/en_US/ftp.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.help] [dolibarr.help]
file_filter = htdocs/langs/<lang>/help.lang file_filter = htdocs/langs/<lang>/help.lang
source_file = htdocs/langs/en_US/help.lang source_file = htdocs/langs/en_US/help.lang

View File

@ -34,14 +34,15 @@ ParseDown 1.6 MIT License Yes
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers
PHPSpreadSheet 1.8.2 LGPL-2.1+ Yes Read/Write XLS files, read ODS files PHPSpreadSheet 1.8.2 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP php-iban 4.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
PSR/Logs 1.0 Library for logs (used by DebugBar) PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet) PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet)
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer) Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
Sabre 3.2.2 BSD Yes DAV support Sabre 3.2.2 BSD Yes DAV support
Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP
Symfony/var-dumper ??? MIT License Yes Library to make var dump (used by DebugBar)
Stripe 7.67.0 MIT Licence Yes Library for Stripe module Stripe 7.67.0 MIT Licence Yes Library for Stripe module
TCPDF 6.3.2 LGPL-3+ Yes PDF generation TCPDF 6.3.2 LGPL-3+ Yes PDF generation
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement

View File

@ -2,6 +2,13 @@
English Dolibarr ChangeLog English Dolibarr ChangeLog
-------------------------------------------------------------- --------------------------------------------------------------
***** ChangeLog for 17.0.0 compared to 16.0.0 *****
For developers or integrators:
------------------------------
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The signature of method getNomUrl() of class ProductFournisseur has been modified to match the signature of method Product
***** ChangeLog for 16.0.0 compared to 15.0.0 ***** ***** ChangeLog for 16.0.0 compared to 15.0.0 *****

File diff suppressed because one or more lines are too long

View File

@ -675,7 +675,7 @@ if (!empty($moreforfilter)) {
} }
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
if ($massactionbutton) { if ($massactionbutton) {
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1); $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
} }
@ -685,7 +685,13 @@ print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" :
// Line for filters fields // Line for filters fields
print '<tr class="liste_titre_filter">'; print '<tr class="liste_titre_filter">';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print '<td class="liste_titre middle">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
// Line numbering // Line numbering
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) { if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
@ -962,6 +968,19 @@ while ($i < min($num, $limit)) {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print '<td class="center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) { if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) {
print '<td class="center" data-key="id">'.$obj->rowid.'</td>'; print '<td class="center" data-key="id">'.$obj->rowid.'</td>';
if (!$i) { if (!$i) {

View File

@ -46,26 +46,26 @@ $error = 0;
*/ */
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) { if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} }
if (($action == 'update' && !GETPOST("cancel", 'alpha')) if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|| ($action == 'updateedit')) { || ($action == 'updateedit')) {
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NAME", GETPOST("nom", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NAME", GETPOST("nom", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ZIP", GETPOST("zipcode", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ZIP", GETPOST("zipcode", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOST("state_id", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOST("state_id", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_REGION", GETPOST("region_code", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_REGION", GETPOST("region_code", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_COUNTRY", GETPOST('country_id', 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_COUNTRY", GETPOST('country_id', 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_PHONE", GETPOST("tel", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_PHONE", GETPOST("tel", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_FAX", GETPOST("fax", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_FAX", GETPOST("fax", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_MAIL", GETPOST("mail", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_MAIL", GETPOST("mail", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_WEB", GETPOST("web", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_WEB", GETPOST("web", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_CODE", GETPOST("code", 'alphanohtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_CODE", GETPOST("code", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NOTE", GETPOST("note", 'restricthtml'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NOTE", GETPOST("note", 'restricthtml'), 'chaine', 0, '', $conf->entity);
if ($action != 'updateedit' && !$error) { if ($action != 'updateedit' && !$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
@ -74,6 +74,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
} }
} }
/* /*
* View * View
*/ */
@ -117,7 +118,7 @@ print '<input type="hidden" name="action" value="update">';
print '<table class="noborder centpercent editmode">'; print '<table class="noborder centpercent editmode">';
print '<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n"; print '<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
// Name // Name of Accountant Company
print '<tr class="oddeven"><td><label for="name">'.$langs->trans("CompanyName").'</label></td><td>'; print '<tr class="oddeven"><td><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
print '<input name="nom" id="name" class="minwidth200" value="'.dol_escape_htmltag(GETPOSTISSET('nom') ? GETPOST('nom', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_NAME) ? $conf->global->MAIN_INFO_ACCOUNTANT_NAME : '')).'"'.(empty($conf->global->MAIN_INFO_ACCOUNTANT_NAME) ? ' autofocus="autofocus"' : '').'></td></tr>'."\n"; print '<input name="nom" id="name" class="minwidth200" value="'.dol_escape_htmltag(GETPOSTISSET('nom') ? GETPOST('nom', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_NAME) ? $conf->global->MAIN_INFO_ACCOUNTANT_NAME : '')).'"'.(empty($conf->global->MAIN_INFO_ACCOUNTANT_NAME) ? ' autofocus="autofocus"' : '').'></td></tr>'."\n";
@ -125,9 +126,11 @@ print '<input name="nom" id="name" class="minwidth200" value="'.dol_escape_htmlt
print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>'; print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOSTISSET('address') ? GETPOST('address', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) ? $conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS : '')).'</textarea></td></tr>'."\n"; print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOSTISSET('address') ? GETPOST('address', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) ? $conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS : '')).'</textarea></td></tr>'."\n";
// ZIP
print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>'; print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'.dol_escape_htmltag(GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP) ? $conf->global->MAIN_INFO_ACCOUNTANT_ZIP : '')).'"></td></tr>'."\n"; print '<input class="minwidth100" name="zipcode" id="zipcode" value="'.dol_escape_htmltag(GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP) ? $conf->global->MAIN_INFO_ACCOUNTANT_ZIP : '')).'"></td></tr>'."\n";
// Town/City
print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>'; print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
print '<input name="town" class="minwidth100" id="town" value="'.dol_escape_htmltag(GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN) ? $conf->global->MAIN_INFO_ACCOUNTANT_TOWN : '')).'"></td></tr>'."\n"; print '<input name="town" class="minwidth100" id="town" value="'.dol_escape_htmltag(GETPOSTISSET('town') ? GETPOST('town', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN) ? $conf->global->MAIN_INFO_ACCOUNTANT_TOWN : '')).'"></td></tr>'."\n";
@ -140,21 +143,25 @@ if ($user->admin) {
} }
print '</td></tr>'."\n"; print '</td></tr>'."\n";
// State
print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">'; print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
print img_picto('', 'state', 'class="pictofixedwidth"'); print img_picto('', 'state', 'class="pictofixedwidth"');
print $formcompany->select_state((GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE) ? $conf->global->MAIN_INFO_ACCOUNTANT_STATE : '')), (GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY) ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'state_id'); print $formcompany->select_state((GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE) ? $conf->global->MAIN_INFO_ACCOUNTANT_STATE : '')), (GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY) ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'state_id');
print '</td></tr>'."\n"; print '</td></tr>'."\n";
// Telephone
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>'; print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
print img_picto('', 'object_phoning', '', false, 0, 0, '', 'pictofixedwidth'); print img_picto('', 'object_phoning', '', false, 0, 0, '', 'pictofixedwidth');
print '<input name="tel" id="phone" class="maxwidth150 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('tel') ? GETPOST('tel', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_PHONE) ? $conf->global->MAIN_INFO_ACCOUNTANT_PHONE : '')).'"></td></tr>'; print '<input name="tel" id="phone" class="maxwidth150 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('tel') ? GETPOST('tel', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_PHONE) ? $conf->global->MAIN_INFO_ACCOUNTANT_PHONE : '')).'"></td></tr>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
// Fax
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>'; print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'pictofixedwidth'); print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'pictofixedwidth');
print '<input name="fax" id="fax" class="maxwidth150 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('fax') ? GETPOST('fax', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_FAX) ? $conf->global->MAIN_INFO_ACCOUNTANT_FAX : '')).'"></td></tr>'; print '<input name="fax" id="fax" class="maxwidth150 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('fax') ? GETPOST('fax', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_FAX) ? $conf->global->MAIN_INFO_ACCOUNTANT_FAX : '')).'"></td></tr>';
print '</td></tr>'."\n"; print '</td></tr>'."\n";
// eMail
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>'; print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
print img_picto('', 'object_email', '', false, 0, 0, '', 'pictofixedwidth'); print img_picto('', 'object_email', '', false, 0, 0, '', 'pictofixedwidth');
print '<input name="mail" id="email" class="maxwidth300 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('mail') ? GETPOST('mail', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_MAIL) ? $conf->global->MAIN_INFO_ACCOUNTANT_MAIL : '')).'"></td></tr>'; print '<input name="mail" id="email" class="maxwidth300 widthcentpercentminusx" value="'.dol_escape_htmltag(GETPOSTISSET('mail') ? GETPOST('mail', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_MAIL) ? $conf->global->MAIN_INFO_ACCOUNTANT_MAIL : '')).'"></td></tr>';

View File

@ -55,6 +55,16 @@ if ($action == 'setbarcodeproducton') {
$res = dolibarr_del_const($db, "BARCODE_PRODUCT_ADDON_NUM", $conf->entity); $res = dolibarr_del_const($db, "BARCODE_PRODUCT_ADDON_NUM", $conf->entity);
} }
if ($action == 'setbarcodethirdpartyon') {
$barcodenumberingmodule = GETPOST('value', 'alpha');
$res = dolibarr_set_const($db, "BARCODE_THIRDPARTY_ADDON_NUM", $barcodenumberingmodule, 'chaine', 0, '', $conf->entity);
if ($barcodenumberingmodule == 'mod_barcode_thirdparty_standard' && empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK)) {
$res = dolibarr_set_const($db, "BARCODE_STANDARD_THIRDPARTY_MASK", '020{000000000}', 'chaine', 0, '', $conf->entity);
}
} elseif ($action == 'setbarcodethirdpartyoff') {
$res = dolibarr_del_const($db, "BARCODE_THIRDPARTY_ADDON_NUM", $conf->entity);
}
if ($action == 'setcoder') { if ($action == 'setcoder') {
$coder = GETPOST('coder', 'alpha'); $coder = GETPOST('coder', 'alpha');
$code_id = GETPOST('code_id', 'int'); $code_id = GETPOST('code_id', 'int');
@ -241,6 +251,66 @@ if ($conf->product->enabled) {
print '</div>'; print '</div>';
} }
// Select barcode numbering module
if ($conf->societe->enabled) {
print load_fiche_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("ThirdParty").")", '', '');
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td width="140">'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Example").'</td>';
print '<td class="center" width="80">'.$langs->trans("Status").'</td>';
print '<td class="center" width="60">'.$langs->trans("ShortInfo").'</td>';
print "</tr>\n";
$dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
foreach ($dirbarcodenum as $dirroot) {
$dir = dol_buildpath($dirroot, 0);
$handle = @opendir($dir);
if (is_resource($handle)) {
while (($file = readdir($handle)) !== false) {
if (preg_match('/^mod_barcode_thirdparty_.*php$/', $file)) {
$file = substr($file, 0, dol_strlen($file) - 4);
try {
dol_include_once($dirroot.$file.'.php');
} catch (Exception $e) {
dol_syslog($e->getMessage(), LOG_ERR);
}
$modBarCode = new $file();
print '<tr class="oddeven">';
print '<td>'.(isset($modBarCode->name) ? $modBarCode->name : $modBarCode->nom)."</td><td>\n";
print $modBarCode->info($langs);
print '</td>';
print '<td class="nowrap">'.$modBarCode->getExample($langs)."</td>\n";
if (!empty($conf->global->BARCODE_THIRDPARTY_ADDON_NUM) && $conf->global->BARCODE_THIRDPARTY_ADDON_NUM == "$file") {
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodethirdpartyoff&token='.newToken().'&amp;value='.urlencode($file).'">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setbarcodethirdpartyon&token='.newToken().'&amp;value='.urlencode($file).'">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '<td class="center">';
$s = $modBarCode->getToolTip($langs, null, -1);
print $form->textwithpicto('', $s, 1);
print '</td>';
print "</tr>\n";
}
}
closedir($handle);
}
}
print "</table>\n";
print '</div>';
}
/* /*
* CHOIX ENCODAGE * CHOIX ENCODAGE

View File

@ -104,6 +104,16 @@ if ($action == 'update') {
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if (GETPOSTISSET('THEME_DARKMODEENABLED')) {
$val = GETPOST('THEME_DARKMODEENABLED');
if (!$val) {
dolibarr_del_const($db, "THEME_DARKMODEENABLED", $conf->entity);
}
if ($val) {
dolibarr_set_const($db, "THEME_DARKMODEENABLED", $val, 'chaine', 0, '', $conf->entity);
}
}
if (GETPOSTISSET('THEME_TOPMENU_DISABLE_IMAGE')) { if (GETPOSTISSET('THEME_TOPMENU_DISABLE_IMAGE')) {
$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE'); $val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
if (!$val) { if (!$val) {
@ -646,7 +656,7 @@ if ($mode == 'login') {
print '(' . $langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND") . ') '; print '(' . $langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND") . ') ';
} }
if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) { if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) {
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=removebackgroundlogin">' . img_delete($langs->trans("Delete")) . '</a>'; print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=removebackgroundlogin&token='.newToken().'&mode=login">' . img_delete($langs->trans("Delete")) . '</a>';
if (file_exists($conf->mycompany->dir_output . '/logos/' . $conf->global->MAIN_LOGIN_BACKGROUND)) { if (file_exists($conf->mycompany->dir_output . '/logos/' . $conf->global->MAIN_LOGIN_BACKGROUND)) {
print ' &nbsp; '; print ' &nbsp; ';
print '<img class="paddingleft valignmiddle" width="100" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&amp;file=' . urlencode('logos/' . $conf->global->MAIN_LOGIN_BACKGROUND) . '">'; print '<img class="paddingleft valignmiddle" width="100" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&amp;file=' . urlencode('logos/' . $conf->global->MAIN_LOGIN_BACKGROUND) . '">';

View File

@ -35,7 +35,8 @@ $month = dol_print_date($now, '%m');
$day = dol_print_date($now, '%d'); $day = dol_print_date($now, '%d');
$forbarcode = GETPOST('forbarcode'); $forbarcode = GETPOST('forbarcode');
$fk_barcode_type = GETPOST('fk_barcode_type'); $fk_barcode_type = GETPOST('fk_barcode_type');
$eraseallbarcode = GETPOST('eraseallbarcode'); $eraseallproductbarcode = GETPOST('eraseallproductbarcode');
$eraseallthirdpartybarcode = GETPOST('eraseallthirdpartybarcode');
$action = GETPOST('action', 'aZ09'); $action = GETPOST('action', 'aZ09');
@ -43,6 +44,7 @@ $producttmp = new Product($db);
$thirdpartytmp = new Societe($db); $thirdpartytmp = new Societe($db);
$modBarCodeProduct = ''; $modBarCodeProduct = '';
$modBarCodeThirdparty = '';
$maxperinit = 1000; $maxperinit = 1000;
@ -51,6 +53,106 @@ $maxperinit = 1000;
* Actions * Actions
*/ */
// Define barcode template for third-party
if (!empty($conf->global->BARCODE_THIRDPARTY_ADDON_NUM)) {
$dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
foreach ($dirbarcodenum as $dirroot) {
$dir = dol_buildpath($dirroot, 0);
$handle = @opendir($dir);
if (is_resource($handle)) {
while (($file = readdir($handle)) !== false) {
if (preg_match('/^mod_barcode_thirdparty_.*php$/', $file)) {
$file = substr($file, 0, dol_strlen($file) - 4);
try {
dol_include_once($dirroot.$file.'.php');
} catch (Exception $e) {
dol_syslog($e->getMessage(), LOG_ERR);
}
$modBarCodeThirdparty = new $file();
break;
}
}
closedir($handle);
}
}
}
if ($action == 'initbarcodethirdparties') {
if (!is_object($modBarCodeThirdparty)) {
$error++;
setEventMessages($langs->trans("NoBarcodeNumberingTemplateDefined"), null, 'errors');
}
if (!$error) {
$thirdpartystatic = new Societe($db);
$db->begin();
$nbok = 0;
if (!empty($eraseallthirdpartybarcode)) {
$sql = "UPDATE ".MAIN_DB_PREFIX."societe";
$sql .= " SET barcode = NULL";
$resql = $db->query($sql);
if ($resql) {
setEventMessages($langs->trans("AllBarcodeReset"), null, 'mesgs');
} else {
$error++;
dol_print_error($db);
}
} else {
$sql = "SELECT rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."societe";
$sql .= " WHERE barcode IS NULL or barcode = ''";
$sql .= $db->order("datec", "ASC");
$sql .= $db->plimit($maxperinit);
dol_syslog("codeinit", LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0; $nbok = $nbtry = 0;
while ($i < min($num, $maxperinit)) {
$obj = $db->fetch_object($resql);
if ($obj) {
$thirdpartystatic->id = $obj->rowid;
$nextvalue = $modBarCodeThirdparty->getNextValue($thirdpartystatic, '');
$result = $thirdpartystatic->setValueFrom('barcode', $nextvalue, '', '', 'text', '', $user, 'THIRDPARTY_MODIFY');
$nbtry++;
if ($result > 0) {
$nbok++;
}
}
$i++;
}
} else {
$error++;
dol_print_error($db);
}
if (!$error) {
setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
}
}
if (!$error) {
//$db->rollback();
$db->commit();
} else {
$db->rollback();
}
}
$action = '';
}
// Define barcode template for products // Define barcode template for products
if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) { if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) {
$dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); $dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']);
@ -91,7 +193,7 @@ if ($action == 'initbarcodeproducts') {
$db->begin(); $db->begin();
$nbok = 0; $nbok = 0;
if (!empty($eraseallbarcode)) { if (!empty($eraseallproductbarcode)) {
$sql = "UPDATE ".MAIN_DB_PREFIX."product"; $sql = "UPDATE ".MAIN_DB_PREFIX."product";
$sql .= " SET barcode = NULL"; $sql .= " SET barcode = NULL";
$resql = $db->query($sql); $resql = $db->query($sql);
@ -155,7 +257,6 @@ if ($action == 'initbarcodeproducts') {
} }
/* /*
* View * View
*/ */
@ -180,16 +281,25 @@ print '<br>';
//print img_picto('','puce').' '.$langs->trans("PrintsheetForOneBarCode").'<br>'; //print img_picto('','puce').' '.$langs->trans("PrintsheetForOneBarCode").'<br>';
//print '<br>'; //print '<br>';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="mode" value="label">';
print '<input type="hidden" name="action" value="initbarcodeproducts">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<br>'; print '<br>';
// Example 1 : Adding jquery code
print '<script type="text/javascript">
function confirm_erase() {
return confirm("'.dol_escape_js($langs->trans("ConfirmEraseAllCurrentBarCode")).'");
}
</script>';
// For thirdparty // For thirdparty
if (isModEnabled('societe')) { if (isModEnabled('societe')) {
$nbno = $nbtotal = 0; print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="mode" value="label">';
print '<input type="hidden" name="action" value="initbarcodethirdparties">';
print '<input type="hidden" name="token" value="'.newToken().'">';
$nbthirdpartyno = $nbthirdpartytotal = 0;
print load_fiche_titre($langs->trans("BarcodeInitForThirdparties"), '', 'company'); print load_fiche_titre($langs->trans("BarcodeInitForThirdparties"), '', 'company');
@ -198,7 +308,7 @@ if (isModEnabled('societe')) {
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) { if ($resql) {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
$nbno = $obj->nb; $nbthirdpartyno = $obj->nb;
} else { } else {
dol_print_error($db); dol_print_error($db);
} }
@ -207,30 +317,47 @@ if (isModEnabled('societe')) {
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) { if ($resql) {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
$nbtotal = $obj->nb; $nbthirdpartytotal = $obj->nb;
} else { } else {
dol_print_error($db); dol_print_error($db);
} }
print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("ThirdParties")).'<br>'."\n"; print $langs->trans("CurrentlyNWithoutBarCode", $nbthirdpartyno, $nbthirdpartytotal, $langs->transnoentitiesnoconv("ThirdParties")).'<br>'."\n";
print '<br><input class="button button-add" type="submit" id="submitformbarcodethirdpartygen" '.((GETPOST("selectorforbarcode") && GETPOST("selectorforbarcode")) ? '' : 'disabled ').'value="'.$langs->trans("InitEmptyBarCode", $nbno).'"'; $disabledthirdparty = $disabledthirdparty1 = 0;
print ' title="'.dol_escape_htmltag($langs->trans("FeatureNotYetAvailable")).'" disabled';
print '>'; if (is_object($modBarCodeThirdparty)) {
print $langs->trans("BarCodeNumberManager").": ";
$objthirdparty = new Societe($db);
print '<b>'.(isset($modBarCodeThirdparty->name) ? $modBarCodeThirdparty->name : $modBarCodeThirdparty->nom).'</b> - '.$langs->trans("NextValue").': <b>'.$modBarCodeThirdparty->getNextValue($objthirdparty).'</b><br>';
$disabledthirdparty = 0;
} else {
$disabledthirdparty = 1;
$titleno = $langs->trans("NoBarcodeNumberingTemplateDefined");
print '<span class="warning">'.$langs->trans("NoBarcodeNumberingTemplateDefined").'</span> (<a href="'.DOL_URL_ROOT.'/admin/barcode.php">'.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").'</a>)<br>';
}
if (empty($nbthirdpartyno)) {
$disabledthirdparty1 = 1;
}
$moretagsthirdparty1 = (($disabledthirdparty || $disabledthirdparty1) ? ' disabled title="'.dol_escape_htmltag($titleno).'"' : '');
print '<br><input class="button button-add" type="submit" id="submitformbarcodethirdpartygen" value="'.$langs->trans("InitEmptyBarCode", $nbno).'"'.$moretagsthirdparty1.'>';
$moretagsthirdparty2 = (($nbthirdpartyno == $nbthirdpartytotal) ? ' disabled' : '');
print ' &nbsp; ';
print '<input type="submit" class="button butActionDelete" name="eraseallthirdpartybarcode" id="eraseallthirdpartybarcode" value="'.$langs->trans("EraseAllCurrentBarCode").'"'.$moretagsthirdparty2.' onClick="return confirm_erase();">';
print '<br><br><br><br>'; print '<br><br><br><br>';
print '</form>';
} }
// For products // For products
if ($conf->product->enabled || $conf->product->service) { if ($conf->product->enabled || $conf->product->service) {
// Example 1 : Adding jquery code print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<script type="text/javascript"> print '<input type="hidden" name="mode" value="label">';
function confirm_erase() { print '<input type="hidden" name="action" value="initbarcodeproducts">';
return confirm("'.dol_escape_js($langs->trans("ConfirmEraseAllCurrentBarCode")).'"); print '<input type="hidden" name="token" value="'.newToken().'">';
}
</script>';
$nbno = $nbtotal = 0; $nbproductno = $nbproducttotal = 0;
print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"), '', 'product'); print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"), '', 'product');
print '<br>'."\n"; print '<br>'."\n";
@ -247,7 +374,7 @@ if ($conf->product->enabled || $conf->product->service) {
$i = 0; $i = 0;
while ($i < $num) { while ($i < $num) {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
$nbno += $obj->nb; $nbproductno += $obj->nb;
$i++; $i++;
} }
@ -259,35 +386,38 @@ if ($conf->product->enabled || $conf->product->service) {
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) { if ($resql) {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
$nbtotal = $obj->nb; $nbproducttotal = $obj->nb;
} else { } else {
dol_print_error($db); dol_print_error($db);
} }
print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("ProductsOrServices")).'<br>'."\n"; print $langs->trans("CurrentlyNWithoutBarCode", $nbproductno, $nbproducttotal, $langs->transnoentitiesnoconv("ProductsOrServices")).'<br>'."\n";
$disabledproduct = $disabledproduct1 = 0;
if (is_object($modBarCodeProduct)) { if (is_object($modBarCodeProduct)) {
print $langs->trans("BarCodeNumberManager").": "; print $langs->trans("BarCodeNumberManager").": ";
$objproduct = new Product($db); $objproduct = new Product($db);
print '<b>'.(isset($modBarCodeProduct->name) ? $modBarCodeProduct->name : $modBarCodeProduct->nom).'</b> - '.$langs->trans("NextValue").': <b>'.$modBarCodeProduct->getNextValue($objproduct).'</b><br>'; print '<b>'.(isset($modBarCodeProduct->name) ? $modBarCodeProduct->name : $modBarCodeProduct->nom).'</b> - '.$langs->trans("NextValue").': <b>'.$modBarCodeProduct->getNextValue($objproduct).'</b><br>';
$disabled = 0; $disabledproduct = 0;
} else { } else {
$disabled = 1; $disabledproduct = 1;
$titleno = $langs->trans("NoBarcodeNumberingTemplateDefined"); $titleno = $langs->trans("NoBarcodeNumberingTemplateDefined");
print '<span class="warning">'.$langs->trans("NoBarcodeNumberingTemplateDefined").'</span> (<a href="'.DOL_URL_ROOT.'/admin/barcode.php">'.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").'</a>)<br>'; print '<span class="warning">'.$langs->trans("NoBarcodeNumberingTemplateDefined").'</span> (<a href="'.DOL_URL_ROOT.'/admin/barcode.php">'.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").'</a>)<br>';
} }
if (empty($nbno)) { if (empty($nbproductno)) {
$disabled1 = 1; $disabledproduct1 = 1;
} }
print '<br>'; print '<br>';
//print '<input type="checkbox" id="erasealreadyset" name="erasealreadyset"> '.$langs->trans("ResetBarcodeForAllRecords").'<br>'; //print '<input type="checkbox" id="erasealreadyset" name="erasealreadyset"> '.$langs->trans("ResetBarcodeForAllRecords").'<br>';
$moretags1 = (($disabled || $disabled1) ? ' disabled title="'.dol_escape_htmltag($titleno).'"' : ''); $moretagsproduct1 = (($disabledproduct || $disabledproduct1) ? ' disabled title="'.dol_escape_htmltag($titleno).'"' : '');
print '<input type="submit" class="button" name="submitformbarcodeproductgen" id="submitformbarcodeproductgen" value="'.$langs->trans("InitEmptyBarCode", min($maxperinit, $nbno)).'"'.$moretags1.'>'; print '<input type="submit" class="button" name="submitformbarcodeproductgen" id="submitformbarcodeproductgen" value="'.$langs->trans("InitEmptyBarCode", min($maxperinit, $nbno)).'"'.$moretagsproduct1.'>';
$moretags2 = (($nbno == $nbtotal) ? ' disabled' : ''); $moretagsproduct2 = (($nbproductno == $nbproducttotal) ? ' disabled' : '');
print ' &nbsp; '; print ' &nbsp; ';
print '<input type="submit" class="button butActionDelete" name="eraseallbarcode" id="eraseallbarcode" value="'.$langs->trans("EraseAllCurrentBarCode").'"'.$moretags2.' onClick="return confirm_erase();">'; print '<input type="submit" class="button butActionDelete" name="eraseallproductbarcode" id="eraseallproductbarcode" value="'.$langs->trans("EraseAllCurrentBarCode").'"'.$moretagsproduct2.' onClick="return confirm_erase();">';
print '<br><br><br><br>'; print '<br><br><br><br>';
print '</form>';
} }
@ -297,7 +427,6 @@ print $langs->trans("ClickHereToGoTo").' : <a href="'.DOL_URL_ROOT.'/barcode/pri
print '</form>';
print '<br>'; print '<br>';
// End of page // End of page

View File

@ -1526,8 +1526,12 @@ if (!empty($conf->project->enabled)) {
$formproject = new FormProjets($db); $formproject = new FormProjets($db);
} }
$title = $langs->trans('Proposal')." - ".$langs->trans('Card'); $title = $object->ref." - ".$langs->trans('Card');
if ($action == 'create') {
$title = $langs->trans("NewPropal");
}
$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos|DE:Modul_Angebote'; $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos|DE:Modul_Angebote';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
$now = dol_now(); $now = dol_now();

View File

@ -1444,7 +1444,7 @@ class Propal extends CommonObject
// Clear fields // Clear fields
$object->user_author = $user->id; $object->user_author = $user->id;
$object->user_valid = ''; $object->user_valid = 0;
$object->date = $now; $object->date = $now;
$object->datep = $now; // deprecated $object->datep = $now; // deprecated
$object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600); $object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600);
@ -2614,8 +2614,22 @@ class Propal extends CommonObject
$newprivatenote = dol_concatdesc($this->note_private, $note); $newprivatenote = dol_concatdesc($this->note_private, $note);
if (empty($conf->global->PROPALE_KEEP_OLD_SIGNATURE_INFO)) {
$date_signature = $now;
$fk_user_signature = $user->id;
} else {
$this->info($this->id);
if (!isset($this->date_signature) || $this->date_signature == '') {
$date_signature = $now;
$fk_user_signature = $user->id;
} else {
$date_signature = $this->date_signature;
$fk_user_signature = $this->user_signature->id;
}
}
$sql = "UPDATE ".MAIN_DB_PREFIX."propal"; $sql = "UPDATE ".MAIN_DB_PREFIX."propal";
$sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."', date_signature='".$this->db->idate($now)."', fk_user_signature=".$user->id; $sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."', date_signature='".$this->db->idate($date_signature)."', fk_user_signature=".$fk_user_signature;
$sql .= " WHERE rowid = ".((int) $this->id); $sql .= " WHERE rowid = ".((int) $this->id);
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
@ -2662,7 +2676,7 @@ class Propal extends CommonObject
$this->oldcopy= clone $this; $this->oldcopy= clone $this;
$this->statut = $status; $this->statut = $status;
$this->status = $status; $this->status = $status;
$this->date_signature = $now; $this->date_signature = $date_signature;
$this->note_private = $newprivatenote; $this->note_private = $newprivatenote;
} }

View File

@ -112,8 +112,9 @@ if ($action == 'addcontact' && $user->rights->propale->creer) {
/* /*
* View * View
*/ */
$title = $langs->trans('Proposal')." - ".$langs->trans('ContactsAddresses'); $title = $object->ref." - ".$langs->trans('ContactsAddresses');
$help_url = "EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos"; $help_url = "EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos";
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
$form = new Form($db); $form = new Form($db);

View File

@ -104,7 +104,7 @@ if ($object->id > 0) {
/* /*
* View * View
*/ */
$title = $langs->trans('Proposal')." - ".$langs->trans('Documents'); $title = $object->ref." - ".$langs->trans('Documents');
$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);

View File

@ -59,7 +59,7 @@ restrictedArea($user, 'propal', $object->id);
$form = new Form($db); $form = new Form($db);
$title = $langs->trans('Proposal')." - ".$langs->trans('Info'); $title = $object->ref." - ".$langs->trans('Info');
$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);

View File

@ -520,8 +520,9 @@ $companystatic = new Societe($db);
$projectstatic = new Project($db); $projectstatic = new Project($db);
$formcompany = new FormCompany($db); $formcompany = new FormCompany($db);
$title = $langs->trans('ListOfProposals');
$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos';
//llxHeader('',$langs->trans('Proposal'),$help_url); llxHeader('', $title, $help_url);
$sql = 'SELECT'; $sql = 'SELECT';
if ($sall || $search_product_category > 0 || $search_user > 0) { if ($sall || $search_product_category > 0 || $search_user > 0) {
@ -786,8 +787,6 @@ if ($resql) {
exit; exit;
} }
llxHeader('', $langs->trans('Proposal'), $help_url);
$param = '&search_status='.urlencode($search_status); $param = '&search_status='.urlencode($search_status);
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage); $param .= '&contextpage='.urlencode($contextpage);
@ -1096,13 +1095,22 @@ if ($resql) {
} }
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
print '<tr class="liste_titre_filter">'; print '<tr class="liste_titre_filter">';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print '<td class="liste_titre" align="middle">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
if (!empty($arrayfields['p.ref']['checked'])) { if (!empty($arrayfields['p.ref']['checked'])) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">'; print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
@ -1365,16 +1373,20 @@ if ($resql) {
print '</td>'; print '</td>';
} }
// Action column // Action column
print '<td class="liste_titre" align="middle">'; if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
$searchpicto = $form->showFilterButtons(); print '<td class="liste_titre" align="middle">';
print $searchpicto; $searchpicto = $form->showFilterButtons();
print '</td>'; print $searchpicto;
print '</td>';
}
print "</tr>\n"; print "</tr>\n";
// Fields title // Fields title
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
}
if (!empty($arrayfields['p.ref']['checked'])) { if (!empty($arrayfields['p.ref']['checked'])) {
print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder);
} }
@ -1527,7 +1539,9 @@ if ($resql) {
if (!empty($arrayfields['p.fk_statut']['checked'])) { if (!empty($arrayfields['p.fk_statut']['checked'])) {
print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, 'class="right"', $sortfield, $sortorder);
} }
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
}
print '</tr>'."\n"; print '</tr>'."\n";
$now = dol_now(); $now = dol_now();
@ -1608,6 +1622,19 @@ if ($resql) {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print '<td class="nowrap" align="center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
if (!empty($arrayfields['p.ref']['checked'])) { if (!empty($arrayfields['p.ref']['checked'])) {
print '<td class="nowraponall">'; print '<td class="nowraponall">';
@ -2120,15 +2147,17 @@ if ($resql) {
} }
} }
// Action column // Action column
print '<td class="nowrap" align="center">'; if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined print '<td class="nowrap" align="center">';
$selected = 0; if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
if (in_array($obj->rowid, $arrayofselected)) { $selected = 0;
$selected = 1; if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
} }
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; print '</td>';
} }
print '</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }

View File

@ -81,8 +81,9 @@ if (empty($reshook)) {
$form = new Form($db); $form = new Form($db);
$title = $langs->trans('Proposal')." - ".$langs->trans('Notes'); $title = $object->ref." - ".$langs->trans('Notes');
$help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
if ($object->id > 0) { if ($object->id > 0) {

View File

@ -425,12 +425,12 @@ if ($socid > 0) {
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>'; print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td class="right">'.$langs->trans("AmountHT").'</td>'; print '<td class="right">'.$langs->trans("AmountHT").'</td>';
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>'; print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountHT")).'">'.$langs->trans("MulticurrencyAmountHT").'</td>';
} }
print '<td class="right">'.$langs->trans("VATRate").'</td>'; print '<td class="right">'.$langs->trans("VATRate").'</td>';
print '<td class="right">'.$langs->trans("AmountTTC").'</td>'; print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>'; print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountTTC")).'">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
} }
print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>'; print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>';
print '<td width="50">&nbsp;</td>'; print '<td width="50">&nbsp;</td>';
@ -563,12 +563,12 @@ if ($socid > 0) {
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>'; print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td class="right">'.$langs->trans("AmountHT").'</td>'; print '<td class="right">'.$langs->trans("AmountHT").'</td>';
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>'; print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountHT")).'">'.$langs->trans("MulticurrencyAmountHT").'</td>';
} }
print '<td class="right">'.$langs->trans("VATRate").'</td>'; print '<td class="right">'.$langs->trans("VATRate").'</td>';
print '<td class="right">'.$langs->trans("AmountTTC").'</td>'; print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>'; print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountTTC")).'">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
} }
print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>'; print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>';
print '<td width="50">&nbsp;</td>'; print '<td width="50">&nbsp;</td>';
@ -736,12 +736,12 @@ if ($socid > 0) {
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>'; print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td class="right">'.$langs->trans("AmountHT").'</td>'; print '<td class="right">'.$langs->trans("AmountHT").'</td>';
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>'; print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountHT")).'">'.$langs->trans("MulticurrencyAmountHT").'</td>';
} }
print '<td class="right">'.$langs->trans("VATRate").'</td>'; print '<td class="right">'.$langs->trans("VATRate").'</td>';
print '<td class="right">'.$langs->trans("AmountTTC").'</td>'; print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>'; print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountTTC")).'">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
} }
print '<td width="100" class="center">'.$langs->trans("Author").'</td>'; print '<td width="100" class="center">'.$langs->trans("Author").'</td>';
print '<td width="50">&nbsp;</td>'; print '<td width="50">&nbsp;</td>';
@ -897,12 +897,12 @@ if ($socid > 0) {
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>'; print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td class="right">'.$langs->trans("AmountHT").'</td>'; print '<td class="right">'.$langs->trans("AmountHT").'</td>';
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>'; print '<td class="right toverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountHT")).'">'.$langs->trans("MulticurrencyAmountHT").'</td>';
} }
print '<td class="right">'.$langs->trans("VATRate").'</td>'; print '<td class="right">'.$langs->trans("VATRate").'</td>';
print '<td class="right">'.$langs->trans("AmountTTC").'</td>'; print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>'; print '<td class="right tdoverflowmax125" title="'.dol_escape_htmltag($langs->trans("MulticurrencyAmountTTC")).'">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
} }
print '<td width="100" class="center">'.$langs->trans("Author").'</td>'; print '<td width="100" class="center">'.$langs->trans("Author").'</td>';
print '<td width="50">&nbsp;</td>'; print '<td width="50">&nbsp;</td>';

View File

@ -1484,8 +1484,12 @@ if (empty($reshook)) {
* View * View
*/ */
$title = $langs->trans('Order')." - ".$langs->trans('Card'); $title = $object->ref." - ".$langs->trans('Card');
if ($action == 'create') {
$title = $langs->trans("NewOrder");
}
$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
$form = new Form($db); $form = new Form($db);

View File

@ -507,7 +507,7 @@ class Commande extends CommonOrder
$sql .= " SET ref = '".$this->db->escape($num)."',"; $sql .= " SET ref = '".$this->db->escape($num)."',";
$sql .= " fk_statut = ".self::STATUS_VALIDATED.","; $sql .= " fk_statut = ".self::STATUS_VALIDATED.",";
$sql .= " date_valid='".$this->db->idate($now)."',"; $sql .= " date_valid='".$this->db->idate($now)."',";
$sql .= " fk_user_valid = ".((int) $user->id).","; $sql .= " fk_user_valid = ".($user->id > 0 ? (int) $user->id : "null").",";
$sql .= " fk_user_modif = ".((int) $user->id); $sql .= " fk_user_modif = ".((int) $user->id);
$sql .= " WHERE rowid = ".((int) $this->id); $sql .= " WHERE rowid = ".((int) $this->id);
@ -1234,7 +1234,8 @@ class Commande extends CommonOrder
// Clear fields // Clear fields
$this->user_author_id = $user->id; $this->user_author_id = $user->id;
$this->user_valid = ''; $this->user_valid = 0; // deprecated
$this->user_validation_id = 0;
$this->date = dol_now(); $this->date = dol_now();
$this->date_commande = dol_now(); $this->date_commande = dol_now();
$this->date_creation = ''; $this->date_creation = '';
@ -1884,7 +1885,7 @@ class Commande extends CommonOrder
$this->user_author_id = $obj->fk_user_author; $this->user_author_id = $obj->fk_user_author;
$this->user_creation_id = $obj->fk_user_author; $this->user_creation_id = $obj->fk_user_author;
$this->user_validation_id = $obj->fk_user_valid; $this->user_validation_id = $obj->fk_user_valid;
$this->user_valid = $obj->fk_user_valid; $this->user_valid = $obj->fk_user_valid; // deprecated
$this->user_modification_id = $obj->fk_user_modif; $this->user_modification_id = $obj->fk_user_modif;
$this->user_modification = $obj->fk_user_modif; $this->user_modification = $obj->fk_user_modif;
$this->total_ht = $obj->total_ht; $this->total_ht = $obj->total_ht;
@ -3351,7 +3352,7 @@ class Commande extends CommonOrder
$sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").","; $sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").",";
$sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").","; $sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").",";
$sql .= " fk_user_author=".(isset($this->user_author_id) ? $this->user_author_id : "null").","; $sql .= " fk_user_author=".(isset($this->user_author_id) ? $this->user_author_id : "null").",";
$sql .= " fk_user_valid=".(isset($this->user_valid) ? $this->user_valid : "null").","; $sql .= " fk_user_valid=".((isset($this->user_valid) && $this->user_valid > 0) ? $this->user_valid : "null").",";
$sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").","; $sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").",";
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").","; $sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").",";
$sql .= " deposit_percent=".(! empty($this->deposit_percent) ? strval($this->deposit_percent) : "null").","; $sql .= " deposit_percent=".(! empty($this->deposit_percent) ? strval($this->deposit_percent) : "null").",";
@ -3840,21 +3841,13 @@ class Commande extends CommonOrder
$obj = $this->db->fetch_object($result); $obj = $this->db->fetch_object($result);
$this->id = $obj->rowid; $this->id = $obj->rowid;
if ($obj->fk_user_author) { if ($obj->fk_user_author) {
$cuser = new User($this->db); $this->user_creation_id = $obj->fk_user_author;
$cuser->fetch($obj->fk_user_author);
$this->user_creation = $cuser;
} }
if ($obj->fk_user_valid) { if ($obj->fk_user_valid) {
$vuser = new User($this->db); $this->user_validation_id = $obj->fk_user_valid;
$vuser->fetch($obj->fk_user_valid);
$this->user_validation = $vuser;
} }
if ($obj->fk_user_cloture) { if ($obj->fk_user_cloture) {
$cluser = new User($this->db); $this->user_closing_id = $obj->fk_user_cloture;
$cluser->fetch($obj->fk_user_cloture);
$this->user_cloture = $cluser;
} }
$this->date_creation = $this->db->jdate($obj->datec); $this->date_creation = $this->db->jdate($obj->datec);

View File

@ -96,10 +96,6 @@ if ($action == 'addcontact' && $user->rights->commande->creer) {
/* /*
* View * View
*/ */
$title = $langs->trans('Order')." - ".$langs->trans('ContactsAddresses');
$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge';
llxHeader('', $title, $help_url);
$form = new Form($db); $form = new Form($db);
$formcompany = new FormCompany($db); $formcompany = new FormCompany($db);
$formother = new FormOther($db); $formother = new FormOther($db);
@ -117,6 +113,10 @@ if ($id > 0 || !empty($ref)) {
if ($object->fetch($id, $ref) > 0) { if ($object->fetch($id, $ref) > 0) {
$object->fetch_thirdparty(); $object->fetch_thirdparty();
$title = $object->ref." - ".$langs->trans('ContactsAddresses');
$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge';
llxHeader('', $title, $help_url);
$head = commande_prepare_head($object); $head = commande_prepare_head($object);
print dol_get_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), -1, 'order'); print dol_get_fiche_head($head, 'contact', $langs->trans("CustomerOrder"), -1, 'order');

View File

@ -96,7 +96,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
/* /*
* View * View
*/ */
$title = $langs->trans('Order')." - ".$langs->trans('Documents'); $title = $object->ref." - ".$langs->trans('Documents');
$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);

View File

@ -1374,7 +1374,7 @@ if ($resql) {
} }
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1); $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
if (GETPOST('autoselectall', 'int')) { if (GETPOST('autoselectall', 'int')) {
@ -1391,6 +1391,14 @@ if ($resql) {
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
print '<tr class="liste_titre_filter">'; print '<tr class="liste_titre_filter">';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print '<td class="liste_titre" align="middle">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
// Ref // Ref
if (!empty($arrayfields['c.ref']['checked'])) { if (!empty($arrayfields['c.ref']['checked'])) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
@ -1643,15 +1651,20 @@ if ($resql) {
print '</td>'; print '</td>';
} }
// Action column // Action column
print '<td class="liste_titre" align="middle">'; if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
$searchpicto = $form->showFilterButtons(); print '<td class="liste_titre" align="middle">';
print $searchpicto; $searchpicto = $form->showFilterButtons();
print '</td>'; print $searchpicto;
print '</td>';
}
print "</tr>\n"; print "</tr>\n";
// Fields title // Fields title
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center ');
}
if (!empty($arrayfields['c.ref']['checked'])) { if (!empty($arrayfields['c.ref']['checked'])) {
print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], 'c.ref', '', $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], 'c.ref', '', $param, '', $sortfield, $sortorder);
} }
@ -1794,7 +1807,9 @@ if ($resql) {
if (!empty($arrayfields['c.fk_statut']['checked'])) { if (!empty($arrayfields['c.fk_statut']['checked'])) {
print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, '', $sortfield, $sortorder, 'center ');
} }
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center '); if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center ');
}
print '</tr>'."\n"; print '</tr>'."\n";
$total = 0; $total = 0;
@ -1875,6 +1890,18 @@ if ($resql) {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
}
// Ref // Ref
if (!empty($arrayfields['c.ref']['checked'])) { if (!empty($arrayfields['c.ref']['checked'])) {
print '<td class="nowraponall">'; print '<td class="nowraponall">';
@ -2438,13 +2465,15 @@ if ($resql) {
} }
// Action column // Action column
print '<td class="nowrap center">'; if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined print '<td class="nowrap center">';
$selected = 0; if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
if (in_array($obj->rowid, $arrayofselected)) { $selected = 0;
$selected = 1; if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
} }
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
} }
print '</td>'; print '</td>';
if (!$i) { if (!$i) {

View File

@ -77,7 +77,7 @@ if (empty($reshook)) {
/* /*
* View * View
*/ */
$title = $langs->trans('Order')." - ".$langs->trans('Notes'); $title = $object->ref." - ".$langs->trans('Notes');
$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);

View File

@ -47,6 +47,11 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php';
if (!empty($conf->project->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
}
// Constant to define payment sens // Constant to define payment sens
const PAY_DEBIT = 0; const PAY_DEBIT = 0;
const PAY_CREDIT = 1; const PAY_CREDIT = 1;
@ -64,6 +69,7 @@ $date_stopMonth = GETPOST('date_stopmonth', 'int');
$date_stopYear = GETPOST('date_stopyear', 'int'); $date_stopYear = GETPOST('date_stopyear', 'int');
$date_stop = dol_mktime(23, 59, 59, $date_stopMonth, $date_stopDay, $date_stopYear, 'tzuserrel'); $date_stop = dol_mktime(23, 59, 59, $date_stopMonth, $date_stopDay, $date_stopYear, 'tzuserrel');
$action = GETPOST('action', 'aZ09'); $action = GETPOST('action', 'aZ09');
$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : 0);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('comptafileslist', 'globallist')); $hookmanager->initHooks(array('comptafileslist', 'globallist'));
@ -175,6 +181,7 @@ if (($action == 'searchfiles' || $action == 'dl')) {
$sql .= " WHERE datef between ".$wheretail; $sql .= " WHERE datef between ".$wheretail;
$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
$sql .= " AND t.fk_statut <> ".Facture::STATUS_DRAFT; $sql .= " AND t.fk_statut <> ".Facture::STATUS_DRAFT;
if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
} }
// Vendor invoices // Vendor invoices
if (GETPOST('selectsupplierinvoices') && !empty($listofchoices['selectsupplierinvoices']['perms'])) { if (GETPOST('selectsupplierinvoices') && !empty($listofchoices['selectsupplierinvoices']['perms'])) {
@ -186,9 +193,10 @@ if (($action == 'searchfiles' || $action == 'dl')) {
$sql .= " WHERE datef between ".$wheretail; $sql .= " WHERE datef between ".$wheretail;
$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
$sql .= " AND t.fk_statut <> ".FactureFournisseur::STATUS_DRAFT; $sql .= " AND t.fk_statut <> ".FactureFournisseur::STATUS_DRAFT;
if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
} }
// Expense reports // Expense reports
if (GETPOST('selectexpensereports') && !empty($listofchoices['selectexpensereports']['perms'])) { if (GETPOST('selectexpensereports') && !empty($listofchoices['selectexpensereports']['perms']) && empty($projectid)) {
if (!empty($sql)) { if (!empty($sql)) {
$sql .= " UNION ALL"; $sql .= " UNION ALL";
} }
@ -208,6 +216,7 @@ if (($action == 'searchfiles' || $action == 'dl')) {
$sql .= " WHERE datedon between ".$wheretail; $sql .= " WHERE datedon between ".$wheretail;
$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
$sql .= " AND t.fk_statut <> ".Don::STATUS_DRAFT; $sql .= " AND t.fk_statut <> ".Don::STATUS_DRAFT;
if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
} }
// Payments of salaries // Payments of salaries
if (GETPOST('selectpaymentsofsalaries') && !empty($listofchoices['selectpaymentsofsalaries']['perms'])) { if (GETPOST('selectpaymentsofsalaries') && !empty($listofchoices['selectpaymentsofsalaries']['perms'])) {
@ -219,6 +228,7 @@ if (($action == 'searchfiles' || $action == 'dl')) {
$sql .= " WHERE datep between ".$wheretail; $sql .= " WHERE datep between ".$wheretail;
$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
//$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT; //$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT;
if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
} }
// Social contributions // Social contributions
if (GETPOST('selectsocialcontributions') && !empty($listofchoices['selectsocialcontributions']['perms'])) { if (GETPOST('selectsocialcontributions') && !empty($listofchoices['selectsocialcontributions']['perms'])) {
@ -230,6 +240,7 @@ if (($action == 'searchfiles' || $action == 'dl')) {
$sql .= " WHERE t.date_ech between ".$wheretail; $sql .= " WHERE t.date_ech between ".$wheretail;
$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
//$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT; //$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT;
if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
} }
// Various payments // Various payments
if (GETPOST('selectvariouspayment') && !empty($listofchoices['selectvariouspayment']['perms'])) { if (GETPOST('selectvariouspayment') && !empty($listofchoices['selectvariouspayment']['perms'])) {
@ -240,9 +251,10 @@ if (($action == 'searchfiles' || $action == 'dl')) {
$sql .= " FROM ".MAIN_DB_PREFIX."payment_various as t"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_various as t";
$sql .= " WHERE datep between ".$wheretail; $sql .= " WHERE datep between ".$wheretail;
$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
} }
// Loan payments // Loan payments
if (GETPOST('selectloanspayment') && !empty($listofchoices['selectloanspayment']['perms'])) { if (GETPOST('selectloanspayment') && !empty($listofchoices['selectloanspayment']['perms']) && empty($projectid)) {
if (!empty($sql)) { if (!empty($sql)) {
$sql .= " UNION ALL"; $sql .= " UNION ALL";
} }
@ -460,7 +472,15 @@ if ($result && $action == "dl" && !$error) {
$log .= ','.$langs->transnoentitiesnoconv("Country"); $log .= ','.$langs->transnoentitiesnoconv("Country");
$log .= ','.$langs->transnoentitiesnoconv("VATIntra"); $log .= ','.$langs->transnoentitiesnoconv("VATIntra");
$log .= ','.$langs->transnoentitiesnoconv("Sens")."\n"; $log .= ','.$langs->transnoentitiesnoconv("Sens")."\n";
$zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc', 'tzuserrel')."-".dol_print_date($date_stop, 'dayrfc', 'tzuserrel').'_export.zip'; $zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc', 'tzuserrel')."-".dol_print_date($date_stop, 'dayrfc', 'tzuserrel');
if (!empty($projectid)) {
$project = new Project($db);
$project->fetch($projectid);
if ($project->ref) {
$zipname .= '_'.$project->ref;
}
}
$zipname .='_export.zip';
dol_delete_file($zipname); dol_delete_file($zipname);
@ -561,11 +581,13 @@ print $form->selectDate($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 0, '', '', '
print "\n"; print "\n";
// Export is for current company only // Export is for current company only
$socid = 0;
if (!empty($conf->multicompany->enabled) && is_object($mc)) { if (!empty($conf->multicompany->enabled) && is_object($mc)) {
$mc->getInfo($conf->entity); $mc->getInfo($conf->entity);
print '<span class="marginleftonly marginrightonly'.(empty($conf->global->MULTICOMPANY_ALLOW_EXPORT_ACCOUNTING_DOC_FOR_ALL_ENTITIES) ? ' opacitymedium' : '').'">('.$langs->trans("Entity").' : '; print '<span class="marginleftonly marginrightonly'.(empty($conf->global->MULTICOMPANY_ALLOW_EXPORT_ACCOUNTING_DOC_FOR_ALL_ENTITIES) ? ' opacitymedium' : '').'">('.$langs->trans("Entity").' : ';
print "<td>"; print "<td>";
if (!empty($conf->global->MULTICOMPANY_ALLOW_EXPORT_ACCOUNTING_DOC_FOR_ALL_ENTITIES)) { if (!empty($conf->global->MULTICOMPANY_ALLOW_EXPORT_ACCOUNTING_DOC_FOR_ALL_ENTITIES)) {
$socid = $mc->id;
print $mc->select_entities(GETPOSTISSET('search_entity') ? GETPOST('search_entity', 'int') : $mc->id, 'search_entity', '', false, false, false, false, true); print $mc->select_entities(GETPOSTISSET('search_entity') ? GETPOST('search_entity', 'int') : $mc->id, 'search_entity', '', false, false, false, false, true);
} else { } else {
print $mc->label; print $mc->label;
@ -576,6 +598,16 @@ if (!empty($conf->multicompany->enabled) && is_object($mc)) {
print '<br>'; print '<br>';
// Project filter
if (!empty($conf->projet->enabled)) {
$formproject = new FormProjets($db);
$langs->load('projects');
print '<span class="marginrightonly">'.$langs->trans('Project').":</span>";
print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, '');
print '<span class="classfortooltip" style="padding: 0px; padding: 0px; padding-right: 3px !important;" title="'.$langs->trans('ExportAccountingProjectHelp').'"><span class="fas fa-info-circle em088 opacityhigh" style=" vertical-align: middle; cursor: help"></span></span>';
print '<br>';
}
foreach ($listofchoices as $choice => $val) { foreach ($listofchoices as $choice => $val) {
if (empty($val['enabled'])) { if (empty($val['enabled'])) {
continue; // list not qualified continue; // list not qualified
@ -614,7 +646,7 @@ if (!empty($date_start) && !empty($date_stop)) {
echo dol_print_date($date_start, 'day', 'tzuserrel')." - ".dol_print_date($date_stop, 'day', 'tzuserrel'); echo dol_print_date($date_start, 'day', 'tzuserrel')." - ".dol_print_date($date_stop, 'day', 'tzuserrel');
print '<a class="marginleftonly small'.(empty($TData) ? ' butActionRefused' : ' butAction').'" href="'.$_SERVER["PHP_SELF"].'?action=dl&token='.newToken().'&output=file&file='.urlencode($filename).$param.'"'; print '<a class="marginleftonly small'.(empty($TData) ? ' butActionRefused' : ' butAction').'" href="'.$_SERVER["PHP_SELF"].'?action=dl&token='.newToken().'&projectid='.$projectid.'&output=file&file='.urlencode($filename).$param.'"';
if (empty($TData)) { if (empty($TData)) {
print " disabled"; print " disabled";
} }

View File

@ -61,10 +61,6 @@ if (!$year_start) {
* View * View
*/ */
$title = $langs->trans("FinancialAccount").' - '.$langs->trans("IOMonthlyReporting");
$helpurl = "";
llxHeader('', $title, $helpurl);
$form = new Form($db); $form = new Form($db);
// Get account informations // Get account informations
@ -82,6 +78,10 @@ $annee = '';
$totentrees = array(); $totentrees = array();
$totsorties = array(); $totsorties = array();
$title = $object->ref.' - '.$langs->trans("IOMonthlyReporting");
$helpurl = "";
llxHeader('', $title, $helpurl);
// Ce rapport de tresorerie est base sur llx_bank (car doit inclure les transactions sans facture) // Ce rapport de tresorerie est base sur llx_bank (car doit inclure les transactions sans facture)
// plutot que sur llx_paiement + llx_paiementfourn // plutot que sur llx_paiement + llx_paiementfourn

View File

@ -512,7 +512,7 @@ $buttonreconcile = '';
$morehtmlref = ''; $morehtmlref = '';
if ($id > 0 || !empty($ref)) { if ($id > 0 || !empty($ref)) {
$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Transactions"); $title = $object->ref.' - '.$langs->trans("Transactions");
$helpurl = ""; $helpurl = "";
llxHeader('', $title, $helpurl); llxHeader('', $title, $helpurl);

View File

@ -332,18 +332,16 @@ if (!empty($conf->accounting->enabled)) {
$countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
$title = $langs->trans("FinancialAccount")." - ".$langs->trans("Card");
$help_url = 'EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Bancos_y_Cajas|DE:Modul_Banken_und_Barbestände'; $help_url = 'EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses|ES:Módulo_Bancos_y_Cajas|DE:Modul_Banken_und_Barbestände';
llxHeader("", $title, $help_url);
// Creation // Creation
if ($action == 'create') { if ($action == 'create') {
$object = new Account($db); $object = new Account($db);
$title = $langs->trans("NewFinancialAccount");
llxHeader("", $title, $help_url);
print load_fiche_titre($langs->trans("NewFinancialAccount"), '', 'bank_account'); print load_fiche_titre($langs->trans("NewFinancialAccount"), '', 'bank_account');
if ($conf->use_javascript_ajax) { if ($conf->use_javascript_ajax) {
@ -615,6 +613,9 @@ if ($action == 'create') {
$_GET["id"] = $object->id; $_GET["id"] = $object->id;
} }
$title = $object->ref." - ".$langs->trans("Card");
llxHeader("", $title, $help_url);
// Show tabs // Show tabs
$head = bank_prepare_head($object); $head = bank_prepare_head($object);
print dol_get_fiche_head($head, 'bankname', $langs->trans("FinancialAccount"), -1, 'account'); print dol_get_fiche_head($head, 'bankname', $langs->trans("FinancialAccount"), -1, 'account');

View File

@ -1707,19 +1707,20 @@ class Account extends CommonObject
*/ */
public function initAsSpecimen() public function initAsSpecimen()
{ {
// Example of IBAN FR7630001007941234567890185
$this->specimen = 1; $this->specimen = 1;
$this->ref = 'MBA'; $this->ref = 'MBA';
$this->label = 'My Big Company Bank account'; $this->label = 'My Big Company Bank account';
$this->bank = 'MyBank'; $this->bank = 'MyBank';
$this->courant = Account::TYPE_CURRENT; $this->courant = Account::TYPE_CURRENT;
$this->clos = Account::STATUS_OPEN; $this->clos = Account::STATUS_OPEN;
$this->code_banque = '123'; $this->code_banque = '30001';
$this->code_guichet = '456'; $this->code_guichet = '00794';
$this->number = 'ABC12345'; $this->number = '12345678901';
$this->cle_rib = '50'; $this->cle_rib = '85';
$this->bic = 'AA12'; $this->bic = 'AA12';
$this->iban = 'FR999999999'; $this->iban = 'FR7630001007941234567890185';
$this->domiciliation = 'My bank address'; $this->domiciliation = 'Banque de France';
$this->proprio = 'Owner'; $this->proprio = 'Owner';
$this->owner_address = 'Owner address'; $this->owner_address = 'Owner address';
$this->country_id = 1; $this->country_id = 1;

View File

@ -93,8 +93,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
* View * View
*/ */
$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Documents"); $title = $object->ref.' - '.$langs->trans("Documents");
$help_url = "EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses"; $help_url = "EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses";
llxHeader("", $title, $help_url); llxHeader("", $title, $help_url);

View File

@ -55,11 +55,6 @@ $error = 0;
/* /*
* View * View
*/ */
$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Graph");
$helpurl = "";
llxHeader('', $title, $helpurl);
$form = new Form($db); $form = new Form($db);
$datetime = dol_now(); $datetime = dol_now();
@ -83,6 +78,10 @@ if (GETPOST("ref")) {
$account = $object->id; $account = $object->id;
} }
$title = $object->ref.' - '.$langs->trans("Graph");
$helpurl = "";
llxHeader('', $title, $helpurl);
$result = dol_mkdir($conf->bank->dir_temp); $result = dol_mkdir($conf->bank->dir_temp);
if ($result < 0) { if ($result < 0) {
$langs->load("errors"); $langs->load("errors");

View File

@ -197,11 +197,6 @@ if ($action == 'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($n
/* /*
* View * View
*/ */
$title = $langs->trans("FinancialAccount").' - '.$langs->trans("AccountStatements");
$helpurl = "";
llxHeader('', $title, $helpurl);
$form = new Form($db); $form = new Form($db);
$societestatic = new Societe($db); $societestatic = new Societe($db);
$chargestatic = new ChargeSociales($db); $chargestatic = new ChargeSociales($db);
@ -253,6 +248,10 @@ if (empty($numref)) {
$numrows = $db->num_rows($result); $numrows = $db->num_rows($result);
$i = 0; $i = 0;
$title = $object->ref.' - '.$langs->trans("AccountStatements");
$helpurl = "";
llxHeader('', $title, $helpurl);
// Onglets // Onglets
$head = bank_prepare_head($object); $head = bank_prepare_head($object);
print dol_get_fiche_head($head, 'statement', $langs->trans("FinancialAccount"), 0, 'account'); print dol_get_fiche_head($head, 'statement', $langs->trans("FinancialAccount"), 0, 'account');

View File

@ -57,11 +57,6 @@ $hookmanager->initHooks(array('banktreso', 'globalcard'));
/* /*
* View * View
*/ */
$title = $langs->trans("FinancialAccount").' - '.$langs->trans("PlannedTransactions");
$helpurl = "";
llxHeader('', $title, $helpurl);
$societestatic = new Societe($db); $societestatic = new Societe($db);
$facturestatic = new Facture($db); $facturestatic = new Facture($db);
$facturefournstatic = new FactureFournisseur($db); $facturefournstatic = new FactureFournisseur($db);
@ -85,6 +80,9 @@ if (GETPOST("account") || GETPOST("ref")) {
$_GET["account"] = $object->id; $_GET["account"] = $object->id;
} }
$title = $object->ref.' - '.$langs->trans("PlannedTransactions");
$helpurl = "";
llxHeader('', $title, $helpurl);
// Onglets // Onglets
$head = bank_prepare_head($object); $head = bank_prepare_head($object);

View File

@ -304,9 +304,6 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->banque->m
/* /*
* View * View
*/ */
llxHeader("", $langs->trans("VariousPayment"));
$form = new Form($db); $form = new Form($db);
if (!empty($conf->accounting->enabled)) { if (!empty($conf->accounting->enabled)) {
$formaccounting = new FormAccounting($db); $formaccounting = new FormAccounting($db);
@ -324,6 +321,13 @@ if ($id) {
} }
} }
$title = $object->ref." - ".$langs->trans('Card');
if ($action == 'create') {
$title = $langs->trans("NewVariousPayment");
}
$help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen';
llxHeader('', $title, $help_url);
$options = array(); $options = array();
// Load bank groups // Load bank groups

View File

@ -284,7 +284,7 @@ if ($resql) {
} }
// must be place behind the last "header(...)" call // must be place behind the last "header(...)" call
llxHeader(); llxHeader('', $langs->trans("VariousPayments"));
$i = 0; $i = 0;
$total = 0; $total = 0;

View File

@ -2880,8 +2880,10 @@ if (!empty($conf->project->enabled)) {
$now = dol_now(); $now = dol_now();
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Card'); $title = $object->ref." - ".$langs->trans('Card');
if ($action == 'create') {
$title = $langs->trans("NewBill");
}
$help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
@ -4182,7 +4184,7 @@ if ($action == 'create') {
// Cree un tableau formulaire // Cree un tableau formulaire
$formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"), array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'morecss' => 'minwidth300')); $formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"), array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'morecss' => 'minwidth300'));
// Paiement incomplet. On demande si motif = escompte ou autre // Paiement incomplet. On demande si motif = escompte ou autre
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes", 1, 310); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes", 1, 340, 600);
} }
// Confirmation du classement abandonne // Confirmation du classement abandonne
@ -5522,9 +5524,9 @@ if ($action == 'create') {
) { ) {
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc" title="'.dol_escape_htmltag($langs->trans("ConfirmConvertToReduc2")).'">'.$langs->trans('ConvertToReduc').'</a>'; print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc" title="'.dol_escape_htmltag($langs->trans("ConfirmConvertToReduc2")).'">'.$langs->trans('ConvertToReduc').'</a>';
} }
// For deposit invoice // For down payment invoice (deposit)
if ($object->type == Facture::TYPE_DEPOSIT && $usercancreate && $object->statut > Facture::STATUS_DRAFT && empty($discount->id)) { if ($object->type == Facture::TYPE_DEPOSIT && $usercancreate && $object->statut > Facture::STATUS_DRAFT && empty($discount->id)) {
if (price2num($object->total_ttc, 'MT') == price2num($sumofpaymentall, 'MT')) { if (price2num($object->total_ttc, 'MT') == price2num($sumofpaymentall, 'MT') || ($object->type == Facture::STATUS_ABANDONED && in_array($object->close_code, array('bankcharge', 'discount_vat', 'other')))) {
// We can close a down payment only if paid amount is same than amount of down payment (by definition) // We can close a down payment only if paid amount is same than amount of down payment (by definition)
print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc">'.$langs->trans('ConvertToReduc').'</a>'; print '<a class="butAction'.($conf->use_javascript_ajax ? ' reposition' : '').'" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc">'.$langs->trans('ConvertToReduc').'</a>';
} else { } else {

View File

@ -167,7 +167,7 @@ class Facture extends CommonInvoice
public $revenuestamp; public $revenuestamp;
/** /**
* ! Closing after partial payment: discount_vat, badsupplier, abandon * ! Closing after partial payment: discount_vat, badcustomer or badsupplier, bankcharge, other
* ! Closing when no payment: replaced, abandoned * ! Closing when no payment: replaced, abandoned
* @var string Close code * @var string Close code
*/ */
@ -424,7 +424,10 @@ class Facture extends CommonInvoice
const STATUS_ABANDONED = 3; const STATUS_ABANDONED = 3;
const CLOSECODE_DISCOUNTVAT = 'discount_vat'; // Abandonned remain - escompte const CLOSECODE_DISCOUNTVAT = 'discount_vat'; // Abandonned remain - escompte
const CLOSECODE_BADDEBT = 'badcustomer'; // Abandonned - bad const CLOSECODE_BADDEBT = 'badcustomer'; // Abandonned remain - bad customer
const CLOSECODE_BANKCHARGE = 'bankcharge'; // Abandonned remain - bank charge
const CLOSECODE_OTHER = 'other'; // Abandonned remain - other
const CLOSECODE_ABANDONED = 'abandon'; // Abandonned - other const CLOSECODE_ABANDONED = 'abandon'; // Abandonned - other
const CLOSECODE_REPLACED = 'replaced'; // Closed after doing a replacement invoice const CLOSECODE_REPLACED = 'replaced'; // Closed after doing a replacement invoice
@ -5454,6 +5457,7 @@ class Facture extends CommonInvoice
$sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp"; $sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp";
} }
$sql .= " WHERE f.paye = 0"; $sql .= " WHERE f.paye = 0";
$sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED;
$sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'"; $sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'";
$sql .= " AND f.entity IN (".getEntity('facture').")"; $sql .= " AND f.entity IN (".getEntity('facture').")";
if (!empty($paymentmode) && $paymentmode != 'all') { if (!empty($paymentmode) && $paymentmode != 'all') {

View File

@ -100,7 +100,7 @@ if ($action == 'addcontact' && $user->rights->facture->creer) {
* View * View
*/ */
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('ContactsAddresses'); $title = $object->ref." - ".$langs->trans('ContactsAddresses');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; $helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl); llxHeader('', $title, $helpurl);

View File

@ -100,8 +100,7 @@ if (empty($object->id)) {
exit; exit;
} }
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents'); $title = $object->ref." - ".$langs->trans('Documents');
$help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);

View File

@ -65,7 +65,7 @@ $result = restrictedArea($user, 'facture', $object->id, '', '', 'fk_soc', 'rowid
$form = new Form($db); $form = new Form($db);
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Info'); $title = $object->ref." - ".$langs->trans('Info');
$help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);

View File

@ -863,9 +863,9 @@ $sql .= empty($hookmanager->resPrint) ? "" : " HAVING 1=1 ".$hookmanager->resPri
$nbtotalofrecords = ''; $nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
/* This old and fast method to get and count full list returns all record so use a high amount of memory. /* This old and fast method to get and count full list returns all record so use a high amount of memory.
$result = $db->query($sql); $result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result); $nbtotalofrecords = $db->num_rows($result);
*/ */
/* The fast and low memory method to get and count full list converts the sql into a sql count */ /* The fast and low memory method to get and count full list converts the sql into a sql count */
if ($sall || $search_product_category > 0 || $search_user > 0) { if ($sall || $search_product_category > 0 || $search_user > 0) {
$sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(DISTINCT f.rowid) as nbtotalofrecords FROM', $sql); $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(DISTINCT f.rowid) as nbtotalofrecords FROM', $sql);
@ -1112,10 +1112,10 @@ if ($resql) {
$arrayofmassactions['makepayment'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakePaymentAndClassifyPayed"); $arrayofmassactions['makepayment'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakePaymentAndClassifyPayed");
} }
if (!empty($conf->prelevement->enabled) && !empty($user->rights->prelevement->bons->creer)) { if (!empty($conf->prelevement->enabled) && !empty($user->rights->prelevement->bons->creer)) {
$langs->load("withdrawals"); $langs->load("withdrawals");
$arrayofmassactions['withdrawrequest'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakeWithdrawRequest"); $arrayofmassactions['withdrawrequest'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakeWithdrawRequest");
} }
if ($user->rights->facture->supprimer) { if (!empty($user->rights->facture->supprimer)) {
if (!empty($conf->global->INVOICE_CAN_REMOVE_DRAFT_ONLY)) { if (!empty($conf->global->INVOICE_CAN_REMOVE_DRAFT_ONLY)) {
$arrayofmassactions['predeletedraft'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Deletedraft"); $arrayofmassactions['predeletedraft'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Deletedraft");
} elseif (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) { // mass deletion never possible on invoices on such situation } elseif (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) { // mass deletion never possible on invoices on such situation
@ -1229,7 +1229,7 @@ if ($resql) {
} }
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
// Show the massaction checkboxes only when this page is not opend from the Extended POS // Show the massaction checkboxes only when this page is not opend from the Extended POS
if ($massactionbutton && $contextpage != 'poslist') { if ($massactionbutton && $contextpage != 'poslist') {
@ -1241,6 +1241,15 @@ if ($resql) {
// Filters lines // Filters lines
print '<tr class="liste_titre_filter">'; print '<tr class="liste_titre_filter">';
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
// Action column
print '<td class="liste_titre center actioncolumn">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '</td>'; print '</td>';
@ -1300,11 +1309,11 @@ if ($resql) {
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
print '<div class="nowrap">'; print '<div class="nowrap">';
/* /*
print $langs->trans('From').' '; print $langs->trans('From').' ';
print $form->selectDate($search_datelimit_start ? $search_datelimit_start : -1, 'search_datelimit_start', 0, 0, 1); print $form->selectDate($search_datelimit_start ? $search_datelimit_start : -1, 'search_datelimit_start', 0, 0, 1);
print '</div>'; print '</div>';
print '<div class="nowrap">'; print '<div class="nowrap">';
print $langs->trans('to').' ';*/ print $langs->trans('to').' ';*/
print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("Before")); print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("Before"));
print '<br><input type="checkbox" name="search_option" value="late"'.($option == 'late' ? ' checked' : '').'> '.$langs->trans("Alert"); print '<br><input type="checkbox" name="search_option" value="late"'.($option == 'late' ? ' checked' : '').'> '.$langs->trans("Alert");
print '</div>'; print '</div>';
@ -1528,13 +1537,20 @@ if ($resql) {
print '</td>'; print '</td>';
} }
// Action column // Action column
print '<td class="liste_titre" align="middle">'; if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
$searchpicto = $form->showFilterButtons(); print '<td class="liste_titre center actioncolumn">';
print $searchpicto; $searchpicto = $form->showFilterButtons();
print '</td>'; print $searchpicto;
print '</td>';
}
print "</tr>\n"; print "</tr>\n";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
}
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
} }
@ -1685,7 +1701,10 @@ if ($resql) {
if (!empty($arrayfields['f.fk_statut']['checked'])) { if (!empty($arrayfields['f.fk_statut']['checked'])) {
print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut,f.paye,f.type", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut,f.paye,f.type", "", $param, 'class="right"', $sortfield, $sortorder);
} }
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
}
print "</tr>\n"; print "</tr>\n";
$projectstatic = new Project($db); $projectstatic = new Project($db);
@ -1744,12 +1763,12 @@ if ($resql) {
$facturestatic->note_public = $obj->note_public; $facturestatic->note_public = $obj->note_public;
$facturestatic->note_private = $obj->note_private; $facturestatic->note_private = $obj->note_private;
if (!empty($conf->global->INVOICE_USE_SITUATION) && !empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) { if (!empty($conf->global->INVOICE_USE_SITUATION) && !empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
$facturestatic->retained_warranty = $obj->retained_warranty; $facturestatic->retained_warranty = $obj->retained_warranty;
$facturestatic->retained_warranty_date_limit = $obj->retained_warranty_date_limit; $facturestatic->retained_warranty_date_limit = $obj->retained_warranty_date_limit;
$facturestatic->situation_final = $obj->retained_warranty_date_limit; $facturestatic->situation_final = $obj->retained_warranty_date_limit;
$facturestatic->situation_final = $obj->retained_warranty_date_limit; $facturestatic->situation_final = $obj->retained_warranty_date_limit;
$facturestatic->situation_cycle_ref = $obj->situation_cycle_ref; $facturestatic->situation_cycle_ref = $obj->situation_cycle_ref;
$facturestatic->situation_counter = $obj->situation_counter; $facturestatic->situation_counter = $obj->situation_counter;
} }
$companystatic->id = $obj->socid; $companystatic->id = $obj->socid;
$companystatic->name = $obj->name; $companystatic->name = $obj->name;
@ -1818,6 +1837,20 @@ if ($resql) {
} }
print '>'; print '>';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print '<td class="nowrap" align="center">';
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
// No // No
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
print '<td>'.(($offset * $limit) + $i).'</td>'; print '<td>'.(($offset * $limit) + $i).'</td>';
@ -2050,14 +2083,14 @@ if ($resql) {
// Amount HT // Amount HT
if (!empty($arrayfields['f.total_ht']['checked'])) { if (!empty($arrayfields['f.total_ht']['checked'])) {
print '<td class="right nowraponall">'.price($obj->total_ht)."</td>\n"; print '<td class="right nowraponall">'.price($obj->total_ht)."</td>\n";
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
if (!$i) { if (!$i) {
$totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht'; $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht';
} }
$totalarray['val']['f.total_ht'] += $obj->total_ht; $totalarray['val']['f.total_ht'] += $obj->total_ht;
} }
// Amount VAT // Amount VAT
if (!empty($arrayfields['f.total_tva']['checked'])) { if (!empty($arrayfields['f.total_tva']['checked'])) {
@ -2225,16 +2258,16 @@ if ($resql) {
// Currency rate // Currency rate
if (!empty($arrayfields['f.multicurrency_tx']['checked'])) { if (!empty($arrayfields['f.multicurrency_tx']['checked'])) {
print '<td class="nowraponall">'; print '<td class="nowraponall">';
$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
print "</td>\n"; print "</td>\n";
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
} }
// Amount HT // Amount HT
if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) { if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) {
print '<td class="right nowraponall amount">'.price($obj->multicurrency_total_ht)."</td>\n"; print '<td class="right nowraponall amount">'.price($obj->multicurrency_total_ht)."</td>\n";
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
@ -2392,19 +2425,21 @@ if ($resql) {
} }
// Action column (Show the massaction button only when this page is not opend from the Extended POS) // Action column (Show the massaction button only when this page is not opend from the Extended POS)
print '<td class="nowrap" align="center">';
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
$selected = 0; print '<td class="nowrap" align="center">';
if (in_array($obj->id, $arrayofselected)) { if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 1; $selected = 0;
if (in_array($obj->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>';
} }
print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>'; print '</td>';
} }
print '</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }
print "</tr>\n"; print "</tr>\n";
$i++; $i++;

View File

@ -85,7 +85,7 @@ if (empty($object->id)) {
exit; exit;
} }
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Notes'); $title = $object->ref." - ".$langs->trans('Notes');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; $helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl); llxHeader('', $title, $helpurl);

View File

@ -132,6 +132,7 @@ if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('b
} }
$offset = $limit * $page; $offset = $limit * $page;
$title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
if ($type == "p") { if ($type == "p") {
if (empty($contextpage) || $contextpage == 'contactlist') { if (empty($contextpage) || $contextpage == 'contactlist') {
@ -345,8 +346,6 @@ if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)
$contactstatic->loadCacheOfProspStatus(); $contactstatic->loadCacheOfProspStatus();
} }
$title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
// Select every potentiels, and note each potentiels which fit in search parameters // Select every potentiels, and note each potentiels which fit in search parameters
$tab_level = array(); $tab_level = array();
$sql = "SELECT code, label, sortorder"; $sql = "SELECT code, label, sortorder";
@ -772,7 +771,7 @@ print $hookmanager->resPrint;
print '</div>'; print '</div>';
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
if ($massactionbutton) { if ($massactionbutton) {
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1); $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
} }
@ -782,6 +781,13 @@ print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" :
// Lines for filter fields // Lines for filter fields
print '<tr class="liste_titre_filter">'; print '<tr class="liste_titre_filter">';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
if (!empty($arrayfields['p.rowid']['checked'])) { if (!empty($arrayfields['p.rowid']['checked'])) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat searchstring" type="text" name="search_id" size="1" value="'.dol_escape_htmltag($search_id).'">'; print '<input class="flat searchstring" type="text" name="search_id" size="1" value="'.dol_escape_htmltag($search_id).'">';
@ -934,15 +940,19 @@ if (!empty($arrayfields['p.import_key']['checked'])) {
print '</td>'; print '</td>';
} }
// Action column // Action column
print '<td class="liste_titre maxwidthsearch">'; if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
$searchpicto = $form->showFilterAndCheckAddButtons(0); print '<td class="liste_titre maxwidthsearch">';
print $searchpicto; $searchpicto = $form->showFilterAndCheckAddButtons(0);
print '</td>'; print $searchpicto;
print '</td>';
}
print '</tr>'; print '</tr>';
// Ligne des titres // Ligne des titres
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
if (!empty($arrayfields['p.rowid']['checked'])) { if (!empty($arrayfields['p.rowid']['checked'])) {
print_liste_field_titre($arrayfields['p.rowid']['label'], $_SERVER["PHP_SELF"], "p.rowid", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['p.rowid']['label'], $_SERVER["PHP_SELF"], "p.rowid", "", $param, "", $sortfield, $sortorder);
} }
@ -1032,7 +1042,9 @@ if (!empty($arrayfields['p.statut']['checked'])) {
if (!empty($arrayfields['p.import_key']['checked'])) { if (!empty($arrayfields['p.import_key']['checked'])) {
print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
} }
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
print "</tr>\n"; print "</tr>\n";
@ -1064,6 +1076,18 @@ while ($i < min($num, $limit)) {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
// ID // ID
if (!empty($arrayfields['p.rowid']['checked'])) { if (!empty($arrayfields['p.rowid']['checked'])) {
print '<td class="tdoverflowmax50">'; print '<td class="tdoverflowmax50">';
@ -1292,15 +1316,17 @@ while ($i < min($num, $limit)) {
} }
// Action column // Action column
print '<td class="nowrap center">'; if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined print '<td class="nowrap center">';
$selected = 0; if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
if (in_array($obj->rowid, $arrayofselected)) { $selected = 0;
$selected = 1; if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
} }
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; print '</td>';
} }
print '</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }

View File

@ -74,6 +74,7 @@ if (!$error && $massaction == 'confirm_presend') {
$nbignored = 0; $nbignored = 0;
$langs->load("mails"); $langs->load("mails");
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php';
$listofobjectid = array(); $listofobjectid = array();
$listofobjectthirdparties = array(); $listofobjectthirdparties = array();

View File

@ -520,6 +520,11 @@ abstract class CommonObject
*/ */
public $date_modification; // Date last change (tms field) public $date_modification; // Date last change (tms field)
/**
* @var integer|string $date_cloture;
*/
public $date_cloture; // Date closing (tms field)
/** /**
* @var User|int User author/creation * @var User|int User author/creation
* @TODO Merge with user_creation * @TODO Merge with user_creation
@ -549,6 +554,10 @@ abstract class CommonObject
* @var int User id of validation * @var int User id of validation
*/ */
public $user_validation_id; public $user_validation_id;
/**
* @var int User id closing object
*/
public $user_closing_id;
/** /**
* @var User|int User last modifier * @var User|int User last modifier
@ -5560,6 +5569,9 @@ abstract class CommonObject
if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) { if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) {
$setsharekey = true; $setsharekey = true;
} }
if ($this->element == 'product' && !empty($conf->global->PRODUCT_ALLOW_EXTERNAL_DOWNLOAD)) {
$setsharekey = true;
}
if ($this->element == 'contrat' && !empty($conf->global->CONTRACT_ALLOW_EXTERNAL_DOWNLOAD)) { if ($this->element == 'contrat' && !empty($conf->global->CONTRACT_ALLOW_EXTERNAL_DOWNLOAD)) {
$setsharekey = true; $setsharekey = true;
} }
@ -6895,15 +6907,15 @@ abstract class CommonObject
if ((!isset($this->fields[$key]['default'])) || ($this->fields[$key]['notnull'] != 1)) { if ((!isset($this->fields[$key]['default'])) || ($this->fields[$key]['notnull'] != 1)) {
$out .= '<option value="0">&nbsp;</option>'; $out .= '<option value="0">&nbsp;</option>';
} }
foreach ($param['options'] as $key => $val) { foreach ($param['options'] as $keyb => $valb) {
if ((string) $key == '') { if ((string) $keyb == '') {
continue; continue;
} }
if (strpos($val, "|") !== false) list($val, $parent) = explode('|', $val); if (strpos($valb, "|") !== false) list($valb, $parent) = explode('|', $valb);
$out .= '<option value="'.$key.'"'; $out .= '<option value="'.$keyb.'"';
$out .= (((string) $value == (string) $key) ? ' selected' : ''); $out .= (((string) $value == (string) $keyb) ? ' selected' : '');
$out .= (!empty($parent) ? ' parent="'.$parent.'"' : ''); $out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
$out .= '>'.$val.'</option>'; $out .= '>'.$valb.'</option>';
} }
$out .= '</select>'; $out .= '</select>';
} elseif ($type == 'sellist') { } elseif ($type == 'sellist') {
@ -7052,12 +7064,12 @@ abstract class CommonObject
$out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, $morecss, 0, '100%'); $out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, $morecss, 0, '100%');
} elseif ($type == 'radio') { } elseif ($type == 'radio') {
$out = ''; $out = '';
foreach ($param['options'] as $keyopt => $val) { foreach ($param['options'] as $keyopt => $valopt) {
$out .= '<input class="flat '.$morecss.'" type="radio" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" '.($moreparam ? $moreparam : ''); $out .= '<input class="flat '.$morecss.'" type="radio" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" '.($moreparam ? $moreparam : '');
$out .= ' value="'.$keyopt.'"'; $out .= ' value="'.$keyopt.'"';
$out .= ' id="'.$keyprefix.$key.$keysuffix.'_'.$keyopt.'"'; $out .= ' id="'.$keyprefix.$key.$keysuffix.'_'.$keyopt.'"';
$out .= ($value == $keyopt ? 'checked' : ''); $out .= ($value == $keyopt ? 'checked' : '');
$out .= '/><label for="'.$keyprefix.$key.$keysuffix.'_'.$keyopt.'">'.$val.'</label><br>'; $out .= '/><label for="'.$keyprefix.$key.$keysuffix.'_'.$keyopt.'">'.$valopt.'</label><br>';
} }
} elseif ($type == 'chkbxlst') { } elseif ($type == 'chkbxlst') {
if (is_array($value)) { if (is_array($value)) {
@ -7613,7 +7625,20 @@ abstract class CommonObject
$result = $object->fetch($value); $result = $object->fetch($value);
} }
if ($result > 0) { if ($result > 0) {
$value = $object->getNomUrl($getnomurlparam, $getnomurlparam2); if ($object->element === 'product') {
$getnomurlparam3 = (!isset($InfoFieldList[5]) ? 0 : $InfoFieldList[5]);
$getnomurlparam4 = (!isset($InfoFieldList[6]) ? -1 : $InfoFieldList[6]);
$getnomurlparam5 = (!isset($InfoFieldList[7]) ? 0 : $InfoFieldList[7]);
$getnomurlparam6 = (!isset($InfoFieldList[8]) ? '' : $InfoFieldList[8]);
$getnomurlparam7 = (!isset($InfoFieldList[9]) ? 0 : $InfoFieldList[9]);
/**
* @var Product $object
*/
$value = $object->getNomUrl($getnomurlparam, $getnomurlparam2, $getnomurlparam3, $getnomurlparam4, $getnomurlparam5, $getnomurlparam6, $getnomurlparam7);
} else {
$value = $object->getNomUrl($getnomurlparam, $getnomurlparam2);
}
} else { } else {
$value = ''; $value = '';
} }
@ -8087,8 +8112,13 @@ abstract class CommonObject
//if (GETPOST('action', 'restricthtml') == 'create') $out.='create'; //if (GETPOST('action', 'restricthtml') == 'create') $out.='create';
// BUG #11554 : For public page, use red dot for required fields, instead of bold label // BUG #11554 : For public page, use red dot for required fields, instead of bold label
$tpl_context = isset($params["tpl_context"]) ? $params["tpl_context"] : "none"; $tpl_context = isset($params["tpl_context"]) ? $params["tpl_context"] : "none";
if ($tpl_context != "public") { // Public page : red dot instead of fieldrequired characters
if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) {
$out .= ' fieldrequired';
}
}
$out .= '">';
if ($tpl_context == "public") { // Public page : red dot instead of fieldrequired characters if ($tpl_context == "public") { // Public page : red dot instead of fieldrequired characters
$out .= '">';
if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) { if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) {
$out .= $form->textwithpicto($labeltoshow, $helptoshow); $out .= $form->textwithpicto($labeltoshow, $helptoshow);
} else { } else {
@ -8098,10 +8128,6 @@ abstract class CommonObject
$out .= '&nbsp;<span style="color: red">*</span>'; $out .= '&nbsp;<span style="color: red">*</span>';
} }
} else { } else {
if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) {
$out .= ' fieldrequired';
}
$out .= '">';
if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) { if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) {
$out .= $form->textwithpicto($labeltoshow, $helptoshow); $out .= $form->textwithpicto($labeltoshow, $helptoshow);
} else { } else {

View File

@ -4911,7 +4911,7 @@ class Form
* @param string $question Question * @param string $question Question
* @param string $action Action * @param string $action Action
* @param array|string $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>)) * @param array|string $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>))
* type can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'morecss', 'other' or 'onecolumn'... * type can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'select', 'multiselect', 'morecss', 'other' or 'onecolumn'...
* @param string $selectedchoice '' or 'no', or 'yes' or '1' or '0' * @param string $selectedchoice '' or 'no', or 'yes' or '1' or '0'
* @param int|string $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx * @param int|string $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx
* @param int|string $height Force height of box (0 = auto) * @param int|string $height Force height of box (0 = auto)
@ -4949,7 +4949,10 @@ class Form
foreach ($formquestion as $key => $input) { foreach ($formquestion as $key => $input) {
if (is_array($input) && !empty($input)) { if (is_array($input) && !empty($input)) {
if ($input['type'] == 'hidden') { if ($input['type'] == 'hidden') {
$more .= '<input type="hidden" id="'.dol_escape_htmltag($input['name']).'" name="'.dol_escape_htmltag($input['name']).'" value="'.dol_escape_htmltag($input['value']).'">'."\n"; $moreattr = (!empty($input['moreattr']) ? ' '.$input['moreattr'] : '');
$morecss = (!empty($input['morecss']) ? ' '.$input['morecss'] : '');
$more .= '<input type="hidden" id="'.dol_escape_htmltag($input['name']).'" name="'.dol_escape_htmltag($input['name']).'" value="'.dol_escape_htmltag($input['value']).'" class="'.$morecss.'"'.$moreattr.'>'."\n";
} }
} }
} }
@ -4979,7 +4982,7 @@ class Form
$moreonecolumn .= $input['value']; $moreonecolumn .= $input['value'];
$moreonecolumn .= '</textarea>'; $moreonecolumn .= '</textarea>';
$moreonecolumn .= '</div>'; $moreonecolumn .= '</div>';
} elseif ($input['type'] == 'select') { } elseif (in_array($input['type'], ['select', 'multiselect'])) {
if (empty($morecss)) { if (empty($morecss)) {
$morecss = 'minwidth100'; $morecss = 'minwidth100';
} }
@ -4996,7 +4999,11 @@ class Form
if (!empty($input['label'])) { if (!empty($input['label'])) {
$more .= $input['label'].'</div><div class="tagtd left">'; $more .= $input['label'].'</div><div class="tagtd left">';
} }
$more .= $this->selectarray($input['name'], $input['values'], isset($input['default'])?$input['default']:'', $show_empty, $key_in_label, $value_as_key, $moreattr, $translate, $maxlen, $disabled, $sort, $morecss); if ($input['type'] == 'select') {
$more .= $this->selectarray($input['name'], $input['values'], $input['default'], $show_empty, $key_in_label, $value_as_key, $moreattr, $translate, $maxlen, $disabled, $sort, $morecss);
} else {
$more .= $this->multiselectarray($input['name'], $input['values'], is_array($input['default']) ? $input['default'] : [$input['default']], $key_in_label, $value_as_key, $morecss, $translate, $maxlen, $moreattr);
}
$more .= '</div></div>'."\n"; $more .= '</div></div>'."\n";
} elseif ($input['type'] == 'checkbox') { } elseif ($input['type'] == 'checkbox') {
$more .= '<div class="tagtr">'; $more .= '<div class="tagtr">';
@ -8386,7 +8393,7 @@ class Form
</dt> </dt>
<dd class="dropdowndd"> <dd class="dropdowndd">
<div class="multiselectcheckbox'.$htmlname.'"> <div class="multiselectcheckbox'.$htmlname.'">
<ul class="ul'.$htmlname.' '.$htmlname.$pos.'"> <ul class="'.$htmlname.($pos == '1' ? 'left' : '').'">
'.$listoffieldsforselection.' '.$listoffieldsforselection.'
</ul> </ul>
</div> </div>

View File

@ -1551,7 +1551,7 @@ class FormMail extends Form
if (!empty($extrafields->attributes[$product->table_element]['label']) && is_array($extrafields->attributes[$product->table_element]['label']) && count($extrafields->attributes[$product->table_element]['label']) > 0) { if (!empty($extrafields->attributes[$product->table_element]['label']) && is_array($extrafields->attributes[$product->table_element]['label']) && count($extrafields->attributes[$product->table_element]['label']) > 0) {
foreach ($extrafields->attributes[$product->table_element]['label'] as $key => $label) { foreach ($extrafields->attributes[$product->table_element]['label'] as $key => $label) {
$substit_line['__PRODUCT_EXTRAFIELD_'.strtoupper($key).'__'] = $product->array_options['options_'.$key]; $substit_line['__PRODUCT_EXTRAFIELD_'.strtoupper($key).'__'] = isset($product->array_options['options_'.$key]) ? $product->array_options['options_'.$key] : '';
} }
} }
} }

View File

@ -92,14 +92,14 @@ class DoliDBMysqli extends DoliDB
// We do not try to connect to database, only to server. Connect to database is done later in constrcutor // We do not try to connect to database, only to server. Connect to database is done later in constrcutor
$this->db = $this->connect($host, $user, $pass, '', $port); $this->db = $this->connect($host, $user, $pass, '', $port);
if ($this->db->connect_errno) { if ($this->db && empty($this->db->connect_errno)) {
$this->connected = false;
$this->ok = false;
$this->error = $this->db->connect_error;
dol_syslog(get_class($this)."::DoliDBMysqli Connect error: ".$this->error, LOG_ERR);
} else {
$this->connected = true; $this->connected = true;
$this->ok = true; $this->ok = true;
} else {
$this->connected = false;
$this->ok = false;
$this->error = empty($this->db) ? 'Failed to connect' : $this->db->connect_error;
dol_syslog(get_class($this)."::DoliDBMysqli Connect error: ".$this->error, LOG_ERR);
} }
// If server connection is ok, we try to connect to the database // If server connection is ok, we try to connect to the database
@ -204,7 +204,13 @@ class DoliDBMysqli extends DoliDB
{ {
// phpcs:enable // phpcs:enable
dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG); dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG);
return $this->db->select_db($database); $result = false;
try {
$result = $this->db->select_db($database);
} catch (Exception $e) {
// Nothing done on error
}
return $result;
} }
@ -216,7 +222,7 @@ class DoliDBMysqli extends DoliDB
* @param string $passwd Password * @param string $passwd Password
* @param string $name Name of database (not used for mysql, used for pgsql) * @param string $name Name of database (not used for mysql, used for pgsql)
* @param integer $port Port of database server * @param integer $port Port of database server
* @return mysqli Database access object * @return mysqli|null Database access object
* @see close() * @see close()
*/ */
public function connect($host, $login, $passwd, $name, $port = 0) public function connect($host, $login, $passwd, $name, $port = 0)
@ -228,7 +234,13 @@ class DoliDBMysqli extends DoliDB
// Can also be // Can also be
// mysqli::init(); mysql::options(MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT = 0'); mysqli::options(MYSQLI_OPT_CONNECT_TIMEOUT, 5); // mysqli::init(); mysql::options(MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT = 0'); mysqli::options(MYSQLI_OPT_CONNECT_TIMEOUT, 5);
// return mysqli::real_connect($host, $user, $pass, $db, $port); // return mysqli::real_connect($host, $user, $pass, $db, $port);
return new mysqli($host, $login, $passwd, $name, $port); $tmp = false;
try {
$tmp = new mysqli($host, $login, $passwd, $name, $port);
} catch (Exception $e) {
dol_syslog(get_class($this)."::connect failed", LOG_DEBUG);
}
return $tmp;
} }
/** /**
@ -746,6 +758,9 @@ class DoliDBMysqli extends DoliDB
// phpcs:enable // phpcs:enable
// FIXME: $fulltext_keys parameter is unused // FIXME: $fulltext_keys parameter is unused
$pk = '';
$sqluq = $sqlk = array();
// cles recherchees dans le tableau des descriptions (fields) : type,value,attribute,null,default,extra // cles recherchees dans le tableau des descriptions (fields) : type,value,attribute,null,default,extra
// ex. : $fields['rowid'] = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment'); // ex. : $fields['rowid'] = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment');
$sql = "CREATE TABLE ".$table."("; $sql = "CREATE TABLE ".$table."(";

View File

@ -419,7 +419,11 @@ class DoliDBPgsql extends DoliDB
// try first Unix domain socket (local) // try first Unix domain socket (local)
if ((!empty($host) && $host == "socket") && !defined('NOLOCALSOCKETPGCONNECT')) { if ((!empty($host) && $host == "socket") && !defined('NOLOCALSOCKETPGCONNECT')) {
$con_string = "dbname='".$name."' user='".$login."' password='".$passwd."'"; // $name may be empty $con_string = "dbname='".$name."' user='".$login."' password='".$passwd."'"; // $name may be empty
$this->db = @pg_connect($con_string); try {
$this->db = @pg_connect($con_string);
} catch (Exception $e) {
// No message
}
} }
// if local connection failed or not requested, use TCP/IP // if local connection failed or not requested, use TCP/IP

View File

@ -237,63 +237,69 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
} }
*/ */
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
$isImageValid = image_format_supported($sFileName) > 0 ? true : false; //var_dump($sFileName); var_dump(image_format_supported($sFileName));exit;
$isImageValid = (image_format_supported($sFileName) >= 0 ? true : false);
if (!$isImageValid) { if (!$isImageValid) {
$sErrorNumber = '202'; $sErrorNumber = '202';
} }
// Check if it is an allowed extension. // Check if it is an allowed extension.
if (!$sErrorNumber && IsAllowedExt($sExtension, $resourceType)) { if (!$sErrorNumber) {
$iCounter = 0; if (IsAllowedExt($sExtension, $resourceType)) {
$iCounter = 0;
while (true) { while (true) {
$sFilePath = $sServerDir.$sFileName; $sFilePath = $sServerDir.$sFileName;
if (is_file($sFilePath)) {
$iCounter++;
$sFileName = RemoveExtension($sOriginalFileName).'('.$iCounter.').'.$sExtension;
$sErrorNumber = '201';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
dol_move_uploaded_file($oFile['tmp_name'], $sFilePath, 0, 0);
if (is_file($sFilePath)) { if (is_file($sFilePath)) {
if (isset($Config['ChmodOnUpload']) && !$Config['ChmodOnUpload']) { $iCounter++;
break; $sFileName = RemoveExtension($sOriginalFileName).'('.$iCounter.').'.$sExtension;
$sErrorNumber = '201';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
dol_move_uploaded_file($oFile['tmp_name'], $sFilePath, 0, 0);
if (is_file($sFilePath)) {
if (isset($Config['ChmodOnUpload']) && !$Config['ChmodOnUpload']) {
break;
}
$permissions = '0777';
if (isset($Config['ChmodOnUpload']) && $Config['ChmodOnUpload']) {
$permissions = (string) $Config['ChmodOnUpload'];
}
$permissionsdec = octdec($permissions);
dol_syslog("commands.php permission = ".$permissions." ".$permissionsdec." ".decoct($permissionsdec));
$oldumask = umask(0);
chmod($sFilePath, $permissionsdec);
umask($oldumask);
} }
$permissions = '0777'; break;
if (isset($Config['ChmodOnUpload']) && $Config['ChmodOnUpload']) {
$permissions = (string) $Config['ChmodOnUpload'];
}
$permissionsdec = octdec($permissions);
dol_syslog("commands.php permission = ".$permissions." ".$permissionsdec." ".decoct($permissionsdec));
$oldumask = umask(0);
chmod($sFilePath, $permissionsdec);
umask($oldumask);
} }
break;
} }
}
if (file_exists($sFilePath)) { if (file_exists($sFilePath)) {
//previous checks failed, try once again //previous checks failed, try once again
if (isset($isImageValid) && $isImageValid === -1 && IsImageValid($sFilePath, $sExtension) === false) { if (isset($isImageValid) && $isImageValid === -1 && IsImageValid($sFilePath, $sExtension) === false) {
@unlink($sFilePath); dol_syslog("commands.php IsImageValid is ko");
$sErrorNumber = '202'; @unlink($sFilePath);
} elseif (isset($detectHtml) && $detectHtml === -1 && DetectHtml($sFilePath) === true) { $sErrorNumber = '202';
@unlink($sFilePath); } elseif (isset($detectHtml) && $detectHtml === -1 && DetectHtml($sFilePath) === true) {
$sErrorNumber = '202'; dol_syslog("commands.php DetectHtml is ko");
@unlink($sFilePath);
$sErrorNumber = '202';
}
} }
} else {
$sErrorNumber = '202';
} }
} else {
$sErrorNumber = '202';
} }
} else { } else {
$sErrorNumber = '202'; $sErrorNumber = '203';
} }

View File

@ -159,7 +159,10 @@ $Config['FileTypesAbsolutePath']['File'] = ($Config['UserFilesAbsolutePath'] ==
$Config['QuickUploadPath']['File'] = $Config['UserFilesPath']; $Config['QuickUploadPath']['File'] = $Config['UserFilesPath'];
$Config['QuickUploadAbsolutePath']['File'] = $Config['UserFilesAbsolutePath']; $Config['QuickUploadAbsolutePath']['File'] = $Config['UserFilesAbsolutePath'];
$Config['AllowedExtensions']['Image'] = array('bmp', 'gif', 'jpeg', 'jpg', 'png'); $Config['AllowedExtensions']['Image'] = array('bmp', 'gif', 'jpeg', 'jpg', 'png', 'ai');
if (!empty($conf->global->MAIN_ALLOW_SVG_FILES_AS_IMAGES)) {
$Config['AllowedExtensions']['Image'][] = 'svg';
}
$Config['DeniedExtensions']['Image'] = array(); $Config['DeniedExtensions']['Image'] = array();
$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'].'image/'; $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'].'image/';
$Config['FileTypesAbsolutePath']['Image'] = ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/'; $Config['FileTypesAbsolutePath']['Image'] = ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/';

View File

@ -42,14 +42,14 @@ function SendError($number, $text)
// Check if this uploader has been enabled. // Check if this uploader has been enabled.
if (!$Config['Enabled']) { if (empty($Config['Enabled'])) {
SendUploadResults('1', '', '', 'This file uploader is disabled. Please check the "filemanagerdol/connectors/php/config.php" file'); SendUploadResults('1', '', '', 'This file uploader is disabled. Please check the "filemanagerdol/connectors/php/config.php" file');
} }
$sCommand = 'QuickUpload'; $sCommand = 'QuickUpload';
// The file type (from the QueryString, by default 'File'). // The file type (from the QueryString, by default 'File', can be 'Image' or 'Media').
$sType = isset($_GET['Type']) ? $_GET['Type'] : 'File'; $sType = GETPOSTISSET('Type') ? GETPOST('Type') : 'File';
$sCurrentFolder = "/"; $sCurrentFolder = "/";
@ -71,5 +71,5 @@ if (!IsAllowedType($sType)) {
// Get the CKEditor Callback // Get the CKEditor Callback
$CKEcallback = $_GET['CKEditorFuncNum']; $CKEcallback = $_GET['CKEditorFuncNum'];
//modify the next line adding in the new param // Get uploaded filr and move it at correct place. Note: Some tests on file name are also included into this function
FileUpload($sType, $sCurrentFolder, $sCommand, $CKEcallback); FileUpload($sType, $sCurrentFolder, $sCommand, $CKEcallback);

View File

@ -27,6 +27,7 @@
* \brief Ensemble de fonctions de base pour le module banque * \brief Ensemble de fonctions de base pour le module banque
*/ */
/** /**
* Prepare array with list of tabs * Prepare array with list of tabs
* *
@ -273,13 +274,13 @@ function checkSwiftForAccount($account)
* @param Account $account A bank account * @param Account $account A bank account
* @return boolean True if informations are valid, false otherwise * @return boolean True if informations are valid, false otherwise
*/ */
function checkIbanForAccount($account) function checkIbanForAccount(Account $account)
{ {
require_once DOL_DOCUMENT_ROOT.'/includes/php-iban/oophp-iban.php'; require_once DOL_DOCUMENT_ROOT.'/includes/php-iban/oophp-iban.php';
$ibantocheck = ($account->iban ? $account->iban : $account->iban_prefix); // iban or iban_prefix for backward compatibility $ibantocheck = ($account->iban ? $account->iban : $account->iban_prefix); // iban or iban_prefix for backward compatibility
$iban = new IBAN($ibantocheck); $iban = new PHP_IBAN\IBAN($ibantocheck);
$check = $iban->Verify(); $check = $iban->Verify();
if ($check) { if ($check) {

View File

@ -1717,7 +1717,9 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess
// Update index table of files (llx_ecm_files) // Update index table of files (llx_ecm_files)
if ($donotupdatesession == 1) { if ($donotupdatesession == 1) {
$result = addFileIntoDatabaseIndex($upload_dir, basename($destfile).($resupload == 2 ? '.noexe' : ''), $TFile['name'][$i], 'uploaded', 0, $object); $sharefile = 0;
if ($TFile['type'][$i] == 'application/pdf' && strpos($_SERVER["REQUEST_URI"], 'product') !== false && !empty($conf->global->PRODUCT_ALLOW_EXTERNAL_DOWNLOAD)) $sharefile = 1;
$result = addFileIntoDatabaseIndex($upload_dir, basename($destfile).($resupload == 2 ? '.noexe' : ''), $TFile['name'][$i], 'uploaded', $sharefile, $object);
if ($result < 0) { if ($result < 0) {
if ($allowoverwrite) { if ($allowoverwrite) {
// Do not show error message. We can have an error due to DB_ERROR_RECORD_ALREADY_EXISTS // Do not show error message. We can have an error due to DB_ERROR_RECORD_ALREADY_EXISTS

View File

@ -508,7 +508,7 @@ function dol_print_object_info($object, $usetable = 0)
} }
// User signature // User signature
if (!empty($object->user_signature)) { if (!empty($object->user_signature) || !empty($object->user_signature_id)) {
if ($usetable) { if ($usetable) {
print '<tr><td class="titlefield">'; print '<tr><td class="titlefield">';
} }
@ -526,7 +526,7 @@ function dol_print_object_info($object, $usetable = 0)
} }
} else { } else {
$userstatic = new User($db); $userstatic = new User($db);
$userstatic->fetch($object->user_signature); $userstatic->fetch($object->user_signature_id ? $object->user_signature_id : $object->user_signature);
if ($userstatic->id) { if ($userstatic->id) {
print $userstatic->getNomUrl(-1, '', 0, 0, 0); print $userstatic->getNomUrl(-1, '', 0, 0, 0);
} else { } else {
@ -563,7 +563,7 @@ function dol_print_object_info($object, $usetable = 0)
} }
// User close // User close
if (!empty($object->user_cloture) || !empty($object->user_closing)) { if (!empty($object->user_cloture) || !empty($object->user_closing) || !empty($object->user_closing_id)) {
if (isset($object->user_cloture) && !empty($object->user_cloture)) { if (isset($object->user_cloture) && !empty($object->user_cloture)) {
$object->user_closing = $object->user_cloture; $object->user_closing = $object->user_cloture;
} }
@ -584,7 +584,7 @@ function dol_print_object_info($object, $usetable = 0)
} }
} else { } else {
$userstatic = new User($db); $userstatic = new User($db);
$userstatic->fetch($object->user_closing); $userstatic->fetch($object->user_closing_id ? $object->user_closing_id : $object->user_closing);
if ($userstatic->id) { if ($userstatic->id) {
print $userstatic->getNomUrl(-1, '', 0, 0, 0); print $userstatic->getNomUrl(-1, '', 0, 0, 0);
} else { } else {
@ -624,7 +624,7 @@ function dol_print_object_info($object, $usetable = 0)
} }
// User conciliate // User conciliate
if (!empty($object->user_rappro)) { if (!empty($object->user_rappro) || !empty($object->user_rappro_id)) {
if ($usetable) { if ($usetable) {
print '<tr><td class="titlefield">'; print '<tr><td class="titlefield">';
} }
@ -642,7 +642,7 @@ function dol_print_object_info($object, $usetable = 0)
} }
} else { } else {
$userstatic = new User($db); $userstatic = new User($db);
$userstatic->fetch($object->user_rappro); $userstatic->fetch($object->user_rappro_id ? $object->user_rappro_id : $object->user_rappro);
if ($userstatic->id) { if ($userstatic->id) {
print $userstatic->getNomUrl(1, '', 0, 0, 0); print $userstatic->getNomUrl(1, '', 0, 0, 0);
} else { } else {

View File

@ -212,7 +212,7 @@ function group_prepare_head($object)
$head = array(); $head = array();
$head[$h][0] = DOL_URL_ROOT.'/user/group/card.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/user/group/card.php?id='.$object->id;
$head[$h][1] = $langs->trans("GroupCard"); $head[$h][1] = $langs->trans("Card");
$head[$h][2] = 'group'; $head[$h][2] = 'group';
$h++; $h++;
@ -455,6 +455,28 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
} }
//Dark mode
if ($foruserprofile) {
//Nothing
} else {
$listofdarkmodes = array(
'0' => $langs->trans("AlwaysDisabled"),
'1' => $langs->trans("AccordingToBrowser"),
'2' => $langs->trans("AlwaysEnabled")
);
print '<tr class="oddeven">';
print '<td>'.$langs->trans("DarkThemeMode").'</td>';
print '<td colspan="'.($colspan - 1).'">';
if ($edit) {
print $form->selectarray('THEME_DARKMODEENABLED', $listofdarkmodes, isset($conf->global->THEME_DARKMODEENABLED) ? $conf->global->THEME_DARKMODEENABLED : 0);
} else {
print $listofdarkmodes[isset($conf->global->THEME_DARKMODEENABLED) ? $conf->global->THEME_DARKMODEENABLED : 0];
}
print $form->textwithpicto('', $langs->trans("DoesNotWorkWithAllThemes"));
print '</tr>';
}
// TopMenuDisableImages // TopMenuDisableImages
if ($foruserprofile) { if ($foruserprofile) {
/* /*

View File

@ -213,6 +213,53 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $c
return $content; return $content;
} }
/**
* Converts smiley string into the utf8 sequence.
* @param string $content Content to replace
* @return string Replacement of all smiley strings with their utf8 code
* @see dolWebsiteOutput()
*/
function dolReplaceSmileyCodeWithUTF8($content)
{
$map = array(
":face_with_tears_of_joy:" => "\xF0\x9F\x98\x82",
":grinning_face_with_smiling_eyes:" => "\xF0\x9F\x98\x81",
":smiling_face_with_open_mouth:" => "\xF0\x9F\x98\x83",
":smiling_face_with_open_mouth_and_cold_sweat:" => "\xF0\x9F\x98\x85",
":smiling_face_with_open_mouth_and_tightly_closed_eyes:" => "\xF0\x9F\x98\x86",
":winking_face:" => "\xF0\x9F\x98\x89",
":smiling_face_with_smiling_eyes:" => "\xF0\x9F\x98\x8A",
":face_savouring_delicious_food:" => "\xF0\x9F\x98\x8B",
":relieved_face:" => "\xF0\x9F\x98\x8C",
":smiling_face_with_heart_shaped_eyes:" => "\xF0\x9F\x98\x8D",
":smiling_face_with_sunglasses:" => "\xF0\x9F\x98\x8E",
":smirking_face:" => "\xF0\x9F\x98\x8F",
":neutral_face:" => "\xF0\x9F\x98\x90",
":expressionless_face:" => "\xF0\x9F\x98\x91",
":unamused_face:" => "\xF0\x9F\x98\x92",
":face_with_cold_sweat:" => "\xF0\x9F\x98\x93",
":pensive_face:" => "\xF0\x9F\x98\x94",
":confused_face:" => "\xF0\x9F\x98\x95",
":confounded_face:" => "\xF0\x9F\x98\x96",
":kissing_face:" => "\xF0\x9F\x98\x97",
":face_throwing_a_kiss:" => "\xF0\x9F\x98\x98",
":kissing_face_with_smiling_eyes:" => "\xF0\x9F\x98\x99",
":kissing_face_with_closed_eyes:" => "\xF0\x9F\x98\x9A",
":face_with_stuck_out_tongue:" => "\xF0\x9F\x98\x9B",
":face_with_stuck_out_tongue_and_winking_eye:" => "\xF0\x9F\x98\x9C",
":face_with_stuck_out_tongue_and_tightly_closed_eyes:" => "\xF0\x9F\x98\x9D",
":disappointed_face:" => "\xF0\x9F\x98\x9E",
":worried_face:" => "\xF0\x9F\x98\x9F",
":angry_face:" => "\xF0\x9F\x98\xA0",
":face_with_symbols_on_mouth:" => "\xF0\x9F\x98\xA1",
);
foreach ($map as $key => $value) {
$content = str_replace($key, $value, $content);
}
return $content;
}
/** /**
* Render a string of an HTML content and output it. * Render a string of an HTML content and output it.
* Used to ouput the page when viewed from a server (Dolibarr or Apache). * Used to ouput the page when viewed from a server (Dolibarr or Apache).
@ -369,6 +416,8 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '')
$content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite '.$conf->global->WEBSITE_ADD_CSS_TO_BODY, $content); $content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite '.$conf->global->WEBSITE_ADD_CSS_TO_BODY, $content);
} }
$content = dolReplaceSmileyCodeWithUTF8($content);
dol_syslog("dolWebsiteOutput end"); dol_syslog("dolWebsiteOutput end");
print $content; print $content;

View File

@ -301,7 +301,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile)
* @param string $format "rss" * @param string $format "rss"
* @param string $title Title of export * @param string $title Title of export
* @param string $desc Description of export * @param string $desc Description of export
* @param array $events_array Array of events ("uid","startdate","summary","url","desc","author","category") or Array of WebsitePage * @param array $events_array Array of events ("uid","startdate","summary","url","desc","author","category","image") or Array of WebsitePage
* @param string $outputfile Output file * @param string $outputfile Output file
* @param string $filter (optional) Filter * @param string $filter (optional) Filter
* @param string $url Url (If empty, forge URL for agenda RSS export) * @param string $url Url (If empty, forge URL for agenda RSS export)
@ -377,7 +377,7 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt
$tmpevent['author'] = $event->author_alias ? $event->author_alias : 'unknown'; $tmpevent['author'] = $event->author_alias ? $event->author_alias : 'unknown';
//$tmpevent['category'] = ''; //$tmpevent['category'] = '';
$tmpevent['desc'] = $event->description; $tmpevent['desc'] = $event->description;
$tmpevent['image'] = $GLOBALS['website']->virtualhost.'/medias/'.$event->image;
$event = $tmpevent; $event = $tmpevent;
} }
@ -387,7 +387,9 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt
$url = $event["url"]; $url = $event["url"];
$author = $event["author"]; $author = $event["author"];
$category = $event["category"]; $category = $event["category"];
if (!empty($event["image"])) {
$image = $event["image"];
}
/* No place inside a RSS /* No place inside a RSS
$priority = $event["priority"]; $priority = $event["priority"];
$fulldayevent = $event["fulldayevent"]; $fulldayevent = $event["fulldayevent"];
@ -404,6 +406,10 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt
fwrite($fichier, "<category><![CDATA[".$category."]]></category>\n"); fwrite($fichier, "<category><![CDATA[".$category."]]></category>\n");
fwrite($fichier, "<description><![CDATA["); fwrite($fichier, "<description><![CDATA[");
if (!empty($image)) {
fwrite($fichier, '<p><img class="center" src="'.$image.'"/></p>');
}
if ($description) { if ($description) {
fwrite($fichier, $description); fwrite($fichier, $description);
} }

View File

@ -0,0 +1,358 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2022 Faustin Boitel <fboitel@enseirb-matmeca.fr>
*
* 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/>.
* or see https://www.gnu.org/
*/
/**
* \file htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php
* \ingroup barcode
* \brief File of class to manage barcode numbering with standard rule
*/
require_once DOL_DOCUMENT_ROOT.'/core/modules/barcode/modules_barcode.class.php';
/**
* Class to manage barcode with standard rule
*/
class mod_barcode_thirdparty_standard extends ModeleNumRefBarCode
{
public $name = 'Standard'; // Model Name
public $code_modifiable; // Editable code
public $code_modifiable_invalide; // Modified code if it is invalid
public $code_modifiable_null; // Modified code if it is null
public $code_null; // Optional code
/**
* Dolibarr version of the loaded document
* @var string
*/
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
/**
* @var int Automatic numbering
*/
public $code_auto;
public $searchcode; // Search string
public $numbitcounter; // Number of digits the counter
public $prefixIsRequired; // The prefix field of third party must be filled when using {pre}
/**
* Constructor
*/
public function __construct()
{
$this->code_null = 0;
$this->code_modifiable = 1;
$this->code_modifiable_invalide = 1;
$this->code_modifiable_null = 1;
$this->code_auto = 1;
$this->prefixIsRequired = 0;
}
/** Return description of module
*
* @param Translate $langs Object langs
* @return string Description of module
*/
public function info($langs)
{
global $conf, $mc;
global $form;
$langs->load("thirdparties");
$disabled = ((!empty($mc->sharings['referent']) && $mc->sharings['referent'] != $conf->entity) ? ' disabled' : '');
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
$texte .= '<input type="hidden" name="token" value="'.newToken().'">';
$texte .= '<input type="hidden" name="page_y" value="">';
$texte .= '<input type="hidden" name="action" value="setModuleOptions">';
$texte .= '<input type="hidden" name="param1" value="BARCODE_STANDARD_THIRDPARTY_MASK">';
$texte .= '<table class="nobordernopadding" width="100%">';
$tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("BarCode"), $langs->transnoentities("BarCode"));
$tooltip .= $langs->trans("GenericMaskCodes3EAN");
$tooltip .= '<strong>'.$langs->trans("Example").':</strong><br>';
$tooltip .= '020{000000000}? (for internal use)<br>';
$tooltip .= '9771234{00000}? (example of ISSN code with prefix 1234)<br>';
$tooltip .= '9791234{00000}? (example of ISMN code with prefix 1234)<br>';
//$tooltip.=$langs->trans("GenericMaskCodes5");
// Mask parameter
//$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):</td>';
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="value1" value="'.(!empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK) ? $conf->global->BARCODE_STANDARD_THIRDPARTY_MASK : '').'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit reposition" name="modify" value="'.$langs->trans("Modify").'"'.$disabled.'></td>';
$texte .= '</tr>';
$texte .= '</table>';
$texte .= '</form>';
return $texte;
}
/**
* Return an example of result returned by getNextValue
*
* @param Translate $langs Object langs
* @param Societe $objthirdparty Object third-party
* @return string Return string example
*/
public function getExample($langs, $objthirdparty = 0)
{
$examplebarcode = $this->getNextValue($objthirdparty, '');
if (!$examplebarcode) {
$examplebarcode = $langs->trans('NotConfigured');
}
if ($examplebarcode == "ErrorBadMask") {
$langs->load("errors");
$examplebarcode = $langs->trans($examplebarcode);
}
return $examplebarcode;
}
/**
* Return literal barcode type code from numerical rowid type of barcode
*
* @param Database $db Database
* @param int $type Type of barcode (EAN, ISBN, ...) as rowid
* @return string
*/
public function literalBarcodeType($db, $type = '')
{
global $conf;
$out = '';
$sql = "SELECT rowid, code, libelle as label";
$sql .= " FROM ".MAIN_DB_PREFIX."c_barcode_type";
$sql .= " WHERE rowid = '".$db->escape($type)."'";
$sql .= " AND entity = ".((int) $conf->entity);
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
if ($num > 0) {
$obj = $db->fetch_object($result);
$out .= $obj->label; //take the label corresponding to the type rowid in the database
}
} else {
dol_print_error($db);
}
return $out;
}
/**
* Return next value
*
* @param Societe $objthirdparty Object third-party
* @param string $type Type of barcode (EAN, ISBN, ...)
* @return string Value if OK, '' if module not configured, <0 if KO
*/
public function getNextValue($objthirdparty, $type = '')
{
global $db, $conf;
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/barcode.lib.php'; // to be able to call function barcode_gen_ean_sum($ean)
if (empty($type)) {
$type = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY;
} //get barcode type configuration for companies if $type not set
// TODO
// Get Mask value
$mask = '';
if (!empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK)) {
$mask = $conf->global->BARCODE_STANDARD_THIRDPARTY_MASK;
}
if (empty($mask)) {
$this->error = 'NotConfigured';
return '';
}
$field = 'barcode';
$where = '';
$now = dol_now();
$numFinal = get_next_value($db, $mask, 'societe', $field, $where, '', $now);
//Begin barcode with key: for barcode with key (EAN13...) calculate and substitute the last character (* or ?) used in the mask by the key
if ((substr($numFinal, -1)=='*') or (substr($numFinal, -1)=='?')) { // if last mask character is * or ? a joker, probably we have to calculate a key as last character (EAN13...)
$literaltype = '';
$literaltype = $this->literalBarcodeType($db, $type);//get literal_Barcode_Type
switch ($literaltype) {
case 'EAN13': //EAN13 rowid = 2
if (strlen($numFinal)==13) {// be sure that the mask length is correct for EAN13
$ean = substr($numFinal, 0, 12); //take first 12 digits
$eansum = barcode_gen_ean_sum($ean);
$ean .= $eansum; //substitute the las character by the key
$numFinal = $ean;
}
break;
// Other barcode cases with key could be written here
default:
break;
}
}
//End barcode with key
return $numFinal;
}
/**
* Check validity of code according to its rules
*
* @param DoliDB $db Database handler
* @param string $code Code to check/correct
* @param Societe $thirdparty Object third-party
* @param int $thirdparty_type 0 = customer/prospect , 1 = supplier
* @param string $type type of barcode (EAN, ISBN, ...)
* @return int 0 if OK
* -1 ErrorBadCustomerCodeSyntax
* -2 ErrorCustomerCodeRequired
* -3 ErrorCustomerCodeAlreadyUsed
* -4 ErrorPrefixRequired
*/
public function verif($db, &$code, $thirdparty, $thirdparty_type, $type)
{
global $conf;
//var_dump($code.' '.$thirdparty->ref.' '.$thirdparty_type);exit;
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$result = 0;
$code = strtoupper(trim($code));
if (empty($code) && $this->code_null && empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK)) {
$result = 0;
} elseif (empty($code) && (!$this->code_null || !empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK))) {
$result = -2;
} else {
if ($this->verif_syntax($code, $type) >= 0) {
$is_dispo = $this->verif_dispo($db, $code, $thirdparty);
if ($is_dispo <> 0) {
$result = -3;
} else {
$result = 0;
}
} else {
if (dol_strlen($code) == 0) {
$result = -2;
} else {
$result = -1;
}
}
}
dol_syslog(get_class($this)."::verif type=".$thirdparty_type." result=".$result);
return $result;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return if a code is used (by other element)
*
* @param DoliDB $db Handler acces base
* @param string $code Code to check
* @param Societe $thirdparty Objet third-party
* @return int 0 if available, <0 if KO
*/
public function verif_dispo($db, $code, $thirdparty)
{
// phpcs:enable
$sql = "SELECT barcode FROM ".MAIN_DB_PREFIX."societe";
$sql .= " WHERE barcode = '".$db->escape($code)."'";
if ($thirdparty->id > 0) {
$sql .= " AND rowid <> ".$thirdparty->id;
}
$resql = $db->query($sql);
if ($resql) {
if ($db->num_rows($resql) == 0) {
return 0;
} else {
return -1;
}
} else {
return -2;
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return if a barcode value match syntax
*
* @param string $codefortest Code to check syntax
* @param string $typefortest Type of barcode (ISBN, EAN, ...)
* @return int 0 if OK, <0 if KO
*/
public function verif_syntax($codefortest, $typefortest)
{
// phpcs:enable
global $conf;
$result = 0;
// Get Mask value
$mask = empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK) ? '' : $conf->global->BARCODE_STANDARD_THIRDPARTY_MASK;
if (!$mask) {
$this->error = 'NotConfigured';
return -1;
}
dol_syslog(get_class($this).'::verif_syntax codefortest='.$codefortest." typefortest=".$typefortest);
$newcodefortest = $codefortest;
// Special case, if mask is on 12 digits instead of 13, we remove last char into code to test
if (in_array($typefortest, array('EAN13', 'ISBN'))) { // We remove the CRC char not included into mask
if (preg_match('/\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}/i', $mask, $reg)) {
if (strlen($reg[1]) == 12) {
$newcodefortest = substr($newcodefortest, 0, 12);
}
dol_syslog(get_class($this).'::verif_syntax newcodefortest='.$newcodefortest);
}
}
$result = check_value($mask, $newcodefortest);
if (is_string($result)) {
$this->error = $result;
return -1;
}
return $result;
}
}

View File

@ -517,7 +517,8 @@ class modFacture extends DolibarrModules
'fd.subprice'=>"LineUnitPrice", 'fd.tva_tx'=>"LineVATRate", 'fd.qty'=>"LineQty", 'fd.total_ht'=>"LineTotalHT", 'fd.total_tva'=>"LineTotalVAT", 'fd.subprice'=>"LineUnitPrice", 'fd.tva_tx'=>"LineVATRate", 'fd.qty'=>"LineQty", 'fd.total_ht'=>"LineTotalHT", 'fd.total_tva'=>"LineTotalVAT",
'fd.total_ttc'=>"LineTotalTTC", 'fd.date_start'=>"DateStart", 'fd.date_end'=>"DateEnd", 'fd.special_code'=>'SpecialCode', 'fd.total_ttc'=>"LineTotalTTC", 'fd.date_start'=>"DateStart", 'fd.date_end'=>"DateEnd", 'fd.special_code'=>'SpecialCode',
'fd.product_type'=>"TypeOfLineServiceOrProduct", 'fd.fk_product'=>'ProductId', 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel', 'fd.product_type'=>"TypeOfLineServiceOrProduct", 'fd.fk_product'=>'ProductId', 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel',
$alias_product_perentity . '.accountancy_code_sell'=>'ProductAccountancySellCode' $alias_product_perentity . '.accountancy_code_sell'=>'ProductAccountancySellCode',
'aa.account_number' => 'AccountingAffectation'
); );
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
$this->export_fields_array[$r]['f.multicurrency_code'] = 'Currency'; $this->export_fields_array[$r]['f.multicurrency_code'] = 'Currency';
@ -549,6 +550,7 @@ class modFacture extends DolibarrModules
'fd.special_code'=>'Numeric', 'fd.product_type'=>"Numeric", 'fd.fk_product'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text', 'fd.special_code'=>'Numeric', 'fd.product_type'=>"Numeric", 'fd.fk_product'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text',
$alias_product_perentity . '.accountancy_code_sell'=>'Text', $alias_product_perentity . '.accountancy_code_sell'=>'Text',
'f.entity'=>'List:entity:label:rowid', 'f.entity'=>'List:entity:label:rowid',
'aa.account_number' => 'Text'
); );
if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) { if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) {
$this->export_TypeFields_array[$r]['f.module_source'] = 'Text'; $this->export_TypeFields_array[$r]['f.module_source'] = 'Text';
@ -561,7 +563,8 @@ class modFacture extends DolibarrModules
'fd.subprice'=>"invoice_line", 'fd.total_ht'=>"invoice_line", 'fd.total_tva'=>"invoice_line", 'fd.total_ttc'=>"invoice_line", 'fd.tva_tx'=>"invoice_line", 'fd.subprice'=>"invoice_line", 'fd.total_ht'=>"invoice_line", 'fd.total_tva'=>"invoice_line", 'fd.total_ttc'=>"invoice_line", 'fd.tva_tx'=>"invoice_line",
'fd.qty'=>"invoice_line", 'fd.date_start'=>"invoice_line", 'fd.date_end'=>"invoice_line", 'fd.special_code'=>'invoice_line', 'fd.qty'=>"invoice_line", 'fd.date_start'=>"invoice_line", 'fd.date_end'=>"invoice_line", 'fd.special_code'=>'invoice_line',
'fd.product_type'=>'invoice_line', 'fd.fk_product'=>'product', 'p.ref'=>'product', 'p.label'=>'product', $alias_product_perentity . '.accountancy_code_sell'=>'product', 'fd.product_type'=>'invoice_line', 'fd.fk_product'=>'product', 'p.ref'=>'product', 'p.label'=>'product', $alias_product_perentity . '.accountancy_code_sell'=>'product',
'f.fk_user_author'=>'user', 'uc.login'=>'user', 'f.fk_user_valid'=>'user', 'uv.login'=>'user' 'f.fk_user_author'=>'user', 'uc.login'=>'user', 'f.fk_user_valid'=>'user', 'uv.login'=>'user',
'aa.account_number' => "invoice_line",
); );
$this->export_special_array[$r] = array('none.rest'=>'getRemainToPay'); $this->export_special_array[$r] = array('none.rest'=>'getRemainToPay');
$this->export_dependencies_array[$r] = array('invoice_line'=>'fd.rowid', 'product'=>'fd.rowid', 'none.rest'=>array('f.rowid', 'f.total_ttc', 'f.close_code')); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_dependencies_array[$r] = array('invoice_line'=>'fd.rowid', 'product'=>'fd.rowid', 'none.rest'=>array('f.rowid', 'f.total_ttc', 'f.close_code')); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
@ -602,6 +605,7 @@ class modFacture extends DolibarrModules
$this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
} }
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra3 on p.rowid = extra3.fk_object'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra3 on p.rowid = extra3.fk_object';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'accounting_account as aa on fd.fk_code_ventilation = aa.rowid';
$this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture'; $this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture';
$this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('invoice').')'; $this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('invoice').')';
if (empty($user->rights->societe->client->voir)) { if (empty($user->rights->societe->client->voir)) {

View File

@ -41,10 +41,10 @@ if ($action == 'presend') {
$object->fetch_projet(); $object->fetch_projet();
if (!in_array($object->element, array('societe', 'user', 'member'))) { $ref = dol_sanitizeFileName($object->ref);
if (!in_array($object->element, array('user', 'member'))) {
// TODO get also the main_lastdoc field of $object. If not found, try to guess with following code // TODO get also the main_lastdoc field of $object. If not found, try to guess with following code
$ref = dol_sanitizeFileName($object->ref);
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
// Special case // Special case
if ($object->element == 'invoice_supplier') { if ($object->element == 'invoice_supplier') {
@ -82,12 +82,15 @@ if ($action == 'presend') {
// Build document if it not exists // Build document if it not exists
$forcebuilddoc = true; $forcebuilddoc = true;
if (in_array($object->element, array('societe', 'user', 'member'))) { if (in_array($object->element, array('user', 'member'))) {
$forcebuilddoc = false; $forcebuilddoc = false;
} }
if ($object->element == 'invoice_supplier' && empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) { if ($object->element == 'invoice_supplier' && empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) {
$forcebuilddoc = false; $forcebuilddoc = false;
} }
if ($object->element == 'societe' && empty($conf->global->COMPANY_ADDON_PDF)) {
$forcebuilddoc = false;
}
if ($forcebuilddoc) { // If there is no default value for supplier invoice, we do not generate file, even if modelpdf was set by a manual generation if ($forcebuilddoc) { // If there is no default value for supplier invoice, we do not generate file, even if modelpdf was set by a manual generation
if ((!$file || !is_readable($file)) && method_exists($object, 'generateDocument')) { if ((!$file || !is_readable($file)) && method_exists($object, 'generateDocument')) {
$result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); $result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);

View File

@ -72,19 +72,25 @@ class InterfaceWorkflowManager extends DolibarrTriggers
if ($action == 'PROPAL_CLOSE_SIGNED') { if ($action == 'PROPAL_CLOSE_SIGNED') {
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
if (!empty($conf->commande->enabled) && !empty($conf->global->WORKFLOW_PROPAL_AUTOCREATE_ORDER)) { if (!empty($conf->commande->enabled) && !empty($conf->global->WORKFLOW_PROPAL_AUTOCREATE_ORDER)) {
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $object->fetchObjectLinked();
$newobject = new Commande($this->db); if (!empty($object->linkedObjectsIds['commande'])) {
setEventMessages($langs->trans("OrderExists"), null, 'warnings');
return $ret;
} else {
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
$newobject = new Commande($this->db);
$newobject->context['createfrompropal'] = 'createfrompropal'; $newobject->context['createfrompropal'] = 'createfrompropal';
$newobject->context['origin'] = $object->element; $newobject->context['origin'] = $object->element;
$newobject->context['origin_id'] = $object->id; $newobject->context['origin_id'] = $object->id;
$ret = $newobject->createFromProposal($object, $user); $ret = $newobject->createFromProposal($object, $user);
if ($ret < 0) { if ($ret < 0) {
$this->error = $newobject->error; $this->error = $newobject->error;
$this->errors[] = $newobject->error; $this->errors[] = $newobject->error;
}
return $ret;
} }
return $ret;
} }
} }

View File

@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; // Ship
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; // supplier invoice require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; // supplier invoice
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; // supplier order require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; // supplier order
require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; // supplier proposal require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; // supplier proposal
require_once DOL_DOCUMENT_ROOT."/reception/class/reception.class.php"; // reception require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; // reception
include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php'; include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php';
//require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; // Holidays (leave request) //require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; // Holidays (leave request)
//require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; // expernse report //require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; // expernse report

View File

@ -804,9 +804,13 @@ if (empty($reshook)) {
* View * View
*/ */
$title = $langs->trans("Shipment");
if ($action == 'create2') {
$title = $langs->trans("CreateShipment");
}
$help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:M&oacute;dulo_Expediciones|DE:Modul_Lieferungen'; $help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:M&oacute;dulo_Expediciones|DE:Modul_Lieferungen';
llxHeader('', $langs->trans('Shipment'), 'Expedition', $help_url); llxHeader('', $title, 'Expedition', $help_url);
if (empty($action)) { if (empty($action)) {
$action = 'view'; $action = 'view';

View File

@ -611,7 +611,7 @@ if (!empty($moreforfilter)) {
} }
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', ''));
if ($massactionbutton) { if ($massactionbutton) {
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1); // This also change content of $arrayfields $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); // This also change content of $arrayfields
} }
@ -621,6 +621,13 @@ print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" :
// Fields title search // Fields title search
print '<tr class="liste_titre_filter">'; print '<tr class="liste_titre_filter">';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print '<td class="liste_titre middle">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
// Ref // Ref
if (!empty($arrayfields['e.ref']['checked'])) { if (!empty($arrayfields['e.ref']['checked'])) {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
@ -742,13 +749,18 @@ if (!empty($arrayfields['e.billed']['checked'])) {
print '</td>'; print '</td>';
} }
// Action column // Action column
print '<td class="liste_titre middle">'; if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
$searchpicto = $form->showFilterAndCheckAddButtons(0); print '<td class="liste_titre middle">';
print $searchpicto; $searchpicto = $form->showFilterAndCheckAddButtons(0);
print '</td>'; print $searchpicto;
print '</td>';
}
print "</tr>\n"; print "</tr>\n";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
if (!empty($arrayfields['e.ref']['checked'])) { if (!empty($arrayfields['e.ref']['checked'])) {
print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, '', $sortfield, $sortorder);
} }
@ -809,7 +821,9 @@ if (!empty($arrayfields['e.fk_statut']['checked'])) {
if (!empty($arrayfields['e.billed']['checked'])) { if (!empty($arrayfields['e.billed']['checked'])) {
print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, '', $sortfield, $sortorder, 'center ');
} }
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
print "</tr>\n"; print "</tr>\n";
$typenArray = $formcompany->typent_array(1); $typenArray = $formcompany->typent_array(1);
@ -832,6 +846,18 @@ while ($i < min($num, $limit)) {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
print '<td class="nowrap" align="center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
// Ref // Ref
if (!empty($arrayfields['e.ref']['checked'])) { if (!empty($arrayfields['e.ref']['checked'])) {
print '<td class="nowraponall">'; print '<td class="nowraponall">';
@ -1008,15 +1034,17 @@ while ($i < min($num, $limit)) {
} }
// Action column // Action column
print '<td class="nowrap" align="center">'; if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined print '<td class="nowrap" align="center">';
$selected = 0; if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
if (in_array($obj->rowid, $arrayofselected)) { $selected = 0;
$selected = 1; if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
} }
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; print '</td>';
} }
print '</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }

View File

@ -231,7 +231,7 @@ if (!empty($conf->project->enabled)) {
$formproject = new FormProjets($db); $formproject = new FormProjets($db);
} }
$title = $langs->trans('Order')." - ".$langs->trans('Shipments'); $title = $object->ref." - ".$langs->trans('Shipments');
$help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge'; $help_url = 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes|DE:Modul_Kundenaufträge';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
@ -610,7 +610,7 @@ if ($id > 0 || !empty($ref)) {
* Lines or orders with quantity shipped and remain to ship * Lines or orders with quantity shipped and remain to ship
* Note: Qty shipped are already available into $object->expeditions[fk_product] * Note: Qty shipped are already available into $object->expeditions[fk_product]
*/ */
print '<table class="noborder noshadow" width="100%">'; print '<table id="tablelines" class="noborder noshadow" width="100%">';
$sql = "SELECT cd.rowid, cd.fk_product, cd.product_type as type, cd.label, cd.description,"; $sql = "SELECT cd.rowid, cd.fk_product, cd.product_type as type, cd.label, cd.description,";
$sql .= " cd.price, cd.tva_tx, cd.subprice,"; $sql .= " cd.price, cd.tva_tx, cd.subprice,";
@ -635,18 +635,19 @@ if ($id > 0 || !empty($ref)) {
if ($resql) { if ($resql) {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $i = 0;
print '<thead>';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Description").'</td>'; print '<th>'.$langs->trans("Description").'</th>';
print '<td class="center">'.$langs->trans("QtyOrdered").'</td>'; print '<th class="center">'.$langs->trans("QtyOrdered").'</th>';
print '<td class="center">'.$langs->trans("QtyShipped").'</td>'; print '<th class="center">'.$langs->trans("QtyShipped").'</th>';
print '<td class="center">'.$langs->trans("KeepToShip").'</td>'; print '<th class="center">'.$langs->trans("KeepToShip").'</th>';
if (!empty($conf->stock->enabled)) { if (!empty($conf->stock->enabled)) {
print '<td class="center">'.$langs->trans("RealStock").'</td>'; print '<th class="center">'.$langs->trans("RealStock").'</th>';
} else { } else {
print '<td>&nbsp;</td>'; print '<th>&nbsp;</th>';
} }
print "</tr>\n"; print "</tr>\n";
print '</thead>';
$toBeShipped = array(); $toBeShipped = array();
$toBeShippedTotal = 0; $toBeShippedTotal = 0;
@ -797,6 +798,10 @@ if ($id > 0 || !empty($ref)) {
print $product->stock_reel; print $product->stock_reel;
if ($product->stock_reel < $toBeShipped[$objp->fk_product]) { if ($product->stock_reel < $toBeShipped[$objp->fk_product]) {
print ' '.img_warning($langs->trans("StockTooLow")); print ' '.img_warning($langs->trans("StockTooLow"));
if (!empty($conf->global->STOCK_CORRECT_STOCK_IN_SHIPMENT)) {
$nbPiece = $toBeShipped[$objp->fk_product] - $product->stock_reel;
print ' &nbsp; '.$langs->trans("GoTo").' <a href="'.DOL_URL_ROOT.'/product/stock/product.php?id='.((int) $product->id).'&action=correction&nbpiece='.urlencode($nbPiece).'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.((int) $object->id)).'">'.$langs->trans("CorrectStock").'</a>';
}
} }
print '</td>'; print '</td>';
} else { } else {

View File

@ -41,7 +41,7 @@ $result = restrictedArea($user, 'export');
$form = new Form($db); $form = new Form($db);
$help_url = 'EN:Module_Exports_En|FR:Module_Exports|ES:M&oacute;dulo_Exportaciones'; $help_url = 'EN:Module_Exports_En|FR:Module_Exports|ES:M&oacute;dulo_Exportaciones|DE:Modul_DatenExporte';
llxHeader('', $langs->trans("ExportsArea"), $help_url); llxHeader('', $langs->trans("ExportsArea"), $help_url);

View File

@ -29,7 +29,7 @@
require '../main.inc.php'; require '../main.inc.php';
// Load translation files required by the page // Load translation files required by the page
$langs->load("externalsite"); $langs->load("other");
$mainmenu = GETPOST('mainmenu', "aZ09"); $mainmenu = GETPOST('mainmenu', "aZ09");

View File

@ -25,7 +25,7 @@
require "../main.inc.php"; require "../main.inc.php";
// Load translation files required by the page // Load translation files required by the page
$langs->load("externalsite"); $langs->load("other");
top_htmlhead("", ""); top_htmlhead("", "");

View File

@ -590,7 +590,7 @@ class Fichinter extends CommonObject
$sql .= " SET fk_statut = 1"; $sql .= " SET fk_statut = 1";
$sql .= ", ref = '".$this->db->escape($num)."'"; $sql .= ", ref = '".$this->db->escape($num)."'";
$sql .= ", date_valid = '".$this->db->idate($now)."'"; $sql .= ", date_valid = '".$this->db->idate($now)."'";
$sql .= ", fk_user_valid = ".((int) $user->id); $sql .= ", fk_user_valid = ".($user->id > 0 ? (int) $user->id : "null");
$sql .= " WHERE rowid = ".((int) $this->id); $sql .= " WHERE rowid = ".((int) $this->id);
$sql .= " AND entity = ".((int) $conf->entity); $sql .= " AND entity = ".((int) $conf->entity);
$sql .= " AND fk_statut = 0"; $sql .= " AND fk_statut = 0";
@ -1204,7 +1204,7 @@ class Fichinter extends CommonObject
// Clear fields // Clear fields
$this->user_author_id = $user->id; $this->user_author_id = $user->id;
$this->user_valid = ''; $this->user_valid = 0;
$this->date_creation = ''; $this->date_creation = '';
$this->date_validation = ''; $this->date_validation = '';
$this->ref_client = ''; $this->ref_client = '';

View File

@ -34,7 +34,7 @@ if (!defined('DOL_APPLICATION_TITLE')) {
define('DOL_APPLICATION_TITLE', 'Dolibarr'); define('DOL_APPLICATION_TITLE', 'Dolibarr');
} }
if (!defined('DOL_VERSION')) { if (!defined('DOL_VERSION')) {
define('DOL_VERSION', '16.0.0-beta'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c define('DOL_VERSION', '16.0.0'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
} }
if (!defined('EURO')) { if (!defined('EURO')) {

View File

@ -1581,7 +1581,7 @@ class CommandeFournisseur extends CommonOrder
$sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").","; $sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").",";
$sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").","; $sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").",";
$sql .= " fk_user_author=".(isset($this->user_author_id) ? $this->user_author_id : "null").","; $sql .= " fk_user_author=".(isset($this->user_author_id) ? $this->user_author_id : "null").",";
$sql .= " fk_user_valid=".(isset($this->user_valid) ? $this->user_valid : "null").","; $sql .= " fk_user_valid=".(isset($this->user_valid) && $this->user_valid > 0 ? $this->user_valid : "null").",";
$sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").","; $sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").",";
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").","; $sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").",";
$sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").","; $sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").",";
@ -1679,7 +1679,7 @@ class CommandeFournisseur extends CommonOrder
// Clear fields // Clear fields
$this->user_author_id = $user->id; $this->user_author_id = $user->id;
$this->user_valid = ''; $this->user_valid = 0;
$this->date_creation = ''; $this->date_creation = '';
$this->date_validation = ''; $this->date_validation = '';
$this->ref_supplier = ''; $this->ref_supplier = '';

View File

@ -3060,7 +3060,7 @@ class FactureFournisseur extends CommonInvoice
// Clear fields // Clear fields
$object->ref_supplier = (empty($this->ref_supplier) ? $langs->trans("CopyOf").' '.$object->ref_supplier : $this->ref_supplier); $object->ref_supplier = (empty($this->ref_supplier) ? $langs->trans("CopyOf").' '.$object->ref_supplier : $this->ref_supplier);
$object->author = $user->id; $object->author = $user->id;
$object->user_valid = ''; $object->user_valid = 0;
$object->fk_facture_source = 0; $object->fk_facture_source = 0;
$object->date_creation = ''; $object->date_creation = '';
$object->date_validation = ''; $object->date_validation = '';

View File

@ -1121,12 +1121,15 @@ class ProductFournisseur extends Product
* *
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
* @param string $option On what the link point to ('nolink', ...) * @param string $option On what the link point to ('nolink', ...)
* @param int $notooltip 1=Disable tooltip * @param int $maxlength Maxlength of ref
* @param string $morecss Add more css on link
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @param int $notooltip No tooltip
* @param string $morecss ''=Add more css on link
* @param int $add_label 0=Default, 1=Add label into string, >1=Add first chars into string
* @param string $sep ' - '=Separator between ref and label if option 'add_label' is set
* @return string String with URL * @return string String with URL
*/ */
public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $save_lastsearch_value = -1, $notooltip = 0, $morecss = '', $add_label = 0, $sep = ' - ')
{ {
global $db, $conf, $langs, $hookmanager; global $db, $conf, $langs, $hookmanager;
@ -1137,6 +1140,11 @@ class ProductFournisseur extends Product
$result = ''; $result = '';
$label = ''; $label = '';
$newref = $this->ref;
if ($maxlength) {
$newref = dol_trunc($newref, $maxlength, 'middle');
}
if (!empty($this->entity)) { if (!empty($this->entity)) {
$tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80); $tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80);
if ($this->nbphoto > 0) { if ($this->nbphoto > 0) {
@ -1258,10 +1266,12 @@ class ProductFournisseur extends Product
$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
} }
if ($withpicto != 2) { if ($withpicto != 2) {
$result .= $this->ref.($this->ref_supplier ? ' ('.$this->ref_supplier.')' : ''); $result .= $newref.($this->ref_supplier ? ' ('.$this->ref_supplier.')' : '');
} }
$result .= $linkend; $result .= $linkend;
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : ''); if ($withpicto != 2) {
$result .= (($add_label && $this->label) ? $sep.dol_trunc($this->label, ($add_label > 1 ? $add_label : 0)) : '');
}
global $action; global $action;
$hookmanager->initHooks(array($this->element . 'dao')); $hookmanager->initHooks(array($this->element . 'dao'));

View File

@ -1538,7 +1538,10 @@ if (!empty($conf->project->enabled)) {
$formproject = new FormProjets($db); $formproject = new FormProjets($db);
} }
$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Card'); $title = $object->ref." - ".$langs->trans('Card');
if ($action == 'create') {
$title = $langs->trans("NewOrderSupplier");
}
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);

View File

@ -99,10 +99,6 @@ if ($action == 'addcontact' && ($user->rights->fournisseur->commande->creer || $
/* /*
* View * View
*/ */
$title = $langs->trans('SupplierOrder')." - ".$langs->trans('ContactsAddresses');
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
llxHeader('', $title, $help_url);
$form = new Form($db); $form = new Form($db);
$formcompany = new FormCompany($db); $formcompany = new FormCompany($db);
$contactstatic = new Contact($db); $contactstatic = new Contact($db);
@ -121,6 +117,10 @@ if ($id > 0 || !empty($ref)) {
if ($object->fetch($id, $ref) > 0) { if ($object->fetch($id, $ref) > 0) {
$object->fetch_thirdparty(); $object->fetch_thirdparty();
$title = $object->ref." - ".$langs->trans('ContactsAddresses');
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
llxHeader('', $title, $help_url);
$head = ordersupplier_prepare_head($object); $head = ordersupplier_prepare_head($object);
print dol_get_fiche_head($head, 'contact', $langs->trans("SupplierOrder"), -1, 'order'); print dol_get_fiche_head($head, 'contact', $langs->trans("SupplierOrder"), -1, 'order');

View File

@ -505,10 +505,11 @@ $formproduct = new FormProduct($db);
$warehouse_static = new Entrepot($db); $warehouse_static = new Entrepot($db);
$supplierorderdispatch = new CommandeFournisseurDispatch($db); $supplierorderdispatch = new CommandeFournisseurDispatch($db);
$title = $object->ref." - ".$langs->trans('OrderDispatch');
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
$morejs = array('/fourn/js/lib_dispatch.js.php'); $morejs = array('/fourn/js/lib_dispatch.js.php');
llxHeader('', $langs->trans("OrderDispatch"), $help_url, '', 0, 0, $morejs); llxHeader('', $title, $help_url, '', 0, 0, $morejs);
if ($id > 0 || !empty($ref)) { if ($id > 0 || !empty($ref)) {
$soc = new Societe($db); $soc = new Societe($db);

View File

@ -98,7 +98,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
$form = new Form($db); $form = new Form($db);
$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Documents'); $title = $object->ref." - ".$langs->trans('Documents');
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);

View File

@ -113,7 +113,7 @@ if ($id > 0 || !empty($ref)) {
$object->info($object->id); $object->info($object->id);
} }
$title = $langs->trans("SupplierOrder").' - '.$langs->trans('Info').' - '.$object->ref.' '.$object->name; $title = $object->ref.' - '.$langs->trans('Info').' - '.$object->ref.' '.$object->name;
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
$title = $object->ref.' '.$object->name.' - '.$langs->trans("Info"); $title = $object->ref.' '.$object->name.' - '.$langs->trans("Info");
} }

View File

@ -93,6 +93,7 @@ $search_product_category = GETPOST('search_product_category', 'int');
$search_ref = GETPOST('search_ref', 'alpha'); $search_ref = GETPOST('search_ref', 'alpha');
$search_refsupp = GETPOST('search_refsupp', 'alpha'); $search_refsupp = GETPOST('search_refsupp', 'alpha');
$search_company = GETPOST('search_company', 'alpha'); $search_company = GETPOST('search_company', 'alpha');
$search_company_alias = GETPOST('search_company_alias', 'alpha');
$search_town = GETPOST('search_town', 'alpha'); $search_town = GETPOST('search_town', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha');
$search_state = GETPOST("search_state", 'alpha'); $search_state = GETPOST("search_state", 'alpha');
@ -181,6 +182,7 @@ $checkedtypetiers = 0;
// Definition of array of fields for columns // Definition of array of fields for columns
$arrayfields = array( $arrayfields = array(
's.name_alias'=>array('label'=>"AliasNameShort", 'position'=>47, 'checked'=>0),
's.town'=>array('label'=>"Town", 'enabled'=>1, 'position'=>47, 'checked'=>1), 's.town'=>array('label'=>"Town", 'enabled'=>1, 'position'=>47, 'checked'=>1),
's.zip'=>array('label'=>"Zip", 'enabled'=>1, 'position'=>47, 'checked'=>1), 's.zip'=>array('label'=>"Zip", 'enabled'=>1, 'position'=>47, 'checked'=>1),
'state.nom'=>array('label'=>"StateShort", 'enabled'=>1, 'position'=>48), 'state.nom'=>array('label'=>"StateShort", 'enabled'=>1, 'position'=>48),
@ -246,6 +248,7 @@ if (empty($reshook)) {
$search_ref = ''; $search_ref = '';
$search_refsupp = ''; $search_refsupp = '';
$search_company = ''; $search_company = '';
$search_company_alias = '';
$search_town = ''; $search_town = '';
$search_zip = ""; $search_zip = "";
$search_state = ""; $search_state = "";
@ -657,6 +660,9 @@ if (empty($reshook)) {
if ($search_company) { if ($search_company) {
$param .= '&search_company='.urlencode($search_company); $param .= '&search_company='.urlencode($search_company);
} }
if ($search_company_alias) {
$param .= '&search_company_alias='.urlencode($search_company_alias);
}
//if ($search_ref_customer) $param .= '&search_ref_customer='.urlencode($search_ref_customer); //if ($search_ref_customer) $param .= '&search_ref_customer='.urlencode($search_ref_customer);
if ($search_user > 0) { if ($search_user > 0) {
$param .= '&search_user='.urlencode($search_user); $param .= '&search_user='.urlencode($search_user);
@ -741,7 +747,7 @@ $sql = 'SELECT';
if ($sall || $search_product_category > 0) { if ($sall || $search_product_category > 0) {
$sql = 'SELECT DISTINCT'; $sql = 'SELECT DISTINCT';
} }
$sql .= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.email,'; $sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.email,';
$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 .= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_livraison,cf.date_valid, cf.date_approve,"; $sql .= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_livraison,cf.date_valid, cf.date_approve,";
@ -803,6 +809,9 @@ if ($sall) {
if ($search_company) { if ($search_company) {
$sql .= natural_search('s.nom', $search_company); $sql .= natural_search('s.nom', $search_company);
} }
if ($search_company_alias) {
$sql .= natural_search('s.name_alias', $search_company_alias);
}
if ($search_request_author) { if ($search_request_author) {
$sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_request_author); $sql .= natural_search(array('u.lastname', 'u.firstname', 'u.login'), $search_request_author);
} }
@ -861,6 +870,9 @@ if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) {
if ($search_company) { if ($search_company) {
$sql .= natural_search('s.nom', $search_company); $sql .= natural_search('s.nom', $search_company);
} }
if ($search_company_alias) {
$sql .= natural_search('s.name_alias', $search_company_alias);
}
if ($search_sale > 0) { if ($search_sale > 0) {
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale); $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale);
} }
@ -1032,6 +1044,9 @@ if ($resql) {
if ($search_company) { if ($search_company) {
$param .= '&search_company='.urlencode($search_company); $param .= '&search_company='.urlencode($search_company);
} }
if ($search_company_alias) {
$param .= '&search_company_alias='.urlencode($search_company_alias);
}
if ($search_user > 0) { if ($search_user > 0) {
$param .= '&search_user='.urlencode($search_user); $param .= '&search_user='.urlencode($search_user);
} }
@ -1275,6 +1290,10 @@ if ($resql) {
if (!empty($arrayfields['cf.fk_soc']['checked'])) { if (!empty($arrayfields['cf.fk_soc']['checked'])) {
print '<td class="liste_titre"><input type="text" size="6" class="flat" name="search_company" value="'.$search_company.'"></td>'; print '<td class="liste_titre"><input type="text" size="6" class="flat" name="search_company" value="'.$search_company.'"></td>';
} }
// Alias
if (!empty($arrayfields['s.name_alias']['checked'])) {
print '<td class="liste_titre"><input type="text" size="6" class="flat" name="search_company_alias" value="'.$search_company_alias.'"></td>';
}
// Town // Town
if (!empty($arrayfields['s.town']['checked'])) { if (!empty($arrayfields['s.town']['checked'])) {
print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_town" value="'.$search_town.'"></td>'; print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_town" value="'.$search_town.'"></td>';
@ -1447,6 +1466,9 @@ if ($resql) {
if (!empty($arrayfields['cf.fk_soc']['checked'])) { if (!empty($arrayfields['cf.fk_soc']['checked'])) {
print_liste_field_titre($arrayfields['cf.fk_soc']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['cf.fk_soc']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder);
} }
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);
}
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);
} }
@ -1623,7 +1645,17 @@ if ($resql) {
$thirdpartytmp->id = $obj->socid; $thirdpartytmp->id = $obj->socid;
$thirdpartytmp->name = $obj->name; $thirdpartytmp->name = $obj->name;
$thirdpartytmp->email = $obj->email; $thirdpartytmp->email = $obj->email;
print $thirdpartytmp->getNomUrl(1, 'supplier'); $thirdpartytmp->name_alias = $obj->alias;
print $thirdpartytmp->getNomUrl(1, 'supplier', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
print '</td>'."\n";
if (!$i) {
$totalarray['nbfield']++;
}
}
//alias
if (!empty($arrayfields['s.name_alias']['checked'])) {
print '<td class="tdoverflowmax150">';
print $obj->alias;
print '</td>'."\n"; print '</td>'."\n";
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;

View File

@ -69,7 +69,7 @@ if (empty($reshook)) {
/* /*
* View * View
*/ */
$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Notes'); $title = $object->ref." - ".$langs->trans('Notes');
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);

View File

@ -1894,7 +1894,10 @@ if (!empty($conf->project->enabled)) {
$now = dol_now(); $now = dol_now();
$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Card'); $title = $object->ref." - ".$langs->trans('Card');
if ($action == 'create') {
$title = $langs->trans("NewSupplierInvoice");
}
$help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen'; $help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen';
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
@ -1902,7 +1905,7 @@ llxHeader('', $title, $help_url);
if ($action == 'create') { if ($action == 'create') {
$facturestatic = new FactureFournisseur($db); $facturestatic = new FactureFournisseur($db);
print load_fiche_titre($langs->trans('NewBill'), '', 'supplier_invoice'); print load_fiche_titre($langs->trans('NewSupplierInvoice'), '', 'supplier_invoice');
dol_htmloutput_events(); dol_htmloutput_events();

View File

@ -99,11 +99,6 @@ if ($action == 'addcontact' && ($user->rights->fournisseur->facture->creer || $u
/* /*
* View * View
*/ */
$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('ContactsAddresses');
$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores";
llxHeader('', $title, $helpurl);
$form = new Form($db); $form = new Form($db);
$formcompany = new FormCompany($db); $formcompany = new FormCompany($db);
$contactstatic = new Contact($db); $contactstatic = new Contact($db);
@ -122,6 +117,10 @@ if ($id > 0 || !empty($ref)) {
$alreadypaid = $object->getSommePaiement(); $alreadypaid = $object->getSommePaiement();
$title = $object->ref." - ".$langs->trans('ContactsAddresses');
$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores";
llxHeader('', $title, $helpurl);
$head = facturefourn_prepare_head($object); $head = facturefourn_prepare_head($object);
print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');

View File

@ -94,7 +94,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
$form = new Form($db); $form = new Form($db);
$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Documents'); $title = $object->ref." - ".$langs->trans('Documents');
$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores";
llxHeader('', $title, $helpurl); llxHeader('', $title, $helpurl);

View File

@ -54,18 +54,15 @@ $object = new FactureFournisseur($db);
*/ */
$form = new Form($db); $form = new Form($db);
$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Info');
$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores";
llxHeader('', $title, $helpurl);
$object->fetch($id, $ref); $object->fetch($id, $ref);
$object->fetch_thirdparty(); $object->fetch_thirdparty();
$object->info($object->id); $object->info($object->id);
$alreadypaid = $object->getSommePaiement(); $alreadypaid = $object->getSommePaiement();
$title = $object->ref." - ".$langs->trans('Info');
$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores";
llxHeader('', $title, $helpurl);
$head = facturefourn_prepare_head($object); $head = facturefourn_prepare_head($object);
$titre = $langs->trans('SupplierInvoice'); $titre = $langs->trans('SupplierInvoice');
print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice');

View File

@ -77,6 +77,7 @@ $search_refsupplier = GETPOST('search_refsupplier', 'alpha');
$search_type = GETPOST('search_type', 'int'); $search_type = GETPOST('search_type', 'int');
$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_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');
@ -178,6 +179,7 @@ $arrayfields = array(
'f.date_lim_reglement'=>array('label'=>"DateDue", 'checked'=>1), 'f.date_lim_reglement'=>array('label'=>"DateDue", 'checked'=>1),
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>0), 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>0),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>0),
's.town'=>array('label'=>"Town", 'checked'=>-1), 's.town'=>array('label'=>"Town", 'checked'=>-1),
's.zip'=>array('label'=>"Zip", 'checked'=>1), 's.zip'=>array('label'=>"Zip", 'checked'=>1),
'state.nom'=>array('label'=>"StateShort", 'checked'=>0), 'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
@ -252,6 +254,7 @@ if (empty($reshook)) {
$search_label = ""; $search_label = "";
$search_project = ''; $search_project = '';
$search_company = ""; $search_company = "";
$search_company_alias = "";
$search_amount_no_tax = ""; $search_amount_no_tax = "";
$search_amount_all_tax = ""; $search_amount_all_tax = "";
$search_montant_ht = ''; $search_montant_ht = '';
@ -413,7 +416,7 @@ $sql .= " f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,";
$sql .= ' f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva as multicurrency_total_vat, f.multicurrency_total_ttc,'; $sql .= ' f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva as multicurrency_total_vat, f.multicurrency_total_ttc,';
$sql .= " f.note_public, f.note_private,"; $sql .= " f.note_public, f.note_private,";
$sql .= " f.fk_user_author,"; $sql .= " f.fk_user_author,";
$sql .= " s.rowid as socid, s.nom as name, s.email, 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.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 .= " 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,";
@ -518,6 +521,9 @@ if ($search_project) {
if ($search_company) { if ($search_company) {
$sql .= natural_search('s.nom', $search_company); $sql .= natural_search('s.nom', $search_company);
} }
if ($search_company_alias) {
$sql .= natural_search('s.name_alias', $search_company_alias);
}
if ($search_town) { if ($search_town) {
$sql .= natural_search('s.town', $search_town); $sql .= natural_search('s.town', $search_town);
} }
@ -693,6 +699,7 @@ if ($resql) {
$soc->fetch($socid); $soc->fetch($socid);
if (empty($search_company)) { if (empty($search_company)) {
$search_company = $soc->name; $search_company = $soc->name;
$search_company_alias = $soc->name_alias;
} }
} }
@ -757,6 +764,9 @@ if ($resql) {
if ($search_company) { if ($search_company) {
$param .= '&search_company='.urlencode($search_company); $param .= '&search_company='.urlencode($search_company);
} }
if ($search_company_alias) {
$param .= '&search_company_alias='.urlencode($search_company_alias);
}
if ($search_login) { if ($search_login) {
$param .= '&search_login='.urlencode($search_login); $param .= '&search_login='.urlencode($search_login);
} }
@ -1004,6 +1014,10 @@ if ($resql) {
if (!empty($arrayfields['s.nom']['checked'])) { if (!empty($arrayfields['s.nom']['checked'])) {
print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).'"></td>'; print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
} }
// Alias
if (!empty($arrayfields['s.name_alias']['checked'])) {
print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>';
}
// Town // Town
if (!empty($arrayfields['s.town']['checked'])) { if (!empty($arrayfields['s.town']['checked'])) {
print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>'; print '<td class="liste_titre"><input class="flat maxwidth50" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>';
@ -1181,6 +1195,9 @@ if ($resql) {
if (!empty($arrayfields['s.nom']['checked'])) { if (!empty($arrayfields['s.nom']['checked'])) {
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], 's.nom', '', $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], 's.nom', '', $param, '', $sortfield, $sortorder);
} }
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);
}
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);
} }
@ -1188,7 +1205,10 @@ if ($resql) {
print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder, 'center ');
} }
if (!empty($arrayfields['state.nom']['checked'])) { if (!empty($arrayfields['state.nom']['checked'])) {
print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.name_alias", "", $param, '', $sortfield, $sortorder);
}
if (!empty($arrayfields['state.name_alias']['checked'])) {
print_liste_field_titre($arrayfields['state.name_alias']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
} }
if (!empty($arrayfields['country.code_iso']['checked'])) { if (!empty($arrayfields['country.code_iso']['checked'])) {
print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
@ -1293,6 +1313,7 @@ if ($resql) {
$thirdparty->id = $obj->socid; $thirdparty->id = $obj->socid;
$thirdparty->name = $obj->name; $thirdparty->name = $obj->name;
$thirdparty->name_alias = $obj->alias;
$thirdparty->client = $obj->client; $thirdparty->client = $obj->client;
$thirdparty->fournisseur = $obj->fournisseur; $thirdparty->fournisseur = $obj->fournisseur;
$thirdparty->code_client = $obj->code_client; $thirdparty->code_client = $obj->code_client;
@ -1417,7 +1438,16 @@ if ($resql) {
// Third party // Third party
if (!empty($arrayfields['s.nom']['checked'])) { if (!empty($arrayfields['s.nom']['checked'])) {
print '<td class="tdoverflowmax200">'; print '<td class="tdoverflowmax200">';
print $thirdparty->getNomUrl(1, 'supplier'); print $thirdparty->getNomUrl(1, 'supplier', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Alias
if (!empty($arrayfields['s.name_alias']['checked'])) {
print '<td class="tdoverflowmax200">';
print $thirdparty->name_alias;
print '</td>'; print '</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;

View File

@ -83,7 +83,7 @@ if ($action == 'setlabel' && ($user->rights->fournisseur->facture->creer || $use
$form = new Form($db); $form = new Form($db);
$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Notes'); $title = $object->ref." - ".$langs->trans('Notes');
$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; $helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores";
llxHeader('', $title, $helpurl); llxHeader('', $title, $helpurl);

View File

@ -25,7 +25,7 @@
require '../../main.inc.php'; require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
$langs->loadLangs(array("admin", "ftp")); $langs->loadLangs(array("admin", "other"));
// Security check // Security check
if (!$user->admin) { if (!$user->admin) {

View File

@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array('ftp', 'companies', 'other')); $langs->loadLangs(array('companies', 'other'));
// Security check // Security check
if ($user->socid) { if ($user->socid) {

View File

@ -0,0 +1,21 @@
matrix:
include:
- php: 5.3
dist: precise
language: php
dist: trusty
php:
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.4'
- '8.0'
- '8.1'
- hhvm-3.3
- hhvm-3.6
- hhvm-3.9
- hhvm-3.12
- hhvm-3.15
- hhvm-3.18
script: php utils/test.php && php utils/ootest.php && php utils/other-tests.php

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
{
"name": "globalcitizen/php-iban",
"description": "php-iban is a library for parsing and validating IBAN (and IIBAN) bank account information.",
"license": "LGPL-3.0-only",
"require": {
"php": "^5.4 || ^5.5 || ^5.6 || ^7.0 || ^7.4 || ^8.0 || ^8.1"
},
"autoload": {
"files": ["oophp-iban.php","php-iban.php"]
}
}

View File

@ -1,4 +1,5 @@
<?php <?php
namespace PHP_IBAN;
# OO wrapper for 'php-iban.php' # OO wrapper for 'php-iban.php'
Class IBAN { Class IBAN {
@ -8,9 +9,9 @@ Class IBAN {
$this->iban = $iban; $this->iban = $iban;
} }
public function Verify($iban='') { public function Verify($iban='',$machine_format_only=false) {
if($iban!='') { return verify_iban($iban); } if($iban!='') { return verify_iban($iban,$machine_format_only); }
return verify_iban($this->iban); return verify_iban($this->iban,$machine_format_only);
# we could throw exceptions of various types, but why - does it really # we could throw exceptions of various types, but why - does it really
# add anything? possibly some slightly better user feedback potential. # add anything? possibly some slightly better user feedback potential.
# however, this can be written by hand by performing individual checks # however, this can be written by hand by performing individual checks
@ -19,6 +20,11 @@ Class IBAN {
# maintenance/documentation cost, i say, therefore: no. no exceptions. # maintenance/documentation cost, i say, therefore: no. no exceptions.
} }
public function VerifyMachineFormatOnly($iban='') {
if($iban!='') { return verify_iban($iban,true); }
return verify_iban($this->iban,true);
}
public function MistranscriptionSuggestions() { public function MistranscriptionSuggestions() {
return iban_mistranscription_suggestions($this->iban); return iban_mistranscription_suggestions($this->iban);
} }
@ -31,6 +37,10 @@ Class IBAN {
return iban_to_human_format($this->iban); return iban_to_human_format($this->iban);
} }
public function ObfuscatedFormat() {
return iban_to_obfuscated_format($this->iban);
}
public function Country($iban='') { public function Country($iban='') {
return iban_get_country_part($this->iban); return iban_get_country_part($this->iban);
} }
@ -39,6 +49,10 @@ Class IBAN {
return iban_get_checksum_part($this->iban); return iban_get_checksum_part($this->iban);
} }
public function NationalChecksum($iban='') {
return iban_get_nationalchecksum_part($this->iban);
}
public function BBAN() { public function BBAN() {
return iban_get_bban_part($this->iban); return iban_get_bban_part($this->iban);
} }
@ -59,6 +73,18 @@ Class IBAN {
return iban_checksum_string_replace($this->iban); return iban_checksum_string_replace($this->iban);
} }
public function FindNationalChecksum() {
return iban_find_nationalchecksum($this->iban);
}
public function SetNationalChecksum() {
$this->iban = iban_set_nationalchecksum($this->iban);
}
public function VerifyNationalChecksum() {
return iban_verify_nationalchecksum($this->iban);
}
public function Parts() { public function Parts() {
return iban_get_parts($this->iban); return iban_get_parts($this->iban);
} }
@ -88,6 +114,10 @@ Class IBANCountry {
$this->code = $code; $this->code = $code;
} }
public function Code() {
return $this->code;
}
public function Name() { public function Name() {
return iban_country_get_country_name($this->code); return iban_country_get_country_name($this->code);
} }
@ -144,14 +174,57 @@ Class IBANCountry {
return iban_country_get_branchid_stop_offset($this->code); return iban_country_get_branchid_stop_offset($this->code);
} }
public function NationalChecksumStartOffset() {
return iban_country_get_nationalchecksum_start_offset($this->code);
}
public function NationalChecksumStopOffset() {
return iban_country_get_nationalchecksum_stop_offset($this->code);
}
public function RegistryEdition() { public function RegistryEdition() {
return iban_country_get_registry_edition($this->code); return iban_country_get_registry_edition($this->code);
} }
public function SWIFTOfficial() {
return iban_country_get_country_swift_official($this->code);
}
public function IsSEPA() { public function IsSEPA() {
return iban_country_is_sepa($this->code); return iban_country_is_sepa($this->code);
} }
public function IANA() {
return iban_country_get_iana($this->code);
}
public function ISO3166() {
return iban_country_get_iso3166($this->code);
}
public function ParentRegistrar() {
return iban_country_get_parent_registrar($this->code);
}
public function CurrencyISO4217() {
return iban_country_get_currency_iso4217($this->code);
}
public function CentralBankURL() {
return iban_country_get_central_bank_url($this->code);
}
public function CentralBankName() {
return iban_country_get_central_bank_name($this->code);
}
public function Membership() {
return iban_country_get_membership($this->code);
}
public function IsEuMember() {
return iban_country_get_is_eu_member($this->code);
}
} }
?> ?>

File diff suppressed because it is too large Load Diff

View File

@ -1,81 +1,117 @@
country_code|country_name|domestic_example|bban_example|bban_format_swift|bban_format_regex|bban_length|iban_example|iban_format_swift|iban_format_regex|iban_length|bban_bankid_start_offset|bban_bankid_stop_offset|bban_branchid_start_offset|bban_branchid_stop_offset|registry_edition|country_sepa country_code|country_name|domestic_example|bban_example|bban_format_swift|bban_format_regex|bban_length|iban_example|iban_format_swift|iban_format_regex|iban_length|bban_bankid_start_offset|bban_bankid_stop_offset|bban_branchid_start_offset|bban_branchid_stop_offset|registry_edition|country_sepa|swift_official|bban_checksum_start_offset|bban_checksum_stop_offset|country_code_iana|country_code_iso3166_1_alpha2|parent_registrar|currency_iso4217|central_bank_url|central_bank_name|membership
AA|IIBAN (Internet)|0011123Z5678|0011123Z5678|12!a|^[A-Z0-9]{12}$|12|AA120011123Z5678|AA2!n12!a|^AA(\d{2})([A-Z0-9]{12})$|16|0|3|||N/A|0 AL|Albania|0000000235698741|212110090000000235698741|8!n16!c|^(\d{8})([A-Za-z0-9]{16})$|24|AL47212110090000000235698741|AL2!n8!n16!c|^AL(\d{2})(\d{8})([A-Za-z0-9]{16})$|28|0|2|3|6|2011-06-20|0|1|7|7|al|AL||ALL|www.bankofalbania.org|Bank of Albania|non_member
AL|Albania|0000000235698741|212110090000000235698741|8!n16!c|^(\d{8})([A-Za-z0-9]{16})$|24|AL47212110090000000235698741|AL2!n8!n16!c|^AL(\d{2})(\d{8})([A-Za-z0-9]{16})$|28|0|2|3|6|2011-06-20|0 DZ|Algeria|12341234123412341234|12341234123412341234|20!n|^[0-9]{20}$|20|DZ3512341234123412341234|DZ2!n20!n|^DZ(\d{2})(\d{20})$|24|||||2016-01-22|0|0|||dz|DZ||DZD|www.bank-of-algeria.dz|Bank of Algeria|non_member
AD|Andorra|2030200359100100|00012030200359100100|4!n4!n12!c|^(\d{4})(\d{4})([A-Za-z0-9]{12})$|20|AD1200012030200359100100|AD2!n4!n4!n12!c|^AD(\d{2})(\d{4})(\d{4})([A-Za-z0-9]{12})$|24|0|3|4|7|2011-06-20|0 AD|Andorra|2030200359100100|00012030200359100100|4!n4!n12!c|^(\d{4})(\d{4})([A-Za-z0-9]{12})$|20|AD1200012030200359100100|AD2!n4!n4!n12!c|^AD(\d{2})(\d{4})(\d{4})([A-Za-z0-9]{12})$|24|0|3|4|7|2011-06-20|1|1|||ad|AD||EUR|www.inaf.ad|Institut Nacional Andorrà de Finances|other_member
AT|Austria|19043-234573201|1904300234573201|5!n11!n|^(\d{5})(\d{11})$|16|AT611904300234573201|AT2!n5!n11!n|^AT(\d{2})(\d{5})(\d{11})$|20|0|4|||2011-06-20|1 AO|Angola|123412341234123412341|123412341234123412341|21!n|^[0-9]{21}$|21|AO44123412341234123412341|AO2!n21!n|^AO(\d{2})(\d{21})$|25|||||2016-01-22|0|0|||ao|AO||AOA|www.bna.ao|National Bank of Angola|non_member
AX|Aland Islands|123456-785|12345600000785|6!n7!n1!n|^(\d{6})(\d{7})(\d{1})$|14|AX2112345600000785|AX2!n6!n7!n1!n|^AX(\d{2})(\d{6})(\d{7})(\d{1})$|18|0|2|||2013-09-05|1 AT|Austria|19043-234573201|1904300234573201|5!n11!n|^(\d{5})(\d{11})$|16|AT611904300234573201|AT2!n5!n11!n|^AT(\d{2})(\d{5})(\d{11})$|20|0|4|||2011-06-20|1|1|||at|AT||EUR|www.oenb.at|Austrian National Bank|eu_member
AZ|Azerbaijan|NABZ00000000137010001944|NABZ00000000137010001944|4!a20!c|^([A-Z]{4})([A-Za-z0-9]{20})$|24|AZ21NABZ00000000137010001944|AZ2!n4!a20!c|^AZ(\d{2})([A-Z]{4})([A-Za-z0-9]{20})$|28|0|3|||2012-05-29|0 AZ|Azerbaijan|NABZ00000000137010001944|NABZ00000000137010001944|4!a20!c|^([A-Z]{4})([A-Za-z0-9]{20})$|24|AZ21NABZ00000000137010001944|AZ2!n4!a20!c|^AZ(\d{2})([A-Z]{4})([A-Za-z0-9]{20})$|28|0|3|||2012-05-29|0|1|||az|AZ||AZN|www.cbar.az|The Central Bank of the Republic of Azerbaijan|non_member
BH|Bahrain|00001299123456|BMAG00001299123456|4!a14!c|^([A-Z]{4})([A-Za-z0-9]{14})$|22|BH67BMAG00001299123456|BH2!n4!a14!c|^BH(\d{2})([A-Z]{4})([A-Za-z0-9]{14})$|22|0|3|||2012-05-29|0 BH|Bahrain|00001299123456|BMAG00001299123456|4!a14!c|^([A-Z]{4})([A-Za-z0-9]{14})$|18|BH67BMAG00001299123456|BH2!n4!a14!c|^BH(\d{2})([A-Z]{4})([A-Za-z0-9]{14})$|22|0|3|||2012-05-29|0|1|||bh|BH||BHD|www.cbb.gov.bh|Central Bank of Bahrain|non_member
BE|Belgium|539-0075470-34|539007547034|3!n7!n2!n|^(\d{3})(\d{7})(\d{2})$|12|BE68539007547034|BE2!n3!n7!n2!n|^BE(\d{2})(\d{3})(\d{7})(\d{2})$|16|0|2|||2011-06-20|1 BE|Belgium|539-0075470-34|539007547034|3!n7!n2!n|^(\d{3})(\d{7})(\d{2})$|12|BE68539007547034|BE2!n3!n7!n2!n|^BE(\d{2})(\d{3})(\d{7})(\d{2})$|16|0|2|||2011-06-20|1|1|10|11|be|BE||EUR|www.nbb.be|National Bank of Belgium|eu_member
BA|Bosnia and Herzegovina|199-044-00012002-79|1990440001200279|3!n3!n8!n2!n|^(\d{3})(\d{3})(\d{8})(\d{2})$|16|BA391290079401028494|BA2!n3!n3!n8!n2!n|^BA(\d{2})(\d{3})(\d{3})(\d{8})(\d{2})$|20|0|2|3|5|2011-06-20|0 BJ|Benin|A12312341234123412341234|A12312341234123412341234|1!a23!n|^[A-Z]{1}[0-9]{23}$|24|BJ83A12312341234123412341234|BJ2!n1!a23!n|^BJ(\d{2})([A-Z]{1}[0-9]{23})$|28|||||2016-01-22|0|0|||bj|BJ||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member
BR|Brazil|0009795493C1|00360305000010009795493P1|8!n5!n10!n1!a1!c|^(\d{8})(\d{5})(\d{10})([A-Z]{1})([A-Za-z0-9]{1})$|25|BR2300360305000010009795493P1BR1800000000141455123924100C2|BR2!n8!n5!n10!n1!a1!c|^BR(\d{2})(\d{8})(\d{5})(\d{10})([A-Z]{1})([A-Za-z0-9]{1})$|29|0|7|8|12|2013-06-20|0 BA|Bosnia and Herzegovina|199-044-00012002-79|1990440001200279|3!n3!n8!n2!n|^(\d{3})(\d{3})(\d{8})(\d{2})$|16|BA391290079401028494|BA2!n3!n3!n8!n2!n|^BA(\d{2})(\d{3})(\d{3})(\d{8})(\d{2})$|20|0|2|3|5|2011-06-20|0|1|14|15|ba|BA||BAM|www.cbbh.ba|Central Bank of Bosnia and Herzegovina|non_member
BG|Bulgaria|BNBG 9661 1020 3456 78|BNBG96611020345678|4!a4!n2!n8!c|^([A-Z]{4})(\d{4})(\d{2})([A-Za-z0-9]{8})$|18|BG80BNBG96611020345678|BG2!n4!a4!n2!n8!c|^BG(\d{2})([A-Z]{4})(\d{4})(\d{2})([A-Za-z0-9]{8})$|22|0|3|4|7|2011-06-20|1 BR|Brazil|0009795493C1|00360305000010009795493P1|8!n5!n10!n1!a1!c|^(\d{8})(\d{5})(\d{10})([A-Z]{1})([A-Za-z0-9]{1})$|25|BR9700360305000010009795493P1|BR2!n8!n5!n10!n1!a1!c|^BR(\d{2})(\d{8})(\d{5})(\d{10})([A-Z]{1})([A-Za-z0-9]{1})$|29|0|7|8|12|2013-06-20|0|1|||br|BR||BRL|www.bcb.gov.br|Central Bank of Brazil|non_member
CR|Costa Rica|1026284066|15202001026284066|3!n14!n|^(\d{3})(\d{14})$|7|CR91202001026284066|CR2!n3!n14!n|^CR(\d{2})(\d{3})(\d{14})$|21|0|2|||2012-05-29|0 VG|British Virgin Islands|00000 12 345 678 901|VPVG0000012345678901|4!a16!n|^([A-Z]{4})(\d{16})$|20|VG96VPVG0000012345678901|VG2!n4!a16!n|^VG(\d{2})([A-Z]{4})(\d{16})$|24|0|3|||2012-05-29|0|1|||vg|VG||USD|www.bvifsc.vg|The British Virgin Islands Financial Services Commission|non_member
HR|Croatia|1001005-1863000160|10010051863000160|7!n10!n|^(\d{7})(\d{10})$|17|HR1210010051863000160|HR2!n7!n10!n|^HR(\d{2})(\d{7})(\d{10})$|21|0|6|||2011-06-20|1 BG|Bulgaria|BNBG 9661 1020 3456 78|BNBG96611020345678|4!a4!n2!n8!c|^([A-Z]{4})(\d{4})(\d{2})([A-Za-z0-9]{8})$|18|BG80BNBG96611020345678|BG2!n4!a4!n2!n8!c|^BG(\d{2})([A-Z]{4})(\d{4})(\d{2})([A-Za-z0-9]{8})$|22|0|3|4|7|2011-06-20|1|1|||bg|BG||BGN|www.bnb.bg|Bulgarian National Bank|eu_member
CY|Cyprus|1200527600|002001280000001200527600|3!n5!n16!c|^(\d{3})(\d{5})([A-Za-z0-9]{16})$|24|CY17002001280000001200527600|CY2!n3!n5!n16!c|^CY(\d{2})(\d{3})(\d{5})([A-Za-z0-9]{16})$|28|0|2|3|7|2011-06-20|1 BF|Burkina Faso|12341234123412341234123|12341234123412341234123|23!n|^[0-9]{23}$|23|BF4512341234123412341234123|BF2!n23!n|^BF(\d{2})(\d{23})$|27|||||2016-01-22|0|0|||bf|BF||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member
CZ|Czech Republic|19-2000145399/0800|08000000192000145399|4!n6!n10!n|^(\d{4})(\d{6})(\d{10})$|20|CZ6508000000192000145399|CZ2!n4!n6!n10!n|^CZ(\d{2})(\d{4})(\d{6})(\d{10})$|24|0|3|4|9|2011-06-20|1 BI|Burundi|123412341234|123412341234|12!n|^[0-9]{12}$|12|BI33123412341234|BI2!n12!n|^BI(\d{2})(\d{12})$|16|||||2016-01-22|0|0|||bi|BI||BIF|www.brb.bi|Bank of the Republic of Burundi|non_member
DK|Denmark|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|DK5000400440116243|DK2!n4!n9!n1!n|^DK(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|1 BY|Belarus|3600 0000 0000 0Z00 AB00|NBRB 3600 0000 0000 0Z00 AB00|4!c4!n16!c|^([A-Za-z0-9]{4})(\d{4})([A-Za-z0-9]{16})$|24|BY13NBRB3600900000002Z00AB00|BY2!n4!c4!n16!c|^BY(\d{2})([A-Za-z0-9]{4})(\d{4})([A-Za-z0-9]{16})$|28|0|3|||2017-08-03|0|1|||by|BY||BYN|www.nbrb.by|National Bank of the Republic of Belarus|non_member
FO|Faroe Islands|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|FO2000400440116243|FO2!n4!n9!n1!n|^FO(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|0 CM|Cameroon|12341234123412341234123|12341234123412341234123|23!n|^[0-9]{23}$|23|CM1512341234123412341234123|CM2!n23!n|^CM(\d{2})(\d{23})$|27|||||2016-01-22|0|0|||cm|CM||XAF|www.beac.int|Bank of Central African States|non_member
GL|Greenland|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|GL2000400440116243|GL2!n4!n9!n1!n|^GL(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|0 CV|Cape Verde|12341234123412341|12341234123412341|21!n|^[0-9]{21}$|21|CV05123412341234123412341|CV2!n21!n|^CV(\d{2})(\d{21})$|25|||||2016-01-22|0|0|||cv|CV||CVE|www.bcv.cv|Bank of Cape Verde|non_member
DO|Dominican Republic|1212453611324|AGR00000001212453611324|4!c20!n|^([A-Za-z0-9]{4})(\d{20})$|24|DO28BAGR00000001212453611324|DO2!n4!c20!n|^DO(\d{2})([A-Za-z0-9]{4})(\d{20})$|28|0|3|||2011-06-20|0 CF|Central African Republic|0140183240140|20001000010140183240140|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|CF4220001000010120069700160|CF2!n5!n5!n11!n2!n|^CF(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|cf|CF||XAF|www.beac.int|Bank of Central African States|non_member
EE|Estonia|221020145685|2200221020145685|2!n2!n11!n1!n|^(\d{2})(\d{2})(\d{11})(\d{1})$|16|EE382200221020145685|EE2!n2!n2!n11!n1!n|^EE(\d{2})(\d{2})(\d{2})(\d{11})(\d{1})$|20|0|1|||2011-06-20|1 TD|Chad|37102538601 74|60003000203710253860174|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|TD8960003000203710253860174|TD2!n5!n5!n11!n2!n|^TD(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|cf|CF||XAF|www.beac.int|Bank of Central African States|non_member
FI|Finland|123456-785|12345600000785|6!n7!n1!n|^(\d{6})(\d{7})(\d{1})$|14|FI2112345600000785|FI2!n6!n7!n1!n|^FI(\d{2})(\d{6})(\d{7})(\d{1})$|18|0|2|||2013-08-05|1 KM|Comoros|00109044001 37|00005000010010904400137|5!n5!n13!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|KM4600005000010010904400137|KM2!n5!n5!n13!n2!n|^KM(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|km|KM||LMF|www.banque-comores.km|Banque Centrale des Comores|non_member
FR|France|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|FR1420041010050500013M02606|FR2!n5!n5!n11!c2!n|^FR(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 CG|Congo|10134513000|30011000101013451300019|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|CG3930013020003710721836132|CG2!n5!n5!n11!n2!n|^CG(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-01|0|1|21|23|cg|CG||CDF|www.bcc.cd|Central Bank of the Congo|non_member
BL|Saint Barthelemy|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|BL9820041010050500013M02606|BL2!n5!n5!n11!c2!n|^BL(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-02-08|0 CR|Costa Rica|02001026284066|015202001026284066|4!n14!n|^(\d{4})(\d{14})$|18|CR05015202001026284066|CR2!n4!n14!n|^CR(\d{2})(\d{4})(\d{14})$|22|0|3|||2012-05-29|0|1|||cr|CR||CRC|www.bccr.fi.cr|Central Bank of Costa Rica|non_member
GF|French Guyana|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|GF4120041010050500013M02606|GF2!n5!n5!n11!c2!n|^GF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 CI|Côte d'Ivoire|A12312341234123412341234|A12312341234123412341234|1!a23!n|^[A-Z]{1}[0-9]{23}$|24|CI77A12312341234123412341234|CI2!n1!a23!n|^CI(\d{2})([A-Z]{1})(\d{23})$|28|||||2016-01-22|0|0|||ci|CI||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member
GP|Guadelope|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|GP1120041010050500013M02606|GP2!n5!n5!n11!c2!n|^GP(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 HR|Croatia|1001005-1863000160|10010051863000160|7!n10!n|^(\d{7})(\d{10})$|17|HR1210010051863000160|HR2!n7!n10!n|^HR(\d{2})(\d{7})(\d{10})$|21|0|6|||2011-06-20|1|1|||hr|HR||HRK|www.hnb.hr|Croatian National Bank|eu_member
MF|Saint Martin (French Part)|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MF9820041010050500013M02606|MF2!n5!n5!n11!c2!n|^MF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-02-08|0 CY|Cyprus|1200527600|002001280000001200527600|3!n5!n16!c|^(\d{3})(\d{5})([A-Za-z0-9]{16})$|24|CY17002001280000001200527600|CY2!n3!n5!n16!c|^CY(\d{2})(\d{3})(\d{5})([A-Za-z0-9]{16})$|28|0|2|3|7|2011-06-20|1|1|||cy|CY||EUR|www.centralbank.gov.cy|Central Bank of Cyprus|eu_member
MQ|Martinique|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MQ5120041010050500013M02606|MQ2!n5!n5!n11!c2!n|^MQ(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 CZ|Czech Republic|19-2000145399/0800|08000000192000145399|4!n6!n10!n|^(\d{4})(\d{6})(\d{10})$|20|CZ6508000000192000145399|CZ2!n4!n6!n10!n|^CZ(\d{2})(\d{4})(\d{6})(\d{10})$|24|0|3|4|9|2011-06-20|1|1|||cz|CZ||CZK|www.cnb.cz|Czech National Bank|eu_member
RE|Reunion|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|RE4220041010050500013M02606|RE2!n5!n5!n11!c2!n|^RE(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 DK|Denmark|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|DK5000400440116243|DK2!n4!n9!n1!n|^DK(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|1|1|||dk|DK||DKK|www.nationalbanken.dk|National Bank of Denmark (Danmarks Nationalbank)||eu_member
PF|French Polynesia|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|PF5720041010050500013M02606|PF2!n5!n5!n11!c2!n|^PF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0 FO|Faroe Islands|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|FO2000400440116243|FO2!n4!n9!n1!n|^FO(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|0|1|13|13|fo|FO|DK|DKK|www.nationalbanken.dk|National Bank of Denmark (Danmarks Nationalbank)|non_member
TF|French Southern Territories|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|TF2120041010050500013M02606|TF2!n5!n5!n11!c2!n|^TF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0 GL|Greenland|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|GL2000400440116243|GL2!n4!n9!n1!n|^GL(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|0|1|||gl|GL|DK|DKK|www.nationalbanken.dk|National Bank of Denmark (Danmarks Nationalbank)|non_member
YT|Mayotte|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|YT3120041010050500013M02606|YT2!n5!n5!n11!c2!n|^YT(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 DJ|Djibouti|04099430200 08|10002010010409943020008|5!n5!n13!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|DJ2110002010010409943020008|DJ2!n5!n5!n13!n2!n|^DJ(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|dj|DJ||DJF|www.banque-centrale.dj|Central Bank of Djibouti|non_member
NC|New Caledonia|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|NC8420041010050500013M02606|NC2!n5!n5!n11!c2!n|^NC(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0 DO|Dominican Republic|1212453611324|AGR00000001212453611324|4!c20!n|^([A-Za-z0-9]{4})(\d{20})$|24|DO28BAGR00000001212453611324|DO2!n4!c20!n|^DO(\d{2})([A-Za-z0-9]{4})(\d{20})$|28|0|3|||2011-06-20|0|1|||do|DO||DOP|www.bancentral.gov.do|Central Bank of the Dominican Republic|non_member
PM|Saint Pierre et Miquelon|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|PM3620041010050500013M02606|PM2!n5!n5!n11!c2!n|^PM(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 EG|Egypt|000263180002|0019000500000000263180002|4!n4!n17!n|(\d{4})(\d{4})(\d{17})|25|EG380019000500000000263180002|EG2!n4!n4!n17!n|^EG(\d{2})(\d{4})(\d{4})(\d{17})$|29|0|4|5|9|2020-01-01|0|0|||eg|EG||EGP|www.cbe.org.eg|Central Bank of Egypt|non_member
WF|Wallis and Futuna Islands|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|WF9120041010050500013M02606|WF2!n5!n5!n11!c2!n|^WF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0 SV|El Salvador|00000000000000700025|CENR00000000000000700025|4!a20!n|^([A-Za-z0-9]{4})(\d{20})$|24|SV62CENR00000000000000700025|SV2!n4!a20!n|^SV(\d{2})([A-Za-z0-9]{4})(\d{20})$|28|0|3|||2017-08-03|0|1|||sv|SV||USD|www.bcr.gob.sv|Central Reserve Bank of El Salvador|non_member
GE|Georgia|0000000101904917|NB0000000101904917|2!a16!n|^([A-Z]{2})(\d{16})$|18|GE29NB0000000101904917|GE2!n2!a16!n|^GE(\d{2})([A-Z]{2})(\d{16})$|22|0|1|||2011-06-20|0 GQ|Equitorial Guinea|37152281901 96|50002001003715228190196|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|GQ7050002001003715228190196|GQ2!n5!n5!n11!n2!n|^GQ(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|gq|GQ||XAF|www.beac.int|Bank of Central African States|non_member
DE|Germany|37040044-532013000|370400440532013000|8!n10!n|^(\d{8})(\d{10})$|18|DE89370400440532013000|DE2!n8!n10!n|^DE(\d{2})(\d{8})(\d{10})$|22|0|7|||2011-06-20|1 EE|Estonia|221020145685|2200221020145685|2!n2!n11!n1!n|^(\d{2})(\d{2})(\d{11})(\d{1})$|16|EE382200221020145685|EE2!n2!n2!n11!n1!n|^EE(\d{2})(\d{2})(\d{2})(\d{11})(\d{1})$|20|0|1|||2011-06-20|1|1|15|15|ee|EE||EUR|www.eestipank.ee|Bank of Estonia|eu_member
GI|Gibraltar|0000 00007099 453|NWBK000000007099453|4!a15!c|^([A-Z]{4})([A-Za-z0-9]{15})$|19|GI75NWBK000000007099453|GI2!n4!a15!c|^GI(\d{2})([A-Z]{4})([A-Za-z0-9]{15})$|23|0|3|||2011-06-20|1 FI|Finland|123456-785|12345600000785|6!n7!n1!n|^(\d{6})(\d{7})(\d{1})$|14|FI2112345600000785|FI2!n6!n7!n1!n|^FI(\d{2})(\d{6})(\d{7})(\d{1})$|18|0|2|||2013-08-05|1|1|13|13|fi|FI||EUR|www.suomenpankki.fi|Bank of Finland|eu_member
GR|Greece|01250000000012300695|01101250000000012300695|3!n4!n16!c|^(\d{3})(\d{4})([A-Za-z0-9]{16})$|23|GR1601101250000000012300695|GR2!n3!n4!n16!c|^GR(\d{2})(\d{3})(\d{4})([A-Za-z0-9]{16})$|27|0|2|3|6|2011-06-20|1 AX|Åland Islands|123456-785|12345600000785|6!n7!n1!n|^(\d{6})(\d{7})(\d{1})$|14|AX2112345600000785|AX2!n6!n7!n1!n|^AX(\d{2})(\d{6})(\d{7})(\d{1})$|18|0|2|||2013-09-05|1|1|||ax|AX|FI|EUR|www.suomenpankki.fi|Bank of Finland|eu_member
GT|Guatemala|01020000001210029690|TRAJ01020000001210029690|4!c20!c|^([A-Za-z0-9]{4})([A-Za-z0-9]{20})$|24|GT82TRAJ01020000001210029690|GT2!n4!c20!c|^GT(\d{2})([A-Za-z0-9]{4})([A-Za-z0-9]{20})$|28|0|3|||2012-05-29|0 FR|France|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|FR1420041010050500013M02606|FR2!n5!n5!n11!c2!n|^FR(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|fr|FR||EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member
HU|Hungary|11773016-11111018-00000000|117730161111101800000000|3!n4!n1!n15!n1!n|^(\d{3})(\d{4})(\d{1})(\d{15})(\d{1})$|24|HU42117730161111101800000000|HU2!n3!n4!n1!n15!n1!n|^HU(\d{2})(\d{3})(\d{4})(\d{1})(\d{15})(\d{1})$|28|0|2|3|6|2011-06-20|1 GF|French Guiana|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|GF4120041010050500013M02606|GF2!n5!n5!n11!c2!n|^GF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|gf|GF|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member
IS|Iceland|0159-26-007654-551073-0339|0159260076545510730339|4!n2!n6!n10!n|^(\d{4})(\d{2})(\d{6})(\d{10})$|22|IS140159260076545510730339|IS2!n4!n2!n6!n10!n|^IS(\d{2})(\d{4})(\d{2})(\d{6})(\d{10})$|26|0|3|6|11|2011-06-20|1 PF|French Polynesia|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|PF5720041010050500013M02606|PF2!n5!n5!n11!c2!n|^PF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0|1|21|22|pf|PF|FR|XPF|www.ieom.fr|Overseas Issuing Institute (Institut d'émission d'Outre-Mer)|other_member
IE|Ireland|93-11-52 12345678|AIBK93115212345678|4!a6!n8!n|^([A-Z]{4})(\d{6})(\d{8})$|18|IE29AIBK93115212345678|IE2!n4!a6!n8!n|^IE(\d{2})([A-Z]{4})(\d{6})(\d{8})$|22|0|3|4|9|2011-06-20|1 TF|French Southern Territories|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|TF2120041010050500013M02606|TF2!n5!n5!n11!c2!n|^TF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0|1|21|22|tf|TF|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|other_member
IL|Israel|10-800-99999999|100800000099999000|3!n3!n13!n|^(\d{3})(\d{3})(\d{13})$|19|IL620108000000099999999|IL2!n3!n3!n13!n|^IL(\d{2})(\d{3})(\d{3})(\d{13})$|23|0|2|3|5|2011-06-20|0 GP|Guadelope|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|GP1120041010050500013M02606|GP2!n5!n5!n11!c2!n|^GP(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|gp|GP|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member
IT|Italy|X 05428 11101 000000123456|X0542811101000000123456|1!a5!n5!n12!c|^([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|23|IT60X0542811101000000123456|IT2!n1!a5!n5!n12!c|^IT(\d{2})([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|27|0|5|6|10|2011-06-20|1 MQ|Martinique|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MQ5120041010050500013M02606|MQ2!n5!n5!n11!c2!n|^MQ(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|mq|MQ|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member
JO|Jordan|1310000302|CBJO0010000000000131000302|4!a4!n18!c|^([A-Z]{4})(\d{4})([A-Za-z0-9]{18})$|26|JO94CBJO0010000000000131000302|JO2!n4!a4!n18!c|^JO(\d{2})([A-Z]{4})(\d{4})([A-Za-z0-9]{18})$|30|0|3|4|7|2014-06-05|0 YT|Mayotte|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|YT3120041010050500013M02606|YT2!n5!n5!n11!c2!n|^YT(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|yt|YT|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member
KZ|Kazakhstan|KZ86 125K ZT50 0410 0100|125KZT5004100100|3!n13!c|^(\d{3})([A-Za-z0-9]{13})$|16|KZ07|KZ2!n3!n13!c|^KZ(\d{2})(\d{3})([A-Za-z0-9]{13})$||0|2|||2014-06-05|0 NC|New Caledonia|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|NC8420041010050500013M02606|NC2!n5!n5!n11!c2!n|^NC(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0|1|21|22|nc|NC|FR|XPF|www.ieom.fr|Overseas Issuing Institute (Institut d'émission d'Outre-Mer)|other_member
KW|Kuwait|CBKU0000000000001234560101|CBKU0000000000001234560101|4!a22!c|^([A-Z]{4})([A-Za-z0-9]{22})$|26|KW81CBKU0000000000001234560101|KW2!n4!a22!n|^KW(\d{2})([A-Z]{4})(\d{22})$|30|0|3|||2011-06-20|0 RE|Réunion|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|RE4220041010050500013M02606|RE2!n5!n5!n11!c2!n|^RE(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|re|RE|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member
LV|Latvia|BANK 0000 4351 9500 1|BANK0000435195001|4!a13!c|^([A-Z]{4})([A-Za-z0-9]{13})$|17|LV80BANK0000435195001|LV2!n4!a13!c|^LV(\d{2})([A-Z]{4})([A-Za-z0-9]{13})$|21|0|3|||2011-06-20|1 BL|Saint Barthélemy|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|BL6820041010050500013M02606|BL2!n5!n5!n11!c2!n|^BL(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-02-08|0|1|21|22||BL|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|other_member
LB|Lebanon|01 001 901229114|0999 0000 0001 0019 0122 9114|4!n20!c|^(\d{4})([A-Za-z0-9]{20})$|24|LB62099900000001001901229114|LB2!n4!n20!c|^LB(\d{2})(\d{4})([A-Za-z0-9]{20})$|28|0|3|||2011-06-20|0 MF|Saint Martin (French Part)|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MF8420041010050500013M02606|MF2!n5!n5!n11!c2!n|^MF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-02-08|0|1|21|22||MF|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member
LI|Liechtenstein|8810 2324013AA|088100002324013AA|5!n12!c|^(\d{5})([A-Za-z0-9]{12})$|19|LI21088100002324013AA|LI2!n5!n12!c|^LI(\d{2})(\d{5})([A-Za-z0-9]{12})$|21|0|4|||2012-05-29|1 PM|Saint-Pierre and Miquelon|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|PM3620041010050500013M02606|PM2!n5!n5!n11!c2!n|^PM(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|pm|PM|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|other_member
LT|Lithuania|1000 0111 0100 1000|10000011101001000|5!n11!n|^(\d{5})(\d{11})$|16|LT121000011101001000|LT2!n5!n11!n|^LT(\d{2})(\d{5})(\d{11})$|20|0|4|||2011-06-20|1 WF|Wallis and Futuna|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|WF9120041010050500013M02606|WF2!n5!n5!n11!c2!n|^WF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0|1|21|22|wf|WF|FR|XPF|www.ieom.fr|Overseas Issuing Institute (Institut d'émission d'Outre-Mer)|other_member
LU|Luxembourg|0019 4006 4475 0000|0019400644750000|3!n13!c|^(\d{3})([A-Za-z0-9]{13})$|16|LU280019400644750000|LU2!n3!n13!c|^LU(\d{2})(\d{3})([A-Za-z0-9]{13})$|20|0|2|||2011-06-20|1 GA|Gabon|15200001069 63|42001007341520000106963|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|GA2142001007341520000106963|GA2!n5!n5!n11!n2!n|^GA(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|ga|GA||XAF|www.beac.int|Bank of Central African States|non_member
MK|Macedonia|300 0000000424 25|250120000058984|3!n10!c2!n|^(\d{3})([A-Za-z0-9]{10})(\d{2})$|15|MK07250120000058984|MK2!n3!n10!c2!n|^MK(\d{2})(\d{3})([A-Za-z0-9]{10})(\d{2})$|19|0|2|||2012-05-29|0 GE|Georgia|0000000101904917|NB0000000101904917|2!a16!n|^([A-Z]{2})(\d{16})$|18|GE29NB0000000101904917|GE2!n2!a16!n|^GE(\d{2})([A-Z]{2})(\d{16})$|22|0|1|||2011-06-20|0|1|||ge|GE||GEL|www.nbg.gov.ge|National Bank of Georgia|non_member
MT|Malta|12345MTLCAST001S|MALT011000012345MTLCAST001S|4!a5!n18!c|^([A-Z]{4})(\d{5})([A-Za-z0-9]{18})$|27|MT84MALT011000012345MTLCAST001S|MT2!n4!a5!n18!c|^MT(\d{2})([A-Z]{4})(\d{5})([A-Za-z0-9]{18})$|31|0|3|4|8|2011-06-20|1 DE|Germany|37040044-532013000|370400440532013000|8!n10!n|^(\d{8})(\d{10})$|18|DE89370400440532013000|DE2!n8!n10!n|^DE(\d{2})(\d{8})(\d{10})$|22|0|7|||2011-06-20|1|1|||de|DE||EUR|www.bundesbank.de|Deutsche Bundesbank|eu_member
MR|Mauritania|00020 00101 00001234567 53|00020001010000123456753|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|MR1300020001010000123456753|MR135!n5!n11!n2!n|^MR13(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2011-06-20|0 GI|Gibraltar|0000 00007099 453|NWBK000000007099453|4!a15!c|^([A-Z]{4})([A-Za-z0-9]{15})$|19|GI75NWBK000000007099453|GI2!n4!a15!c|^GI(\d{2})([A-Z]{4})([A-Za-z0-9]{15})$|23|0|3|||2011-06-20|1|1|||gi|GI||GIP|www.gibraltar.gov.gi|Government of Gibraltar|other_member
MU|Mauritius|BOMM 0101 1010 3030 0200 000M UR|BOMM0101101030300200000MUR|4!a2!n2!n12!n3!n3!a|^([A-Z]{4})(\d{2})(\d{2})(\d{12})(\d{3})([A-Z]{3})$|26|MU17BOMM0101101030300200000MUR|MU2!n4!a2!n2!n12!n3!n3!a|^MU(\d{2})([A-Z]{4})(\d{2})(\d{2})(\d{12})(\d{3})([A-Z]{3})$|30|0|5|6|7|2011-06-20|0 GR|Greece|01250000000012300695|01101250000000012300695|3!n4!n16!c|^(\d{3})(\d{4})([A-Za-z0-9]{16})$|23|GR1601101250000000012300695|GR2!n3!n4!n16!c|^GR(\d{2})(\d{3})(\d{4})([A-Za-z0-9]{16})$|27|0|2|3|6|2011-06-20|1|1|||gr|GR||EUR|www.nbg.gr|National Bank of Greece|eu_member
MD|Moldova|00225100013104168|AG000225100013104168|2!c18!c|^([A-Za-z0-9]{2})([A-Za-z0-9]{18})$|20|MD24AG000225100013104168|MD2!n20!c|^MD(\d{2})([A-Za-z0-9]{20})$|24|0|1|||2012-09-09|0 GT|Guatemala|01020000001210029690|TRAJ01020000001210029690|4!c20!c|^([A-Za-z0-9]{4})([A-Za-z0-9]{20})$|24|GT82TRAJ01020000001210029690|GT2!n4!c20!c|^GT(\d{2})([A-Za-z0-9]{4})([A-Za-z0-9]{20})$|28|0|3|||2012-05-29|0|1|||gt|GT||GTQ|www.banguat.gob.gt|Bank of Guatemala|non_member
MC|Monaco|0011111000h|11222 00001 01234567890 30|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MC5811222000010123456789030|MC2!n5!n5!n11!c2!n|^MC(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|1 GW|Guinea-Bissau|0181800637601|GW1430010181800637601|2!c2!n4!n11!n2!n|^([A-Za-z0-9]{2}\d{2})(\d{4})(\d{11})(\d{2})$|21|GW04GW1430010181800637601|GW2!n2!c2!n4!n11!n2!n|^GW(\d{2})([A-Za-z0-9]{2}\d{2})(\d{4})(\d{11})(\d{2})$|25|0|3|4|7|2017-08-03|0|0|||gw|GW||XOF|www.bceao.int|Central Bank of West African States|non_member
ME|Montenegro|505 0000123456789 51|505000012345678951|3!n13!n2!n|^(\d{3})(\d{13})(\d{2})$|18|ME25505000012345678951|ME2!n3!n13!n2!n|^ME(\d{2})(\d{3})(\d{13})(\d{2})$|22|0|2|||2011-06-20|0 HN|Honduras|123124|PISA00000000000000123124|4!a20!n|^([A-Za-z]{4})(\d{20})$|24|HN54PISA00000000000000123124|HN2!n4!a20!n|^HN(\d{2})([A-Za-z]{4})(\d{20})$|28|0|3|||2017-08-03|0|0|||hn|HN||HNL|www.bch.hn|Central Bank of Honduras|non_member
NL|The Netherlands|041 71 64 300|ABNA0417164300|4!a10!n|^([A-Z]{4})(\d{10})$|14|NL91ABNA0417164300|NL2!n4!a10!n|^NL(\d{2})([A-Z]{4})(\d{10})$|18|0|3|4|3|2013-06-20|1 HU|Hungary|11773016-11111018-00000000|117730161111101800000000|3!n4!n1!n15!n1!n|^(\d{3})(\d{4})(\d{1})(\d{15})(\d{1})$|24|HU42117730161111101800000000|HU2!n3!n4!n1!n15!n1!n|^HU(\d{2})(\d{3})(\d{4})(\d{1})(\d{15})(\d{1})$|28|0|2|3|6|2011-06-20|1|1|23|23|hu|HU||HUF|english.mnb.hu|Magyar Nemzeti Bank (Central Bank of Hungary)|eu_member
NO|Norway|8601 11 17947|86011117947|4!n6!n1!n|^(\d{4})(\d{6})(\d{1})$|11|NO9386011117947|NO2!n4!n6!n1!n|^NO(\d{2})(\d{4})(\d{6})(\d{1})$|15|0|3|||2011-06-20|1 IS|Iceland|0159-26-007654-551073-0339|0159260076545510730339|4!n2!n6!n10!n|^(\d{4})(\d{2})(\d{6})(\d{10})$|22|IS140159260076545510730339|IS2!n4!n2!n6!n10!n|^IS(\d{2})(\d{4})(\d{2})(\d{6})(\d{10})$|26|0|3|6|11|2011-06-20|1|1|||is|IS||ISK|www.sedlabanki.is|Central Bank of Iceland|efta_member
PK|Pakistan|00260101036360|SCBL0000001123456702|4!a16!c|^([A-Z]{4})([A-Za-z0-9]{16})$|20|PK36SCBL0000001123456702|PK2!n4!a16!c|^PK(\d{2})([A-Z]{4})([A-Za-z0-9]{16})$|24|0|3|||2012-05-29|0 AA|IIBAN (Internet)|0011123Z5678|0011123Z5678|12!a|^[A-Z0-9]{12}$|12|AA110011123Z5678|AA2!n12!a|^AA(\d{2})([A-Z0-9]{12})$|16|0|3||||0|0|||||||||non_member
PL|Poland|61 1090 1014 0000 0712 1981 2874|109010140000071219812874|8!n16!n|^(\d{8})(\d{16})$|24|PL61109010140000071219812874|PL2!n8!n16n|^PL(\d{2})(\d{8})(\d{1,16})$|28|0|7|||2011-06-20|1 IR|Iran|1234123412341234123412|123412341234123412|22!n|^[0-9]{22}$|22|IR081234123412341234123412|IR2!n22!n|^IR(\d{2})(\d{22})$|26|||||2016-01-22|0|0|||ir|IR||IRR|www.cbi.ir|The Central Bank of the Islamic Republic of Iran|non_member
PS|Palestine|400123456702|PALS000000000400123456702|4!a21!c|^([A-Z]{4})([A-Za-z0-9]{21})$|25|PS92PALS000000000400123456702|PS2!n4!a21!c|^PS(\d{2})([A-Z]{4})([A-Za-z0-9]{21})$|29|0|3|||2013-09-05|0 IQ|Iraq|123456789012|NBIQ850123456789012|4!a3!n12!n|^([A-Za-z]{4})(\d{3})(\d{12})$|19|IQ98NBIQ850123456789012|IQ2!n4!a3!n12!n|^IQ(\d{2})([A-Za-z]{4})(\d{3})(\d{12})$|23|0|3|4|6|2017-08-03|0|1|||iq|IQ||IQD|www.cbi.iq|Central Bank of Iraq|non_member
PT|Portugal|0002.0123.12345678901.54|000201231234567890154|4!n4!n11!n2!n|^(\d{4})(\d{4})(\d{11})(\d{2})$|21|PT50000201231234567890154|PT2!n4!n4!n11!n2!n|^PT(\d{2})(\d{4})(\d{4})(\d{11})(\d{2})$|25|0|3|4|7|2013-09-05|1 IE|Ireland|93-11-52 12345678|AIBK93115212345678|4!a6!n8!n|^([A-Z]{4})(\d{6})(\d{8})$|18|IE29AIBK93115212345678|IE2!n4!a6!n8!n|^IE(\d{2})([A-Z]{4})(\d{6})(\d{8})$|22|0|3|4|9|2011-06-20|1|1|||ie|IE||EUR|www.centralbank.ie|Central Bank and Financial Services Authority of Ireland|eu_member
QA|Qatar|QA58DOHB00001234567890ABCDEFG|DOHB00001234567890ABCDEFG|4!a4!n17!c|^([A-Z]{4})(\d{4})([A-Za-z0-9]{17})$|29|QA58DOHB00001234567890ABCDEFG|QA2!n4!a4!n17!c|^QA(\d{2})([A-Z]{4})(\d{4})([A-Za-z0-9]{17})$|29|0|3|4|7|2014-06-05|0 IL|Israel|10-800-99999999|010800000099999999|3!n3!n13!n|^(\d{3})(\d{3})(\d{13})$|19|IL620108000000099999999|IL2!n3!n3!n13!n|^IL(\d{2})(\d{3})(\d{3})(\d{13})$|23|0|2|3|5|2011-06-20|0|1|||il|IL||ILS|www.bankisrael.org.il|Bank of Israel|non_member
RO|Romania|AAAA 1B31 0075 9384 0000|AAAA1B31007593840000|4!a16!c|^([A-Z]{4})([A-Za-z0-9]{16})$|20|RO49AAAA1B31007593840000|RO2!n4!a16!c|^RO(\d{2})([A-Z]{4})([A-Za-z0-9]{16})$|24|0|3|||2011-06-20|1 IT|Italy|X 05428 11101 000000123456|X0542811101000000123456|1!a5!n5!n12!c|^([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|23|IT60X0542811101000000123456|IT2!n1!a5!n5!n12!c|^IT(\d{2})([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|27|1|5|6|10|2011-06-20|1|1|0|0|it|IT||EUR|www.bancaditalia.it|Bank of Italy|eu_member
SM|San Marino|U032 2509 8000 0000 0270 100|U0322509800000000270100|1!a5!n5!n12!c|^([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|23|SM86U0322509800000000270100|SM2!n1!a5!n5!n12!c|^SM(\d{2})([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|27|0|5|6|10|2011-06-20|1 JO|Jordan|1310000302|CBJO0010000000000131000302|4!a4!n18!c|^([A-Z]{4})(\d{4})([A-Za-z0-9]{18})$|26|JO94CBJO0010000000000131000302|JO2!n4!a4!n18!c|^JO(\d{2})([A-Z]{4})(\d{4})([A-Za-z0-9]{18})$|30|0|3|4|7|2014-06-05|0|1|||jo|JO||JOD|www.cbj.gov.jo|Central Bank of Jordan|non_member
SA|Saudi Arabia|608010167519|80000000608010167519|2!n18!c|^(\d{2})([A-Za-z0-9]{18})$|20|SA0380000000608010167519|SA2!n2!n18!c|^SA(\d{2})(\d{2})([A-Za-z0-9]{18})$|24|0|1|||2012-05-29|0 KZ|Kazakhstan|KZ86125KZT5004100100|125KZT5004100100|3!n13!c|^(\d{3})([A-Za-z0-9]{13})$|16|KZ86125KZT5004100100|KZ2!n3!n13!c|^KZ(\d{2})(\d{3})([A-Za-z0-9]{13})$|20|0|2|||2014-06-05|0|1|||kz|KZ||KZT|www.nationalbank.kz|National Bank of Kazakhstan|non_member
RS|Serbia|260-0056010016113-79|260005601001611379|3!n13!n2!n|^(\d{3})(\d{13})(\d{2})$|18|RS35260005601001611379|RS2!n3!n13!n2!n|^RS(\d{2})(\d{3})(\d{13})(\d{2})$|22|0|2|||2011-06-20|0 XK|Kosovo|1212 0123456789 06|1212012345678906|4!n10!n2!n|^(\d{4})(\d{10})(\d{2})$|16|XK051212012345678906|XK2!n4!n10!n2!n|^XK(\d{2})(\d{4})(\d{10})(\d{2})$|20|0|1|2|3|2016-01-21|0|1||||||EUR|www.bqk-kos.org|Central Bank of the Republic of Kosovo (Banka Qendrore e Kosovës)|non_member
SK|Slovak Republic|19-8742637541/1200|12000000198742637541|4!n6!n10!n|^(\d{4})(\d{6})(\d{10})$|20|SK3112000000198742637541|SK2!n4!n6!n10!n|^SK(\d{2})(\d{4})(\d{6})(\d{10})$|24|0|3|4|9|2011-06-20|1 KW|Kuwait|CBKU0000000000001234560101|CBKU0000000000001234560101|4!a22!c|^([A-Z]{4})([A-Za-z0-9]{22})$|26|KW81CBKU0000000000001234560101|KW2!n4!a22!c|^KW(\d{2})([A-Z]{4})([A-Za-z0-9]{22})$|30|0|3|||2016-01-21|0|1|||kw|KW||KWD|www.cbk.gov.kw|Central Bank of Kuwait|non_member
SI|Slovenia|2633 0001 2039 086|263300012039086|5!n8!n2!n|^(\d{5})(\d{8})(\d{2})$|15|SI56191000000123438|SI2!n5!n8!n2!n|^SI(\d{2})(\d{5})(\d{8})(\d{2})$|19|0|1|2|4|2012-09-09|1 LV|Latvia|BANK 0000 4351 9500 1|BANK0000435195001|4!a13!c|^([A-Z]{4})([A-Za-z0-9]{13})$|17|LV80BANK0000435195001|LV2!n4!a13!c|^LV(\d{2})([A-Z]{4})([A-Za-z0-9]{13})$|21|0|3|||2011-06-20|1|1|||lv|LV||EUR|www.bank.lv/lat/main/all|Bank of Latvia|eu_member
ES|Spain|2100 0418 45 0200051332|21000418450200051332|4!n4!n1!n1!n10!n|^(\d{4})(\d{4})(\d{1})(\d{1})(\d{10})$|20|ES9121000418450200051332|ES2!n4!n4!n1!n1!n10!n|^ES(\d{2})(\d{4})(\d{4})(\d{1})(\d{1})(\d{10})$|24|0|3|4|7|2013-09-05|1 LB|Lebanon|01 001 901229114|0999 0000 0001 0019 0122 9114|4!n20!c|^(\d{4})([A-Za-z0-9]{20})$|24|LB62099900000001001901229114|LB2!n4!n20!c|^LB(\d{2})(\d{4})([A-Za-z0-9]{20})$|28|0|3|||2011-06-20|0|1|||lb|LB||LBP|www.bdl.gov.lb|Central Bank of Lebanon|non_member
SE|Sweden|1234 12 3456 1|5000 0000 0583 9825 7466|3!n16!n1!n|^(\d{3})(\d{16})(\d{1})$|20|SE4550000000058398257466|SE2!n3!n16!n1!n|^SE(\d{2})(\d{3})(\d{16})(\d{1})$|24|0|2|||2011-06-20|1 LI|Liechtenstein|8810 2324013AA|088100002324013AA|5!n12!c|^(\d{5})([A-Za-z0-9]{12})$|17|LI21088100002324013AA|LI2!n5!n12!c|^LI(\d{2})(\d{5})([A-Za-z0-9]{12})$|21|0|4|||2012-05-29|1|1|||li|LI||CHF|www.llb.li|National Bank of Liechtenstein (Liechtensteinische Landesbank)|efta_member
CH|Switzerland|762 1162-3852.957|00762011623852957|5!n12!c|^(\d{5})([A-Za-z0-9]{12})$|17|CH9300762011623852957|CH2!n5!n12!c|^CH(\d{2})(\d{5})([A-Za-z0-9]{12})$|21|0|4|||2011-06-20|1 LT|Lithuania|1000 0111 0100 1000|10000011101001000|5!n11!n|^(\d{5})(\d{11})$|16|LT121000011101001000|LT2!n5!n11!n|^LT(\d{2})(\d{5})(\d{11})$|20|0|4|||2011-06-20|1|1|||lt|LT||EUR|www.lb.lt|Bank of Lithuania|eu_member
TN|Tunisia|10 006 0351835984788 31|10006035183598478831|2!n3!n13!n2!n|^(\d{2})(\d{3})(\d{13})(\d{2})$|20|TN5910006035183598478831|TN592!n3!n13!n2!n|^TN59(\d{2})(\d{3})(\d{13})(\d{2})$|24|0|1|2|4|2011-06-20|0 LU|Luxembourg|0019 4006 4475 0000|0019400644750000|3!n13!c|^(\d{3})([A-Za-z0-9]{13})$|16|LU280019400644750000|LU2!n3!n13!c|^LU(\d{2})(\d{3})([A-Za-z0-9]{13})$|20|0|2|||2011-06-20|1|1|14|15|lu|LU||EUR|www.bcl.lu|Central Bank of Luxembourg|eu_member
TR|Turkey|0061 01299 1234567890123456789|0006100519786457841326|5!n1!c16!c|^(\d{5})([A-Za-z0-9]{1})([A-Za-z0-9]{16})$|22|TR330006100519786457841326|TR2!n5!n1!c16!c|^TR(\d{2})(\d{5})([A-Za-z0-9]{1})([A-Za-z0-9]{16})$|26|0|4|||2011-06-20|0 MK|Macedonia|300 0000000424 25|250120000058984|3!n10!c2!n|^(\d{3})([A-Za-z0-9]{10})(\d{2})$|15|MK07250120000058984|MK2!n3!n10!c2!n|^MK(\d{2})(\d{3})([A-Za-z0-9]{10})(\d{2})$|19|0|2|||2012-05-29|0|1|13|14|mk|MK||MKD|www.nbrm.mk|National Bank of the Republic of Macedonia|non_member
AE|United Arab Emirates|1234567890123456|0331234567890123456|3!n16!n|^(\d{3})(\d{16})$|19|AE070331234567890123456|AE2!n3!n16!n|^AE(\d{2})(\d{3})(\d{16})$|23|0|2|||2011-06-20|0 MG|Madagascar|12341234123412341234123|12341234123412341234123|23!n|^[0-9]{23}$|23|MG4012341234123412341234123|MG2!n23!n|^MG(\d{2})(\d{23})$|27|||||2016-01-22|0|0|||mg|MG||MGA|www.banque-centrale.mg|Central Bank of Madagascar|non_member
GB|United Kingdom|60-16-13 31926819|NWBK60161331926819|4!a6!n8!n|^([A-Z]{4})(\d{6})(\d{8})$|18|GB29NWBK60161331926819|GB2!n4!a6!n8!n|^GB(\d{2})([A-Z]{4})(\d{6})(\d{8})$|22|0|3|4|9|2011-06-20|1 ML|Mali|A12312341234123412341234|A12312341234123412341234|1!a23!n|^[A-Z]{1}[0-9]{23}$|24|ML75A12312341234123412341234|ML2!n1!a23!n|^ML(\d{2})([A-Z]{1})(\d{23})$|28|||||2016-01-22|0|0|||ml|ML||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member
VG|British Virgin Islands|00000 12 345 678 901|VPVG0000012345678901|4!a16!n|^([A-Z]{4})(\d{16})$|20|VG96VPVG0000012345678901|VG2!n4!a16!n|^VG(\d{2})([A-Z]{4})(\d{16})$|24|0|3|||2012-05-29|0 MT|Malta|12345MTLCAST001S|MALT011000012345MTLCAST001S|4!a5!n18!c|^([A-Z]{4})(\d{5})([A-Za-z0-9]{18})$|27|MT84MALT011000012345MTLCAST001S|MT2!n4!a5!n18!c|^MT(\d{2})([A-Z]{4})(\d{5})([A-Za-z0-9]{18})$|31|0|3|4|8|2011-06-20|1|1|||mt|MT||EUR|www.centralbankmalta.org|Central Bank of Malta|eu_member
MR|Mauritania|00020 00101 00001234567 53|00020001010000123456753|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|MR1300020001010000123456753|MR2!n5!n5!n11!n2!n|^MR(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2016-06-11|0|1|21|22|mr|MR||MRO|www.bcm.mr|Central Bank of Mauritania|non_member
MU|Mauritius|BOMM 0101 1010 3030 0200 000M UR|BOMM0101101030300200000MUR|4!a2!n2!n12!n3!n3!a|^([A-Z]{4})(\d{2})(\d{2})(\d{12})(\d{3})([A-Z]{3})$|26|MU17BOMM0101101030300200000MUR|MU2!n4!a2!n2!n12!n3!n3!a|^MU(\d{2})([A-Z]{4})(\d{2})(\d{2})(\d{12})(\d{3})([A-Z]{3})$|30|0|5|6|7|2011-06-20|0|1|||mu|MU||MUR|www.bom.mu|Bank of Mauritius|non_member
MD|Moldova|00225100013104168|AG000225100013104168|2!c18!c|^([A-Za-z0-9]{2})([A-Za-z0-9]{18})$|20|MD24AG000225100013104168|MD2!n2!c18!c|^MD(\d{2})([A-Za-z0-9]{20})$|24|0|1|||2012-09-09|0|1|||md|MD||MDL|www.bnm.org|National Bank of Moldova|non_member
MC|Monaco|0011111000h|11222 00001 01234567890 30|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MC5811222000010123456789030|MC2!n5!n5!n11!c2!n|^MC(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|1|1|21|22|mc|MC||EUR|||other_member
ME|Montenegro|505 0000123456789 51|505000012345678951|3!n13!n2!n|^(\d{3})(\d{13})(\d{2})$|18|ME25505000012345678951|ME2!n3!n13!n2!n|^ME(\d{2})(\d{3})(\d{13})(\d{2})$|22|0|2|||2011-06-20|0|1|16|17|me|ME||EUR|www.cb-mn.org|Central Bank of Montenegro|non_member
MA|Morocco|00012050005349 21|011519000001205000534921|3!n5!n14!n2!n|^(\d{3})(\d{5})(\d{14})(\d{2})$|26|MA64011519000001205000534921|MA2!n3!n5!n14!n2!n|^MA(\d{2})(\d{3})(\d{5})(\d{14})(\d{2})$|28|0|2|3|7|2017-08-03|0|0|22|24|ma|MA||MAD|www.bkam.ma|Bank Al-Maghrib|non_member
MZ|Mozambique|12341234123412341|12341234123412341|21!n|^[0-9]{21}$|21|MZ97123412341234123412341|MZ2!n21!n|^MZ(\d{2})(\d{21})$|25|||||2016-01-22|0|0|||mz|MZ||MZN|www.bancomoc.mz|Bank of Mozambique|non_member
NL|Netherlands|041 71 64 300|ABNA0417164300|4!a10!n|^([A-Z]{4})(\d{10})$|14|NL91ABNA0417164300|NL2!n4!a10!n|^NL(\d{2})([A-Z]{4})(\d{10})$|18|0|3|4|3|2013-06-20|1|1|||nl|NL||EUR|www.dnb.nl|Netherlands Bank|eu_member
NI|Nicaragua|3123123|BAMC000000000000000003123123|28!n|^([A-Za-z]{4})(\d{24})$|28|NI92BAMC000000000000000003123123|NI2!n4!a24!n|^NI(\d{2})([A-Za-z]{4})(\d{24})$|32|0|3|||2017-08-03|0|0|||ni|NI||NIO|www.bcn.gob.ni|Central Bank of Nicaragua|non_member
NE|Niger|01303050002 68|NE0380100100130305000268|2!a3!n5!n12!n2!n|^([A-Za-z]{2}\d{3})(\d{5})(\d{12})(\d{2})$|23|NE58NE0380100100130305000268|NE2!n2!a3!n5!n12!n2!n|^NE(\d{2})([A-Za-z]{2}\d{3})(\d{5})(\d{12})(\d{2})$|28|0|4|5|9|2017-08-03|0|0|22|23|ne|NE||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member
NO|Norway|8601 11 17947|86011117947|4!n6!n1!n|^(\d{4})(\d{6})(\d{1})$|11|NO9386011117947|NO2!n4!n6!n1!n|^NO(\d{2})(\d{4})(\d{6})(\d{1})$|15|0|3|||2011-06-20|1|1|10|10|no|NO||NOK|www.norges-bank.no|Central Bank of Norway (Norges Bank)|efta_member
PK|Pakistan|00260101036360|SCBL0000001123456702|4!a16!c|^([A-Z]{4})([A-Za-z0-9]{16})$|20|PK36SCBL0000001123456702|PK2!n4!a16!c|^PK(\d{2})([A-Z]{4})([A-Za-z0-9]{16})$|24|0|3|||2012-05-29|0|1|||pk|PK||PKR|www.sbp.org.pk|State Bank of Pakistan|non_member
PS|Palestine|400123456702|PALS000000000400123456702|4!a21!c|^([A-Z]{4})([A-Za-z0-9]{21})$|25|PS92PALS000000000400123456702|PS2!n4!a21!c|^PS(\d{2})([A-Z]{4})([A-Za-z0-9]{21})$|29|0|3|||2013-09-05|0|1|||ps|PS||ILS|www.pma.ps|Palestine Monetary Authority|non_member
PL|Poland|61 1090 1014 0000 0712 1981 2874|109010140000071219812874|8!n16!n|^(\d{8})(\d{16})$|24|PL61109010140000071219812874|PL2!n8!n16!n|^PL(\d{2})(\d{8})(\d{16})$|28|0|7|||2011-06-20|1|1|7|7|pl|PL||PLN|www.nbp.pl|National Bank of Poland|eu_member
PT|Portugal|0002.0123.12345678901.54|000201231234567890154|4!n4!n11!n2!n|^(\d{4})(\d{4})(\d{11})(\d{2})$|21|PT50000201231234567890154|PT2!n4!n4!n11!n2!n|^PT(\d{2})(\d{4})(\d{4})(\d{11})(\d{2})$|25|0|3|4|7|2013-09-05|1|1|19|20|pt|PT||EUR|www.bportugal.pt|Bank of Portugal|eu_member
QA|Qatar|QA58DOHB00001234567890ABCDEFG|DOHB00001234567890ABCDEFG|4!a4!n17!c|^([A-Z]{4})(\d{4})([A-Za-z0-9]{17})$|25|QA58DOHB00001234567890ABCDEFG|QA2!n4!a4!n17!c|^QA(\d{2})([A-Z]{4})(\d{4})([A-Za-z0-9]{17})$|29|0|3|4|7|2014-06-05|0|1|||qa|QA||QAR|www.qcb.gov.qa|Qatar Central Bank|non_member
RO|Romania|AAAA 1B31 0075 9384 0000|AAAA1B31007593840000|4!a16!c|^([A-Z]{4})([A-Za-z0-9]{16})$|20|RO49AAAA1B31007593840000|RO2!n4!a16!c|^RO(\d{2})([A-Z]{4})([A-Za-z0-9]{16})$|24|0|3|||2011-06-20|1|1|||ro|RO||RON|www.bnro.ro|National Bank of Romania|eu_member
LC|Saint Lucia|0001 0001 0012 0012 0002 3015|HEMM000100010012001200023015|4!a24!c|^([A-Z]{4})([A-Za-z0-9]{24})$|28|LC55HEMM000100010012001200023015|LC2!n4!a24!c|^LC(\d{2})([A-Z]{4})([A-Za-z0-9]{24})$|32|0|3|||2016-04-15|0|1|||lc|LC||XCD|www.eccb-centralbank.org|Eastern Caribbean Central Bank|non_member
SM|San Marino|U032 2509 8000 0000 0270 100|U0322509800000000270100|1!a5!n5!n12!c|^([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|23|SM86U0322509800000000270100|SM2!n1!a5!n5!n12!c|^SM(\d{2})([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|27|1|5|6|10|2011-06-20|1|1|0|0|sm|SM||EUR|www.bcsm.sm|Central Bank of the Republic of San Marino|other_member
ST|São Tomé and Príncipe|518453101|0001000100518453101|8!n11!n2!n|^(\d{8})(\d{11})(\d{2})$|21|ST68000100010051845310112|ST2!n8!n11!n2!n|^ST(\d{2})(\d{8})(\d{11})(\d{2})$|25|0|3|4|7|2016-01-21|0|1|||st|ST||STD|www.bcstp.st|Central Bank of São Tomé and Príncipe|non_member
SA|Saudi Arabia|608010167519|80000000608010167519|2!n18!c|^(\d{2})([A-Za-z0-9]{18})$|20|SA0380000000608010167519|SA2!n2!n18!c|^SA(\d{2})(\d{2})([A-Za-z0-9]{18})$|24|0|1|||2012-05-29|0|1|||sa|SA||SAR|www.sama.gov.sa|Saudi Arabian Monetary Agency|non_member
SN|Senegal|A12312341234123412341234|A12312341234123412341234|1!a23!n|^[A-Z]{1}[0-9]{23}$|24|SN15A12312341234123412341234|SN2!n1!a23!n|^SN(\d{2})([A-Z]{1})(\d{23})$|28|||||2016-01-22|0|0|||sn|SN||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member
RS|Serbia|260-0056010016113-79|260005601001611379|3!n13!n2!n|^(\d{3})(\d{13})(\d{2})$|18|RS35260005601001611379|RS2!n3!n13!n2!n|^RS(\d{2})(\d{3})(\d{13})(\d{2})$|22|0|2|||2011-06-20|0|1|16|17|rs|RS||RSD|www.nbs.rs|National Bank of Serbia|non_member
SC|Seychelles|0000000000001497|SSCB11010000000000001497USD|4!a2!n2!n16!n3!a|^([A-Z]{4})(\d{2})(\d{2})(\d{16})([A-Z]{3})$|27|SC18SSCB11010000000000001497USD|SC2!n4!a2!n2!n16!n3!a|^SC(\d{2})([A-Z]{4})(\d{2})(\d{2})(\d{16})([A-Z]{3})$|31|0|3|4|7|2020-01-01|0|1|||sc|SC||SCR|www.cbs.sc|Central Bank of Seychelles|non_member
SK|Slovakia|19-8742637541/1200|12000000198742637541|4!n6!n10!n|^(\d{4})(\d{6})(\d{10})$|20|SK3112000000198742637541|SK2!n4!n6!n10!n|^SK(\d{2})(\d{4})(\d{6})(\d{10})$|24|0|3|4|9|2011-06-20|1|1|19|19|sk|SK||EUR|www.nbs.sk|National Bank of Slovakia|eu_member
SI|Slovenia|2633 0001 2039 086|263300012039086|5!n8!n2!n|^(\d{5})(\d{8})(\d{2})$|15|SI56191000000123438|SI2!n5!n8!n2!n|^SI(\d{2})(\d{5})(\d{8})(\d{2})$|19|0|1|2|4|2012-09-09|1|1|13|14|si|SI||EUR|www.bsi.si|Bank of Slovenia|eu_member
ES|Spain|2100 0418 45 0200051332|21000418450200051332|4!n4!n1!n1!n10!n|^(\d{4})(\d{4})(\d{1})(\d{1})(\d{10})$|20|ES9121000418450200051332|ES2!n4!n4!n1!n1!n10!n|^ES(\d{2})(\d{4})(\d{4})(\d{1})(\d{1})(\d{10})$|24|0|3|4|7|2013-09-05|1|1|8|9|es|ES||EUR|www.bde.es|Bank of Spain|eu_member
SE|Sweden|1234 12 3456 1|5000 0000 0583 9825 7466|3!n16!n1!n|^(\d{3})(\d{16})(\d{1})$|20|SE4550000000058398257466|SE2!n3!n16!n1!n|^SE(\d{2})(\d{3})(\d{16})(\d{1})$|24|0|2|||2011-06-20|1|1|19|19|se|SE||SEK|www.riksbank.com|Bank of Sweden (Sveriges Riksbank)|eu_member
CH|Switzerland|762 1162-3852.957|00762011623852957|5!n12!c|^(\d{5})([A-Za-z0-9]{12})$|17|CH9300762011623852957|CH2!n5!n12!c|^CH(\d{2})(\d{5})([A-Za-z0-9]{12})$|21|0|4|||2011-06-20|1|1|||ch|CH||CHF|www.snb.ch|Swiss National Bank|efta_member
TL|Timor-Leste|008 00123456789101 57|0080012345678910157|3!n 14!n 2!n|^(\d{3})(\d{14})(\d{2})$|19|TL380080012345678910157|TL2!n3!n14!n2!n|^TL(\d{2})(\d{3})(\d{14})(\d{2})$|23|0|3|4|6|2016-01-21|0|1|17|18|tl|TL||USD|www.bancocentral.tl|Central Bank of Timor-Leste (Banco Central de Timor-Leste)|non_member
TG|Togo|43103465004000 70|TG0090604310346500400070|2!a3!n5!n12!n2!n|^([A-Za-z]{2}\d{3})(\d{5})(\d{12})(\d{2})$|26|TG53TG0090604310346500400070|TG2!n2!a3!n5!n12!n2!n|^TG(\d{2})([A-Za-z]{2}\d{3})(\d{5})(\d{12})(\d{2})$|28|0|4|5|9|2017-08-03|0|0|22|24|tg|TG||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member
TN|Tunisia|10 006 0351835984788 31|10006035183598478831|2!n3!n13!n2!n|^(\d{2})(\d{3})(\d{13})(\d{2})$|20|TN5910006035183598478831|TN2!n2!n3!n13!n2!n|^TN(\d{2})(\d{2})(\d{3})(\d{13})(\d{2})$|24|0|1|2|4|2011-06-20|0|1|18|19|tn|TN||TND|www.bct.gov.tn|Central Bank of Tunisia|non_member
TR|Turkey|TR33 0006 1005 1978 6457 8413 26|0006100519786457841326|5!n1!n16!c|^(\d{5})(\d{1})([A-Za-z0-9]{16})$|22|TR330006100519786457841326|TR2!n5!n1!n16!c|^TR(\d{2})(\d{5})(\d{1})([A-Za-z0-9]{16})$|26|0|4|||2016-01-21|0|1|||tr|TR||TRY|www.tcmb.gov.tr|Central Bank of the Republic of Turkey|non_member
UA|Ukraine|3996220000026007233566001|3996220000026007233566001|6!n19!c|^[0-9]{6}[A-Za-z0-9]{19}$|25|UA213996220000026007233566001|UA2!n6!n19!c|^UA(\d{2})(\d{6})([A-Za-z0-9]{19})$|29|0|5|||2016-01-22|0|0|||ua|UA||UAH|www.bank.gov.ua|National Bank of Ukraine|non_member
AE|United Arab Emirates|1234567890123456|0331234567890123456|3!n16!n|^(\d{3})(\d{16})$|19|AE070331234567890123456|AE2!n3!n16!n|^AE(\d{2})(\d{3})(\d{16})$|23|0|2|||2011-06-20|0|1|||ae|AE||AED|www.centralbank.ae|Central Bank of the United Arab Emirates|non_member
GB|United Kingdom|60-16-13 31926819|NWBK60161331926819|4!a6!n8!n|^([A-Z]{4})(\d{6})(\d{8})$|18|GB29NWBK60161331926819|GB2!n4!a6!n8!n|^GB(\d{2})([A-Z]{4})(\d{6})(\d{8})$|22|0|3|4|9|2011-06-20|1|1|||uk|GB||GBP|www.bankofengland.co.uk|Bank of England|other_member

View File

@ -457,7 +457,8 @@ if (!file_exists($conffile)) {
while (($file = readdir($handle)) !== false) { while (($file = readdir($handle)) !== false) {
$reg = array(); $reg = array();
if (preg_match('/^(\d+\.\d+\.\d+)-(\d+\.\d+\.\d+)\.sql$/i', $file, $reg)) { if (preg_match('/^(\d+\.\d+\.\d+)-(\d+\.\d+\.\d+)\.sql$/i', $file, $reg)) {
if (!empty($reg[2]) && version_compare(DOL_VERSION, $reg[2])) { //var_dump(DOL_VERSION." ".$reg[2]." ".version_compare(DOL_VERSION, $reg[2]));
if (!empty($reg[2]) && version_compare(DOL_VERSION, $reg[2]) >= 0) {
$migrationscript[] = array('from' => $reg[1], 'to' => $reg[2]); $migrationscript[] = array('from' => $reg[1], 'to' => $reg[2]);
} }
} }

View File

@ -150,6 +150,8 @@ ALTER TABLE llx_facture ADD INDEX idx_facture_datef (datef);
ALTER TABLE llx_projet_task_time ADD COLUMN fk_product integer NULL; ALTER TABLE llx_projet_task_time ADD COLUMN fk_product integer NULL;
ALTER TABLE llx_c_action_trigger MODIFY elementtype VARCHAR(64);
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_MODIFY','Customer proposal modified','Executed when a customer proposal is modified','propal',2); INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_MODIFY','Customer proposal modified','Executed when a customer proposal is modified','propal',2);
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_MODIFY','Customer order modified','Executed when a customer order is set modified','commande',5); INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_MODIFY','Customer order modified','Executed when a customer order is set modified','commande',5);
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_MODIFY','Customer invoice modified','Executed when a customer invoice is modified','facture',7); INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_MODIFY','Customer invoice modified','Executed when a customer invoice is modified','facture',7);

View File

@ -1,7 +1,7 @@
-- --
-- Be carefull to requests order. -- Be carefull to requests order.
-- This file must be loaded by calling /install/index.php page -- This file must be loaded by calling /install/index.php page
-- when current version is 15.0.0 or higher. -- when current version is 16.0.0 or higher.
-- --
-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y -- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y
-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y -- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y
@ -32,5 +32,17 @@
-- -- VPGSQL8.2 SELECT dol_util_rebuild_sequences(); -- -- VPGSQL8.2 SELECT dol_util_rebuild_sequences();
-- Missing in v16 or lower
ALTER TABLE llx_c_action_trigger MODIFY elementtype VARCHAR(64);
-- v17
ALTER TABLE llx_facture ADD COLUMN close_missing_amount double(24, 8) after close_code;
ALTER TABLE llx_facture_fourn ADD COLUMN close_missing_amount double(24, 8) after close_code;
-- Allow users to make subscriptions of any amount during membership subscription -- Allow users to make subscriptions of any amount during membership subscription
ALTER TABLE llx_adherent_type ADD COLUMN caneditamount varchar(3) DEFAULT 0 AFTER amount; ALTER TABLE llx_adherent_type ADD COLUMN caneditamount varchar(3) DEFAULT 0 AFTER amount;

View File

@ -48,6 +48,7 @@ create table llx_facture
remise real DEFAULT 0, -- remise totale calculee remise real DEFAULT 0, -- remise totale calculee
close_code varchar(16), -- Code motif cloture sans paiement complet close_code varchar(16), -- Code motif cloture sans paiement complet
close_missing_amount double(24,8), -- Amount missing when closing with a not complete payment
close_note varchar(128), -- Commentaire cloture sans paiement complet close_note varchar(128), -- Commentaire cloture sans paiement complet
total_tva double(24,8) DEFAULT 0, -- amount total tva apres remise totale total_tva double(24,8) DEFAULT 0, -- amount total tva apres remise totale

View File

@ -44,6 +44,7 @@ create table llx_facture_fourn
remise double(24,8) DEFAULT 0, remise double(24,8) DEFAULT 0,
close_code varchar(16), -- Code motif cloture sans paiement complet close_code varchar(16), -- Code motif cloture sans paiement complet
close_missing_amount double(24,8), -- Amount missing when closing with a not complete payment
close_note varchar(128), -- Commentaire cloture sans paiement complet close_note varchar(128), -- Commentaire cloture sans paiement complet
tva double(24,8) DEFAULT 0, tva double(24,8) DEFAULT 0,

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