Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_projectwork

This commit is contained in:
florian HENRY 2016-09-05 08:31:40 +02:00
commit 8319d1f70a
113 changed files with 1258 additions and 1371 deletions

View File

@ -24,69 +24,65 @@ Dolibarr better:
- Function delete of class Facture (invoice) need the object $user as first parameter. Also you must
check you make a fetch on object before calling the delete.
- The old driver of "mysql" has been removed. Dolibarr use the new one (mysqli) by default.
- Remove not used function calculate_byte(). Use dol_print_size() instead.
- Function pdf_getTotalQty is now deprecated. Not used by Dolibarr core.
***** ChangeLog for 4.0.0 compared to 3.9.* *****
For users:
NEW: Add reccuring invoice feature and automatic generation of invoices.
NEW: Add recurring invoice feature and automatic generation of invoices.
NEW: Add module "Loan" as stable.
NEW: Add module "Supplier commercial proposal" (price request) is set to stable status.
NEW: Experimental module Accountancy Expert
NEW: Experimental module Multicurency
NEW: Show into badge on tab head the number of dedicated contacts for all objects.
NEW: Add module "Supplier commercial proposal" (price request) with stable status.
NEW: Can select dynamicaly number of lines to show on page on product, shipment, contact, orders, thirdparties.
NEW: Can select fields to show on list also for list of customer orders, supplier orders, shipments, proposals and invoices.
NEW: Show into badge on tab head, the number of dedicated contacts for all objects.
NEW: Add a checkbox to select/unselect all lines on page that support mass actions (like invoice list page)
NEW: Add a new method for margin calculation. Added margin on "cost price" to margin on WAP price and margin on "best supplier price".
NEW: Add a new method for margin calculation. Added margin on "cost price" in addition to margin on WAP price and margin on "best supplier price".
NEW: Add an explanation message on shipment page to explain you can't make shipment if order is not validated
NEW: Add date_rum into table of thirdparty bank account.
NEW: The probability of lead/opportunity can be defined per lead.
NEW: Added Malta VAT into migration script
NEW: #4972 Translated Charges sociales (type 0) and Charges sociales (type 1) in reports page
NEW: Add Expense report into accountancy report
NEW: Add Expense report to approve into workboard
NEW: Selection of boxes is move on top of home page
NEW: Add filter on a keyword, status and nature into list of modules
NEW: Selection of boxes is moved on top of home page
NEW: Add filter on a keyword, status and nature into list of modules.
NEW: Add hidden option BANK_DISABLE_CHECK_DEPOSIT to disable check deposit feature.
NEW: Add option MAIN_PUBLIC_NOTE_IN_ADDRESS
NEW: add html id/class to locate value in the DOM html
NEW: Add hidden option MAIN_PUBLIC_NOTE_IN_ADDRESS
NEW: Add index on invoice status
NEW: Add constant MAIN_LOGTOHTML to 0 into other setup by default to save time when we need to make debug on hosted instance.
NEW: Add constant MAIN_LOGTOHTML to 0 into setup by default to save time when we need to make debug on hosted instance.
NEW: Add list of billed
NEW: Add minimum stock and desired stock into import/export profiles.
NEW: Add state into thirdparty export fields
NEW: Add state into thirdparty export fields.
NEW: Add more trackable events (create, submit and receive supplier order).
NEW: Add option MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN
NEW: Add hidden option MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN
NEW: Add picto on module list to show warning and if module is an external module.
NEW: add product type filter on turnover report
NEW: Add product type filter on turnover report
NEW: Add state into list of fields available for personalized fields of thirdparties
NEW: Add statistics for interventions module
NEW: Add statistics on number of projets on home page
NEW: Add stats and late records into dashboard for supplier proposals.
NEW: Add statistics and late records into dashboard for supplier proposals.
NEW: Add the admin info on combo of type of contact
NEW: Add the event BILL_PAYED to list of supported events for module notification.
NEW: Add total weight and volume on PDF
NEW: Add the event BILL_PAYED to the list of supported events for module notification.
NEW: Add total weight and volume on PDF.
NEW: Add hidden option to hide column qty ordered on shipments.
NEW: Add view of virtual stock into product list (when appropriate)
NEW: Add warning on tasks when they are late (add also the warning tolerance parameter)
NEW: Add weight/volume for one product into shipment export
NEW: Add view of virtual stock into product list (when appropriate).
NEW: Add warning on tasks when they are late (add also the warning tolerance parameter).
NEW: Add weight/volume for one product into shipment export.
NEW: Add width and height on product card
NEW: allow a document to be linked to project from another customer on config
NEW: allow project to be shared across entities (for multicompany module)
NEW: allow a document to be linked to project of another customer by config setup.
NEW: allow project to be shared across entities (for multicompany module).
NEW: All variant of ckeditor config can be tested into the setup page of module.
NEW: Can change dynamically number of records visible into lists.
NEW: Can change type of extrafields for some combinations.
NEW: Can define number of first and last line into import wizard.
NEW: Can change type of extrafields (for some combinations only).
NEW: Can define number of first and last line to import into import wizard.
NEW: Can edit next execution date of a cron job.
NEW: Can edit value date of a vat payment after recording it.
NEW: Can filter modules on publisher
NEW: Can filter on employee status when building emailing from users
NEW: Can reopen an closed shipment
NEW: Can search on shipments into the quick search box
NEW: Can select dynamicaly number of lines to show on page on product, shipment, contact, orders, thirdparties
NEW: Can select fields to show on supplier orders list.
NEW: Can select fields to show on list also for list of customer orders, shipments and invoices.
NEW: Can select fields to show on proposal lists.
NEW: Can select language from combo list on page to overwrite a translation
NEW: Can filter modules on publisher.
NEW: Can filter on employee status when building emailing from users.
NEW: Can reopen an closed shipment.
NEW: Can search on shipments into the quick search box.
NEW: Can select language from a combo list on page to overwrite a translation.
NEW: Can select number of lines on page list for projects and tasks.
NEW: Can use ^ and $ (to say start with or end with like regex syntax) into search fields when search field is text. Bonus: ^$ can filter all lines with field not defined.
NEW: Clean and enhance code for cron engine
@ -108,33 +104,35 @@ NEW: Into GED module, filename is truncated only if there is not enough space in
NEW: Introduce a predefined job to run database backup
NEW: Introduce option MAIN_WEIGHT_DEFAULT_UNIT and MAIN_VOLUME_DEFAULT_UNIT to force output unit for weight and volume.
NEW: Introduce position of records into dictionnary of type of contacts
NEW: Link on user in leave context reach to leave tab.
NEW: List of user in agenda view per user show photo thumb
NEW: Link on a user in leave page reach to leave tab of user.
NEW: List of user in agenda view per user show photo thumb.
NEW: Margins module - Check/update buying price on invoice lines
NEW: Merge all admin tools (system and module admin tools) into same entry "Admin tools", so now things are clear: All features restricted to an admin user is inside "setup" (for setup) or "admin tools" (for action tools) instead of 3 different entries.
NEW: Merge all boxes "related objects" into one. This save a lot of room on most card and avoid often horizontal scoll.
NEW: Moved code that deals with bank categories to BankCateg. Created BankCateg::fetchAll function
NEW: Move Expense report menu from module to menu files
NEW: Move HRM dictionary from module to core dictionaries
NEW: Move HRM dictionary from module to core dictionaries.
NEW: Mutualize code to manage email substitution variables. Show available variables into page to edit email templates.
NEW: Mutualize code: Use one call of function "addThumbs", when possible, to generate thumbs files instead of several call of "vignette" function.
NEW: On translation admin page, admin can overwrite a translation value.
NEW: Option MAIN_LIST_FILTER_ON_DAY is supported on proposal list
NEW: Add reputation field for price supplier
NEW: Rest API token is no more reset at each call. We can reset it with param reset=1 on login call.
NEW: Option MAIN_LIST_FILTER_ON_DAY is supported on proposal list.
NEW: Add reputation field for price supplier.
NEW: Selection of fields is available on member list.
NEW: Show a badge with number of withdraw requests done on the withdraw tab of invoice.
NEW: Add option to show detail per warehouse into reassort
NEW: Show total number of modules into the module list
NEW: Add option to show detail per warehouse into reassort.
NEW: Show total number of modules into the module list.
NEW: Survey system has now a status like other objects. You can close or reopen a survey.
NEW: The note on time spent can be entered when using the view per day.
NEW: Use ellipsis truncation on too large left menu text
NEW: The note on time spent can be entered when using the "view per day".
NEW: Use ellipsis truncation on too large left menu text.
NEW: When a new field to show into lists is selected, the form is automatically submited and field added.
NEW: When creating a template invoice from a draft invoice, if there is link to contract on draft invoice, link is kept on template invoice.
NEW: When emailing is not sent completely, show progression.
NEW: Add entity field in llx_societe_remise_except and llx_societe_remise
NEW: Experimental module Accountancy Expert.
NEW: Experimental module Multicurency
For developers:
NEW: Add entity field in llx_societe_remise_except and llx_societe_remise.
NEW: Rest API token is no more reset at each call. We can reset it with param reset=1 on login call.
NEW: Add html id/class to locate value in the DOM html
NEW: Add a css class style called 'reposition', so when clicking on a link with this class will move scrollbarr to be placed at same page location.
NEW: TimeZone can be supplied to mktime
NEW: hook in shipment card
@ -154,8 +152,9 @@ NEW: Removed deprecated CommonObject::client property. Please use CommonObject::
NEW: Removed unused FormOrder::selectSourcesCommande function
NEW: Renamed ActionComm::add function to ActionComm::create
NEW: Rename Form::select_date to Form::selectDate and Form::form_date to Form::formDate
NEW: Rename path for generiN
NEW: Rename path for generic media files
NEW: More phpunit tests. Include some REST API into automatic tests.
NEW: Move Expense report menu from module to menu files.
WARNING:

View File

@ -26,11 +26,11 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
# Misc dependencies
# fonts-dejavu-core | ttf-dejavu-core,
xdg-utils,
mysql-server,
mysql-client,
virtual-mysql-client,
${misc:Depends},
${perl:Depends}
Recommends: apache2 | lighttpd | httpd
Recommends: apache2 | lighttpd | httpd,
virtual-mysql-server
Suggests: www-browser, php5-geoip
Description: Web based software to manage a company or foundation
Dolibarr ERP & CRM is an easy to use open source/free software package for

View File

@ -2,14 +2,22 @@
"name": "dolibarr/dolibarr",
"type": "project",
"description": "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business",
"keywords": ["erp","crm","invoice","sme","proposal","order","stock"],
"homepage": "http://www.dolibarr.org",
"keywords": [
"erp",
"crm",
"invoice",
"sme",
"proposal",
"order",
"stock",
"agenda"
],
"homepage": "https://www.dolibarr.org",
"license": "GPL-3.0+",
"support": {
"issues": "https://github.com/Dolibarr/dolibarr/issues",
"forum": "http://www.dolibarr.org/forum",
"wiki": "http://wiki.dolibarr.org",
"irc": "irc://chat.freenode.net/dolibarr",
"forum": "https://www.dolibarr.org/forum",
"wiki": "https://wiki.dolibarr.org",
"source": "https://github.com/Dolibarr/dolibarr"
},
"config": {
@ -48,6 +56,5 @@
"ext-zip": "ODT and Excel support",
"ext-xml": "Excel support",
"firephp/firephp-core": "Logging to Firebug console support",
"raven/raven": "Sentry logging server support"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

View File

@ -47,8 +47,6 @@ class AccountancyCategory
*/
public function __construct($db) {
$this->db = $db;
return 1;
}
/**

View File

@ -95,7 +95,6 @@ class BookKeeping extends CommonObject
*/
public function __construct(DoliDB $db) {
$this->db = $db;
return 1;
}
/**

View File

@ -27,6 +27,8 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
global $conf;
if (!$user->admin) accessforbidden();
$langs->load("admin");
@ -40,34 +42,37 @@ $activeModules = array();
if (defined('SYSLOG_HANDLERS')) $activeModules = json_decode(constant('SYSLOG_HANDLERS'));
$dir = dol_buildpath('/core/modules/syslog/');
$dirsyslogs = array_merge(array('/core/modules/syslog/'), $conf->modules_parts['syslog']);
foreach ($dirsyslogs as $reldir) {
$dir = dol_buildpath($reldir, 0);
$newdir = dol_osencode($dir);
if (is_dir($newdir)) {
$handle = opendir($newdir);
if (is_dir($dir))
{
$handle = opendir($dir);
if (is_resource($handle)) {
$var = true;
if (is_resource($handle))
{
$var=true;
while (($file = readdir($handle)) !== false) {
if (substr($file, 0, 11) == 'mod_syslog_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
$file = substr($file, 0, dol_strlen($file) - 4);
while (($file = readdir($handle))!==false)
{
if (substr($file, 0, 11) == 'mod_syslog_' && substr($file, dol_strlen($file)-3, 3) == 'php')
{
$file = substr($file, 0, dol_strlen($file)-4);
require_once $newdir . $file . '.php';
require_once $dir.$file.'.php';
$module = new $file;
$module = new $file;
// Show modules according to features level
if ($module->getVersion() == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
continue;
}
if ($module->getVersion() == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
continue;
}
// Show modules according to features level
if ($module->getVersion() == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
if ($module->getVersion() == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
$syslogModules[] = $file;
$syslogModules[] = $file;
}
}
closedir($handle);
}
closedir($handle);
}
}

View File

@ -23,6 +23,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
$langs->load("companies");
@ -36,10 +37,14 @@ if (!$user->admin) accessforbidden();
$id=GETPOST('rowid','int');
$action=GETPOST('action','alpha');
$langcode=GETPOST('langcode','alpha');
$transkey=GETPOST('transkey','alpha');
$transvalue=GETPOST('transvalue','alpha');
$mode = GETPOST('mode')?GETPOST('mode'):'overwrite';
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
@ -56,6 +61,28 @@ if (! $sortorder) $sortorder='ASC';
* Actions
*/
/*
* Actions
*/
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
$parameters=array('socid'=>$socid);
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
{
$transkey='';
$transvalue='';
$toselect='';
$search_array_options=array();
}
if ($action == 'add' || (GETPOST('add') && $action != 'update'))
{
@ -124,182 +151,290 @@ $formadmin = new FormAdmin($db);
$wikihelp='EN:Setup|FR:Paramétrage|ES:Configuración';
llxHeader('',$langs->trans("Setup"),$wikihelp);
print load_fiche_titre($langs->trans("TranslationSetup"),'','title_setup');
print load_fiche_titre($langs->trans("Translation"),'','title_setup');
print $langs->trans("TranslationDesc")."<br>\n";
print "<br>\n";
print $langs->trans("CurrentUserLanguage").': <strong>'.$langs->defaultlang.'</strong><br>';
$current_language_code=$langs->defaultlang;
$s=picto_from_langcode($current_language_code);
print $langs->trans("CurrentUserLanguage").': <strong>'.$s.' '.$current_language_code.'</strong><br>';
print '<br>';
print img_info().' '.$langs->trans("SomeTranslationAreUncomplete");
$urlwikitranslatordoc='https://wiki.dolibarr.org/index.php/Translator_documentation';
print ' ('.$langs->trans("SeeAlso").': <a href="'.$urlwikitranslatordoc.'" target="_blank">'.$urlwikitranslatordoc.'</a>)<br>';
print $langs->trans("TranslationOverwriteDesc",$langs->transnoentitiesnoconv("Language"),$langs->transnoentitiesnoconv("Key"),$langs->transnoentitiesnoconv("NewTranslationStringToShow"))."<br>\n";
$param='&mode='.$mode;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($optioncss != '') $param.='&optioncss='.$optioncss;
if ($langcode) $param.='&langcode='.urlencode($langcode);
if ($transkey) $param.='&transkey='.urlencode($transkey);
if ($transvalue) $param.='&transvalue='.urlencode($transvalue);
print '<br>';
$param='';
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
$head=translation_prepare_head();
dol_fiche_head($head, $mode, '', 0, '');
if ($mode == 'overwrite')
{
//print load_fiche_titre($langs->trans("TranslationOverwriteKey"), '', '')."\n";
print img_info().' '.$langs->trans("SomeTranslationAreUncomplete");
$urlwikitranslatordoc='https://wiki.dolibarr.org/index.php/Translator_documentation';
print ' ('.$langs->trans("SeeAlso").': <a href="'.$urlwikitranslatordoc.'" target="_blank">'.$urlwikitranslatordoc.'</a>)<br>';
print $langs->trans("TranslationOverwriteDesc",$langs->transnoentitiesnoconv("Language"),$langs->transnoentitiesnoconv("Key"),$langs->transnoentitiesnoconv("NewTranslationStringToShow"))."\n";
print ' ('.$langs->trans("TranslationOverwriteDesc2").').'."<br>\n";
print '<br>';
print load_fiche_titre($langs->trans("TranslationKeySearch"), '', '')."\n";
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" id="action" name="action" value="">';
print '<input type="hidden" id="mode" name="mode" value="'.$mode.'">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Language").' (en_US, es_MX, ...)</td>';
print '<td>'.$langs->trans("Key").'</td>';
print '<td>'.$langs->trans("TranslationString").'</td>';
if (! empty($conf->multicompany->enabled) && !$user->entity) print '<td>'.$langs->trans("Entity").'</td>';
print_liste_field_titre($langs->trans("Language").' (en_US, es_MX, ...)',$_SERVER["PHP_SELF"],'lang,transkey','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Key"),$_SERVER["PHP_SELF"],'transkey','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("NewTranslationStringToShow"),$_SERVER["PHP_SELF"],'transvalue','',$param,'',$sortfield,$sortorder);
if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
print '<td align="center"></td>';
print "</tr>\n";
// Line to search new record
// Line to add new record
$var=false;
print "\n";
print '<tr '.$bc[$var].'><td>';
print $formadmin->select_language(GETPOST('langcodesearch'),'langcodesearch',0,null,1,0,0,'',1);
//print '<input type="text" class="flat" size="24" name="langcode" value="'.GETPOST('langcode').'">';
print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, null, 1, 0, 0, 'maxwidthonsmartphone', 1);
print '</td>'."\n";
print '<td>';
print '<input type="text" class="flat maxwidthonsmartphone" name="transkeysearch" value="">';
print '<input type="text" class="flat maxwidthonsmartphone" name="transkey" value="">';
print '</td><td>';
print '<input type="text" class="quatrevingtpercent" name="transvaluesearch" value="">';
print '<input type="text" class="quatrevingtpercent" name="transvalue" value="">';
print '</td>';
// Limit to superadmin
if (! empty($conf->multicompany->enabled) && !$user->entity)
{
print '<td>';
print '<input type="text" class="flat" size="1" name="entitysearch" value="'.$conf->entity.'">';
print '</td>';
print '<td align="center">';
print '<td>';
print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
print '</td>';
print '<td align="center">';
}
else
{
print '<td align="center">';
print '<input type="hidden" name="entitysearch" value="'.$conf->entity.'">';
print '<td align="center">';
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
}
print '<input type="submit" class="button" value="'.$langs->trans("Search").'" name="search">';
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="add">';
print "</td>\n";
print '</tr>';
// Show constants
$sql = "SELECT";
$sql.= " rowid";
$sql.= ", lang";
$sql.= ", transkey";
$sql.= ", transvalue";
$sql.= " FROM ".MAIN_DB_PREFIX."overwrite_trans";
$sql.= " WHERE 1 = 1";
//$sql.= " AND entity IN (".$user->entity.",".$conf->entity.")";
//if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug
//else if (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits
//if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name'));
//$sql.= " ORDER BY entity, name ASC";
$sql.= $db->order($sortfield, $sortorder);
dol_syslog("translation::select from table", LOG_DEBUG);
$result = $db->query($sql);
if ($result)
{
$num = $db->num_rows($result);
$i = 0;
$var=false;
while ($i < $num)
{
$obj = $db->fetch_object($result);
$var=!$var;
print "\n";
print '<tr '.$bc[$var].'>';
print '<td>'.$obj->lang.'</td>'."\n";
print '<td>'.$obj->transkey.'</td>'."\n";
// Value
print '<td>';
/*print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">';
print '<input type="hidden" name="const['.$i.'][lang]" value="'.$obj->lang.'">';
print '<input type="hidden" name="const['.$i.'][name]" value="'.$obj->transkey.'">';
print '<input type="text" id="value_'.$i.'" class="flat inputforupdate" size="30" name="const['.$i.'][value]" value="'.dol_escape_htmltag($obj->transvalue).'">';
*/
print $obj->transvalue;
print '</td>';
print '<td align="center">';
print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&action=delete'.((empty($user->entity) && $debug)?'&debug=1':'').'">'.img_delete().'</a>';
print '</td>';
print "</tr>\n";
print "\n";
$i++;
}
}
print '</table>';
}
if ($mode == 'searchkey')
{
$langcode=GETPOST('langcode')?GETPOST('langcode'):$langs->defaultlang;
$newlang=new Translate('',$conf);
$newlang->setDefaultLang($langcode);
$newlangfileonly=new Translate('',$conf);
$newlangfileonly->setDefaultLang($langcode);
$recordtoshow=array();
$nbempty=0;
/*var_dump($langcode);
var_dump($transkey);
var_dump($transvalue);*/
if (empty($langcode) || $langcode == '-1') $nbempty++;
if (empty($transkey)) $nbempty++;
if (empty($transvalue)) $nbempty++;
if ($action == 'search' && ($nbempty > 999)) // 999 to disable this
{
setEventMessages($langs->trans("WarningAtLeastKeyOrTranslationRequired"), null, 'warnings');
}
else
{
// Load all translations keys
foreach($conf->file->dol_document_root as $keydir => $searchdir)
{
// Directory of translation files
$dir_lang = $searchdir."/langs/".$langcode;
$dir_lang_osencoded=dol_osencode($dir_lang);
$filearray=dol_dir_list($dir_lang_osencoded,'files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1);
foreach($filearray as $file)
{
$tmpfile=preg_replace('/.lang/i', '', basename($file['name']));
$newlang->load($tmpfile, 0, 0, '', 0);
$newlangfileonly->load($tmpfile, 0, 0, '', 1);
//print 'After loading lang '.$tmpfile.', newlang has '.count($newlang->tab_translate).' records<br>'."\n";
}
}
// Now search into translation array
foreach($newlang->tab_translate as $key => $val)
{
if ($transkey && ! preg_match('/'.preg_quote($transkey).'/', $key)) continue;
if ($transvalue && ! preg_match('/'.preg_quote($transvalue).'/', $val)) continue;
$recordtoshow[$key]=$val;
}
}
//print '<br>';
$nbtotalofrecordswithoutfilters = count($newlang->tab_translate);
$nbtotalofrecords = count($recordtoshow);
$num = $limit + 1;
if (($offset + $num) > $nbtotalofrecords) $num = $limit;
//print 'param='.$param.' $_SERVER["PHP_SELF"]='.$_SERVER["PHP_SELF"].' num='.$num.' page='.$page.' nbtotalofrecords='.$nbtotalofrecords." sortfield=".$sortfield." sortorder=".$sortorder;
$title = $langs->trans("TranslationKeySearch");
if ($nbtotalofrecords > 0) $title.=' ('.$nbtotalofrecords.' / '.$nbtotalofrecordswithoutfilters.')';
print print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, '', '', $limit)."\n";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" id="action" name="action" value="search">';
print '<input type="hidden" id="mode" name="mode" value="'.$mode.'">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Language").' (en_US, es_MX, ...)',$_SERVER["PHP_SELF"],'lang,transkey','',$param,'',$sortfield,$sortorder).'</td>';
print_liste_field_titre($langs->trans("Key"),$_SERVER["PHP_SELF"],'transkey','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("CurrentTranslationString"),$_SERVER["PHP_SELF"],'transvalue','',$param,'',$sortfield,$sortorder);
if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
print '<td align="center"></td>';
print "</tr>\n";
// Line to search new record
$var=false;
print "\n";
print '<tr '.$bc[$var].'><td>';
//print $formadmin->select_language($langcode,'langcode',0,null,$langs->trans("All"),0,0,'',1);
print $formadmin->select_language($langcode,'langcode', 0, null, 0, 0, 0, 'maxwidthonsmartphone', 1);
print '</td>'."\n";
print '<td>';
print '<input type="text" class="flat maxwidthonsmartphone" name="transkey" value="'.$transkey.'">';
print '</td><td>';
print '<input type="text" class="quatrevingtpercent" name="transvalue" value="'.$transvalue.'">';
// Limit to superadmin
if (! empty($conf->multicompany->enabled) && !$user->entity)
{
print '</td><td>';
print '<input type="text" class="flat" size="1" name="entitysearch" value="'.$conf->entity.'">';
}
else
{
print '<input type="hidden" name="entitysearch" value="'.$conf->entity.'">';
}
print '</td>';
// Action column
print '<td class="liste_titre" align="middle">';
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpitco;
print '</td>';
print '</tr>';
if ($sortfield == 'transkey' && strtolower($sortorder) == 'asc') ksort($recordtoshow);
if ($sortfield == 'transkey' && strtolower($sortorder) == 'desc') krsort($recordtoshow);
if ($sortfield == 'transvalue' && strtolower($sortorder) == 'asc') asort($recordtoshow);
if ($sortfield == 'transvalue' && strtolower($sortorder) == 'desc') arsort($recordtoshow);
// Show result
$i=0;
$var=false;
foreach($recordtoshow as $key => $val)
{
$i++;
if ($i <= $offset) continue;
if ($i > ($offset + $limit)) break;
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langcode.'</td><td>'.$key.'</td><td>';
print dol_escape_htmltag($val);
print '</td><td align="right">';
if ($val != $newlangfileonly->tab_translate[$key])
{
$htmltext = $langs->trans("OriginalValueWas", $newlangfileonly->tab_translate[$key]);
print $form->textwithpicto('', $htmltext, 1, 'warning');
}
print '</td></tr>'."\n";
}
print '</table>';
print '</form>';
}
print '<br>';
print load_fiche_titre($langs->trans("TranslationOverwriteKey"), '', '')."\n";
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" id="action" name="action" value="">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Language").' (en_US, es_MX, ...)',$_SERVER["PHP_SELF"],'lang,transkey','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Key"),$_SERVER["PHP_SELF"],'transkey','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("NewTranslationStringToShow"),$_SERVER["PHP_SELF"],'transvalue','',$param,'',$sortfield,$sortorder);
if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
print '<td align="center"></td>';
print "</tr>\n";
// Line to add new record
$var=false;
print "\n";
print '<tr '.$bc[$var].'><td>';
print $formadmin->select_language(GETPOST('langcode'),'langcode',0,null,1,0,0,'',1);
//print '<input type="text" class="flat" size="24" name="langcode" value="'.GETPOST('langcode').'">';
print '</td>'."\n";
print '<td>';
print '<input type="text" class="flat maxwidthonsmartphone" name="transkey" value="">';
print '</td><td>';
print '<input type="text" class="quatrevingtpercent" name="transvalue" value="">';
print '</td>';
// Limit to superadmin
if (! empty($conf->multicompany->enabled) && !$user->entity)
{
print '<td>';
print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
print '</td>';
print '<td align="center">';
}
else
{
print '<td align="center">';
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
}
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="add">';
print "</td>\n";
print '</tr>';
// Show constants
$sql = "SELECT";
$sql.= " rowid";
$sql.= ", lang";
$sql.= ", transkey";
$sql.= ", transvalue";
$sql.= " FROM ".MAIN_DB_PREFIX."overwrite_trans";
$sql.= " WHERE 1 = 1";
//$sql.= " AND entity IN (".$user->entity.",".$conf->entity.")";
//if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug
//else if (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits
//if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name'));
//$sql.= " ORDER BY entity, name ASC";
$sql.= $db->order($sortfield, $sortorder);
dol_syslog("translation::select from table", LOG_DEBUG);
$result = $db->query($sql);
if ($result)
{
$num = $db->num_rows($result);
$i = 0;
$var=false;
while ($i < $num)
{
$obj = $db->fetch_object($result);
$var=!$var;
print "\n";
print '<tr '.$bc[$var].'>';
print '<td>'.$obj->lang.'</td>'."\n";
print '<td>'.$obj->transkey.'</td>'."\n";
// Value
print '<td>';
/*print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">';
print '<input type="hidden" name="const['.$i.'][lang]" value="'.$obj->lang.'">';
print '<input type="hidden" name="const['.$i.'][name]" value="'.$obj->transkey.'">';
print '<input type="text" id="value_'.$i.'" class="flat inputforupdate" size="30" name="const['.$i.'][value]" value="'.dol_escape_htmltag($obj->transvalue).'">';
*/
print $obj->transvalue;
print '</td>';
print '<td align="center">';
print '<a href="'.$_SERVER['PHP_SELF'].'?rowid='.$obj->rowid.'&entity='.$obj->entity.'&action=delete'.((empty($user->entity) && $debug)?'&debug=1':'').'">'.img_delete().'</a>';
print '</td>';
print "</tr>\n";
print "\n";
$i++;
}
}
print '</table>';
dol_fiche_end();
print "</form>\n";

View File

@ -71,7 +71,7 @@ if (! empty($conf->supplier_proposal->enabled)) $supplierproposalstatic=new Supp
if (! empty($conf->commande->enabled)) $orderstatic=new Commande($db);
if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFournisseur($db);
llxHeader();
llxHeader("",$langs->trans("CommercialArea"));
print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png');

View File

@ -2513,7 +2513,7 @@ if ($action == 'create' && $user->rights->commande->creer)
}
// Create contract
if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED)) {
if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED || $object->statut == Commande::STATUS_CLOSED)) {
$langs->load("contracts");
if ($user->rights->contrat->creer) {

View File

@ -95,11 +95,11 @@ $pagenext = $page + 1;
if (! $sortfield) $sortfield='c.ref';
if (! $sortorder) $sortorder='DESC';
$viewstatut=GETPOST('viewstatut');
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$contextpage='orderlist';
$viewstatut=GETPOST('viewstatut');
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('orderlist'));
$extrafields = new ExtraFields($db);
@ -594,7 +594,7 @@ if ($resql)
if (! empty($arrayfields['c.date_commande']['checked'])) print_liste_field_titre($arrayfields['c.date_commande']['label'],$_SERVER["PHP_SELF"],'c.date_commande','',$param, 'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['c.date_delivery']['checked'])) print_liste_field_titre($arrayfields['c.date_delivery']['label'],$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['c.total_ht']['checked'])) print_liste_field_titre($arrayfields['c.total_ht']['label'],$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'],$_SERVER["PHP_SELF"],'c.tva','',$param, 'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'],$_SERVER["PHP_SELF"],'c.tva','',$param, 'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['c.total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.total_ttc']['label'],$_SERVER["PHP_SELF"],'c.total_ttc','',$param, 'align="right"',$sortfield,$sortorder);
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))

View File

@ -2185,31 +2185,34 @@ if ($action == 'create')
if ((empty($origin)) || ((($origin == 'propal') || ($origin == 'commande')) && (! empty($originid))))
{
// Deposit
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> ';
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#typedeposit, #valuedeposit").click(function() {
jQuery("#radio_deposit").prop("checked", true);
});
});
</script>';
$desc = $form->textwithpicto($tmp.$langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3);
print '<table class="nobordernopadding"><tr><td>';
print $desc;
print '</td>';
if (($origin == 'propal') || ($origin == 'commande'))
{
print '<td class="nowrap" style="padding-left: 5px">';
$arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount');
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
print '</td>';
print '<td class="nowrap" style="padding-left: 5px">' . $langs->trans('Value') . ':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="' . GETPOST('valuedeposit', 'int') . '"/>';
}
print '</td></tr></table>';
print '</div></div>';
if (empty($conf->global->INVOICE_DISABLE_DEPOSIT))
{
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> ';
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#typedeposit, #valuedeposit").click(function() {
jQuery("#radio_deposit").prop("checked", true);
});
});
</script>';
$desc = $form->textwithpicto($tmp.$langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3);
print '<table class="nobordernopadding"><tr><td>';
print $desc;
print '</td>';
if (($origin == 'propal') || ($origin == 'commande'))
{
print '<td class="nowrap" style="padding-left: 5px">';
$arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount');
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
print '</td>';
print '<td class="nowrap" style="padding-left: 5px">' . $langs->trans('Value') . ':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="' . GETPOST('valuedeposit', 'int') . '"/>';
}
print '</td></tr></table>';
print '</div></div>';
}
}
if ($socid > 0)
@ -2239,32 +2242,36 @@ if ($action == 'create')
}
// Replacement
print '<!-- replacement line --><div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" name="type" id="radio_replacement" value="1"' . (GETPOST('type') == 1 ? ' checked' : '');
if (! $options) $tmp.=' disabled';
$tmp.='> ';
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#fac_replacement").change(function() {
jQuery("#radio_replacement").prop("checked", true);
});
});
</script>';
$text = $tmp.$langs->trans("InvoiceReplacementAsk") . ' ';
$text .= '<select class="flat" name="fac_replacement" id="fac_replacement"';
if (! $options)
$text .= ' disabled';
$text .= '>';
if ($options) {
$text .= '<option value="-1">&nbsp;</option>';
$text .= $options;
} else {
$text .= '<option value="-1">' . $langs->trans("NoReplacableInvoice") . '</option>';
if (empty($conf->global->INVOICE_DISABLE_REPLACEMENT))
{
print '<!-- replacement line -->';
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" name="type" id="radio_replacement" value="1"' . (GETPOST('type') == 1 ? ' checked' : '');
if (! $options) $tmp.=' disabled';
$tmp.='> ';
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#fac_replacement").change(function() {
jQuery("#radio_replacement").prop("checked", true);
});
});
</script>';
$text = $tmp.$langs->trans("InvoiceReplacementAsk") . ' ';
$text .= '<select class="flat" name="fac_replacement" id="fac_replacement"';
if (! $options)
$text .= ' disabled';
$text .= '>';
if ($options) {
$text .= '<option value="-1">&nbsp;</option>';
$text .= $options;
} else {
$text .= '<option value="-1">' . $langs->trans("NoReplacableInvoice") . '</option>';
}
$text .= '</select>';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3);
print $desc;
print '</div></div>';
}
$text .= '</select>';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3);
print $desc;
print '</div></div>';
}
else
{
@ -2281,48 +2288,51 @@ if ($action == 'create')
{
if ($socid > 0)
{
// Credit note
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_creditnote" name="type" value="2"' . (GETPOST('type') == 2 ? ' checked' : '');
if (! $optionsav) $tmp.=' disabled';
$tmp.= '> ';
// Show credit note options only if we checked credit note
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
if (! jQuery("#radio_creditnote").is(":checked"))
{
jQuery("#credit_note_options").hide();
}
jQuery("#radio_creditnote").click(function() {
jQuery("#credit_note_options").show();
});
jQuery("#radio_standard, #radio_replacement, #radio_deposit").click(function() {
jQuery("#credit_note_options").hide();
});
});
</script>';
$text = $tmp.$langs->transnoentities("InvoiceAvoirAsk") . ' ';
// $text.='<input type="text" value="">';
$text .= '<select class="flat" name="fac_avoir" id="fac_avoir"';
if (! $optionsav)
$text .= ' disabled';
$text .= '>';
if ($optionsav) {
$text .= '<option value="-1"></option>';
$text .= $optionsav;
} else {
$text .= '<option value="-1">' . $langs->trans("NoInvoiceToCorrect") . '</option>';
}
$text .= '</select>';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3);
print $desc;
print '<div id="credit_note_options" class="clearboth">';
print '&nbsp;&nbsp;&nbsp; <input data-role="none" type="checkbox" name="invoiceAvoirWithLines" id="invoiceAvoirWithLines" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithPaymentRestAmount\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithLines','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithLines">'.$langs->trans('invoiceAvoirWithLines')."</label>";
print '<br>&nbsp;&nbsp;&nbsp; <input data-role="none" type="checkbox" name="invoiceAvoirWithPaymentRestAmount" id="invoiceAvoirWithPaymentRestAmount" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithLines\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithPaymentRestAmount','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithPaymentRestAmount">'.$langs->trans('invoiceAvoirWithPaymentRestAmount')."</label>";
print '</div>';
print '</div></div>';
// Credit note
if (empty($conf->global->INVOICE_DISABLE_CREDIT_NOTE))
{
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_creditnote" name="type" value="2"' . (GETPOST('type') == 2 ? ' checked' : '');
if (! $optionsav) $tmp.=' disabled';
$tmp.= '> ';
// Show credit note options only if we checked credit note
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
if (! jQuery("#radio_creditnote").is(":checked"))
{
jQuery("#credit_note_options").hide();
}
jQuery("#radio_creditnote").click(function() {
jQuery("#credit_note_options").show();
});
jQuery("#radio_standard, #radio_replacement, #radio_deposit").click(function() {
jQuery("#credit_note_options").hide();
});
});
</script>';
$text = $tmp.$langs->transnoentities("InvoiceAvoirAsk") . ' ';
// $text.='<input type="text" value="">';
$text .= '<select class="flat" name="fac_avoir" id="fac_avoir"';
if (! $optionsav)
$text .= ' disabled';
$text .= '>';
if ($optionsav) {
$text .= '<option value="-1"></option>';
$text .= $optionsav;
} else {
$text .= '<option value="-1">' . $langs->trans("NoInvoiceToCorrect") . '</option>';
}
$text .= '</select>';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3);
print $desc;
print '<div id="credit_note_options" class="clearboth">';
print '&nbsp;&nbsp;&nbsp; <input data-role="none" type="checkbox" name="invoiceAvoirWithLines" id="invoiceAvoirWithLines" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithPaymentRestAmount\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithLines','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithLines">'.$langs->trans('invoiceAvoirWithLines')."</label>";
print '<br>&nbsp;&nbsp;&nbsp; <input data-role="none" type="checkbox" name="invoiceAvoirWithPaymentRestAmount" id="invoiceAvoirWithPaymentRestAmount" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithLines\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithPaymentRestAmount','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithPaymentRestAmount">'.$langs->trans('invoiceAvoirWithPaymentRestAmount')."</label>";
print '</div>';
print '</div></div>';
}
}
else
{

View File

@ -22,7 +22,7 @@
/**
* \file htdocs/compta/prelevement/class/bonprelevement.class.php
* \ingroup prelevement
* \brief Fichier de la classe des bons de prelevements
* \brief File of withdrawal receipts class
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
@ -104,11 +104,11 @@ class BonPrelevement extends CommonObject
}
/**
* Add facture to withdrawal
* Add invoice to withdrawal
*
* @param int $facture_id id invoice to add
* @param int $client_id id invoice customer
* @param string $client_nom name of cliente
* @param string $client_nom customer name
* @param int $amount amount of invoice
* @param string $code_banque code of bank withdrawal
* @param string $code_guichet code of bank's office
@ -166,7 +166,7 @@ class BonPrelevement extends CommonObject
*
* @param int $line_id id line to add
* @param int $client_id id invoice customer
* @param string $client_nom name of cliente
* @param string $client_nom customer name
* @param int $amount amount of invoice
* @param string $code_banque code of bank withdrawal
* @param string $code_guichet code of bank's office
@ -182,7 +182,7 @@ class BonPrelevement extends CommonObject
if ($concat == 1)
{
/*
* On aggrege les lignes
* We aggregate the lines
*/
$sql = "SELECT rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes";
@ -205,7 +205,7 @@ class BonPrelevement extends CommonObject
else
{
/*
* Pas de d'agregation
* No aggregate
*/
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_lignes (";
$sql.= "fk_prelevement_bons";
@ -376,7 +376,7 @@ class BonPrelevement extends CommonObject
}
/*
* Fin de la procedure
* End of procedure
*/
if ($error == 0)
{
@ -478,7 +478,7 @@ class BonPrelevement extends CommonObject
$error++;
}
}
// Update prelevement line
// Update withdrawal line
// TODO: Translate to ligneprelevement.class.php
$sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes";
$sql.= " SET statut = 2";
@ -605,8 +605,8 @@ class BonPrelevement extends CommonObject
$arr = array();
/*
* Renvoie toutes les factures presente
* dans un bon de prelevement
* Returns all invoices presented
* within a withdrawal receipt
*/
$sql = "SELECT fk_facture";
if ($amounts) $sql .= ", SUM(pl.amount)";
@ -1680,8 +1680,9 @@ class BonPrelevement extends CommonObject
* @return string String with SEPA Sender
*/
function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n')
{ // SEPA INITIALISATION
global $confs;
{
// SEPA INITIALISATION
global $conf;
$dateTime_YMD = dol_print_date($ladate, '%Y%m%d');
$dateTime_ETAD = dol_print_date($ladate, '%Y-%m-%d');

View File

@ -554,8 +554,6 @@ class Contact extends CommonObject
$this->db->rollback();
return -$error;
}
return $result;
}

View File

@ -31,13 +31,25 @@ require ("../main.inc.php");
require_once (DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
$langs->load("contracts");
$langs->load("products");
$langs->load("companies");
$langs->load("compta");
$action=GETPOST('action','alpha');
$massaction=GETPOST('massaction','alpha');
$show_files=GETPOST('show_files','int');
$confirm=GETPOST('confirm','alpha');
$toselect = GETPOST('toselect', 'array');
$search_name=GETPOST('search_name');
$search_town=GETPOST('search_town','alpha');
$search_zip=GETPOST('search_zip','alpha');
$search_state=trim(GETPOST("search_state"));
$search_country=GETPOST("search_country",'int');
$search_type_thirdparty=GETPOST("search_type_thirdparty",'int');
$search_contract=GETPOST('search_contract');
$search_ref_supplier=GETPOST('search_ref_supplier','alpha');
$sall=GETPOST('sall');
@ -73,6 +85,7 @@ $staticcontratligne=new ContratLigne($db);
if ($search_status == '') $search_status=1;
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$contextpage='contractlist';
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
@ -80,9 +93,8 @@ $hookmanager->initHooks(array($contextpage));
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
$extralabels = $extrafields->fetch_name_optionals_label('contract');
$extralabels = $extrafields->fetch_name_optionals_label('contrat');
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'c.ref'=>'Ref',
@ -94,25 +106,56 @@ $fieldstosearchall = array(
);
if (empty($user->socid)) $fieldstosearchall["c.note_private"]="NotePrivate";
$arrayfields=array(
'c.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
'c.ref_customer'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1),
'c.ref_supplier'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1),
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0),
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0),
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0),
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0),
'sale_representative'=>array('label'=>$langs->trans("SalesRepresentative"), 'checked'=>1),
'c.date_contrat'=>array('label'=>$langs->trans("DateContract"), 'checked'=>1),
'c.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
'c.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
'status'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
);
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
{
$arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]);
}
}
/*
* Action
*/
$parameters=array();
$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
$parameters=array('socid'=>$socid);
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
if (empty($reshook))
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
{
}
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
$search_name="";
$day='';
$month='';
$year='';
$search_name="";
$search_town='';
$search_zip="";
$search_state="";
$search_type='';
$search_country='';
$search_contract="";
$search_ref_supplier="";
$search_user='';
@ -120,10 +163,18 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
$search_product_category='';
$sall="";
$search_status="";
$toselect='';
$search_array_options=array();
$day='';
$month='';
$year='';
}
if (empty($reshook))
{
$objectclass='Contrat';
$objectlabel='Contracts';
$permtoread = $user->rights->contrat->lire;
$permtodelete = $user->rights->contrat->supprimer;
$uploaddir = $conf->contrat->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
@ -139,16 +190,28 @@ $socstatic = new Societe($db);
llxHeader();
$sql = 'SELECT';
$sql.= " c.rowid as cid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier,";
$sql.= " s.nom as name, s.rowid as socid,";
$sql.= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier,";
$sql.= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,';
$sql.= " typent.code as typent_code,";
$sql.= " state.code_departement as state_code, state.nom as state_name,";
$sql.= ' SUM('.$db->ifsql("cd.statut=0",1,0).') as nb_initial,';
$sql.= ' SUM('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NULL OR cd.date_fin_validite >= '".$db->idate($now)."')",1,0).') as nb_running,';
$sql.= ' SUM('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '".$db->idate($now)."')",1,0).') as nb_expired,';
$sql.= ' SUM('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '".$db->idate($now - $conf->contrat->services->expires->warning_delay)."')",1,0).') as nb_late,';
$sql.= ' SUM('.$db->ifsql("cd.statut=5",1,0).') as nb_closed';
// Add fields from extrafields
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
// Add fields from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
if ($search_sale > 0 || (! $user->rights->societe->client->voir && ! $socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ", ".MAIN_DB_PREFIX."contrat as c";
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contrat_extrafields as ef on (c.rowid = ef.fk_object)";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat";
if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=cd.fk_product';
if ($search_user > 0)
@ -183,14 +246,46 @@ if ($search_sale > 0)
}
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='contrat' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user;
$sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, s.nom, s.rowid";
// Add where from extra fields
foreach ($search_array_options as $key => $val)
{
$crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key);
$typ=$extrafields->attribute_type[$tmpkey];
$mode=0;
if (in_array($typ, array('int','double'))) $mode=1; // Search on a numeric
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
{
$sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
}
}
// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier,";
$sql.= ' s.rowid, s.nom, s.town, s.zip, s.fk_pays, s.client, s.code_client,';
$sql.= " typent.code,";
$sql.= " state.code_departement, state.nom";
// Add where from extra fields
foreach ($extrafields->attribute_label as $key => $val)
{
$sql .= ', ef.'.$val;
}
// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= $db->order($sortfield,$sortorder);
$totalnboflines=0;
$result=$db->query($sql);
if ($result)
{
$totalnboflines = $db->num_rows($result);
}
$sql.= $db->order($sortfield,$sortorder);
$nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
@ -207,23 +302,46 @@ if ($resql)
$num = $db->num_rows($resql);
$i = 0;
$arrayofselected=is_array($toselect)?$toselect:array();
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
$param.='&search_contract='.$search_contract;
$param.='&search_name='.$search_name;
$param.='&search_ref_supplier='.$search_ref_supplier;
$param.='&search_sale=' .$search_sale;
if ($optioncss != '') $param.='&optioncss='.$optioncss;
if ($search_contract) $param.='&search_contract='.$search_contract;
if ($search_name) $param.='&search_name='.$search_name;
if ($search_ref_supplier) $param.='&search_ref_supplier='.$search_ref_supplier;
if ($search_sale) $param.='&search_sale=' .$search_sale;
if ($show_files) $param.='&show_files=' .$show_files;
if ($optioncss != '') $param.='&optioncss='.$optioncss;
// Add $param from extra fields
foreach ($search_array_options as $key => $val)
{
$crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key);
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
}
// List of mass actions available
$arrayofmassactions = array(
//'presend'=>$langs->trans("SendByMail"),
//'builddoc'=>$langs->trans("PDFMerge"),
);
if ($user->rights->contrat->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete");
if ($massaction == 'presend') $arrayofmassactions=array();
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num,$totalnboflines,'title_commercial.png', 0, '', '', $limit);
print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $totalnboflines, 'title_commercial.png', 0, '', '', $limit);
if ($sall)
{
@ -231,8 +349,9 @@ if ($resql)
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
}
// If the user can view prospects other than his'
$moreforfilter='';
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
$langs->load("commercial");
@ -264,6 +383,7 @@ if ($resql)
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
else $moreforfilter = $hookmanager->resPrint;
if (! empty($moreforfilter))
{
print '<div class="liste_titre liste_titre_bydiv centpercent">';
@ -271,52 +391,164 @@ if ($resql)
print '</div>';
}
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("RefCustomer"), $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("RefSupplier"), $_SERVER["PHP_SELF"], "c.ref_supplier","","$param",'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("ThirdParty"), $_SERVER["PHP_SELF"], "s.nom","","$param",'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("SalesRepresentative"), $_SERVER["PHP_SELF"], "","","$param",'',$sortfield,$sortorder);
//print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","$param",'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateContract"), $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder);
//print_liste_field_titre($langs->trans("Status"), $_SERVER["PHP_SELF"], "c.statut","","$param",'align="center"',$sortfield,$sortorder);
print_liste_field_titre($staticcontratligne->LibStatut(0,3), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(4,3,0), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(4,3,1), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(5,3), '', '', '', '', 'width="16"');
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder);
if (! empty($arrayfields['c.ref_customer']['checked'])) print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder);
if (! empty($arrayfields['c.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier","","$param",'',$sortfield,$sortorder);
if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom","","$param",'',$sortfield,$sortorder);
if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'],$_SERVER["PHP_SELF"],'s.town','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'],$_SERVER["PHP_SELF"],'s.zip','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'],$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'],$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "","","$param",'',$sortfield,$sortorder);
if (! empty($arrayfields['c.date_contrat']['checked'])) print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder);
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
{
$align=$extrafields->getAlignFlag($key);
print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder);
}
}
}
// Hook fields
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'],$_SERVER["PHP_SELF"],"c.date_creation","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'],$_SERVER["PHP_SELF"],"c.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['status']['checked']))
{
print_liste_field_titre($staticcontratligne->LibStatut(0,3), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(4,3,0), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(4,3,1), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(5,3), '', '', '', '', 'width="16"');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
print "</tr>\n";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr class="liste_titre">';
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="3" name="search_contract" value="'.dol_escape_htmltag($search_contract).'">';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="6" name="search_ref_customer value="'.dol_escape_htmltag($search_ref_customer).'">';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="6" name="search_ref_supplier value="'.dol_escape_htmltag($search_ref_supplier).'">';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="8" name="search_name" value="'.dol_escape_htmltag($search_name).'">';
print '</td>';
print '<td></td>';
// Date contract
print '<td class="liste_titre center">';
//print $langs->trans('Month').': ';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
//print '&nbsp;'.$langs->trans('Year').': ';
$syear = $year;
$formother->select_year($syear,'year',1, 20, 5);
print '</td>';
print '<td class="liste_titre" colspan="4" align="right"></td>';
print '<td>';
$searchpitco=$form->showFilterAndCheckAddButtons(0);
print $searchpitco;
if (! empty($arrayfields['c.ref']['checked']))
{
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="3" name="search_contract" value="'.dol_escape_htmltag($search_contract).'">';
print '</td>';
}
if (! empty($arrayfields['c.ref_customer']['checked']))
{
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="6" name="search_ref_customer value="'.dol_escape_htmltag($search_ref_customer).'">';
print '</td>';
}
if (! empty($arrayfields['c.ref_supplier']['checked']))
{
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="6" name="search_ref_supplier value="'.dol_escape_htmltag($search_ref_supplier).'">';
print '</td>';
}
if (! empty($arrayfields['s.nom']['checked']))
{
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="8" name="search_name" value="'.dol_escape_htmltag($search_name).'">';
print '</td>';
}
// Town
if (! empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.'"></td>';
// Zip
if (! empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_zip" value="'.$search_zip.'"></td>';
// State
if (! empty($arrayfields['state.nom']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
print '</td>';
}
// Country
if (! empty($arrayfields['country.code_iso']['checked']))
{
print '<td class="liste_titre" align="center">';
print $form->select_country($search_country,'search_country','',0,'maxwidth100');
print '</td>';
}
// Company type
if (! empty($arrayfields['typent.code']['checked']))
{
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
print '</td>';
}
if (! empty($arrayfields['sale_representative']['checked']))
{
print '<td></td>';
}
if (! empty($arrayfields['c.date_contrat']['checked']))
{
// Date contract
print '<td class="liste_titre center">';
//print $langs->trans('Month').': ';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
//print '&nbsp;'.$langs->trans('Year').': ';
$syear = $year;
$formother->select_year($syear,'year',1, 20, 5);
print '</td>';
}
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
{
$align=$extrafields->getAlignFlag($key);
$typeofextrafield=$extrafields->attribute_type[$key];
print '<td class="liste_titre'.($align?' '.$align:'').'">';
if (in_array($typeofextrafield, array('varchar', 'int', 'double', 'select')))
{
$crit=$val;
$tmpkey=preg_replace('/search_options_/','',$key);
$searchclass='';
if (in_array($typeofextrafield, array('varchar', 'select'))) $searchclass='searchstring';
if (in_array($typeofextrafield, array('int', 'double'))) $searchclass='searchnum';
print '<input class="flat'.($searchclass?' '.$searchclass:'').'" size="4" type="text" name="search_options_'.$tmpkey.'" value="'.dol_escape_htmltag($search_array_options['search_options_'.$tmpkey]).'">';
}
print '</td>';
}
}
}
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
if (! empty($arrayfields['c.datec']['checked']))
{
print '<td class="liste_titre">';
print '</td>';
}
// Date modification
if (! empty($arrayfields['c.tms']['checked']))
{
print '<td class="liste_titre">';
print '</td>';
}
// Status
if (! empty($arrayfields['status']['checked']))
{
print '<td class="liste_titre" colspan="4" align="right"></td>';
}
print '<td class="liste_titre" align="middle">';
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpitco;
print '</td>';
print "</tr>\n";
@ -326,65 +558,166 @@ if ($resql)
$obj = $db->fetch_object($resql);
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td class="nowrap"><a href="card.php?id='.$obj->cid.'">';
print img_object($langs->trans("ShowContract"),"contract").' '.(isset($obj->ref) ? $obj->ref : $obj->cid) .'</a>';
if ($obj->nb_late) print img_warning($langs->trans("Late"));
print '</td>';
print '<td>'.$obj->ref_customer.'</td>';
print '<td>'.$obj->ref_supplier.'</td>';
print '<td><a href="../comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'</a></td>';
//print '<td align="center">'.dol_print_date($obj->datec).'</td>';
// Sales Rapresentatives
print '<td>';
if($obj->socid)
if (! empty($arrayfields['c.ref']['checked']))
{
$result=$socstatic->fetch($obj->socid);
if ($result < 0)
{
dol_print_error($db);
exit;
}
$listsalesrepresentatives=$socstatic->getSalesRepresentatives($user);
if ($listsalesrepresentatives < 0) dol_print_error($db);
$nbofsalesrepresentative=count($listsalesrepresentatives);
if ($nbofsalesrepresentative > 3) // We print only number
{
print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$socstatic->id.'">';
print $nbofsalesrepresentative;
print '</a>';
}
else if ($nbofsalesrepresentative > 0)
{
$userstatic=new User($db);
$j=0;
foreach($listsalesrepresentatives as $val)
{
$userstatic->id=$val['id'];
$userstatic->lastname=$val['lastname'];
$userstatic->firstname=$val['firstname'];
print '<div class="float">'.$userstatic->getNomUrl(1);
$j++;
if ($j < $nbofsalesrepresentative) print ', ';
print '</div>';
}
}
//else print $langs->trans("NoSalesRepresentativeAffected");
print '<td class="nowrap"><a href="card.php?id='.$obj->rowid.'">';
print img_object($langs->trans("ShowContract"),"contract").' '.(isset($obj->ref) ? $obj->ref : $obj->rowid) .'</a>';
if ($obj->nb_late) print img_warning($langs->trans("Late"));
print '</td>';
}
else
if (! empty($arrayfields['c.ref_customer']['checked']))
{
print '&nbsp';
print '<td>'.$obj->ref_customer.'</td>';
}
if (! empty($arrayfields['c.ref_supplier']['checked']))
{
print '<td>'.$obj->ref_supplier.'</td>';
}
if (! empty($arrayfields['s.nom']['checked']))
{
print '<td><a href="../comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'</a></td>';
}
// Town
if (! empty($arrayfields['s.town']['checked']))
{
print '<td class="nocellnopadd">';
print $obj->town;
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Zip
if (! empty($arrayfields['s.zip']['checked']))
{
print '<td class="nocellnopadd">';
print $obj->zip;
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// State
if (! empty($arrayfields['state.nom']['checked']))
{
print "<td>".$obj->state_name."</td>\n";
if (! $i) $totalarray['nbfield']++;
}
// Country
if (! empty($arrayfields['country.code_iso']['checked']))
{
print '<td align="center">';
$tmparray=getCountry($obj->fk_pays,'all');
print $tmparray['label'];
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Type ent
if (! empty($arrayfields['typent.code']['checked']))
{
print '<td align="center">';
if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
print $typenArray[$obj->typent_code];
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['sale_representative']['checked']))
{
// Sales representatives
print '<td>';
if ($obj->socid > 0)
{
$result=$socstatic->fetch($obj->socid);
$listsalesrepresentatives=$socstatic->getSalesRepresentatives($user);
if ($listsalesrepresentatives < 0) dol_print_error($db);
$nbofsalesrepresentative=count($listsalesrepresentatives);
if ($nbofsalesrepresentative > 3) // We print only number
{
print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$socstatic->id.'">';
print $nbofsalesrepresentative;
print '</a>';
}
else if ($nbofsalesrepresentative > 0)
{
$userstatic=new User($db);
$j=0;
foreach($listsalesrepresentatives as $val)
{
$userstatic->id=$val['id'];
$userstatic->lastname=$val['lastname'];
$userstatic->firstname=$val['firstname'];
print '<div class="float">'.$userstatic->getNomUrl(1);
$j++;
if ($j < $nbofsalesrepresentative) print ', ';
print '</div>';
}
}
//else print $langs->trans("NoSalesRepresentativeAffected");
}
else
{
print '&nbsp';
}
print '</td>';
}
// Date
if (! empty($arrayfields['c.date_contrat']['checked']))
{
print '<td align="center">'.dol_print_date($db->jdate($obj->date_contrat), 'day').'</td>';
}
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key => $val)
{
if (! empty($arrayfields["ef.".$key]['checked']))
{
print '<td';
$align=$extrafields->getAlignFlag($key);
if ($align) print ' align="'.$align.'"';
print '>';
$tmpkey='options_'.$key;
print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1);
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
}
}
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj);
$reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
if (! empty($arrayfields['c.datec']['checked']))
{
print '<td align="center" class="nowrap">';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour');
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Date modification
if (! empty($arrayfields['c.tms']['checked']))
{
print '<td align="center" class="nowrap">';
print dol_print_date($db->jdate($obj->date_update), 'dayhour');
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Status
if (! empty($arrayfields['status']['checked']))
{
print '<td align="center">'.($obj->nb_initial>0?$obj->nb_initial:'').'</td>';
print '<td align="center">'.($obj->nb_running>0?$obj->nb_running:'').'</td>';
print '<td align="center">'.($obj->nb_expired>0?$obj->nb_expired:'').'</td>';
print '<td align="center">'.($obj->nb_closed>0 ?$obj->nb_closed:'').'</td>';
}
// Action 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>';
print '<td align="center">'.dol_print_date($db->jdate($obj->date_contrat), 'day').'</td>';
//print '<td align="center">'.$staticcontrat->LibStatut($obj->statut,3).'</td>';
print '<td align="center">'.($obj->nb_initial>0?$obj->nb_initial:'').'</td>';
print '<td align="center">'.($obj->nb_running>0?$obj->nb_running:'').'</td>';
print '<td align="center">'.($obj->nb_expired>0?$obj->nb_expired:'').'</td>';
print '<td align="center">'.($obj->nb_closed>0 ?$obj->nb_closed:'').'</td>';
print '<td></td>';
if (! $i) $totalarray['nbfield']++;
print "</tr>\n";
$i++;
}

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -71,7 +72,8 @@ class box_contracts extends ModeleBoxes
$sql.= " AND c.entity = ".$conf->entity;
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
$sql.= " ORDER BY c.date_contrat DESC, c.ref DESC ";
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql.= " ORDER BY c.date_contrat DESC, c.ref DESC ";
else $sql.= " ORDER BY c.tms DESC, c.ref DESC ";
$sql.= $db->plimit($max, 0);
$resql = $db->query($sql);

View File

@ -68,6 +68,7 @@ class box_services_expired extends ModeleBoxes
$sql.= " FROM ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."societe s, ".MAIN_DB_PREFIX."contratdet as cd";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE cd.statut = 4 AND cd.date_fin_validite <= '".$db->idate($now)."'";
$sql.= " AND c.entity = ".$conf->entity;
$sql.= " AND c.fk_soc=s.rowid AND cd.fk_contrat=c.rowid AND c.statut > 0";
if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id;
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;

View File

@ -51,7 +51,7 @@ class Conf
public $standard_menu;
public $modules = array(); // List of activated modules
public $modules_parts = array('css'=>array(),'js'=>array(),'tabs'=>array(),'triggers'=>array(),'login'=>array(),'substitutions'=>array(),'menus'=>array(),'theme'=>array(),'sms'=>array(),'tpl'=>array(),'barcode'=>array(),'models'=>array(),'societe'=>array(),'hooks'=>array(),'dir'=>array());
public $modules_parts = array('css'=>array(),'js'=>array(),'tabs'=>array(),'triggers'=>array(),'login'=>array(),'substitutions'=>array(),'menus'=>array(),'theme'=>array(),'sms'=>array(),'tpl'=>array(),'barcode'=>array(),'models'=>array(),'societe'=>array(),'hooks'=>array(),'dir'=>array(), 'syslog' =>array());
var $logbuffer = array();
@ -123,6 +123,8 @@ class Conf
*/
function setValues($db)
{
global $conf;
dol_syslog(get_class($this)."::setValues");
/*
@ -203,7 +205,7 @@ class Conf
$db->free($resql);
}
// Include other local consts.php files and fetch their values to the corresponding database constants
if (! empty($this->global->LOCAL_CONSTS_FILES)) {
$filesList = explode(":", $this->global->LOCAL_CONSTS_FILES);
@ -342,7 +344,7 @@ class Conf
$this->fournisseur->facture=new stdClass();
$this->fournisseur->facture->dir_output =$rootfordata."/fournisseur/facture";
$this->fournisseur->facture->dir_temp =$rootfordata."/fournisseur/facture/temp";
// To prepare split of module fournisseur into fournisseur + supplier_order + supplier_invoice
if (! empty($this->fournisseur->enabled) && empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) // By default, if module supplier is on, we set new properties
{
@ -379,7 +381,7 @@ class Conf
// Set some default values
$this->global->MAIN_ACTIVATE_HTML5=1;
// societe
if (empty($this->global->SOCIETE_CODECLIENT_ADDON)) $this->global->SOCIETE_CODECLIENT_ADDON="mod_codeclient_leopard";
if (empty($this->global->SOCIETE_CODECOMPTA_ADDON)) $this->global->SOCIETE_CODECOMPTA_ADDON="mod_codecompta_panicum";
@ -483,10 +485,10 @@ class Conf
// By default, we propagate contacts
if (! isset($this->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) $this->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN='*'; // Can be also '*' or '^(BILLING|SHIPPING|CUSTOMER|.*)$' (regex not yet implemented)
// By default, we use the zip town autofill
if (! isset($this->global->MAIN_USE_ZIPTOWN_DICTIONNARY)) $this->global->MAIN_USE_ZIPTOWN_DICTIONNARY=1;
// Define list of limited modules
if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,supplier_proposal,facture,categorie,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda,adherent'; // '' means 'all'. Note that contact is added here as it should be a module later.
@ -510,13 +512,13 @@ class Conf
$this->adherent->cotisation->warning_delay=(isset($this->global->MAIN_DELAY_MEMBERS)?$this->global->MAIN_DELAY_MEMBERS:0)*24*60*60;
}
if (isset($this->agenda)) $this->agenda->warning_delay=(isset($this->global->MAIN_DELAY_ACTIONS_TODO)?$this->global->MAIN_DELAY_ACTIONS_TODO:7)*24*60*60;
if (isset($this->projet))
if (isset($this->projet))
{
$this->projet->warning_delay=(isset($this->global->MAIN_DELAY_PROJECT_TO_CLOSE)?$this->global->MAIN_DELAY_PROJECT_TO_CLOSE:7)*24*60*60;
$this->projet->task = new StdClass();
$this->projet->task->warning_delay=(isset($this->global->MAIN_DELAY_TASKS_TODO)?$this->global->MAIN_DELAY_TASKS_TODO:7)*24*60*60;
}
if (isset($this->commande)) {
$this->commande->client = new stdClass();
$this->commande->fournisseur = new stdClass();
@ -570,26 +572,40 @@ class Conf
if (is_object($mc)) $mc->setValues($this);
}
// We init log handlers
if (defined('SYSLOG_HANDLERS')) $handlers = json_decode(constant('SYSLOG_HANDLERS'));
else $handlers = array();
foreach ($handlers as $handler)
{
$file = DOL_DOCUMENT_ROOT.'/core/modules/syslog/'.$handler.'.php';
if (!file_exists($file))
{
throw new Exception('Missing log handler file '.$handler.'.php');
}
// We init log handlers
if (defined('SYSLOG_HANDLERS')) {
$handlers = json_decode(constant('SYSLOG_HANDLERS'));
} else {
$handlers = array();
}
foreach ($handlers as $handler) {
$handler_files = array();
$dirsyslogs = array_merge(array('/core/modules/syslog/'), $conf->modules_parts['syslog']);
foreach ($dirsyslogs as $reldir) {
$dir = dol_buildpath($reldir, 0);
$newdir = dol_osencode($dir);
if (is_dir($newdir)) {
$file = $newdir . $handler . '.php';
if (file_exists($file)) {
$handler_files[] = $file;
}
}
}
require_once $file;
$loghandlerinstance = new $handler();
if (!$loghandlerinstance instanceof LogHandlerInterface)
{
throw new Exception('Log handler does not extend LogHandlerInterface');
}
if (empty($handler_files)) {
throw new Exception('Missing log handler file ' . $handler . '.php');
}
if (empty($this->loghandlers[$handler])) $this->loghandlers[$handler]=$loghandlerinstance;
}
require_once $handler_files[0];
$loghandlerinstance = new $handler();
if (!$loghandlerinstance instanceof LogHandlerInterface) {
throw new Exception('Log handler does not extend LogHandlerInterface');
}
if (empty($this->loghandlers[$handler])) {
$this->loghandlers[$handler] = $loghandlerinstance;
}
}
}
}

View File

@ -51,14 +51,14 @@ class FormAdmin
* @param string $htmlname Name of HTML select
* @param int $showauto Show 'auto' choice
* @param array $filter Array of keys to exclude in list
* @param int $showempty Add empty value
* @param string $showempty 1=Add empty value or string to show
* @param int $showwarning Show a warning if language is not complete
* @param int $disabled Disable edit of select
* @param string $morecss Add more css styles
* @param int $showcode Add language code into label
* @return string Return HTML select string with list of languages
*/
function select_language($selected='',$htmlname='lang_id',$showauto=0,$filter=null,$showempty=0,$showwarning=0,$disabled=0,$morecss='',$showcode=0)
function select_language($selected='', $htmlname='lang_id', $showauto=0, $filter=null, $showempty='', $showwarning=0, $disabled=0, $morecss='', $showcode=0)
{
global $langs;
@ -71,7 +71,10 @@ class FormAdmin
{
$out.= '<option value=""';
if ($selected == '') $out.= ' selected';
$out.= '>&nbsp;</option>';
$out.= '>';
if ($showempty != '1') $out.=$showempty;
else $out.='&nbsp;';
$out.='</option>';
}
if ($showauto)
{

View File

@ -155,14 +155,15 @@ class Translate
* @param integer $alt 0 (try xx_ZZ then 1), 1 (try xx_XX then 2), 2 (try en_US)
* @param int $stopafterdirection Stop when the DIRECTION tag is found (optimize speed)
* @param int $forcelangdir To force a different lang directory
* @param int $loadfromfileonly 1=Do not load overwritten translation from file or old conf.
* @return int <0 if KO, 0 if already loaded or loading not required, >0 if OK
*/
function load($domain,$alt=0,$stopafterdirection=0,$forcelangdir='')
function load($domain,$alt=0,$stopafterdirection=0,$forcelangdir='',$loadfromfileonly=0)
{
global $conf,$db;
// Load $this->tab_translate[] from database
if (count($this->tab_translate) == 0) $this->loadFromDatabase($db); // Nothing was loaded yet, so we load database.
if (empty($loadfromfileonly) && count($this->tab_translate) == 0) $this->loadFromDatabase($db); // Nothing was loaded yet, so we load database.
// Check parameters
if (empty($domain))
@ -336,19 +337,20 @@ class Translate
// This part is deprecated and replaced with table llx_overwrite_trans
// Kept for backward compatibility.
$overwritekey='MAIN_OVERWRITE_TRANS_'.$this->defaultlang;
if (! empty($conf->global->$overwritekey)) // Overwrite translation with key1:newstring1,key2:newstring2
{
// Overwrite translation with param MAIN_OVERWRITE_TRANS_xx_XX
$tmparray=explode(',', $conf->global->$overwritekey);
foreach($tmparray as $tmp)
if (empty($loadfromfileonly))
{
$overwritekey='MAIN_OVERWRITE_TRANS_'.$this->defaultlang;
if (! empty($conf->global->$overwritekey)) // Overwrite translation with key1:newstring1,key2:newstring2
{
$tmparray2=explode(':',$tmp);
if (! empty($tmparray2[1])) $this->tab_translate[$tmparray2[0]]=$tmparray2[1];
// Overwrite translation with param MAIN_OVERWRITE_TRANS_xx_XX
$tmparray=explode(',', $conf->global->$overwritekey);
foreach($tmparray as $tmp)
{
$tmparray2=explode(':',$tmp);
if (! empty($tmparray2[1])) $this->tab_translate[$tmparray2[0]]=$tmparray2[1];
}
}
}
}
// Check to be sure that SeparatorDecimal differs from SeparatorThousand
if (! empty($this->tab_translate["SeparatorDecimal"]) && ! empty($this->tab_translate["SeparatorThousand"])

View File

@ -568,6 +568,37 @@ function security_prepare_head()
}
/**
* Prepare array with list of tabs
*
* @return array Array of tabs to show
*/
function translation_prepare_head()
{
global $langs, $conf, $user;
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT."/admin/translation.php?mode=overwrite";
$head[$h][1] = $langs->trans("TranslationOverwriteKey");
$head[$h][2] = 'overwrite';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/translation.php?mode=searchkey";
$head[$h][1] = $langs->trans("TranslationKeySearch");
$head[$h][2] = 'searchkey';
$h++;
complete_head_from_modules($conf,$langs,null,$head,$h,'translation_admin');
complete_head_from_modules($conf,$langs,null,$head,$h,'translation_admin','remove');
return $head;
}
/**
* Return list of session
*

View File

@ -309,6 +309,8 @@ function getCountry($searchkey,$withcode='',$dbtouse=0,$outputlangs='',$entconv=
{
global $db,$langs;
$result='';
// Check parameters
if (empty($searchkey) && empty($searchlabel))
{
@ -323,7 +325,6 @@ function getCountry($searchkey,$withcode='',$dbtouse=0,$outputlangs='',$entconv=
elseif (! empty($searchkey)) $sql.= " WHERE code='".$db->escape($searchkey)."'";
else $sql.= " WHERE label='".$db->escape($searchlabel)."'";
dol_syslog("Company.lib::getCountry", LOG_DEBUG);
$resql=$dbtouse->query($sql);
if ($resql)
{
@ -337,17 +338,18 @@ function getCountry($searchkey,$withcode='',$dbtouse=0,$outputlangs='',$entconv=
if ($entconv) $label=($obj->code && ($outputlangs->trans("Country".$obj->code)!="Country".$obj->code))?$outputlangs->trans("Country".$obj->code):$label;
else $label=($obj->code && ($outputlangs->transnoentitiesnoconv("Country".$obj->code)!="Country".$obj->code))?$outputlangs->transnoentitiesnoconv("Country".$obj->code):$label;
}
if ($withcode == 1) return $label?"$obj->code - $label":"$obj->code";
else if ($withcode == 2) return $obj->code;
else if ($withcode == 3) return $obj->rowid;
else if ($withcode === 'all') return array('id'=>$obj->rowid,'code'=>$obj->code,'label'=>$label);
else return $label;
if ($withcode == 1) $result=$label?"$obj->code - $label":"$obj->code";
else if ($withcode == 2) $result=$obj->code;
else if ($withcode == 3) $result=$obj->rowid;
else if ($withcode === 'all') $result=array('id'=>$obj->rowid,'code'=>$obj->code,'label'=>$label);
else $result=$label;
}
else
{
return 'NotDefined';
$result='NotDefined';
}
$dbtouse->free($resql);
return $result;
}
else dol_print_error($dbtouse,'');
return 'Error';

View File

@ -204,328 +204,6 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
}
}
/**
* Scan a directory and return a array of files/directories from a selection.
* Content for string is UTF8 and dir separator is "/".
*
* @param int $fk_soc select socid - for your selection in array
* @param string $module_get Starting path from which to search
* @param string $sortorder SORT_ASC or SORT_DESC
* @param array $excludefiles Array of Regex for exclude filter (example: array('(\.meta|_preview\.png)$','^\.'))
* @return array Array of array( filefolder=> array( filelabel=> array( file=> array('name'=>'xxx','date'=>'yyy','size'=>99,'type'=>'dir|file'))))
*/
function get_soc_file_array($fk_soc, $module_get = false, $sortorder = false, $excludefiles = false)
{
global $user, $conf, $db;
$sortfield = "date";
if(!$sortorder){
$sorting = SORT_DESC;
}else{
$sorting = $sortorder;
}
$ar_modules_get = array();
if (is_array($module_get)) $ar_modules_get = $module_get;
elseif (strlen($module_get) > 0) $ar_modules_get[$module_get] = $module_get;
else
{
$ar_modules_get['company'] = 'company';
$ar_modules_get['dolimail'] = 'dolimail';
$ar_modules_get['actions'] = 'actions';
$ar_modules_get['invoice'] = 'invoice';
$ar_modules_get['order'] = 'order';
$ar_modules_get['propal'] = 'propal';
$ar_modules_get['contract'] = 'contract';
$ar_modules_get['project'] = 'project';
$ar_modules_get['invoice_supplier'] = 'invoice_supplier';
$ar_modules_get['order_supplier'] = 'order_supplier';
}
// rights
if (count($ar_modules_get) > 0)
foreach($ar_modules_get as $curmodule)
{
switch($curmodule)
{
case 'company':
if (! empty($conf->societe->enabled)) // Recht Alle oder nur die Vertriebspartneradressen
$ar_modules_secure['company']['outputdir'] = $conf->societe->dir_output;
break;
case 'dolimail':
if (! empty($conf->dolimail->enabled) && ($user->rights->dolimail->read || $user->admin))
$ar_modules_secure[$curmodule]['outputdir']=$conf->dolimail->dir_output.'/attachments';
break;
case 'actions':
if (! empty($conf->agenda->enabled) || ($user->rights->agenda->allactions->read || $user->admin))
$ar_modules_secure[$curmodule]['outputdir']=$conf->agenda->dir_output;
break;
case 'invoice':
if (! empty($conf->facture->enabled) && ($user->rights->facture->lire || $user->admin))
$ar_modules_secure[$curmodule]['outputdir']=$conf->facture->dir_output;
break;
case 'order':
if (!empty($conf->commande->enabled) && ($user->rights->commande->lire || $user->admin))
$ar_modules_secure[$curmodule]['outputdir']=$conf->commande->dir_output;
break;
case 'propal':
if (!empty($conf->propal->enabled) && ($user->rights->propale->lire || $user->admin))
$ar_modules_secure[$curmodule]['outputdir']=$conf->propal->dir_output;
break;
case 'project':
if (! empty($conf->projet->enabled) && ($user->rights->projet->lire || $user->admin))
$ar_modules_secure[$curmodule]['outputdir']=$conf->projet->dir_output;
break;
case 'invoice_supplier':
if (! empty($conf->fournisseur->enabled) && ($user->rights->fournisseur->facture->lire || $user->admin))
$ar_modules_secure[$curmodule]['outputdir']=$conf->fournisseur->dir_output.'/facture';
break;
case 'order_supplier':
if (! empty($conf->fournisseur->enabled) && ($user->rights->fournisseur->commande->lire || $user->admin))
$ar_modules_secure[$curmodule]['outputdir']=$conf->fournisseur->dir_output.'/commande';
break;
}
}
/* TODO make a outputdir*/
//unset($ar_modules_secure['dolimail']);
unset($ar_modules_secure['project']); // project (list with project) is "ref"
unset($ar_modules_secure['actions']);
unset($ar_modules_secure['contract']);
/* TODO make a outputdir*/
unset($curmodule);
if($fk_soc > 0)
$ar_modules_get = $ar_modules_secure;
$xy=0;
if (count($ar_modules_get)>0)
foreach($ar_modules_get as $curmodule => $myarray)
{
if($fk_soc > 0 && $curmodule != "company")
{
// SQL to find documents (ref number)
if($curmodule == "invoice") $sql = "SELECT facnumber as refstr FROM ".MAIN_DB_PREFIX."facture";
elseif($curmodule == "order") $sql = "SELECT ref as refstr FROM ".MAIN_DB_PREFIX."commande";
elseif($curmodule == "invoice_supplier") $sql = "SELECT rowid as refstr FROM ".MAIN_DB_PREFIX."facture_fourn";
elseif($curmodule == "order_supplier") $sql = "SELECT ref as refstr FROM ".MAIN_DB_PREFIX."commande_fournisseur";
elseif($curmodule == "propal") $sql = "SELECT ref as refstr FROM ".MAIN_DB_PREFIX."propal";
elseif($curmodule == "contract") $sql = "SELECT ref as refstr FROM ".MAIN_DB_PREFIX."contrat";
elseif($curmodule == "dolimail") $sql = "SELECT uid as refstr, subject FROM ".MAIN_DB_PREFIX."mails";
$sql.= ' WHERE entity IN ('.getEntity('societe', 1).')';
$sql.= " AND fk_soc = '".$fk_soc."'";
$res = $db->query($sql);
if ($res && $db->num_rows($res) > 0)
{
while($obj = $db->fetch_object($res))
{
$ar_modules_secure[$curmodule]['socref'][] = $obj->refstr;
if($curmodule == "dolimail") $ar_modules_secure['dolimail']['subject'][$obj->refstr] = $obj->subject;
}
}
else
{
unset($ar_modules_secure[$curmodule]);
continue;
$errors[]="SQL Error: ".$sql;
$error++;
}
}else{
if($curmodule == "dolimail") $sql = "SELECT uid as refstr, subject FROM ".MAIN_DB_PREFIX."mails";
$res = $db->query($sql);
if ($res && $db->num_rows($res) > 0)
{
while($obj = $db->fetch_object($res))
{
if($curmodule == "dolimail") $ar_modules_secure['dolimail']['subject'][$obj->refstr] = $obj->subject;
}
}
}
// Data in Array
// Get Array from ar_module
$output[$curmodule]=dol_dir_list($myarray['outputdir'],"files",1,'', $excludefiles, $sortfield, $sorting,1);
if($fk_soc > 0)
{
if($curmodule == "company")
{
foreach($output["company"] as $label => $filedata)
{
if($filedata['level1name'] != $fk_soc)
{
unset($output['company'][$label]);
}
}
}
elseif($curmodule == "invoice")
{
if (! is_array($ar_modules_secure[$curmodule]['socref'])) { unset($output[$curmodule]); continue; } // wenn no file exsit
foreach($output["invoice"] as $label => $filedata)
{
if (! in_array($filedata['level1name'], $ar_modules_secure[$curmodule]['socref']))
{
unset($output[$curmodule][$label]); // throw all ref number who are not in ($fac_supp_N_arr) array
}
}
}
elseif($curmodule == "invoice_supplier")
{
if (! is_array($ar_modules_secure[$curmodule]['socref'])) { unset($output[$curmodule]); } // throw all ref number who are not in ($fac_invoice_arr) array
foreach($output["invoice_supplier"] as $label => $filedata)
{
if (! in_array($filedata['level1name'], $ar_modules_secure[$curmodule]['socref'])) {
unset($output[$curmodule][$label]); // throw all ref number who are not in ($fac_supp_N_arr) array
}
}
}
elseif($curmodule == "order")
{
if (! is_array($ar_modules_secure[$curmodule]['socref'])) { unset($output[$curmodule]); continue; } // throw all ref number who are not in ($fac_invoice_arr) array
foreach($output["order"] as $label => $filedata)
{
if (! in_array($filedata['level1name'], $ar_modules_secure[$curmodule]['socref'])) {
unset($output[$curmodule][$label]); // throw all ref number who are not in ($ref_order_arr) array
}
}
}
elseif($curmodule == "order_supplier")
{
if (! is_array($ar_modules_secure[$curmodule]['socref'])) { unset($output[$curmodule]); continue; } // throw all ref number who are not in ($fac_invoice_arr) array
foreach($output["order_supplier"] as $label => $filedata)
{
if (! in_array($filedata['level1name'], $ar_modules_secure[$curmodule]['socref'])) {
unset($output[$curmodule][$label]); // throw all ref number who are not in ($ref_order_supp_arr) array
}
}
}
elseif($curmodule == "propal")
{
if (! is_array($ar_modules_secure[$curmodule]['socref'])) { unset($output[$curmodule]); continue; } // throw all ref number who are not in ($fac_invoice_arr) array
foreach($output["propal"] as $label => $filedata)
{
if (! in_array($filedata['level1name'], $ar_modules_secure[$curmodule]['socref'])) {
unset($output[$curmodule][$label]); // throw all ref number who are not in ($ref_propal_arr) array
}
}
}
elseif($curmodule == "contract")
{
if (! is_array($ar_modules_secure[$curmodule]['socref'])) { unset($output[$curmodule]); continue; } // throw all ref number who are not in ($fac_invoice_arr) array
foreach($output["contract"] as $label => $filedata)
{
if (! in_array($filedata['level1name'], $ar_modules_secure[$curmodule]['socref'])) {
unset($output[$curmodule][$label]); // throw all ref number who are not in ($ref_contract_arr) array
}
}
}
elseif($curmodule == "dolimail")
{
if (! is_array($ar_modules_secure[$curmodule]['socref'])) { unset($output[$curmodule]); continue; } // throw all ref number who are not in ($fac_invoice_arr) array
foreach($output["dolimail"] as $label => $filedata)
{
if($filedata['name'] == "winmail.dat" || $filedata['name'] == "smime.p7s") unset($output[$curmodule][$label]);
else
if (! in_array($filedata['level1name'], $ar_modules_secure[$curmodule]['socref'])) {
unset($output[$curmodule][$label]); // throw all ref number who are not in ($ref_propal_arr) array
}
}
}
// Error if ther isn't any File
if(count($output[$curmodule]) == 0)
{
$error++;
$errors[]="Error [404]: No File found for User: ".$fk_soc." in module: ".$curmodule;
unset($output[$curmodule]);
}
}
// Extra for Mail attachments
if($curmodule == "dolimail" && count($output["dolimail"])>0)
{
foreach($output["dolimail"] as $label => $filedata)
{
$output[$curmodule][$label]['subject'] = $ar_modules_secure['dolimail']['subject'][$filedata['level1name']];
}
}
// Extra for Mail attachments
if($curmodule == "invoice" && count($output["invoice"])>0)
{
foreach($output["invoice"] as $label => $filedata)
{
$output[$curmodule][$label]['subject'] = $filedata['level1name'];
}
}
// Extra for Mail attachments
if($curmodule == "invoice_supplier" && count($output["invoice_supplier"])>0)
{
foreach($output["invoice_supplier"] as $label => $filedata)
{
$output[$curmodule][$label]['subject'] = $filedata['level1name'];
}
}
// Extra for Mail attachments
if($curmodule == "contract" && count($output["contract"])>0)
{
foreach($output["contract"] as $label => $filedata)
{
$output[$curmodule][$label]['subject'] = $filedata['level1name'];
}
}
$xy++;
}
if(count($output) > 0)
{
return $output;
}
else
{
return -1;
}
}
/**
* Calculate Bytes to kb, mb and translate it to current language
*
* @param int $byt Bytes
* @return string calculated string
*/
function calculate_byte($byt)
{
global $langs;
if ($byt < 1024) {
$unit = '&nbsp;'.$langs->trans("b");
$mailsize=$byt;
} else if ($byt / 1024 > 1024) {
$mailsize = $byt / 1024 / 1024;
$unit = '&nbsp;'.$langs->trans("Mb");
} else {
$mailsize = $byt / 1024;
$unit = '&nbsp;'.$langs->trans("Kb");
}
$val = number_format($mailsize, 2).$unit;
return $val;
}
/**
* Fast compare of 2 files identified by their properties ->name, ->date and ->size

View File

@ -3034,14 +3034,14 @@ function load_fiche_titre($titre, $mesg='', $picto='title_generic.png', $pictois
* Print a title with navigation controls for pagination
*
* @param string $titre Title to show (required)
* @param string $page Numero of page to show in navigation links (required)
* @param int $page Numero of page to show in navigation links (required)
* @param string $file Url of page (required)
* @param string $options parametres complementaires lien ('' par defaut)
* @param string $sortfield champ de tri ('' par defaut)
* @param string $sortorder ordre de tri ('' par defaut)
* @param string $center chaine du centre ('' par defaut). We often find here string $massaction comming from $form->selectMassAction()
* @param int $num number of records found by select with limit+1
* @param int $totalnboflines Total number of records/lines for all pages (if known). Use a negative value to no show number.
* @param string $options More parameters for links ('' by default, does not include sortfield neither sortorder)
* @param string $sortfield Field to sort on ('' by default)
* @param string $sortorder Order to sort ('' by default)
* @param string $center Strin gin the middle ('' by default). We often find here string $massaction comming from $form->selectMassAction()
* @param int $num Number of records found by select with limit+1
* @param int $totalnboflines Total number of records/lines for all pages (if known). Use a negative value to not show number.
* @param string $picto Icon to use before title (should be a 32x32 transparent png file)
* @param int $pictoisfullpath 1=Icon name is a full absolute url of image
* @param string $morehtml More html to show
@ -3106,9 +3106,9 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
if ($cpt>=1)
{
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=0'.$options.'&amp;sortfield='.$sortfield.'&amp;sortorder='.$sortorder.'">1</a></li>';
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=0'.$options.'">1</a></li>';
if ($cpt > 2) $pagelist.='<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><span '.(empty($conf->dol_use_jmobile)?'class="inactive"':'data-role="button"').'>...</span></li>';
else if ($cpt == 2) $pagelist.='<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=1'.$options.'&amp;sortfield='.$sortfield.'&amp;sortorder='.$sortorder.'">2</a></li>';
else if ($cpt == 2) $pagelist.='<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=1'.$options.'">2</a></li>';
}
do
@ -3119,7 +3119,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
}
else
{
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.$cpt.$options.'&amp;sortfield='.$sortfield.'&amp;sortorder='.$sortorder.'">'.($cpt+1).'</a></li>';
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.$cpt.$options.'">'.($cpt+1).'</a></li>';
}
$cpt++;
}
@ -3128,8 +3128,8 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
if ($cpt<$nbpages)
{
if ($cpt<$nbpages-2) $pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><span '.(empty($conf->dol_use_jmobile)?'class="inactive"':'data-role="button"').'>...</span></li>';
else if ($cpt == $nbpages-2) $pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-2).$options.'&amp;sortfield='.$sortfield.'&amp;sortorder='.$sortorder.'">'.($nbpages - 1).'</a></li>';
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-1).$options.'&amp;sortfield='.$sortfield.'&amp;sortorder='.$sortorder.'">'.$nbpages.'</a></li>';
else if ($cpt == $nbpages-2) $pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-2).$options.'">'.($nbpages - 1).'</a></li>';
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-1).$options.'">'.$nbpages.'</a></li>';
}
}
else
@ -3149,7 +3149,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
*
* @param int $page Number of page
* @param string $file Page URL (in most cases provided with $_SERVER["PHP_SELF"])
* @param string $options Other url paramaters to propagate ("" by default)
* @param string $options Other url paramaters to propagate ("" by default, may include sortfield and sortorder)
* @param integer $nextpage Do we show a next page button
* @param string $betweenarrows HTML content to show between arrows. MUST contains '<li> </li>' tags or '<li><span> </span></li>'.
* @param string $afterarrows HTML content to show after arrows. Must NOT contains '<li> </li>' tags.

View File

@ -1846,6 +1846,7 @@ function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0)
* @param string $type Type
* @param Translate $outputlangs Object langs for output
* @return integer
* @deprecated Not used by Dolibarr core, so will be removed.
*/
function pdf_getTotalQty($object,$type,$outputlangs)
{

View File

@ -106,6 +106,7 @@ function checkLoginPassEntity($usertotest,$passwordtotest,$entitytotest,$authmod
sleep(1);
$langs->load('main');
$langs->load('other');
$langs->load('errors');
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorFailedToLoadLoginFileForMode",$mode);
}
}

View File

@ -332,9 +332,14 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?select_statut=2&leftmenu=hrm', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?&action=request', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__);
-- HRM - Expense reports
-- HRM - Trips and expenses (old module)
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2100__+MAX_llx_menu__, 'accountancy', 'tripsandexpenses', 15__+MAX_llx_menu__, '/compta/deplacement/index.php?leftmenu=tripsandexpenses', 'TripsAndExpenses', 0, 'trips', '$user->rights->deplacement->lire', '', 0, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2101__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/card.php?action=create&amp;leftmenu=tripsandexpenses', 'New', 1, 'trips', '$user->rights->deplacement->creer', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2102__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/list.php?leftmenu=tripsandexpenses', 'List', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2103__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses', 'Statistics', 1, 'trips', '$user->rights->deplacement->lire', '', 0, 2, __ENTITY__);
-- HRM - Expense reports
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5300__+MAX_llx_menu__, 'hrm', 'expensereport', 15__+MAX_llx_menu__, '/expensereport/index.php?leftmenu=expensereport', 'TripsAndExpenses', 0, 'trips', '$user->rights->expensereport->lire', '', 0, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5301__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/card.php?action=create&amp;leftmenu=expensereport', 'New', 1, 'trips', '$user->rights->expensereport->creer', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5302__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/list.php?leftmenu=expensereport', 'List', 1, 'trips', '$user->rights->expensereport->lire', '', 0, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5303__+MAX_llx_menu__, 'hrm', '', 5302__+MAX_llx_menu__, '/expensereport/list.php?search_status=2&amp;leftmenu=expensereport', 'ListToApprove', 2, 'trips', '$user->rights->expensereport->approve', '', 0, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->expensereport->enabled', __HANDLER__, 'left', 5304__+MAX_llx_menu__, 'hrm', '', 5300__+MAX_llx_menu__, '/expensereport/stats/index.php?leftmenu=expensereport', 'Statistics', 1, 'trips', '$user->rights->expensereport->lire', '', 0, 2, __ENTITY__);

View File

@ -1262,6 +1262,17 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&amp;mainmenu=hrm", $langs->trans("List"), 1, $user->rights->deplacement->lire);
$newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&amp;mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->deplacement->lire);
}
// Expense report
if (! empty($conf->expensereport->enabled))
{
$langs->load("trips");
$newmenu->add("/expensereport/index.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->rights->expensereport->lire, '', $mainmenu, 'expensereport');
$newmenu->add("/expensereport/card.php?action=create&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("New"), 1, $user->rights->expensereport->creer);
$newmenu->add("/expensereport/list.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("List"), 1, $user->rights->expensereport->lire);
$newmenu->add("/expensereport/list.php?search_status=2&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->expensereport->approve);
$newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->expensereport->lire);
}
}

View File

@ -213,112 +213,6 @@ class modExpenseReport extends DolibarrModules
$this->export_sql_end[$r] .=' WHERE ed.fk_expensereport = d.rowid AND d.fk_user_author = u.rowid';
$this->export_sql_end[$r] .=' AND d.entity IN ('.getEntity('expensereport',1).')';
// Main menu entries
$this->menu = array(); // List of menus to add
$r=0;
// Example to declare a Left Menu entry: fk_mainmenu=home,fk_leftmenu=admintools
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left', // This is a Left menu entry
'titre'=>'TripsAndExpenses',
'mainmenu'=>'hrm',
'leftmenu'=>'expensereport',
'url'=>'/expensereport/index.php',
'langs'=>'trips', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->expensereport->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->lire', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$r++;
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left', // This is a Left menu entry
'titre'=>'New',
'mainmenu'=>'hrm',
'leftmenu'=>'expensereport_detailnew',
'url'=>'/expensereport/card.php?action=create',
'langs'=>'trips', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->expensereport->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->creer', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$r++;
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left', // This is a Left menu entry
'titre'=>'List',
'mainmenu'=>'hrm',
'leftmenu'=>'expensereport_detaillist',
'url'=>'/expensereport/list.php',
'langs'=>'trips', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->expensereport->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->lire', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$r++;
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport_detaillist', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left', // This is a Left menu entry
'titre'=>'ListToApprove',
'mainmenu'=>'hrm',
'leftmenu'=>'expensereport_detaillist_approve',
'url'=>'/expensereport/list.php?search_status=2',
'langs'=>'trips', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->expensereport->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->approve', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$r++;
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left', // This is a Left menu entry
'titre'=>'Statistics',
'mainmenu'=>'hrm',
'leftmenu'=>'expensereport_detail',
'url'=>'/expensereport/stats/index.php',
'langs'=>'trips', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->expensereport->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->lire', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$r++;
// Disabled, not yet stable
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left', // This is a Left menu entry
'titre'=>'ExportTripCSV',
'mainmenu'=>'hrm',
'leftmenu'=>'expensereport_detail',
'url'=>'/expensereport/export_csv.php',
'langs'=>'expensereport', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->global->DEPLACEMENT_TO_CLEAN', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->lire', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$r++;
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=hrm,fk_leftmenu=expensereport', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
'type'=>'left', // This is a Left menu entry
'titre'=>'Synchro_Compta',
'mainmenu'=>'hrm',
'leftmenu'=>'expensereport_detail',
'url'=>'/expensereport/synchro_compta.php',
'langs'=>'expensereport', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->global->DEPLACEMENT_TO_CLEAN', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->expensereport->lire', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$r++;
}
/**

View File

@ -1,195 +0,0 @@
<?php
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.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 <http://www.gnu.org/licenses/>.
*/
require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php';
if (file_exists(DOL_DOCUMENT_ROOT.'/includes/raven/raven/lib/Raven/Autoloader.php'))
{
require_once DOL_DOCUMENT_ROOT.'/includes/raven/raven/lib/Raven/Autoloader.php';
Raven_Autoloader::register();
}
/**
* Class to manage logging to Sentry
*
* @see https://docs.getsentry.com/on-premise/clients/php/
*/
class mod_syslog_sentry extends LogHandler implements LogHandlerInterface
{
/**
* @var string Log handler code
*/
public $code = 'sentry';
/**
* Return name of logger
*
* @return string Name of logger
*/
public function getName()
{
return 'Sentry';
}
/**
* Version of the module ('x.y.z' or 'dolibarr' or 'experimental' or 'development')
*
* @return string
*/
public function getVersion()
{
return 'dolibarr';
}
/**
* Content of the info tooltip.
*
* @return false|string
*/
public function getInfo()
{
global $langs;
return $langs->trans('SyslogSentryFromProject');
}
/**
* Is the module active ?
*
* @return boolean
*/
public function isActive()
{
return file_exists(DOL_DOCUMENT_ROOT.'/includes/raven/raven/lib/Raven/Autoloader.php');
}
/**
* Return array of configuration data
*
* @return array Return array of configuration data
*/
public function configure()
{
global $langs;
return array(
array(
'constant' => 'SYSLOG_SENTRY_DSN',
'name' => $langs->trans('SyslogSentryDSN'),
'default' => '',
'attr' => 'size="100" placeholder="https://<key>:<secret>@app.getsentry.com/<project>"'
)
);
}
/**
* Return if configuration is valid
*
* @return array Array of errors. Empty array if ok.
*/
public function checkConfiguration()
{
global $conf;
$errors = array();
$dsn = $conf->global->SYSLOG_SENTRY_DSN;
try {
$client = new Raven_Client(
$dsn,
array('curl_method' => 'sync')
);
} catch (InvalidArgumentException $ex) {
$errors[] = "ERROR: There was an error parsing your DSN:\n " . $ex->getMessage();
}
if (!$errors) {
// Send test event and check for errors
$client->captureMessage('TEST: Sentry syslog configuration check', null, Raven_Client::DEBUG);
$last_error = $client->getLastError();
if ($last_error) {
$errors[] = $last_error;
}
}
if (!$errors) {
// Install handlers
$error_handler = new Raven_ErrorHandler($client);
$error_handler->registerExceptionHandler();
$error_handler->registerErrorHandler();
$error_handler->registerShutdownFunction();
}
return $errors;
}
/**
* Export the message
*
* @param array $content Array containing the info about the message
* @return void
*/
public function export($content)
{
if (! $this->isActive()) {
return;
}
global $conf;
$dsn = $conf->global->SYSLOG_SENTRY_DSN;
$client = new Raven_Client(
$dsn,
array('curl_method' => 'exec')
);
$client->user_context(array(
'username' => ($content['user'] ? $content['user'] : ''),
'ip_address' => $content['ip']
));
$client->tags_context(array(
'version' => DOL_VERSION
));
$client->registerSeverityMap(array(
LOG_EMERG => Raven_Client::FATAL,
LOG_ALERT => Raven_Client::FATAL,
LOG_CRIT => Raven_Client::ERROR,
LOG_ERR => Raven_Client::ERROR,
LOG_WARNING => Raven_Client::WARNING,
LOG_NOTICE => Raven_Client::WARNING,
LOG_INFO => Raven_Client::INFO,
LOG_DEBUG => Raven_Client::DEBUG,
));
if (substr($content['message'], 0, 3) === 'sql') {
global $db;
$query = substr($content['message'], 4, strlen($content['message']));
$client->captureQuery(
$query,
$client->translateSeverity($content['level']),
$db->type
);
} else {
$client->captureMessage(
$content['message'],
null,
$client->translateSeverity($content['level'])
);
}
}
}

View File

@ -1262,7 +1262,7 @@ else
print '<td>';
$userfee=new User($db);
$userfee->fetch($object->fk_user_valid);
print $userfee->getNomUrl(1);
print $userfee->getNomUrl(-1);
print '</td></tr>';
}
@ -1271,7 +1271,7 @@ else
print '<td>';
$userfee=new User($db);
$userfee->fetch($object->fk_user_author);
print $userfee->getNomUrl(1);
print $userfee->getNomUrl(-1);
print '</td></tr>';
if ($object->fk_statut==6)
{
@ -1280,7 +1280,7 @@ else
print '<td>';
$userfee=new User($db);
$userfee->fetch($user->id);
print $userfee->getNomUrl(1);
print $userfee->getNomUrl(-1);
print '</td></tr>';
}
@ -1504,7 +1504,7 @@ else
$userauthor=new User($db);
$result=$userauthor->fetch($object->fk_user_author);
if ($result < 0) dol_print_error('',$userauthor->error);
print $userauthor->getNomUrl(1);
print $userauthor->getNomUrl(-1);
}
print '</td></tr>';
@ -1527,7 +1527,7 @@ else
{
$userfee=new User($db);
$userfee->fetch($object->fk_user_validator);
print $userfee->getNomUrl(1);
print $userfee->getNomUrl(-1);
if (empty($userfee->email) || ! isValidEmail($userfee->email))
{
$langs->load("errors");
@ -1545,7 +1545,7 @@ else
{
$userfee=new User($db);
$userfee->fetch($object->fk_user_cancel);
print $userfee->getNomUrl(1);
print $userfee->getNomUrl(-1);
}
print '</td></tr>';
print '<tr>';
@ -1566,7 +1566,7 @@ else
{
$userapp=new User($db);
$userapp->fetch($object->fk_user_approve);
print $userapp->getNomUrl(1);
print $userapp->getNomUrl(-1);
}
print '</td></tr>';
print '<tr>';
@ -1582,7 +1582,7 @@ else
print '<td>';
$userfee=new User($db);
$userfee->fetch($object->fk_user_refuse);
print $userfee->getNomUrl(1);
print $userfee->getNomUrl(-1);
print '</td></tr>';
print '<tr>';
print '<td>'.$langs->trans("DATE_REFUS").'</td>';
@ -1600,7 +1600,7 @@ else
print '<td>';
$userfee=new User($db);
$userfee->fetch($object->fk_user_paid);
print $userfee->getNomUrl(1);
print $userfee->getNomUrl(-1);
print '</td></tr>';
print '<tr>';
print '<td>'.$langs->trans("DATE_PAIEMENT").'</td>';

View File

@ -142,7 +142,7 @@ $max=10;
$langs->load("boxes");
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.rowid, d.ref, d.date_debut as dated, d.date_fin as datef, d.date_create as dm, d.total_ht, d.total_ttc, d.fk_statut as fk_status";
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut, u.photo, d.rowid, d.ref, d.date_debut as dated, d.date_fin as datef, d.date_create as dm, d.total_ht, d.total_ttc, d.fk_statut as fk_status";
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d, ".MAIN_DB_PREFIX."user as u";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE u.rowid = d.fk_user_author";
@ -183,9 +183,12 @@ if ($result)
$userstatic->id=$obj->uid;
$userstatic->lastname=$obj->lastname;
$userstatic->firstname=$obj->firstname;
$userstatic->login=$obj->login;
$userstatic->statut=$obj->statut;
$userstatic->photo=$obj->photo;
print '<tr '.$bc[$var].'>';
print '<td>'.$expensereportstatic->getNomUrl(1).'</td>';
print '<td>'.$userstatic->getNomUrl(1).'</td>';
print '<td>'.$userstatic->getNomUrl(-1).'</td>';
print '<td align="right">'.price($obj->total_ht).'</td>';
print '<td align="right">'.price($obj->total_ttc).'</td>';
print '<td align="right">'.dol_print_date($db->jdate($obj->dm),'day').'</td>';

View File

@ -20,7 +20,7 @@
*/
/**
* \file htdocs/expensereport/index.php
* \file htdocs/expensereport/list.php
* \ingroup expensereport
* \brief list of expense reports
*/
@ -130,7 +130,7 @@ $pagenext = $page + 1;
$sql = "SELECT d.rowid, d.ref, d.fk_user_author, d.total_ht, d.total_tva, d.total_ttc, d.fk_statut as status,";
$sql.= " d.date_debut, d.date_fin, d.date_valid,";
$sql.= " u.rowid as id_user, u.firstname, u.lastname";
$sql.= " u.rowid as id_user, u.firstname, u.lastname, u.login, u.statut, u.photo";
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d";
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON d.fk_user_author = u.rowid";
$sql.= " WHERE d.entity = ".$conf->entity;
@ -314,19 +314,20 @@ if ($resql)
$total_total_tva = 0;
$expensereportstatic=new ExpenseReport($db);
$usertmp = new User($db);
if ($num > 0)
{
while ($i < min($num,$limit))
{
$objp = $db->fetch_object($resql);
$expensereportstatic->id=$objp->rowid;
$expensereportstatic->ref=$objp->ref;
$expensereportstatic->status=$objp->status;
$expensereportstatic->valid=$objp->date_valid;
$expensereportstatic->date_debut=$objp->date_debut;
$expensereportstatic->date_fin=$objp->date_fin;
$obj = $db->fetch_object($resql);
$expensereportstatic->id=$obj->rowid;
$expensereportstatic->ref=$obj->ref;
$expensereportstatic->status=$obj->status;
$expensereportstatic->valid=$obj->date_valid;
$expensereportstatic->date_debut=$obj->date_debut;
$expensereportstatic->date_fin=$obj->date_fin;
$var=!$var;
print "<tr ".$bc[$var].">";
@ -335,12 +336,20 @@ if ($resql)
if ($expensereportstatic->status == 2 && $expensereportstatic->hasDelay('toappove')) print img_warning($langs->trans("Late"));
if ($expensereportstatic->status == 5 && $expensereportstatic->hasDelay('topay')) print img_warning($langs->trans("Late"));
print '</td>';
print '<td align="center">'.($objp->date_debut > 0 ? dol_print_date($objp->date_debut, 'day') : '').'</td>';
print '<td align="center">'.($objp->date_fin > 0 ? dol_print_date($objp->date_fin, 'day') : '').'</td>';
print '<td align="left"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$objp->id_user.'">'.img_object($langs->trans("ShowUser"),"user").' '.dolGetFirstLastname($objp->firstname, $objp->lastname).'</a></td>';
print '<td align="right">'.price($objp->total_ht).'</td>';
print '<td align="right">'.price($objp->total_tva).'</td>';
print '<td align="right">'.price($objp->total_ttc).'</td>';
print '<td align="center">'.($obj->date_debut > 0 ? dol_print_date($obj->date_debut, 'day') : '').'</td>';
print '<td align="center">'.($obj->date_fin > 0 ? dol_print_date($obj->date_fin, 'day') : '').'</td>';
print '<td align="left">';
$usertmp->id=$obj->id_user;
$usertmp->lastname=$obj->lastname;
$usertmp->firstname=$obj->firstname;
$usertmp->login=$obj->login;
$usertmp->statut=$obj->statut;
$usertmp->photo=$obj->photo;
print $usertmp->getNomUrl(-1);
print '</td>';
print '<td align="right">'.price($obj->total_ht).'</td>';
print '<td align="right">'.price($obj->total_tva).'</td>';
print '<td align="right">'.price($obj->total_ttc).'</td>';
print '<td align="right">';
print $expensereportstatic->getLibStatut(5);
print '</td>';
@ -349,9 +358,9 @@ if ($resql)
print "</tr>\n";
$total_total_ht = $total_total_ht + $objp->total_ht;
$total_total_tva = $total_total_tva + $objp->total_tva;
$total_total_ttc = $total_total_ttc + $objp->total_ttc;
$total_total_ht = $total_total_ht + $obj->total_ht;
$total_total_tva = $total_total_tva + $obj->total_tva;
$total_total_ttc = $total_total_ttc + $obj->total_ttc;
$i++;
}

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2012-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012-2016 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
@ -1010,7 +1010,7 @@ else
print '<td>'.$langs->trans("User").'</td>';
print '<td>';
print $userRequest->getNomUrl(1, 'leave');
print $userRequest->getNomUrl(-1, 'leave');
print '</td></tr>';
// Type
@ -1120,14 +1120,14 @@ else
$userCreate->fetch($cp->fk_user_create);
print '<tr>';
print '<td>'.$langs->trans('RequestByCP').'</td>';
print '<td>'.$userCreate->getNomUrl(1).'</td>';
print '<td>'.$userCreate->getNomUrl(-1).'</td>';
print '</tr>';
}
if (!$edit) {
print '<tr>';
print '<td width="50%">'.$langs->trans('ReviewedByCP').'</td>';
print '<td>'.$valideur->getNomUrl(1).'</td>';
print '<td>'.$valideur->getNomUrl(-1).'</td>';
print '</tr>';
} else {
print '<tr>';

View File

@ -298,11 +298,17 @@ class Holiday extends CommonObject
$sql.= " cp.detail_refuse,";
$sql.= " uu.lastname as user_lastname,";
$sql.= " uu.firstname as user_firstname,";
$sql.= " uu.firstname as user_firstname,";
$sql.= " uu.login as user_login,";
$sql.= " uu.statut as user_statut,";
$sql.= " uu.photo as user_photo,";
$sql.= " ua.lastname as validator_lastname,";
$sql.= " ua.firstname as validator_firstname";
$sql.= " ua.firstname as validator_firstname,";
$sql.= " ua.login as validator_login,";
$sql.= " ua.statut as validator_statut,";
$sql.= " ua.photo as validator_photo";
$sql.= " FROM ".MAIN_DB_PREFIX."holiday as cp, ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua";
$sql.= " WHERE cp.entity IN (".getEntity('holiday', 1).")";
$sql.= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pour la recherche sur le tableau
@ -360,10 +366,16 @@ class Holiday extends CommonObject
$tab_result[$i]['user_firstname'] = $obj->user_firstname;
$tab_result[$i]['user_lastname'] = $obj->user_lastname;
$tab_result[$i]['user_login'] = $obj->user_login;
$tab_result[$i]['user_statut'] = $obj->user_statut;
$tab_result[$i]['user_photo'] = $obj->user_photo;
$tab_result[$i]['validator_firstname'] = $obj->validator_firstname;
$tab_result[$i]['validator_lastname'] = $obj->validator_lastname;
$tab_result[$i]['validator_login'] = $obj->validator_login;
$tab_result[$i]['validator_statut'] = $obj->validator_statut;
$tab_result[$i]['validator_photo'] = $obj->validator_photo;
$i++;
}
@ -412,10 +424,16 @@ class Holiday extends CommonObject
$sql.= " uu.lastname as user_lastname,";
$sql.= " uu.firstname as user_firstname,";
$sql.= " uu.login as user_login,";
$sql.= " uu.statut as user_statut,";
$sql.= " uu.photo as user_photo,";
$sql.= " ua.lastname as validator_lastname,";
$sql.= " ua.firstname as validator_firstname";
$sql.= " ua.firstname as validator_firstname,";
$sql.= " ua.login as validator_login,";
$sql.= " ua.statut as validator_statut,";
$sql.= " ua.photo as validator_photo";
$sql.= " FROM ".MAIN_DB_PREFIX."holiday as cp, ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua";
$sql.= " WHERE cp.entity IN (".getEntity('holiday', 1).")";
$sql.= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pour la recherche sur le tableau
@ -473,10 +491,16 @@ class Holiday extends CommonObject
$tab_result[$i]['user_firstname'] = $obj->user_firstname;
$tab_result[$i]['user_lastname'] = $obj->user_lastname;
$tab_result[$i]['user_login'] = $obj->user_login;
$tab_result[$i]['user_statut'] = $obj->user_statut;
$tab_result[$i]['user_photo'] = $obj->user_photo;
$tab_result[$i]['validator_firstname'] = $obj->validator_firstname;
$tab_result[$i]['validator_lastname'] = $obj->validator_lastname;
$tab_result[$i]['validator_login'] = $obj->validator_login;
$tab_result[$i]['validator_statut'] = $obj->validator_statut;
$tab_result[$i]['validator_photo'] = $obj->validator_photo;
$i++;
}
// Retourne 1 et ajoute le tableau à la variable

View File

@ -121,14 +121,14 @@ if ($object->id)
print '<td>'.$langs->trans("User").'</td>';
print '<td>';
print $userRequest->getNomUrl(1);
print $userRequest->getNomUrl(-1);
print '</td></tr>';
// Type
print '<tr>';
print '<td>'.$langs->trans("Type").'</td>';
print '<td>';
$typeleaves=$object->getTypes(1,1);
$typeleaves=$object->getTypes(1,-1);
print $typeleaves[$object->fk_type]['label'];
print '</td>';
print '</tr>';

View File

@ -404,12 +404,18 @@ if (! empty($holiday->holiday))
$userstatic->id=$infos_CP['fk_user'];
$userstatic->lastname=$infos_CP['user_lastname'];
$userstatic->firstname=$infos_CP['user_firstname'];
$userstatic->login=$infos_CP['user_login'];
$userstatic->statut=$infos_CP['user_statut'];
$userstatic->photo=$infos_CP['user_photo'];
// Valideur
$approbatorstatic->id=$infos_CP['fk_validator'];
$approbatorstatic->lastname=$infos_CP['validator_lastname'];
$approbatorstatic->firstname=$infos_CP['validator_firstname'];
$approbatorstatic->login=$infos_CP['validator_login'];
$approbatorstatic->statut=$infos_CP['validator_statut'];
$approbatorstatic->photo=$infos_CP['validator_photo'];
$date = $infos_CP['date_create'];
print '<tr '.$bc[$var].'>';
@ -419,8 +425,8 @@ if (! empty($holiday->holiday))
print $holidaystatic->getNomUrl(1);
print '</td>';
print '<td style="text-align: center;">'.dol_print_date($date,'day').'</td>';
print '<td>'.$userstatic->getNomUrl('1', 'leave').'</td>';
print '<td>'.$approbatorstatic->getNomUrl('1').'</td>';
print '<td>'.$userstatic->getNomUrl(-1, 'leave').'</td>';
print '<td>'.$approbatorstatic->getNomUrl(-1).'</td>';
print '<td>';
$label=$alltypeleaves[$infos_CP['fk_type']]['label'];
print $label?$label:$infos_CP['fk_type'];

View File

@ -100,8 +100,8 @@ foreach($cp->logs as $logs_CP)
print '<tr '.$bc[$var].'>';
print '<td>'.$logs_CP['rowid'].'</td>';
print '<td style="text-align: center;">'.$logs_CP['date_action'].'</td>';
print '<td>'.$user_action->getNomUrl(1).'</td>';
print '<td>'.$user_update->getNomUrl(1).'</td>';
print '<td>'.$user_action->getNomUrl(-1).'</td>';
print '<td>'.$user_update->getNomUrl(-1).'</td>';
print '<td>'.$logs_CP['type_action'].'</td>';
print '<td>';
$label=$alltypeleaves[$logs_CP['fk_type']]['label'];

View File

@ -110,7 +110,8 @@ if ($result)
$establishmentstatic->id=$obj->rowid;
$establishmentstatic->name=$obj->name;
$establishmentstatic->status=$obj->status;
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$establishmentstatic->getNomUrl(1).'</td>';
@ -119,7 +120,7 @@ if ($result)
print '<td align="left">'.$obj->town.'</td>';
print '<td align="right">';
print $establishmenttmp->getLibStatus(5);
print $establishmentstatic->getLibStatus(5);
print '</td>';
print "</tr>\n";

View File

@ -58,8 +58,8 @@ class Establishment extends CommonObject
{
$this->db = $db;
$this->statuts_short = array(0 => 'Opened', 1 => 'Closed');
$this->statuts = array(0 => 'Opened', 1 => 'Closed');
$this->statuts_short = array(0 => 'Closed', 1 => 'Opened');
$this->statuts = array(0 => 'Closed', 1 => 'Opened');
return 1;
}
@ -157,7 +157,7 @@ class Establishment extends CommonObject
$sql .= ", address = '".$this->address."'";
$sql .= ", zip = '".$this->zip."'";
$sql .= ", town = '".$this->town."'";
$sql .= ", fk_country = ".($this->country_id > 0 ? $this->country_id : 'null');
$sql .= ", status = '".$this->status."'";
$sql .= ", fk_user_mod = " . $user->id;
$sql .= " WHERE rowid = ".$this->id;
@ -273,23 +273,23 @@ class Establishment extends CommonObject
}
if ($mode == 2)
{
if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]),'statut4').' '.$langs->trans($this->statuts_short[$status]);
if ($status==1) return img_picto($langs->trans($this->statuts_short[$status]),'statut8').' '.$langs->trans($this->statuts_short[$status]);
if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]),'statut5').' '.$langs->trans($this->statuts_short[$status]);
if ($status==1) return img_picto($langs->trans($this->statuts_short[$status]),'statut4').' '.$langs->trans($this->statuts_short[$status]);
}
if ($mode == 3)
{
if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut4');
if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut8');
if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut5');
if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut4');
}
if ($mode == 4)
{
if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut4').' '.$langs->trans($this->statuts[$status]);
if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut8').' '.$langs->trans($this->statuts[$status]);
if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut5').' '.$langs->trans($this->statuts[$status]);
if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut4').' '.$langs->trans($this->statuts[$status]);
}
if ($mode == 5)
{
if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut4');
if ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut8');
if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut5');
if ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut4');
}
}

View File

@ -40,14 +40,18 @@ $id = GETPOST('id','int');
// List of status
static $tmpstatus2label=array(
'0'=>'OpenEtablishment',
'1'=>'CloseEtablishment'
'0'=>'CloseEtablishment',
'1'=>'OpenEtablishment'
);
$status2label=array('');
foreach ($tmpstatus2label as $key => $val) $status2label[$key]=$langs->trans($val);
$object = new Establishment($db);
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
/*
* Actions
*/
@ -128,12 +132,13 @@ else if ($action == 'update')
$error ++;
}
if (empty($error)) {
if (empty($error))
{
$object->name = GETPOST('name', 'alpha');
$object->address = GETPOST('address', 'alpha');
$object->zip = GETPOST('zipcode', 'alpha');
$object->town = GETPOST('town', 'alpha');
$object->country_id = $_POST["country_id"];
$object->country_id = GETPOST('country_id', 'int');
$object->fk_user_mod = $user->id;
$result = $object->update($user);
@ -373,7 +378,8 @@ else if ($id)
print '</tr>';
// Status
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">'.$object->getLibStatus(4).'</td></tr>';
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">';
print $object->getLibStatus(4).'</td></tr>';
print "</table>";

View File

@ -145,7 +145,7 @@ $langs->load("boxes");
// Last leave requests
if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
{
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, x.rowid, x.rowid as ref, x.fk_type, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.tms as dm, x.statut as status";
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.photo, u.statut, x.rowid, x.rowid as ref, x.fk_type, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.tms as dm, x.statut as status";
$sql.= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE u.rowid = x.fk_user";
$sql.= " AND x.entity = ".$conf->entity;
@ -187,9 +187,12 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
$userstatic->id=$obj->uid;
$userstatic->lastname=$obj->lastname;
$userstatic->firstname=$obj->firstname;
$userstatic->login=$obj->login;
$userstatic->photo=$obj->photo;
$userstatic->statut=$obj->statut;
print '<tr '.$bc[$var].'>';
print '<td>'.$holidaystatic->getNomUrl(1).'</td>';
print '<td>'.$userstatic->getNomUrl(1, 'leave').'</td>';
print '<td>'.$userstatic->getNomUrl(-1, 'leave').'</td>';
print '<td>'.$typeleaves[$obj->fk_type]['label'].'</td>';
$starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning';
@ -218,7 +221,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
// Last expense report (old module)
if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
{
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km, d.fk_statut";
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut, u.photo, d.rowid, d.dated as date, d.tms as dm, d.km, d.fk_statut";
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE u.rowid = d.fk_user";
@ -258,9 +261,12 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
$userstatic->id=$obj->uid;
$userstatic->lastname=$obj->lastname;
$userstatic->firstname=$obj->firstname;
$userstatic->login=$obj->login;
$userstatic->statut=$obj->statut;
$userstatic->photo=$obj->photo;
print '<tr '.$bc[$var].'>';
print '<td>'.$deplacementstatic->getNomUrl(1).'</td>';
print '<td>'.$userstatic->getNomUrl(1).'</td>';
print '<td>'.$userstatic->getNomUrl(-1).'</td>';
print '<td align="right">'.$obj->km.'</td>';
print '<td align="right">'.dol_print_date($db->jdate($obj->dm),'day').'</td>';
print '<td>'.$deplacementstatic->LibStatut($obj->fk_statut,3).'</td>';
@ -282,7 +288,7 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
// Last expense report (new module)
if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire)
{
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ttc, x.fk_statut as status";
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.statut, u.photo, x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ttc, x.fk_statut as status";
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE u.rowid = x.fk_user_author";
@ -322,9 +328,12 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire
$userstatic->id=$obj->uid;
$userstatic->lastname=$obj->lastname;
$userstatic->firstname=$obj->firstname;
$userstatic->login=$obj->login;
$userstatic->statut=$obj->statut;
$userstatic->photo=$obj->photo;
print '<tr '.$bc[$var].'>';
print '<td>'.$expensereportstatic->getNomUrl(1).'</td>';
print '<td>'.$userstatic->getNomUrl(1).'</td>';
print '<td>'.$userstatic->getNomUrl(-1).'</td>';
print '<td align="right">'.price($obj->total_ttc).'</td>';
print '<td align="right">'.dol_print_date($db->jdate($obj->dm),'day').'</td>';
print '<td>'.$expensereportstatic->LibStatut($obj->status,3).'</td>';

View File

@ -540,3 +540,7 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178,
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17804', 'Sociedad Civil', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17805', 'Sociedad Anónima', 1);
-- VMYSQL4.1 ALTER TABLE llx_establishment CHANGE COLUMN fk_user_mod fk_user_mod integer NULL;
-- VPGSQL8.2 ALTER TABLE llx_establishment ALTER COLUMN fk_user_mod DROP NOT NULL;

View File

@ -21,6 +21,7 @@
-- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user);
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
DELETE FROM llx_menu where module='expensereport';
ALTER TABLE llx_user DROP COLUMN phenix_login;
ALTER TABLE llx_user DROP COLUMN phenix_pass;

View File

@ -33,7 +33,7 @@ CREATE TABLE llx_establishment (
profid3 varchar(20),
phone varchar(20),
fk_user_author integer NOT NULL,
fk_user_mod integer NOT NULL,
fk_user_mod integer,
datec datetime NOT NULL,
tms timestamp NOT NULL,
status tinyint DEFAULT 1

View File

@ -1311,8 +1311,6 @@ SyslogFilename=اسم الملف ومسار
YouCanUseDOL_DATA_ROOT=يمكنك استخدام DOL_DATA_ROOT / dolibarr.log لملف الدخول في Dolibarr "وثائق" دليل. يمكنك أن تحدد مسارا مختلفا لتخزين هذا الملف.
ErrorUnknownSyslogConstant=ثابت %s ليس ثابت سيسلوغ معروفة
OnlyWindowsLOG_USER=نوافذ يعتمد فقط LOG_USER
SyslogSentryDSN=ترقب DSN
SyslogSentryFromProject=DSN من مشروع ترقب بك
##### Donations #####
DonationsSetup=وحدة الإعداد للتبرع
DonationsReceiptModel=قالب من استلام التبرع

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Име на файла и пътя
YouCanUseDOL_DATA_ROOT=Можете да използвате DOL_DATA_ROOT / dolibarr.log за лог файл в Dolibarr директория &quot;документи&quot;. Можете да зададете различен път, за да се съхранява този файл.
ErrorUnknownSyslogConstant=Постоянни %s не е известен Syslog постоянно
OnlyWindowsLOG_USER=Windows поддържа само LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Настройка на модул Дарение
DonationsReceiptModel=Шаблон на получаване на дарение

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Nom i ruta de l'arxiu
YouCanUseDOL_DATA_ROOT=Utilitza DOL_DATA_ROOT/dolibarr.log per un fitxer de registre en la carpeta documents de Dolibarr. Tanmateix, es pot definir una carpeta diferent per guardar aquest fitxer.
ErrorUnknownSyslogConstant=La constant %s no és una constant syslog coneguda
OnlyWindowsLOG_USER=Windows només suporta LOG_USER
SyslogSentryDSN=DSN Sentry
SyslogSentryFromProject=DSN del teu projecte Sentry
##### Donations #####
DonationsSetup=Configuració del mòdul donacions
DonationsReceiptModel=Plantilla de rebut de donació

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Název souboru a cesta
YouCanUseDOL_DATA_ROOT=Můžete použít DOL_DATA_ROOT / dolibarr.log pro soubor protokolu Dolibarr &quot;Dokumenty&quot; adresáře. Můžete nastavit jinou cestu k uložení tohoto souboru.
ErrorUnknownSyslogConstant=Konstantní %s není známo, Syslog konstantní
OnlyWindowsLOG_USER=Windows podporuje pouze LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Darování modul nastavení
DonationsReceiptModel=Vzor darovací přijetí

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Filnavn og sti
YouCanUseDOL_DATA_ROOT=Du kan bruge DOL_DATA_ROOT / dolibarr.log for en logfil i Dolibarr "dokumenter" mappen. Du kan indstille en anden vej til at gemme denne fil.
ErrorUnknownSyslogConstant=Konstant %s er ikke en kendt syslog konstant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation modul opsætning
DonationsReceiptModel=Skabelon for donationen modtagelse

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Dateiname und-pfad
YouCanUseDOL_DATA_ROOT=Sie können DOL_DATA_ROOT/dolibarr.log als Protokolldatei in Ihrem Dokumentenverzeichnis verwenden. Bei Bedarf können Sie auch den Pfad der Datei anpassen.
ErrorUnknownSyslogConstant=Konstante %s ist nicht als Protokoll-Konstante definiert
OnlyWindowsLOG_USER=Windows unterstützt nur LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN Ihres Sentry Projekts
##### Donations #####
DonationsSetup=Spendenmoduleinstellungen
DonationsReceiptModel=Vorlage für Spendenquittungen

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1041,9 +1041,13 @@ TranslationSetup=Setup of translation
TranslationKeySearch=Search a translation key or string
TranslationOverwriteKey=Overwrite a translation string
TranslationDesc=How to set displayed application language :<br>* Systemwide: menu <strong>Home - Setup - Display</strong><br>* Per user: <strong>User display setup</strong> tab of user card (click on username at the top of the screen).
TranslationOverwriteDesc=You can also override strings filling the following table. Choose your language from "%s" dropdown, insert the key string found in the lang file (langs/xx_XX/somefile.lang) into "%s" and your new translation into "%s".
TranslationOverwriteDesc=You can also override strings filling the following table. Choose your language from "%s" dropdown, insert the translation key string into "%s" and your new translation into "%s"
TranslationOverwriteDesc2=You can use the other tab to help you know translation key to use
TranslationString=Translation string
CurrentTranslationString=Current translation string
WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least for key or translation string
NewTranslationStringToShow=New translation string to show
OriginalValueWas=The original translation is overwritten. Original value was:<br><br>%s
TotalNumberOfActivatedModules=Total number of activated feature modules: <b>%s</b> / <b>%s</b>
YouMustEnableOneModule=You must at least enable 1 module
ClassNotFoundIntoPathWarning=Class %s not found into PHP path
@ -1323,8 +1327,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -38,7 +38,7 @@ BoxMyLastBookmarks=My latest %s bookmarks
BoxOldestExpiredServices=Oldest active expired services
BoxLastExpiredServices=Latest %s oldest contacts with active expired services
BoxTitleLastActionsToDo=Latest %s actions to do
BoxTitleLastContracts=Latest %s contracts
BoxTitleLastContracts=Latest %s modified contracts
BoxTitleLastModifiedDonations=Latest %s modified donations
BoxTitleLastModifiedExpenses=Latest %s modified expense reports
BoxGlobalActivity=Global activity (invoices, proposals, orders)

View File

@ -174,6 +174,7 @@ ErrorStockIsNotEnoughToAddProductOnOrder=Stock is not enougth for product %s to
ErrorStockIsNotEnoughToAddProductOnInvoice=Stock is not enougth for product %s to add it into a new invoice.
ErrorStockIsNotEnoughToAddProductOnShipment=Stock is not enougth for product %s to add it into a new shipment.
ErrorStockIsNotEnoughToAddProductOnProposal=Stock is not enougth for product %s to add it into a new proposal.
ErrorFailedToLoadLoginFileForMode=Failed to get the login file for mode '%s'.
# Warnings
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Nombre y ruta del archivo
YouCanUseDOL_DATA_ROOT=Puede utilizar DOL_DATA_ROOT/dolibarr.log para un registro en el directorio "documentos" de Dolibarr. Sin embargo, puede establecer un directorio diferente para guardar este archivo.
ErrorUnknownSyslogConstant=La constante %s no es una constante syslog conocida
OnlyWindowsLOG_USER=Windows sólo soporta LOG_USER
SyslogSentryDSN=DSN Sentry
SyslogSentryFromProject=DSN de su proyecto Sentry
##### Donations #####
DonationsSetup=Configuración del módulo donaciones
DonationsReceiptModel=Modelo recepción de donaciones

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Faili nimi ja rada
YouCanUseDOL_DATA_ROOT=Võid kasutada DOL_DATA_ROOT/dolibarr.log Dolibarri "documents" kausta faili salvestamiseks, aga logifaili salvestamiseks võib ka mõnda muud rada kasutada.
ErrorUnknownSyslogConstant=Konstant %s ei ole tuntud Syslogi konstant
OnlyWindowsLOG_USER=Windows toetab vaid LOG_USER direktiivi
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Annetuste mooduli seadistamine
DonationsReceiptModel=Annetuse kviitungi mall

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Fitxategiaren izena eta kokapena
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=%s konstantea ez da Syslog-eko konstante ezaguna
OnlyWindowsLOG_USER=Windows-ek LOG_USER soilik jasaten du
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=نام فایل و مسیر
YouCanUseDOL_DATA_ROOT=شما می توانید DOL_DATA_ROOT / dolibarr.log برای یک فایل در "اسناد" Dolibarr دایرکتوری استفاده کنید. شما می توانید راه های مختلفی را برای ذخیره این فایل را.
ErrorUnknownSyslogConstant=٪ ثابت است ثابت های Syslog شناخته نشده است
OnlyWindowsLOG_USER=ویندوز تنها پشتیبانی از LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=راه اندازی ماژول کمک مالی
DonationsReceiptModel=الگو از دریافت کمک مالی

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Tiedoston nimi ja polku
YouCanUseDOL_DATA_ROOT=Voit käyttää DOL_DATA_ROOT / dolibarr.log varten lokitiedoston Dolibarr "asiakirjoihin" hakemistoon. Voit valita eri reitin tallentaa tiedoston.
ErrorUnknownSyslogConstant=Constant %s ei ole tunnettu syslog vakio
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Lahjoitus-moduulin asetukset
DonationsReceiptModel=Malline lahjoituksen vastaanottamisesta

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Nom et chemin du fichier
YouCanUseDOL_DATA_ROOT=Vous pouvez utiliser DOL_DATA_ROOT/dolibarr.log pour un journal dans le répertoire "documents" de Dolibarr. Vous pouvez néanmoins définir un chemin différent pour stocker ce fichier.
ErrorUnknownSyslogConstant=La constante %s n'est pas une constante syslog connue
OnlyWindowsLOG_USER=Windows ne prend en charge que LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN de votre projet Sentry
##### Donations #####
DonationsSetup=Configuration du module Dons
DonationsReceiptModel=Modèles de reçu de dons

View File

@ -1311,8 +1311,6 @@ SyslogFilename=שם קובץ ונתיב
YouCanUseDOL_DATA_ROOT=ניתן להשתמש DOL_DATA_ROOT / dolibarr.log עבור קובץ יומן בספרייה Dolibarr &quot;מסמכים&quot;. ניתן להגדיר בדרך אחרת כדי לאחסן קובץ זה.
ErrorUnknownSyslogConstant=%s קבועים אינו ידוע Syslog מתמיד
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=מודול תרומה ההתקנה
DonationsReceiptModel=תבנית של קבלת תרומה

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=A fájl nevét és elérési útvonalát
YouCanUseDOL_DATA_ROOT=Használhatja DOL_DATA_ROOT / dolibarr.log egy log fájlt Dolibarr &quot;Dokumentumok&quot; mappa. Beállíthatjuk, más utat kell tárolni ezt a fájlt.
ErrorUnknownSyslogConstant=Constant %s nem ismert Syslog állandó
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Adomány modul beállítása
DonationsReceiptModel=Sablon az adomány átvételét

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Skráarnafn og slóði
YouCanUseDOL_DATA_ROOT=Þú getur notað DOL_DATA_ROOT / dolibarr.log fyrir annálinn í Dolibarr "skjöl" skrá. Þú getur stillt mismunandi leið til að geyma þessa skrá.
ErrorUnknownSyslogConstant=Constant %s er ekki þekktur skrifað fasti
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Safnast mát skipulag
DonationsReceiptModel=Snið af málefnið berst

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Nome file e percorso
YouCanUseDOL_DATA_ROOT=È possibile utilizzare DOL_DATA_ROOT/dolibarr.log come file di log per la directory "documenti". È anche possibile impostare un percorso diverso per tale file.
ErrorUnknownSyslogConstant=La costante %s è sconosciuta a syslog.
OnlyWindowsLOG_USER=Solo utenti Windows supportano LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Impostazioni modulo donazioni
DonationsReceiptModel=Modello di ricevuta per donazioni

View File

@ -1311,8 +1311,6 @@ SyslogFilename=ファイル名とパス
YouCanUseDOL_DATA_ROOT=あなたがDolibarr &quot;ドキュメント&quot;ディレクトリ内のログ·ファイルのDOL_DATA_ROOT / dolibarr.logを使用することができます。このファイルを格納する別のパスを設定することができます。
ErrorUnknownSyslogConstant=定数%sは知られているSyslogの定数ではありません。
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=寄付モジュールのセットアップ
DonationsReceiptModel=寄付金の領収書のテンプレート

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Failo pavadinimas ir kelias
YouCanUseDOL_DATA_ROOT=Galite naudoti DOL_DATA_ROOT/dolibarr.log prisijungimo failui Dolibarr "dokuments" kataloge. Galite nustatyti kitokį kelią šio failo saugojimui.
ErrorUnknownSyslogConstant=Konstanta %s yra nežinoma Syslog konstanta
OnlyWindowsLOG_USER=Windows palaiko tik LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Aukų modulio nuostatos
DonationsReceiptModel=Aukų įplaukų šablonas

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Faila nosaukums un ceļš
YouCanUseDOL_DATA_ROOT=Jūs varat izmantot DOL_DATA_ROOT / dolibarr.log uz log failu Dolibarr "dokumenti" direktorijā. Jūs varat iestatīt citu ceļu, lai saglabātu šo failu.
ErrorUnknownSyslogConstant=Constant %s nav zināms Syslog konstante
OnlyWindowsLOG_USER=Windows atbalsta tikai LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Ziedojumu moduļa uzstādīšana
DonationsReceiptModel=Veidne ziedojuma saņemšanu

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Filnavn og bane
YouCanUseDOL_DATA_ROOT=Du kan bruke DOL_DATA_ROOT / dolibarr.log som loggfil i Dolibarr "dokumenter"-mappen. Du kan angi en annen bane for å lagre denne filen.
ErrorUnknownSyslogConstant=Konstant %s er ikke en kjent syslog-konstant
OnlyWindowsLOG_USER=Windows støtter bare LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN fra ditt Sentry-prosjekt
##### Donations #####
DonationsSetup=Oppsett av Donasjonsmodulen
DonationsReceiptModel=Mal for donasjonskvittering

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Bestandsnaam en -pad
YouCanUseDOL_DATA_ROOT=U kunt DOL_DATA_ROOT/dolibarr.log gebruiken voor een logbestand in de Dolibarr "documenten"-map. U kunt ook een ander pad gebruiken om dit bestand op te slaan.
ErrorUnknownSyslogConstant=Constante %s is geen bekende 'syslog' constante
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donatiemoduleinstellingen
DonationsReceiptModel=Sjabloon van donatie-ontvangst

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Nazwa pliku i ścieżka
YouCanUseDOL_DATA_ROOT=Możesz użyć DOL_DATA_ROOT / dolibarr.log do pliku w Dolibarr "dokumenty" katalogu. Można ustawić inną ścieżkę do przechowywania tego pliku.
ErrorUnknownSyslogConstant=Stała %s nie jest znany syslog stałej
OnlyWindowsLOG_USER=System Windows obsługuje tylko LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Darowizna konfiguracji modułu
DonationsReceiptModel=Szablon otrzymania wpłaty

View File

@ -1011,7 +1011,6 @@ SyslogFilename=Nome do arquivo e caminho
YouCanUseDOL_DATA_ROOT=Você pode usar DOL_DATA_ROOT/dolibarr.log para um arquivo de log no diretório dos "documentos" do Dolibarr.
ErrorUnknownSyslogConstant=A Constante %s não é conhecida pelas constantes do Syslog
OnlyWindowsLOG_USER=Somente Windows suporta LOG_USER
SyslogSentryFromProject=DSN do seu projeto Sentry
DonationsSetup=Configurações do módulo de doações
DonationsReceiptModel=Templates de recibos de doação
BarcodeSetup=Configurações de código de barras

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Nome e caminho do Ficheiro
YouCanUseDOL_DATA_ROOT=Pode utilizar DOL_DATA_ROOT/dolibarr.log para um log na pasta 'documentos' de Dolibarr.
ErrorUnknownSyslogConstant=A constante %s não é uma constante syslog conhecida
OnlyWindowsLOG_USER=O Windows suporta apenas LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Configuração do módulo Bolsas
DonationsReceiptModel=Modelo de recibo de doação

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Nume fişier şi calea
YouCanUseDOL_DATA_ROOT=Puteţi folosi DOL_DATA_ROOT / dolibarr.log pentru un fişier de log în Dolibarr "Documente" director. Aveţi posibilitatea să setaţi o altă cale de a păstra acest fişier.
ErrorUnknownSyslogConstant=Constant %s nu este un cunoscut syslog constant
OnlyWindowsLOG_USER=Windows suportă numai LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donatii modul de configurare
DonationsReceiptModel=Format de donatie la primirea

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Имя файла и путь
YouCanUseDOL_DATA_ROOT=Вы можете использовать DOL_DATA_ROOT / dolibarr.log в лог-файл в Dolibarr "документы" каталог. Вы можете установить различные пути для хранения этого файла.
ErrorUnknownSyslogConstant=Постоянная %s не известны журнала постоянная
OnlyWindowsLOG_USER=Windows&copy; поддерживает только LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Пожертвования модуль настройки
DonationsReceiptModel=Шаблон дарения получения

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Názov súboru a cesta
YouCanUseDOL_DATA_ROOT=Môžete použiť DOL_DATA_ROOT / dolibarr.log pre súbor denníka Dolibarr &quot;Dokumenty&quot; adresára. Môžete nastaviť inú cestu na uloženie tohto súboru.
ErrorUnknownSyslogConstant=Konštantná %s nie je známe, Syslog konštantný
OnlyWindowsLOG_USER=Windows podporuje iba LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Darovanie modul nastavenia
DonationsReceiptModel=Vzor darovacej prijatie

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Ime datoteke in pot
YouCanUseDOL_DATA_ROOT=Za log datoteko v Dolibarr dokumentni mapi lahko uporabite DOL_DATA_ROOT/dolibarr.log. Za shranjevanje te datoteke lahko nastavite tudi drugačno pot.
ErrorUnknownSyslogConstant=Konstanta %s ni znana syslog konstanta
OnlyWindowsLOG_USER=Windowsi podpirajo samo LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Nastanitev modula za donacije
DonationsReceiptModel=Predloga računa za donacijo

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN iz Vašeg Sentry projekta
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Filnamn och sökväg
YouCanUseDOL_DATA_ROOT=Du kan använda DOL_DATA_ROOT / dolibarr.log för en loggfil i Dolibarr &quot;dokument&quot; katalogen. Du kan ställa in en annan väg för att lagra den här filen.
ErrorUnknownSyslogConstant=Konstant %s är inte en känd syslog konstant
OnlyWindowsLOG_USER=Endast Windows stöder LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation modul setup
DonationsReceiptModel=Mall för donation kvitto

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=ชื่อแฟ้มและเส้นทาง
YouCanUseDOL_DATA_ROOT=คุณสามารถใช้ DOL_DATA_ROOT / dolibarr.log สำหรับล็อกไฟล์ใน Dolibarr "เอกสาร" ไดเรกทอรี คุณสามารถตั้งค่าเส้นทางที่แตกต่างกันในการจัดเก็บไฟล์นี้
ErrorUnknownSyslogConstant=% s คงไม่ได้เป็นที่รู้จักกันอย่างต่อเนื่อง Syslog
OnlyWindowsLOG_USER=Windows เท่านั้นสนับสนุน LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=บริจาคการติดตั้งโมดูล
DonationsReceiptModel=แม่แบบที่ได้รับการบริจาค

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Dosya adı ve yolu
YouCanUseDOL_DATA_ROOT=Dolibarrdaki “belgeler” dizinindeki bir log (günlük) dosyası için DOL_DATA_ROOT/dolibarr.log u kullanabilirsiniz. Bu dosyayı saklamak için farklı bir yol (path) kullanabilirsiniz.
ErrorUnknownSyslogConstant=%s Değişmezi bilinen bir Syslog değişmezi değildir
OnlyWindowsLOG_USER=Windows yalnızca LOG_USER'ı destekler
SyslogSentryDSN=Nöbetçi DSN
SyslogSentryFromProject=Nöbetçi projenizdeki DSN
##### Donations #####
DonationsSetup=Bağış modülü kurulumu
DonationsReceiptModel=Bağış makbuzu şablonu

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Donation module setup
DonationsReceiptModel=Template of donation receipt

View File

@ -1311,8 +1311,6 @@ SyslogFilename=Tên tập tin và đường dẫn
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=Cài đặt module Tài trợ
DonationsReceiptModel=Mẫu biên nhận Tài trợ

View File

@ -1311,8 +1311,6 @@ SyslogFilename=文件名称和路径
YouCanUseDOL_DATA_ROOT=您可以使用 DOL_DATA_ROOT/dolibarr.log 来表示“documents”目录下的日志文件。您可以设置不同的路径来保存此文件。
ErrorUnknownSyslogConstant=常量 %s 不是已知的 Syslog 常数
OnlyWindowsLOG_USER=Windows 仅支持 LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=捐赠模块设置
DonationsReceiptModel=捐赠收据模板

View File

@ -1311,8 +1311,6 @@ SyslogFilename=文件名稱和路徑
YouCanUseDOL_DATA_ROOT=你可以使用DOL_DATA_ROOT /可在Dolibarr日誌文件dolibarr.log“文件”目錄。你可以設置一個不同的路徑來存儲該文件。
ErrorUnknownSyslogConstant=恆%s不是一個已知的syslog常數
OnlyWindowsLOG_USER=Windows only supports LOG_USER
SyslogSentryDSN=Sentry DSN
SyslogSentryFromProject=DSN from your Sentry project
##### Donations #####
DonationsSetup=捐贈模組設置
DonationsReceiptModel=模板的捐贈收據

View File

@ -1293,16 +1293,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print '<script type="text/javascript" src="'.$pathckeditor.$jsckeditor.($ext?'?'.$ext:'').'"></script>'."\n";
}
// Raven.js for client-side Sentry logging support
if (array_key_exists('mod_syslog_sentry', $conf->loghandlers)) {
print '<!-- Includes Raven.js for Sentry -->' . "\n";
print '<script src="' . DOL_URL_ROOT . '/includes/raven-js/dist/raven.min.js"></script>' . "\n";
print '<script src="' . DOL_URL_ROOT . '/includes/raven-js/plugins/native.js"></script>' . "\n";
if (! defined('DISABLE_JQUERY')) {
print '<script src="' . DOL_URL_ROOT . '/includes/raven-js/plugins/jquery.js"></script>' . "\n";
}
}
// Global js function
print '<!-- Includes JS of Dolibarr -->'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?version='.urlencode(DOL_VERSION).($ext?'&amp;'.$ext:'').'"></script>'."\n";
@ -1388,23 +1378,6 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
print '<body id="mainbody">' . "\n";
if ($conf->use_javascript_ajax)
{
// Raven.js for client-side Sentry logging support
if (array_key_exists('mod_syslog_sentry', $conf->loghandlers) && ! empty($conf->global->SYSLOG_SENTRY_DSN))
{
// Filter out secret key
$dsn = parse_url($conf->global->SYSLOG_SENTRY_DSN);
$public_dsn = $dsn['scheme'] . '://' . $dsn['user'] .'@' . $dsn['host'] . $dsn['path'];
print '<script type="text/javascript">' . "\n";
print "Raven.config('" . $public_dsn . "').install()\n";
print "Raven.setUserContext({username: '" . $user->login . "'})\n";
print "Raven.setTagsContext({version: '" . DOL_VERSION . "'})\n";
print "</script>\n";
}
}
/*
* Top menu
*/

View File

@ -926,7 +926,7 @@ class Product extends CommonObject
// Delete all child tables
if (! $error)
{
$elements = array('product_fournisseur_price','product_price','product_lang','categorie_product','product_stock','product_customer_price');
$elements = array('product_fournisseur_price','product_price','product_lang','categorie_product','product_stock','product_customer_price','product_lot');
foreach($elements as $table)
{
if (! $error)

View File

@ -74,8 +74,6 @@ llxHeader('', $title, $helpurl);
$form=new Form($b);
llxHeader('', $title, $help_url);
if ($id > 0 || $ref)
{
$result = $object->fetch($id,$ref);

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